Gate: 5 Node basic gate

This PS adds a 5 node basic gate for OSH, using the same format as the
dev-deploy guide. Follow on commits will:
 * Remove redundant gate scripts
 * Add documentation, in the same format as the AIO guide
 * Add all remaining services in OSH
 * Enable Helm test for all services

Change-Id: I7b72dc4777e88cae2b8a4d842c41a17a526079a2
Depends-On: Ie9b23174fade3df4a87f2b771ea654e2081b4f4e
This commit is contained in:
Pete Birley 2018-01-08 09:01:51 -06:00
parent 52c98d9c46
commit 0f86dbdc27
39 changed files with 752 additions and 137 deletions

View File

@ -16,22 +16,25 @@
name: openstack/openstack-helm name: openstack/openstack-helm
check: check:
jobs: jobs:
- openstack-helm-linter: - openstack-helm-linter
voting: true
- openstack-helm-dev-deploy: - openstack-helm-dev-deploy:
voting: true
irrelevant-files: irrelevant-files:
- ^.*\.rst$ - ^.*\.rst$
- ^doc/.*$ - ^doc/.*$
- ^releasenotes/.*$ - ^releasenotes/.*$
- openstack-helm-legacy-ubuntu-vm-ovs-radosgw: - openstack-helm-multinode-ubuntu:
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- ^releasenotes/.*$
#NOTE(portdirect): Voting disabled until ipcalc package issue resolved.
- openstack-helm-multinode-centos:
voting: false voting: false
irrelevant-files: irrelevant-files:
- ^.*\.rst$ - ^.*\.rst$
- ^doc/.*$ - ^doc/.*$
- ^releasenotes/.*$ - ^releasenotes/.*$
- openstack-helm-legacy-ubuntu-vm-lb-radosgw: - openstack-helm-multinode-fedora:
voting: false
irrelevant-files: irrelevant-files:
- ^.*\.rst$ - ^.*\.rst$
- ^doc/.*$ - ^doc/.*$
@ -40,6 +43,9 @@
jobs: jobs:
- openstack-helm-linter - openstack-helm-linter
- openstack-helm-dev-deploy - openstack-helm-dev-deploy
- openstack-helm-multinode-ubuntu
# - openstack-helm-multinode-centos
- openstack-helm-multinode-fedora
- job: - job:
name: openstack-helm-linter name: openstack-helm-linter
@ -63,29 +69,28 @@
timeout: 7200 timeout: 7200
vars: vars:
zuul_osh_infra_relative_path: ../openstack-helm-infra/ zuul_osh_infra_relative_path: ../openstack-helm-infra/
name: openstack-helm-legacy name: openstack-helm-multinode
pre-run: pre-run:
- ../openstack-helm-infra/tools/gate/playbooks/osh-infra-upgrade-host.yaml - ../openstack-helm-infra/tools/gate/playbooks/osh-infra-upgrade-host.yaml
- ../openstack-helm-infra/tools/gate/playbooks/osh-infra-deploy-docker.yaml - ../openstack-helm-infra/tools/gate/playbooks/osh-infra-deploy-docker.yaml
- ../openstack-helm-infra/tools/gate/playbooks/osh-infra-build.yaml - ../openstack-helm-infra/tools/gate/playbooks/osh-infra-build.yaml
- ../openstack-helm-infra/tools/gate/playbooks/osh-infra-deploy-k8s.yaml - ../openstack-helm-infra/tools/gate/playbooks/osh-infra-deploy-k8s.yaml
run: tools/gate/playbooks/legacy-gate-runner.yaml run: tools/gate/playbooks/multinode-deploy.yaml
post-run: ../openstack-helm-infra/tools/gate/playbooks/osh-infra-collect-logs.yaml post-run: ../openstack-helm-infra/tools/gate/playbooks/osh-infra-collect-logs.yaml
required-projects: required-projects:
- openstack/openstack-helm-infra - openstack/openstack-helm-infra
- job: - job:
name: openstack-helm-legacy-ubuntu-vm-ovs-radosgw name: openstack-helm-multinode-ubuntu
parent: openstack-helm-legacy parent: openstack-helm-multinode
vars: nodeset: openstack-helm-five-node-ubuntu
sdn_plugin: ovs
glance_backend: radosgw
nodeset: openstack-helm-ubuntu
- job: - job:
name: openstack-helm-legacy-ubuntu-vm-lb-radosgw name: openstack-helm-multinode-centos
parent: openstack-helm-legacy parent: openstack-helm-multinode
vars: nodeset: openstack-helm-five-node-centos
sdn_plugin: linuxbridge
glance_backend: radosgw - job:
nodeset: openstack-helm-ubuntu name: openstack-helm-multinode-fedora
parent: openstack-helm-multinode
nodeset: openstack-helm-five-node-fedora

View File

@ -0,0 +1,28 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
set -xe
#NOTE: Deploy command
helm install ./ingress \
--namespace=openstack \
--name=ingress
#NOTE: Wait for deploy
./tools/deployment/common/wait-for-pods.sh openstack
#NOTE: Display info
helm status ingress

View File

@ -0,0 +1,28 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
set -xe
#NOTE: Deploy command
helm install ./memcached \
--namespace=openstack \
--name=memcached
#NOTE: Wait for deploy
./tools/deployment/common/wait-for-pods.sh openstack
#NOTE: Validate Deployment info
helm status memcached

View File

@ -0,0 +1,38 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
set -xe
sudo -H -E pip install python-openstackclient python-heatclient
sudo -H mkdir -p /etc/openstack
cat << EOF | sudo -H tee -a /etc/openstack/clouds.yaml
clouds:
openstack_helm:
region_name: RegionOne
identity_api_version: 3
auth:
username: 'admin'
password: 'password'
project_name: 'admin'
project_domain_name: 'default'
user_domain_name: 'default'
auth_url: 'http://keystone.openstack.svc.cluster.local/v3'
EOF
sudo -H chown -R $(id -un): /etc/openstack
#NOTE: Build charts
make all

View File

@ -16,12 +16,12 @@
set -e set -e
# From Kolla-Kubernetes, orginal authors Kevin Fox & Serguei Bezverkhi # From Kolla-Kubernetes, orginal authors Kevin Fox & Serguei Bezverkhi
# Default wait timeout is 300 seconds # Default wait timeout is 600 seconds
end=$(date +%s) end=$(date +%s)
if ! [ -z $2 ]; then if ! [ -z $2 ]; then
end=$((end + $2)) end=$((end + $2))
else else
end=$((end + 300)) end=$((end + 600))
fi fi
while true; do while true; do
kubectl get pods --namespace=$1 -o json | jq -r \ kubectl get pods --namespace=$1 -o json | jq -r \

View File

@ -1,38 +0,0 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
set -xe
sudo -H -E pip install python-openstackclient python-heatclient
sudo -H mkdir -p /etc/openstack
cat << EOF | sudo -H tee -a /etc/openstack/clouds.yaml
clouds:
openstack_helm:
region_name: RegionOne
identity_api_version: 3
auth:
username: 'admin'
password: 'password'
project_name: 'admin'
project_domain_name: 'default'
user_domain_name: 'default'
auth_url: 'http://keystone.openstack.svc.cluster.local/v3'
EOF
sudo -H chown -R $(id -un): /etc/openstack
#NOTE: Build charts
make all

View File

@ -0,0 +1 @@
../common/setup-client.sh

View File

@ -1,31 +0,0 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
set -xe
#NOTE: Pull images and lint chart
make pull-images ingress
#NOTE: Deploy command
helm install ./ingress \
--namespace=openstack \
--name=ingress
#NOTE: Wait for deploy
./tools/deployment/developer/wait-for-pods.sh openstack
#NOTE: Display info
helm status ingress

View File

@ -0,0 +1 @@
../common/ingress.sh

View File

@ -38,7 +38,7 @@ helm install --namespace=ceph ${WORK_DIR}/ceph --name=ceph \
--values=${WORK_DIR}/tools/overrides/mvp/ceph.yaml --values=${WORK_DIR}/tools/overrides/mvp/ceph.yaml
#NOTE: Wait for deploy #NOTE: Wait for deploy
./tools/deployment/developer/wait-for-pods.sh ceph ./tools/deployment/common/wait-for-pods.sh ceph
#NOTE: Validate deploy #NOTE: Validate deploy
MON_POD=$(kubectl get pods \ MON_POD=$(kubectl get pods \

View File

@ -37,7 +37,7 @@ helm install --namespace=openstack ${WORK_DIR}/ceph --name=ceph-openstack-config
--values=${WORK_DIR}/tools/overrides/mvp/ceph.yaml --values=${WORK_DIR}/tools/overrides/mvp/ceph.yaml
#NOTE: Wait for deploy #NOTE: Wait for deploy
./tools/deployment/developer/wait-for-pods.sh openstack ./tools/deployment/common/wait-for-pods.sh openstack
#NOTE: Validate Deployment info #NOTE: Validate Deployment info
kubectl get -n openstack jobs --show-all kubectl get -n openstack jobs --show-all

View File

@ -26,7 +26,7 @@ helm install ./mariadb \
--set pod.replicas.server=1 --set pod.replicas.server=1
#NOTE: Wait for deploy #NOTE: Wait for deploy
./tools/deployment/developer/wait-for-pods.sh openstack 600 ./tools/deployment/common/wait-for-pods.sh openstack
#NOTE: Validate Deployment info #NOTE: Validate Deployment info
helm status mariadb helm status mariadb

View File

@ -25,7 +25,7 @@ helm install ./rabbitmq \
--name=rabbitmq --name=rabbitmq
#NOTE: Wait for deploy #NOTE: Wait for deploy
./tools/deployment/developer/wait-for-pods.sh openstack ./tools/deployment/common/wait-for-pods.sh openstack
#NOTE: Validate Deployment info #NOTE: Validate Deployment info
helm status rabbitmq helm status rabbitmq

View File

@ -1,31 +0,0 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
set -xe
#NOTE: Pull images and lint chart
make pull-images memcached
#NOTE: Deploy command
helm install ./memcached \
--namespace=openstack \
--name=memcached
#NOTE: Wait for deploy
./tools/deployment/developer/wait-for-pods.sh openstack
#NOTE: Validate Deployment info
helm status memcached

View File

@ -0,0 +1 @@
../common/memcached.sh

View File

@ -25,7 +25,7 @@ helm install ./keystone \
--name=keystone --name=keystone
#NOTE: Wait for deploy #NOTE: Wait for deploy
./tools/deployment/developer/wait-for-pods.sh openstack ./tools/deployment/common/wait-for-pods.sh openstack
#NOTE: Validate Deployment info #NOTE: Validate Deployment info
helm status keystone helm status keystone

View File

@ -37,7 +37,7 @@ helm install --namespace=openstack ${WORK_DIR}/ceph --name=radosgw-openstack \
--values=${WORK_DIR}/tools/overrides/mvp/ceph.yaml --values=${WORK_DIR}/tools/overrides/mvp/ceph.yaml
#NOTE: Wait for deploy #NOTE: Wait for deploy
./tools/deployment/developer/wait-for-pods.sh openstack ./tools/deployment/common/wait-for-pods.sh openstack
#NOTE: Validate Deployment info #NOTE: Validate Deployment info
helm status radosgw-openstack helm status radosgw-openstack

View File

@ -27,7 +27,7 @@ helm install ./horizon \
--set network.node_port.port=31000 --set network.node_port.port=31000
#NOTE: Wait for deploy #NOTE: Wait for deploy
./tools/deployment/developer/wait-for-pods.sh openstack ./tools/deployment/common/wait-for-pods.sh openstack
#NOTE: Validate Deployment info #NOTE: Validate Deployment info
helm status horizon helm status horizon

View File

@ -27,7 +27,7 @@ helm install ./glance \
--set storage=${GLANCE_BACKEND} --set storage=${GLANCE_BACKEND}
#NOTE: Wait for deploy #NOTE: Wait for deploy
./tools/deployment/developer/wait-for-pods.sh openstack 600 ./tools/deployment/common/wait-for-pods.sh openstack
#NOTE: Validate Deployment info #NOTE: Validate Deployment info
helm status glance helm status glance

View File

@ -24,7 +24,7 @@ helm install ./openvswitch \
--name=openvswitch --name=openvswitch
#NOTE: Wait for deploy #NOTE: Wait for deploy
./tools/deployment/developer/wait-for-pods.sh openstack ./tools/deployment/common/wait-for-pods.sh openstack
#NOTE: Validate Deployment info #NOTE: Validate Deployment info
helm status openvswitch helm status openvswitch

View File

@ -24,7 +24,7 @@ helm install ./libvirt \
--name=libvirt --name=libvirt
#NOTE: Wait for deploy #NOTE: Wait for deploy
./tools/deployment/developer/wait-for-pods.sh openstack ./tools/deployment/common/wait-for-pods.sh openstack
#NOTE: Validate Deployment info #NOTE: Validate Deployment info
helm status libvirt helm status libvirt

View File

@ -40,7 +40,7 @@ helm install ./neutron \
--values=./tools/overrides/mvp/neutron-ovs.yaml --values=./tools/overrides/mvp/neutron-ovs.yaml
#NOTE: Wait for deploy #NOTE: Wait for deploy
./tools/deployment/developer/wait-for-pods.sh openstack ./tools/deployment/common/wait-for-pods.sh openstack
#NOTE: Validate Deployment info #NOTE: Validate Deployment info
export OS_CLOUD=openstack_helm export OS_CLOUD=openstack_helm

View File

@ -24,7 +24,7 @@ helm install ./cinder \
--name=cinder --name=cinder
#NOTE: Wait for deploy #NOTE: Wait for deploy
./tools/deployment/developer/wait-for-pods.sh openstack ./tools/deployment/common/wait-for-pods.sh openstack
#NOTE: Validate Deployment info #NOTE: Validate Deployment info
export OS_CLOUD=openstack_helm export OS_CLOUD=openstack_helm

View File

@ -24,7 +24,7 @@ helm install ./heat \
--name=heat --name=heat
#NOTE: Wait for deploy #NOTE: Wait for deploy
./tools/deployment/developer/wait-for-pods.sh openstack ./tools/deployment/common/wait-for-pods.sh openstack
#NOTE: Validate Deployment info #NOTE: Validate Deployment info
export OS_CLOUD=openstack_helm export OS_CLOUD=openstack_helm

View File

@ -74,13 +74,13 @@ FLOATING_IP=$(openstack floating ip show \
-f value -c floating_ip_address) -f value -c floating_ip_address)
function wait_for_ssh_port { function wait_for_ssh_port {
# Default wait timeout is 180 seconds # Default wait timeout is 300 seconds
set +x set +x
end=$(date +%s) end=$(date +%s)
if ! [ -z $2 ]; then if ! [ -z $2 ]; then
end=$((end + $2)) end=$((end + $2))
else else
end=$((end + 180)) end=$((end + 300))
fi fi
while true; do while true; do
# Use Nmap as its the same on Ubuntu and RHEL family distros # Use Nmap as its the same on Ubuntu and RHEL family distros

View File

@ -0,0 +1 @@
../common/setup-client.sh

View File

@ -0,0 +1 @@
../common/ingress.sh

View File

@ -0,0 +1,40 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
set -xe
#NOTE: Deploy command
helm install ./ceph \
--namespace=ceph \
--name=ceph \
--set endpoints.identity.namespace=openstack \
--set endpoints.object_store.namespace=ceph \
--set endpoints.ceph_mon.namespace=ceph \
--set ceph.rgw_keystone_auth=true \
--set network.public=$(./tools/deployment/multinode/kube-node-subnet.sh) \
--set network.cluster=$(./tools/deployment/multinode/kube-node-subnet.sh) \
--set deployment.storage_secrets=true \
--set deployment.ceph=true \
--set deployment.rbd_provisioner=true \
--set deployment.client_secrets=false \
--set deployment.rgw_keystone_user_and_endpoints=false \
--set bootstrap.enabled=true
#NOTE: Wait for deploy
./tools/deployment/common/wait-for-pods.sh ceph 1200
#NOTE: Validate Deployment info
helm status ceph

View File

@ -0,0 +1,40 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
set -xe
#NOTE: Deploy command
helm install ./ceph \
--namespace=openstack \
--name=ceph-openstack-config \
--set endpoints.identity.namespace=openstack \
--set endpoints.object_store.namespace=ceph \
--set endpoints.ceph_mon.namespace=ceph \
--set ceph.rgw_keystone_auth=true \
--set network.public=$(./tools/deployment/multinode/kube-node-subnet.sh) \
--set network.cluster=$(./tools/deployment/multinode/kube-node-subnet.sh) \
--set deployment.storage_secrets=false \
--set deployment.ceph=false \
--set deployment.rbd_provisioner=false \
--set deployment.cephfs_provisioner=false \
--set deployment.client_secrets=true \
--set deployment.rgw_keystone_user_and_endpoints=false
#NOTE: Wait for deploy
./tools/deployment/common/wait-for-pods.sh openstack
#NOTE: Validate Deployment info
helm status ceph

View File

@ -0,0 +1,29 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
set -xe
#NOTE: Deploy command
helm install ./mariadb \
--namespace=openstack \
--name=mariadb \
--set volume.enabled=false
#NOTE: Wait for deploy
./tools/deployment/common/wait-for-pods.sh openstack
#NOTE: Validate Deployment info
helm status mariadb

View File

@ -0,0 +1,28 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
set -xe
#NOTE: Deploy command
helm install ./rabbitmq \
--namespace=openstack \
--name=rabbitmq
#NOTE: Wait for deploy
./tools/deployment/common/wait-for-pods.sh openstack
#NOTE: Validate Deployment info
helm status rabbitmq

View File

@ -0,0 +1 @@
../common/memcached.sh

View File

@ -0,0 +1,32 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
set -xe
#NOTE: Deploy command
helm install ./keystone \
--namespace=openstack \
--name=keystone \
--set pod.replicas.api=2
#NOTE: Wait for deploy
./tools/deployment/common/wait-for-pods.sh openstack
#NOTE: Validate Deployment info
helm status keystone
export OS_CLOUD=openstack_helm
openstack endpoint list
helm test keystone --timeout 900

View File

@ -0,0 +1,44 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
set -xe
helm install ./ceph \
--namespace=openstack \
--name=radosgw-openstack \
--set endpoints.identity.namespace=openstack \
--set endpoints.object_store.namespace=ceph \
--set endpoints.ceph_mon.namespace=ceph \
--set ceph.rgw_keystone_auth=true \
--set network.public=$(./tools/deployment/multinode/kube-node-subnet.sh) \
--set network.cluster=$(./tools/deployment/multinode/kube-node-subnet.sh) \
--set deployment.storage_secrets=false \
--set deployment.ceph=false \
--set deployment.rbd_provisioner=false \
--set deployment.cephfs_provisioner=false \
--set deployment.client_secrets=false \
--set deployment.rgw_keystone_user_and_endpoints=true
#NOTE: Wait for deploy
./tools/deployment/common/wait-for-pods.sh openstack
#NOTE: Validate Deployment info
helm status radosgw-openstack
export OS_CLOUD=openstack_helm
openstack service list
openstack container create 'mygreatcontainer'
curl -L -o /tmp/important-file.jpg https://imgflip.com/s/meme/Cute-Cat.jpg
openstack object create --name 'superimportantfile.jpg' 'mygreatcontainer' /tmp/important-file.jpg

View File

@ -0,0 +1,38 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
set -xe
#NOTE: Deploy command
GLANCE_BACKEND="radosgw" # NOTE(portdirect), this could be: radosgw, rbd, swift or pvc
helm install ./glance \
--namespace=openstack \
--name=glance \
--set pod.replicas.api=2 \
--set pod.replicas.registry=2 \
--set storage=${GLANCE_BACKEND}
#NOTE: Wait for deploy
./tools/deployment/common/wait-for-pods.sh openstack
#NOTE: Validate Deployment info
helm status glance
export OS_CLOUD=openstack_helm
openstack service list
sleep 15
openstack image list
openstack image show 'Cirros 0.3.5 64-bit'
helm test glance --timeout 900

View File

@ -0,0 +1,36 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
set -xe
#NOTE: Deploy command
helm install ./cinder \
--namespace=openstack \
--name=cinder \
--set pod.replicas.api=2 \
--set pod.replicas.volume=1 \
--set pod.replicas.scheduler=1 \
--set pod.replicas.backup=1 \
--set conf.cinder.DEFAULT.backup_driver=cinder.backup.drivers.swift
#NOTE: Wait for deploy
./tools/deployment/common/wait-for-pods.sh openstack
#NOTE: Validate Deployment info
export OS_CLOUD=openstack_helm
openstack service list
sleep 15
openstack volume type list
#helm test cinder

View File

@ -0,0 +1,27 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
set -xe
#NOTE: Deploy command
helm install ./openvswitch \
--namespace=openstack \
--name=openvswitch
#NOTE: Wait for deploy
./tools/deployment/common/wait-for-pods.sh openstack
#NOTE: Validate Deployment info
helm status openvswitch

View File

@ -0,0 +1,27 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
set -xe
#NOTE: Deploy command
helm install ./libvirt \
--namespace=openstack \
--name=libvirt
#NOTE: Wait for deploy
./tools/deployment/common/wait-for-pods.sh openstack
#NOTE: Validate Deployment info
helm status libvirt

View File

@ -0,0 +1,73 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
set -xe
#NOTE: Deploy nova
if [ "x$(systemd-detect-virt)" == "xnone" ]; then
echo 'OSH is not being deployed in virtualized environment'
helm install ./nova \
--namespace=openstack \
--name=nova \
--set pod.replicas.api_metadata=1 \
--set pod.replicas.placement=2 \
--set pod.replicas.osapi=2 \
--set pod.replicas.conductor=2 \
--set pod.replicas.consoleauth=2 \
--set pod.replicas.scheduler=2 \
--set pod.replicas.novncproxy=1 \
--set labels.api_metadata.node_selector_key=openstack-helm-node-class \
--set labels.api_metadata.node_selector_value=primary
else
echo 'OSH is being deployed in virtualized environment, using qemu for nova'
helm install ./nova \
--namespace=openstack \
--name=nova \
--set pod.replicas.api_metadata=1 \
--set pod.replicas.placement=2 \
--set pod.replicas.osapi=2 \
--set pod.replicas.conductor=2 \
--set pod.replicas.consoleauth=2 \
--set pod.replicas.scheduler=2 \
--set pod.replicas.novncproxy=1 \
--set labels.api_metadata.node_selector_key=openstack-helm-node-class \
--set labels.api_metadata.node_selector_value=primary \
--set conf.nova.libvirt.virt_type=qemu
fi
#NOTE: Deploy neutron
helm install ./neutron \
--namespace=openstack \
--name=neutron \
--set pod.replicas.server=2 \
--set labels.agent.dhcp.node_selector_key=openstack-helm-node-class \
--set labels.agent.dhcp.node_selector_value=primary \
--set labels.agent.l3.node_selector_key=openstack-helm-node-class \
--set labels.agent.l3.node_selector_value=primary \
--set labels.agent.metadata.node_selector_key=openstack-helm-node-class \
--set labels.agent.metadata.node_selector_value=primary \
--values=./tools/overrides/mvp/neutron-ovs.yaml
#NOTE: Wait for deploy
./tools/deployment/common/wait-for-pods.sh openstack
#NOTE: Validate Deployment info
export OS_CLOUD=openstack_helm
openstack service list
sleep 15
openstack hypervisor list
openstack network agent list
#helm test nova --timeout 900
#helm test neutron --timeout 900

View File

@ -0,0 +1,34 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
set -xe
#NOTE: Deploy command
helm install ./heat \
--namespace=openstack \
--name=heat \
--set pod.replicas.api=2 \
--set pod.replicas.cfn=2 \
--set pod.replicas.cloudwatch=2 \
--set pod.replicas.engine=2
#NOTE: Wait for deploy
./tools/deployment/common/wait-for-pods.sh openstack
#NOTE: Validate Deployment info
export OS_CLOUD=openstack_helm
openstack service list
sleep 15
openstack orchestration service list

View File

@ -0,0 +1,34 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
set -e
NODE_IPS=$(mktemp --suffix=.txt)
kubectl get nodes -o json | jq -r '.items[].status.addresses[] | select(.type=="InternalIP").address' | sort -V > $NODE_IPS
FIRST_IP_SUBNET=$(ipcalc "$(head -n 1 ${NODE_IPS})/24" | awk '/^Network/ { print $2 }')
LAST_IP_SUBNET=$(ipcalc "$(tail -n 1 ${NODE_IPS})/24" | awk '/^Network/ { print $2 }')
rm -f $NODE_IPS
function ip_diff {
echo $(($(echo $LAST_IP_SUBNET | awk -F '.' "{ print \$$1}") - $(echo $FIRST_IP_SUBNET | awk -F '.' "{ print \$$1}")))
}
for X in {1..4}; do
if ! [ "$(ip_diff ${X})" -eq "0" ]; then
SUBMASK=$((((${X} - 1 )) * 8))
break
elif [ ${X} -eq "4" ]; then
SUBMASK=24
fi
done
echo ${FIRST_IP_SUBNET%/*}/${SUBMASK}

View File

@ -0,0 +1,128 @@
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- hosts: primary
tasks:
- name: installing ipcalc on Ubuntu
become: true
become_user: root
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
apt:
name: ipcalc
state: present
- name: installing ipcalc on CentOS
become: true
become_user: root
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux'
yum:
name: ipcalc
enablerepo: epel
state: present
- name: installing ipcalc on Fedora
become: true
become_user: root
when: ansible_distribution == 'Fedora'
dnf:
name: ipcalc
state: present
- name: Setup OS and K8s Clients
shell: |
set -xe;
./tools/deployment/multinode/010-setup-client.sh
args:
chdir: "{{ zuul.project.src_dir }}"
- name: Deploy Ingress
shell: |
set -xe;
./tools/deployment/multinode/020-ingress.sh
args:
chdir: "{{ zuul.project.src_dir }}"
- name: Deploy Ceph
shell: |
set -xe;
./tools/deployment/multinode/030-ceph.sh
args:
chdir: "{{ zuul.project.src_dir }}"
- name: Setup openstack namespace for ceph
shell: |
set -xe;
./tools/deployment/multinode/040-ceph-ns-activate.sh
args:
chdir: "{{ zuul.project.src_dir }}"
- name: Deploy MariaDB
shell: |
set -xe;
./tools/deployment/multinode/050-mariadb.sh
args:
chdir: "{{ zuul.project.src_dir }}"
- name: Deploy RabbitMQ
shell: |
set -xe;
./tools/deployment/multinode/060-rabbitmq.sh
args:
chdir: "{{ zuul.project.src_dir }}"
- name: Deploy Memcached
shell: |
set -xe;
./tools/deployment/multinode/070-memcached.sh
args:
chdir: "{{ zuul.project.src_dir }}"
- name: Deploy Keystone
shell: |
set -xe;
./tools/deployment/multinode/080-keystone.sh
args:
chdir: "{{ zuul.project.src_dir }}"
- name: Deploy Keystone RadosGW endpoints and user
shell: |
set -xe;
./tools/deployment/multinode/090-ceph-radosgateway.sh
args:
chdir: "{{ zuul.project.src_dir }}"
- name: Deploy Glance
shell: |
set -xe;
./tools/deployment/multinode/100-glance.sh
args:
chdir: "{{ zuul.project.src_dir }}"
- name: Deploy Cinder
shell: |
set -xe;
./tools/deployment/multinode/110-cinder.sh
args:
chdir: "{{ zuul.project.src_dir }}"
- name: Deploy OpenVswitch
shell: |
set -xe;
./tools/deployment/multinode/120-openvswitch.sh
args:
chdir: "{{ zuul.project.src_dir }}"
- name: Deploy Libvirt
shell: |
set -xe;
./tools/deployment/multinode/130-libvirt.sh
args:
chdir: "{{ zuul.project.src_dir }}"
- name: Deploy ComputeKit
shell: |
set -xe;
./tools/deployment/multinode/140-compute-kit.sh
args:
chdir: "{{ zuul.project.src_dir }}"
- name: Deploy Heat
shell: |
set -xe;
./tools/deployment/multinode/150-heat.sh
args:
chdir: "{{ zuul.project.src_dir }}"