diff --git a/.zuul.yaml b/.zuul.yaml index ae076edf44..65d9ef2a1e 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -16,22 +16,25 @@ name: openstack/openstack-helm check: jobs: - - openstack-helm-linter: - voting: true + - openstack-helm-linter - openstack-helm-dev-deploy: - voting: true irrelevant-files: - ^.*\.rst$ - ^doc/.*$ - ^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 irrelevant-files: - ^.*\.rst$ - ^doc/.*$ - ^releasenotes/.*$ - - openstack-helm-legacy-ubuntu-vm-lb-radosgw: - voting: false + - openstack-helm-multinode-fedora: irrelevant-files: - ^.*\.rst$ - ^doc/.*$ @@ -40,6 +43,9 @@ jobs: - openstack-helm-linter - openstack-helm-dev-deploy + - openstack-helm-multinode-ubuntu + # - openstack-helm-multinode-centos + - openstack-helm-multinode-fedora - job: name: openstack-helm-linter @@ -63,29 +69,28 @@ timeout: 7200 vars: zuul_osh_infra_relative_path: ../openstack-helm-infra/ - name: openstack-helm-legacy + name: openstack-helm-multinode pre-run: - ../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-build.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 required-projects: - openstack/openstack-helm-infra - job: - name: openstack-helm-legacy-ubuntu-vm-ovs-radosgw - parent: openstack-helm-legacy - vars: - sdn_plugin: ovs - glance_backend: radosgw - nodeset: openstack-helm-ubuntu + name: openstack-helm-multinode-ubuntu + parent: openstack-helm-multinode + nodeset: openstack-helm-five-node-ubuntu - job: - name: openstack-helm-legacy-ubuntu-vm-lb-radosgw - parent: openstack-helm-legacy - vars: - sdn_plugin: linuxbridge - glance_backend: radosgw - nodeset: openstack-helm-ubuntu + name: openstack-helm-multinode-centos + parent: openstack-helm-multinode + nodeset: openstack-helm-five-node-centos + +- job: + name: openstack-helm-multinode-fedora + parent: openstack-helm-multinode + nodeset: openstack-helm-five-node-fedora diff --git a/tools/deployment/common/ingress.sh b/tools/deployment/common/ingress.sh new file mode 100755 index 0000000000..426cb0301c --- /dev/null +++ b/tools/deployment/common/ingress.sh @@ -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 diff --git a/tools/deployment/common/memcached.sh b/tools/deployment/common/memcached.sh new file mode 100755 index 0000000000..68f627aec2 --- /dev/null +++ b/tools/deployment/common/memcached.sh @@ -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 diff --git a/tools/deployment/common/setup-client.sh b/tools/deployment/common/setup-client.sh new file mode 100755 index 0000000000..4b2368f105 --- /dev/null +++ b/tools/deployment/common/setup-client.sh @@ -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 diff --git a/tools/deployment/developer/wait-for-pods.sh b/tools/deployment/common/wait-for-pods.sh similarity index 96% rename from tools/deployment/developer/wait-for-pods.sh rename to tools/deployment/common/wait-for-pods.sh index cf5d489267..22ce6fde76 100755 --- a/tools/deployment/developer/wait-for-pods.sh +++ b/tools/deployment/common/wait-for-pods.sh @@ -16,12 +16,12 @@ set -e # From Kolla-Kubernetes, orginal authors Kevin Fox & Serguei Bezverkhi -# Default wait timeout is 300 seconds +# Default wait timeout is 600 seconds end=$(date +%s) if ! [ -z $2 ]; then end=$((end + $2)) else - end=$((end + 300)) + end=$((end + 600)) fi while true; do kubectl get pods --namespace=$1 -o json | jq -r \ diff --git a/tools/deployment/developer/02-setup-client.sh b/tools/deployment/developer/02-setup-client.sh deleted file mode 100755 index 4b2368f105..0000000000 --- a/tools/deployment/developer/02-setup-client.sh +++ /dev/null @@ -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 diff --git a/tools/deployment/developer/02-setup-client.sh b/tools/deployment/developer/02-setup-client.sh new file mode 120000 index 0000000000..b2416e5e90 --- /dev/null +++ b/tools/deployment/developer/02-setup-client.sh @@ -0,0 +1 @@ +../common/setup-client.sh \ No newline at end of file diff --git a/tools/deployment/developer/03-ingress.sh b/tools/deployment/developer/03-ingress.sh deleted file mode 100755 index 73c3d7b2f3..0000000000 --- a/tools/deployment/developer/03-ingress.sh +++ /dev/null @@ -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 diff --git a/tools/deployment/developer/03-ingress.sh b/tools/deployment/developer/03-ingress.sh new file mode 120000 index 0000000000..47bb302d8c --- /dev/null +++ b/tools/deployment/developer/03-ingress.sh @@ -0,0 +1 @@ +../common/ingress.sh \ No newline at end of file diff --git a/tools/deployment/developer/04-ceph.sh b/tools/deployment/developer/04-ceph.sh index e5f8840f5a..a1c5f6922a 100755 --- a/tools/deployment/developer/04-ceph.sh +++ b/tools/deployment/developer/04-ceph.sh @@ -38,7 +38,7 @@ helm install --namespace=ceph ${WORK_DIR}/ceph --name=ceph \ --values=${WORK_DIR}/tools/overrides/mvp/ceph.yaml #NOTE: Wait for deploy -./tools/deployment/developer/wait-for-pods.sh ceph +./tools/deployment/common/wait-for-pods.sh ceph #NOTE: Validate deploy MON_POD=$(kubectl get pods \ diff --git a/tools/deployment/developer/05-ceph-ns-activate.sh b/tools/deployment/developer/05-ceph-ns-activate.sh index f4347fb40f..5e45270ccb 100755 --- a/tools/deployment/developer/05-ceph-ns-activate.sh +++ b/tools/deployment/developer/05-ceph-ns-activate.sh @@ -37,7 +37,7 @@ helm install --namespace=openstack ${WORK_DIR}/ceph --name=ceph-openstack-config --values=${WORK_DIR}/tools/overrides/mvp/ceph.yaml #NOTE: Wait for deploy -./tools/deployment/developer/wait-for-pods.sh openstack +./tools/deployment/common/wait-for-pods.sh openstack #NOTE: Validate Deployment info kubectl get -n openstack jobs --show-all diff --git a/tools/deployment/developer/06-mariadb.sh b/tools/deployment/developer/06-mariadb.sh index 0572576529..f536915a5e 100755 --- a/tools/deployment/developer/06-mariadb.sh +++ b/tools/deployment/developer/06-mariadb.sh @@ -26,7 +26,7 @@ helm install ./mariadb \ --set pod.replicas.server=1 #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 helm status mariadb diff --git a/tools/deployment/developer/07-rabbitmq.sh b/tools/deployment/developer/07-rabbitmq.sh index 4eb173ce7d..ec054696f0 100755 --- a/tools/deployment/developer/07-rabbitmq.sh +++ b/tools/deployment/developer/07-rabbitmq.sh @@ -25,7 +25,7 @@ helm install ./rabbitmq \ --name=rabbitmq #NOTE: Wait for deploy -./tools/deployment/developer/wait-for-pods.sh openstack +./tools/deployment/common/wait-for-pods.sh openstack #NOTE: Validate Deployment info helm status rabbitmq diff --git a/tools/deployment/developer/08-memcached.sh b/tools/deployment/developer/08-memcached.sh deleted file mode 100755 index 13677fcbd4..0000000000 --- a/tools/deployment/developer/08-memcached.sh +++ /dev/null @@ -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 diff --git a/tools/deployment/developer/08-memcached.sh b/tools/deployment/developer/08-memcached.sh new file mode 120000 index 0000000000..9592670f70 --- /dev/null +++ b/tools/deployment/developer/08-memcached.sh @@ -0,0 +1 @@ +../common/memcached.sh \ No newline at end of file diff --git a/tools/deployment/developer/09-keystone.sh b/tools/deployment/developer/09-keystone.sh index 3e961cbac0..f68d773684 100755 --- a/tools/deployment/developer/09-keystone.sh +++ b/tools/deployment/developer/09-keystone.sh @@ -25,7 +25,7 @@ helm install ./keystone \ --name=keystone #NOTE: Wait for deploy -./tools/deployment/developer/wait-for-pods.sh openstack +./tools/deployment/common/wait-for-pods.sh openstack #NOTE: Validate Deployment info helm status keystone diff --git a/tools/deployment/developer/10-ceph-radosgateway.sh b/tools/deployment/developer/10-ceph-radosgateway.sh index 8f4be8ea27..b8c19a20b2 100755 --- a/tools/deployment/developer/10-ceph-radosgateway.sh +++ b/tools/deployment/developer/10-ceph-radosgateway.sh @@ -37,7 +37,7 @@ helm install --namespace=openstack ${WORK_DIR}/ceph --name=radosgw-openstack \ --values=${WORK_DIR}/tools/overrides/mvp/ceph.yaml #NOTE: Wait for deploy -./tools/deployment/developer/wait-for-pods.sh openstack +./tools/deployment/common/wait-for-pods.sh openstack #NOTE: Validate Deployment info helm status radosgw-openstack diff --git a/tools/deployment/developer/11-horizon.sh b/tools/deployment/developer/11-horizon.sh index b38dde26e1..74870587f8 100755 --- a/tools/deployment/developer/11-horizon.sh +++ b/tools/deployment/developer/11-horizon.sh @@ -27,7 +27,7 @@ helm install ./horizon \ --set network.node_port.port=31000 #NOTE: Wait for deploy -./tools/deployment/developer/wait-for-pods.sh openstack +./tools/deployment/common/wait-for-pods.sh openstack #NOTE: Validate Deployment info helm status horizon diff --git a/tools/deployment/developer/12-glance.sh b/tools/deployment/developer/12-glance.sh index 7873a3d500..821638f6ce 100755 --- a/tools/deployment/developer/12-glance.sh +++ b/tools/deployment/developer/12-glance.sh @@ -27,7 +27,7 @@ helm install ./glance \ --set storage=${GLANCE_BACKEND} #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 helm status glance diff --git a/tools/deployment/developer/13-openvswitch.sh b/tools/deployment/developer/13-openvswitch.sh index 2f98a94607..db451b9075 100755 --- a/tools/deployment/developer/13-openvswitch.sh +++ b/tools/deployment/developer/13-openvswitch.sh @@ -24,7 +24,7 @@ helm install ./openvswitch \ --name=openvswitch #NOTE: Wait for deploy -./tools/deployment/developer/wait-for-pods.sh openstack +./tools/deployment/common/wait-for-pods.sh openstack #NOTE: Validate Deployment info helm status openvswitch diff --git a/tools/deployment/developer/14-libvirt.sh b/tools/deployment/developer/14-libvirt.sh index 811a0b7cab..c34dcc2c30 100755 --- a/tools/deployment/developer/14-libvirt.sh +++ b/tools/deployment/developer/14-libvirt.sh @@ -24,7 +24,7 @@ helm install ./libvirt \ --name=libvirt #NOTE: Wait for deploy -./tools/deployment/developer/wait-for-pods.sh openstack +./tools/deployment/common/wait-for-pods.sh openstack #NOTE: Validate Deployment info helm status libvirt diff --git a/tools/deployment/developer/15-compute-kit.sh b/tools/deployment/developer/15-compute-kit.sh index f025332fca..e44298e27f 100755 --- a/tools/deployment/developer/15-compute-kit.sh +++ b/tools/deployment/developer/15-compute-kit.sh @@ -40,7 +40,7 @@ helm install ./neutron \ --values=./tools/overrides/mvp/neutron-ovs.yaml #NOTE: Wait for deploy -./tools/deployment/developer/wait-for-pods.sh openstack +./tools/deployment/common/wait-for-pods.sh openstack #NOTE: Validate Deployment info export OS_CLOUD=openstack_helm diff --git a/tools/deployment/developer/17-cinder.sh b/tools/deployment/developer/17-cinder.sh index 4d8ccfd7e4..846602936c 100755 --- a/tools/deployment/developer/17-cinder.sh +++ b/tools/deployment/developer/17-cinder.sh @@ -24,7 +24,7 @@ helm install ./cinder \ --name=cinder #NOTE: Wait for deploy -./tools/deployment/developer/wait-for-pods.sh openstack +./tools/deployment/common/wait-for-pods.sh openstack #NOTE: Validate Deployment info export OS_CLOUD=openstack_helm diff --git a/tools/deployment/developer/18-heat.sh b/tools/deployment/developer/18-heat.sh index e5ef2b85ba..1a09a76635 100755 --- a/tools/deployment/developer/18-heat.sh +++ b/tools/deployment/developer/18-heat.sh @@ -24,7 +24,7 @@ helm install ./heat \ --name=heat #NOTE: Wait for deploy -./tools/deployment/developer/wait-for-pods.sh openstack +./tools/deployment/common/wait-for-pods.sh openstack #NOTE: Validate Deployment info export OS_CLOUD=openstack_helm diff --git a/tools/deployment/developer/19-use-it.sh b/tools/deployment/developer/19-use-it.sh index 5cee3c4eaa..83f5082e5d 100755 --- a/tools/deployment/developer/19-use-it.sh +++ b/tools/deployment/developer/19-use-it.sh @@ -74,13 +74,13 @@ FLOATING_IP=$(openstack floating ip show \ -f value -c floating_ip_address) function wait_for_ssh_port { - # Default wait timeout is 180 seconds + # Default wait timeout is 300 seconds set +x end=$(date +%s) if ! [ -z $2 ]; then end=$((end + $2)) else - end=$((end + 180)) + end=$((end + 300)) fi while true; do # Use Nmap as its the same on Ubuntu and RHEL family distros diff --git a/tools/deployment/multinode/010-setup-client.sh b/tools/deployment/multinode/010-setup-client.sh new file mode 120000 index 0000000000..b2416e5e90 --- /dev/null +++ b/tools/deployment/multinode/010-setup-client.sh @@ -0,0 +1 @@ +../common/setup-client.sh \ No newline at end of file diff --git a/tools/deployment/multinode/020-ingress.sh b/tools/deployment/multinode/020-ingress.sh new file mode 120000 index 0000000000..47bb302d8c --- /dev/null +++ b/tools/deployment/multinode/020-ingress.sh @@ -0,0 +1 @@ +../common/ingress.sh \ No newline at end of file diff --git a/tools/deployment/multinode/030-ceph.sh b/tools/deployment/multinode/030-ceph.sh new file mode 100755 index 0000000000..1d045facd3 --- /dev/null +++ b/tools/deployment/multinode/030-ceph.sh @@ -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 diff --git a/tools/deployment/multinode/040-ceph-ns-activate.sh b/tools/deployment/multinode/040-ceph-ns-activate.sh new file mode 100755 index 0000000000..fc4e3d4bb7 --- /dev/null +++ b/tools/deployment/multinode/040-ceph-ns-activate.sh @@ -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 diff --git a/tools/deployment/multinode/050-mariadb.sh b/tools/deployment/multinode/050-mariadb.sh new file mode 100755 index 0000000000..0b99516311 --- /dev/null +++ b/tools/deployment/multinode/050-mariadb.sh @@ -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 diff --git a/tools/deployment/multinode/060-rabbitmq.sh b/tools/deployment/multinode/060-rabbitmq.sh new file mode 100755 index 0000000000..e621127c29 --- /dev/null +++ b/tools/deployment/multinode/060-rabbitmq.sh @@ -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 diff --git a/tools/deployment/multinode/070-memcached.sh b/tools/deployment/multinode/070-memcached.sh new file mode 120000 index 0000000000..9592670f70 --- /dev/null +++ b/tools/deployment/multinode/070-memcached.sh @@ -0,0 +1 @@ +../common/memcached.sh \ No newline at end of file diff --git a/tools/deployment/multinode/080-keystone.sh b/tools/deployment/multinode/080-keystone.sh new file mode 100755 index 0000000000..4e8b58707b --- /dev/null +++ b/tools/deployment/multinode/080-keystone.sh @@ -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 diff --git a/tools/deployment/multinode/090-ceph-radosgateway.sh b/tools/deployment/multinode/090-ceph-radosgateway.sh new file mode 100755 index 0000000000..deea8565ce --- /dev/null +++ b/tools/deployment/multinode/090-ceph-radosgateway.sh @@ -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 diff --git a/tools/deployment/multinode/100-glance.sh b/tools/deployment/multinode/100-glance.sh new file mode 100755 index 0000000000..1e5e4a1de7 --- /dev/null +++ b/tools/deployment/multinode/100-glance.sh @@ -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 diff --git a/tools/deployment/multinode/110-cinder.sh b/tools/deployment/multinode/110-cinder.sh new file mode 100755 index 0000000000..dcbde273e6 --- /dev/null +++ b/tools/deployment/multinode/110-cinder.sh @@ -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 diff --git a/tools/deployment/multinode/120-openvswitch.sh b/tools/deployment/multinode/120-openvswitch.sh new file mode 100755 index 0000000000..654641c747 --- /dev/null +++ b/tools/deployment/multinode/120-openvswitch.sh @@ -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 diff --git a/tools/deployment/multinode/130-libvirt.sh b/tools/deployment/multinode/130-libvirt.sh new file mode 100755 index 0000000000..ecbfa7fa01 --- /dev/null +++ b/tools/deployment/multinode/130-libvirt.sh @@ -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 diff --git a/tools/deployment/multinode/140-compute-kit.sh b/tools/deployment/multinode/140-compute-kit.sh new file mode 100755 index 0000000000..64a472dbba --- /dev/null +++ b/tools/deployment/multinode/140-compute-kit.sh @@ -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 diff --git a/tools/deployment/multinode/150-heat.sh b/tools/deployment/multinode/150-heat.sh new file mode 100755 index 0000000000..476501db0d --- /dev/null +++ b/tools/deployment/multinode/150-heat.sh @@ -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 diff --git a/tools/deployment/multinode/kube-node-subnet.sh b/tools/deployment/multinode/kube-node-subnet.sh new file mode 100755 index 0000000000..93f90736d0 --- /dev/null +++ b/tools/deployment/multinode/kube-node-subnet.sh @@ -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} diff --git a/tools/gate/playbooks/multinode-deploy.yaml b/tools/gate/playbooks/multinode-deploy.yaml new file mode 100644 index 0000000000..3ad10491a6 --- /dev/null +++ b/tools/gate/playbooks/multinode-deploy.yaml @@ -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 }}"