commit a39e84c1ae3dfd1dd4bd38fea010d166b9fd5677 Author: Drew Walters Date: Tue Sep 22 18:32:45 2020 +0000 Add CI test-site deployment job This change adds a non-voting job to validate the test-site in openstack-helm-deployments. Currently, the phases defined in openstack-helm-deployments point to airshipctl documents to provide a base infrastructure for testing functions/composites provided by openstack-helm-deployments. Once a workload is added to openstack-helm-deployments, the workload script can be added to this test suite. Depends-On: https://review.opendev.org/754729 Change-Id: Ie9f4056a98147320059bc8e98fdcf87b250797c7 diff --git a/playbooks/get-vm-config.yaml b/playbooks/get-vm-config.yaml new file mode 100644 index 0000000..b9a61e4 --- /dev/null +++ b/playbooks/get-vm-config.yaml @@ -0,0 +1,70 @@ +# 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. + +# TODO(drewwalters96): Work with Airship to move this logic to a role. + +- name: get BareMetalHost objects + shell: | + set -e + kustomize build --enable_alpha_plugins \ + {{ airship_config_manifest_directory }}/{{ airship_config_site_path }}/{{ path }} | + kustomize config grep "kind=BareMetalHost" + register: bmh_command + failed_when: "bmh_command.stdout == ''" + environment: + KUSTOMIZE_PLUGIN_HOME: "{{ ansible_env.HOME }}/.airship/kustomize-plugins" + KUSTOMIZE_ENABLE_ALPHA_COMMANDS: "true" + +- set_fact: + bmh: "{{ bmh_command.stdout | from_yaml_all | list }}" + +- name: get network configuration for BareMetalHost objects + shell: | + set -e + kustomize build --enable_alpha_plugins \ + {{ airship_config_manifest_directory }}/{{ airship_config_site_path }}/{{ path }} | + kustomize config grep "metadata.name={{ item.spec.networkData.name }}" + register: netdata_command + failed_when: "netdata_command.stdout == ''" + environment: + KUSTOMIZE_PLUGIN_HOME: "{{ ansible_env.HOME }}/.airship/kustomize-plugins" + KUSTOMIZE_ENABLE_ALPHA_COMMANDS: "true" + with_items: "{{ bmh }}" + +- name: get links from network data per BareMetalHost object + set_fact: + links: | + {{ + netdata_command.results | + map(attribute='stdout')| map('from_yaml') | + map(attribute='stringData.networkData') | map('from_yaml') | + map(attribute='links') | list + }} +- name: define list of VM mac addresses and VM boot mode + set_fact: + vm_cfg: "{{ dict(['boot_mode', 'nat_mac', 'provision_mac'] | zip([item.spec.bootMode, nat_mac_list[0], item.spec.bootMACAddress])) }}" + vars: + nat_mac_list: | + {{ + links[idx] | + rejectattr('ethernet_mac_address', 'undefined') | + selectattr('ethernet_mac_address', '!=', item.spec.bootMACAddress) | + map(attribute='ethernet_mac_address') | list + }} + failed_when: nat_mac_list | length == 0 + loop: "{{ bmh }}" + loop_control: + index_var: idx + register: vm_cfg_fact + +- set_fact: + "{{ name }}_vm_cfg": "{{ vm_cfg_fact.results | map(attribute='ansible_facts.vm_cfg') | list }}" diff --git a/playbooks/openstack-helm-deployments-build-gate.yaml b/playbooks/openstack-helm-deployments-build-gate.yaml new file mode 100644 index 0000000..cbddf6d --- /dev/null +++ b/playbooks/openstack-helm-deployments-build-gate.yaml @@ -0,0 +1,128 @@ +# 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. + +# TODO(drewwalters96): Work with Airship to move this logic to a role. + +- hosts: primary + environment: + LIBVIRT_DEFAULT_URI: qemu:///system + + tasks: + - name: set default vars + set_fact: + var_files_default: + - airship-ipam.yaml + - test-config.yaml + + - name: read test variables + include_vars: + file: "vars/{{ var_file }}" + with_items: "{{ var_files | default(var_files_default) }}" + loop_control: + loop_var: var_file + + - name: docker install + include_role: + name: docker-install + + - name: install kustomize + include_role: + name: install-kustomize + + # Installs kustomize plugin functionality needed for rendering below + - name: install airshipctl + shell: | + cd {{ local_src_dir | default(zuul.projects['opendev.org/airship/airshipctl'].src_dir) }} + ./tools/deployment/21_systemwide_executable.sh + - name: make sure serve directory exists + file: + dest: "{{ serve_dir }}" + state: directory + mode: "0755" + owner: "{{ ansible_user }}" + become: yes + + - name: get BareMetalHost from model + block: + - name: ensure tempdir for airshipctl does not exist + file: + path: "{{ remote_work_dir }}" + state: absent + when: remote_work_dir is defined + - name: clone document model + command: git clone -q {{ airship_config_primary_repo_url }} {{ remote_work_dir }} + when: remote_work_dir is defined + + - name: get VM config(MACs and bootMode) from BareMetalHost objects + include_tasks: + file: get-vm-config.yaml + vars: + name: "{{ roleinputvar.name }}" + path: "{{ roleinputvar.path }}" + loop: + - { name: 'target', path: 'ephemeral/controlplane' } + - { name: 'ephemeral', path: 'ephemeral/bootstrap' } + - { name: 'worker', path: 'target/workers' } + loop_control: + loop_var: roleinputvar + + - name: deploy-gate + include_role: + name: airship-libvirt-gate + vars: + gate_flavor: medium + gate_action: build-infra + airship_gate_libvirt_pools: + - path: /var/lib/libvirt/airship + name: "airship" + - path: /var/lib/libvirt/images + name: "default" + airship_gate_flavors: + medium: + disk_format: qcow2 + ephemeral_disk_size: 20G + ephemeral_vm_cfg: "{{ ephemeral_vm_cfg }}" + ephemeral_vm_memory_mb: 6124 + ephemeral_vm_vcpus: 4 + target_disk_size: 10G + target_vm_cfg: "{{ target_vm_cfg }}" + target_vm_memory_mb: 4096 + target_vm_vcpus: 2 + target_vms_count: 1 + worker_disk_size: 10G + worker_vm_cfg: "{{ worker_vm_cfg }}" + worker_vm_memory_mb: 1024 + worker_vm_vcpus: 1 + worker_vms_count: 1 + airship_gate_file_exchanger: + servername: "localhost" + ip: + - "127.0.0.1" + - "::1" + - "{{ airship_gate_ipam.provision_network.bridge_ip }}" + http_port: "{{ serve_port }}" + path: "{{ serve_dir }}" + user: + - username: "username" + password: "password" + group: + - name: writers + member: + - username + rbac: + policies: + - role: + - PUT + group: + - writers + default: + all: granted diff --git a/playbooks/openstack-helm-deployments-collect-logs.yaml b/playbooks/openstack-helm-deployments-collect-logs.yaml new file mode 100644 index 0000000..34cb75a --- /dev/null +++ b/playbooks/openstack-helm-deployments-collect-logs.yaml @@ -0,0 +1,36 @@ +# 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 + vars: + logs_dir: "/tmp/logs" + environment: + LIBVIRT_DEFAULT_URI: qemu:///system + + tasks: + - name: set default roles + set_fact: + default_log_roles: + - gather-system-logs + - airship-gather-apache-logs + - airship-gather-libvirt-logs + - airship-gather-runtime-logs + - airship-airshipctl-gather-configs + - airship-gather-pod-logs + - name: run roles + include_role: + name: "{{ role_name }}" + with_items: "{{ log_roles | default(default_log_roles) }}" + loop_control: + loop_var: role_name diff --git a/playbooks/openstack-helm-deployments-deploy-docker.yaml b/playbooks/openstack-helm-deployments-deploy-docker.yaml new file mode 100644 index 0000000..095b0b8 --- /dev/null +++ b/playbooks/openstack-helm-deployments-deploy-docker.yaml @@ -0,0 +1,15 @@ +# 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: all + roles: + - docker-install diff --git a/playbooks/openstack-helm-deployments-gate-runner.yaml b/playbooks/openstack-helm-deployments-gate-runner.yaml new file mode 100644 index 0000000..f167d77 --- /dev/null +++ b/playbooks/openstack-helm-deployments-gate-runner.yaml @@ -0,0 +1,49 @@ +# 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: "set default gate scripts" + set_fact: + gate_scripts_default: + - ./tools/deployment/01_install_kubectl.sh + - ./tools/deployment/02_install_clusterctl.sh + - ./tools/deployment/21_systemwide_executable.sh + - ./tools/deployment/22_test_configs.sh + - ./tools/deployment/23_pull_documents.sh + - ./tools/deployment/24_build_ephemeral_iso.sh + - ./tools/deployment/25_deploy_ephemeral_node.sh + - ./tools/deployment/26_deploy_metal3_capi_ephemeral_node.sh + - ./tools/deployment/30_deploy_controlplane.sh + - ./tools/deployment/31_deploy_initinfra_target_node.sh + - ./tools/deployment/32_cluster_init_target_node.sh + - ./tools/deployment/33_cluster_move_target_node.sh + - ./tools/deployment/34_deploy_worker_node.sh + + - name: "Run gate scripts" + shell: | + set -xe; + # NOTE(drewwalters96): Rather than re-cloning airshipctl, this uses the + # airshipctl repo cloned to the disk by Zuul. + export AIRSHIP_CONFIG_PRIMARY_REPO_URL={{ airshipctl_path | quote }} + export AIRSHIP_CONFIG_METADATA_PATH={{ metadata_path | quote }} + export AIRSHIPCTL_PATH={{ airshipctl_path | quote }} + export OSH_DEPLOYMENTS_PATH={{ osh_deployments_path | quote }} + {{ gate_script_path }} + args: + chdir: "{{ zuul.projects['opendev.org/airship/airshipctl'].src_dir }}" + vars: + airshipctl_path: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/airship/airshipctl'].src_dir }}" + gate_script_path: "{{ item }}" + metadata_path: "openstack-helm-deployments/manifests/site/test-site/metadata.yaml" + osh_deployments_path: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}" + with_items: "{{ gate_scripts | default(gate_scripts_default) }}" diff --git a/playbooks/vars/airship-ipam.yaml b/playbooks/vars/airship-ipam.yaml new file mode 100644 index 0000000..d484b02 --- /dev/null +++ b/playbooks/vars/airship-ipam.yaml @@ -0,0 +1,21 @@ +# 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. + +airship_gate_ipam: + nat_network: + bridge_ip: "10.23.25.1" + ephemeral_ip: "10.23.25.101" + dhcp_start: "10.23.25.150" + dhcp_end: "10.23.25.160" + provision_network: + bridge_ip: "10.23.24.1" + ephemeral_ip: "10.23.24.101" diff --git a/playbooks/vars/local-dev.yaml b/playbooks/vars/local-dev.yaml new file mode 100644 index 0000000..17bde54 --- /dev/null +++ b/playbooks/vars/local-dev.yaml @@ -0,0 +1,23 @@ +# 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. + +proxy: + enabled: "{{ lookup('env', 'USE_PROXY', default='false') }}" + http: "{{ lookup('env', 'HTTP_PROXY', default='') }}" + https: "{{ lookup('env', 'HTTPS_PROXY', default='') }}" + noproxy: "{{ lookup('env', 'NO_PROXY', default='') }}" + +# If remote_work_dir is defined, the deployment script will invoke airshipctl +# document pull command to download the manifests to the remote_work_dir. +# Otherwise, the current working dir where the script is launched is used and +# document pull is skipped. +#remote_work_dir: "/tmp/airship" diff --git a/playbooks/vars/test-config.yaml b/playbooks/vars/test-config.yaml new file mode 100644 index 0000000..2d6bfab --- /dev/null +++ b/playbooks/vars/test-config.yaml @@ -0,0 +1,22 @@ +# 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. + +airship_config_action: generate +airship_config_iso_gen_target_path: "{{ serve_dir }}" +airship_config_primary_repo_url: "https://review.opendev.org/airship/airshipctl" +airship_config_manifest_directory: "{{ zuul.projects['opendev.org/airship/airshipctl'].src_dir }}" +airship_config_ephemeral_ip: "{{ airship_gate_ipam.nat_network.ephemeral_ip }}" +airship_config_iso_builder_docker_image: "quay.io/airshipit/isogen:latest-ubuntu_focal" +airship_config_site_path: manifests/site/test-site +airship_config_ca_data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN5RENDQWJDZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRFNU1USXlOakE0TWpneU5Gb1hEVEk1TVRJeU16QTRNamd5TkZvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTTFSClM0d3lnajNpU0JBZjlCR0JUS1p5VTFwYmdDaGQ2WTdJektaZWRoakM2K3k1ZEJpWm81ZUx6Z2tEc2gzOC9YQ1MKenFPS2V5cE5RcDN5QVlLdmJKSHg3ODZxSFZZNjg1ZDVYVDNaOHNyVVRzVDR5WmNzZHAzV3lHdDM0eX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3UnQwbEppZllWb1V3Y3FYUzJkUG5jYzlNUW9qTEdUYXN1TlUKRy9EWmw5ZWtjV3hFSXlLWGNuY2QzZnhiK3p6OUJFbUxaRDduZjlacnhHU2IrZmhGeDdzWFJRRWc1YkQvdHdkbwpFWFcvbTU1YmJEZnhhNzFqZG5NaDJxdVEzRGlWT0ZFNGZMTERxcjlDRWlsaDMySFJNeHJJNGcwWTVRUFFaazMwCnFZTldmbktWUllOTHYrWC9DeGZ6ZkVacGpxRkVPRkVsQW9JQkFRQ0t6R2JGdmx6d1BaUmh4czd2VXYxOXlIUXAKQzFmR3gwb0tpRDFSNWZwWVBrT0VRQWVudEFKRHNyYVRsNy9rSDY5V09VbUQ1T3gxbWpyRFB0a1M4WnhXYlJXeApGYjJLK3JxYzRtcGFacGROV09OTkszK3RNZmsrb0FRcWUySU1JV253NUhmbVpjNE1QY0t0bkZQYlJTTkF0aktwCkQ2aG9oL3BXMmdjRFA0cVpNWVZvRW04MVZYZEZDUGhOYitNYnUvU3gyaFB4U0dXYTVGaTczeEtwWWp5M3BISlQKWFoyY2lHN0VNQ3NKZW9HS2FRdmNCY1kvNGlSRGFoV0hWcmlsSVhJQXJQdXdmVUIybzZCZFR0allHeU5sZ2NmeApxWEt4aXBTaEE2VlNienVnR3pkdEdNeEUyekRHVEkxOXFSQy96OUNEREM1ZTJTQUZqbEJUV0QyUHJjcU4KLS0tLS1FTkQgUlNBIFBSSVZBVEUgS0VZLS0tLS0K diff --git a/tools/patch-airship-config.sh b/tools/patch-airship-config.sh new file mode 100755 index 0000000..800506a --- /dev/null +++ b/tools/patch-airship-config.sh @@ -0,0 +1,15 @@ +export AIRSHIPCTL_PATH=${AIRSHIPCTL_PATH:-"../airshipctl"} +export OSH_DEPLOYMENTS_PATH=${OSH_DEPLOYMENTS_PATH:-$(pwd)} + +# NOTE(drewwalters96): Add openstack-helm-deployments repo to the airship +# config. +airshipctl config set-manifest dummy_manifest \ + --primary \ + --branch master \ + --repo openstack-helm-deployments \ + --url "${OSH_DEPLOYMENTS_PATH}" + +airshipctl config set-manifest dummy_manifest \ + --branch master \ + --repo airshipctl \ + --url "${AIRSHIPCTL_PATH}" diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml new file mode 100644 index 0000000..2e41aeb --- /dev/null +++ b/zuul.d/jobs.yaml @@ -0,0 +1,50 @@ +# 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. + +- job: + name: openstack-helm-deployments-test + description: | + Deploys the OpenStack-Helm composite using Airship CI infrastructure. + infrastructure. + timeout: 7200 + attempts: 1 + required-projects: + - airship/airshipctl + roles: + - zuul: airship/airshipctl + pre-run: + - playbooks/openstack-helm-deployments-deploy-docker.yaml + - playbooks/openstack-helm-deployments-build-gate.yaml + post-run: playbooks/openstack-helm-deployments-collect-logs.yaml + run: playbooks/openstack-helm-deployments-gate-runner.yaml + nodeset: openstack-helm-deployments-single-16GB-bionic-node + vars: + site_name: test-site + gate_scripts: + - ./tools/deployment/01_install_kubectl.sh + - ./tools/deployment/22_test_configs.sh + # TODO(drewwalters96): Remove this when the airshipctl config scripts + # support multiple repositories. This imperatively adds the + # OSH-deployments repository. + - ../../openstack/openstack-helm-deployments/tools/patch-airship-config.sh + - ./tools/deployment/23_pull_documents.sh + - ./tools/deployment/24_build_ephemeral_iso.sh + - ./tools/deployment/25_deploy_ephemeral_node.sh + - ./tools/deployment/26_deploy_metal3_capi_ephemeral_node.sh + - ./tools/deployment/30_deploy_controlplane.sh + - ./tools/deployment/31_deploy_initinfra_target_node.sh + - ./tools/deployment/32_cluster_init_target_node.sh + - ./tools/deployment/33_cluster_move_target_node.sh + - ./tools/deployment/34_deploy_worker_node.sh + serve_dir: /srv/iso + serve_port: 8099 + voting: false diff --git a/zuul.d/nodesets.yaml b/zuul.d/nodesets.yaml new file mode 100644 index 0000000..5487182 --- /dev/null +++ b/zuul.d/nodesets.yaml @@ -0,0 +1,17 @@ +# 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. + +- nodeset: + name: openstack-helm-deployments-single-16GB-bionic-node + nodes: + - name: primary + label: ubuntu-bionic-32GB diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index 115d77c..49a774f 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -11,5 +11,9 @@ # limitations under the License. - project: - templates: - - noop-jobs + check: + jobs: + - openstack-helm-deployments-test + gate: + jobs: + - noop