From 425e7adcda1c025c0aee50174c05be3ffe594966 Mon Sep 17 00:00:00 2001 From: Matt McEuen Date: Fri, 17 Jul 2020 09:06:09 -0500 Subject: [PATCH] Add deployment gate This adds airshipctl as a testing, and calls its deployment scripts to launch a VM-based test. This will be used to validate treasuremap deployment manifests. Change-Id: If4fa60f896211d2f6b63271b58b96541c399694c --- .../ephemeral/initinfra/patch_bmo_config.yaml | 1 - .../test-site/shared/catalogues/hosts.yaml | 6 +- .../shared/catalogues/common-networking.yaml | 4 +- playbooks/airship-collect-logs.yaml | 30 +++++ playbooks/airship-treasuremap-build-gate.yaml | 124 ++++++++++++++++++ .../airship-treasuremap-deploy-docker.yaml | 15 +++ .../airship-treasuremap-gate-runner.yaml | 32 +++++ ...ship-treasuremap-update-github-issues.yaml | 35 +++++ playbooks/files/update_github_issues.py | 83 ++++++++++++ playbooks/get-mac-addresses.yaml | 64 +++++++++ playbooks/vars/airship-ipam.yaml | 21 +++ playbooks/vars/local-dev.yaml | 23 ++++ playbooks/vars/test-config.yaml | 22 ++++ tools/deployment/01_install_kubectl.sh | 20 +++ tools/deployment/21_systemwide_executable.sh | 20 +++ tools/deployment/22_test_configs.sh | 34 +++++ tools/deployment/24_build_ephemeral_iso.sh | 21 +++ tools/deployment/25_deploy_ephemeral_node.sh | 20 +++ .../26_deploy_metal3_capi_ephemeral_node.sh | 20 +++ tools/deployment/30_deploy_controlplane.sh | 20 +++ tools/validate_docs | 25 ++++ zuul.d/jobs.yaml | 75 +++++++++++ zuul.d/nodesets.yaml | 44 +++++++ zuul.d/projects.yaml | 32 +++++ .zuul.yaml => zuul.d/secrets.yaml | 46 +++---- 25 files changed, 804 insertions(+), 33 deletions(-) create mode 100644 playbooks/airship-collect-logs.yaml create mode 100644 playbooks/airship-treasuremap-build-gate.yaml create mode 100644 playbooks/airship-treasuremap-deploy-docker.yaml create mode 100644 playbooks/airship-treasuremap-gate-runner.yaml create mode 100644 playbooks/airship-treasuremap-update-github-issues.yaml create mode 100755 playbooks/files/update_github_issues.py create mode 100644 playbooks/get-mac-addresses.yaml create mode 100644 playbooks/vars/airship-ipam.yaml create mode 100644 playbooks/vars/local-dev.yaml create mode 100644 playbooks/vars/test-config.yaml create mode 100755 tools/deployment/01_install_kubectl.sh create mode 100755 tools/deployment/21_systemwide_executable.sh create mode 100755 tools/deployment/22_test_configs.sh create mode 100755 tools/deployment/24_build_ephemeral_iso.sh create mode 100755 tools/deployment/25_deploy_ephemeral_node.sh create mode 100755 tools/deployment/26_deploy_metal3_capi_ephemeral_node.sh create mode 100755 tools/deployment/30_deploy_controlplane.sh create mode 100755 tools/validate_docs create mode 100644 zuul.d/jobs.yaml create mode 100644 zuul.d/nodesets.yaml create mode 100644 zuul.d/projects.yaml rename .zuul.yaml => zuul.d/secrets.yaml (80%) diff --git a/manifests/site/test-site/ephemeral/initinfra/patch_bmo_config.yaml b/manifests/site/test-site/ephemeral/initinfra/patch_bmo_config.yaml index fe1e595ad..807852aa8 100644 --- a/manifests/site/test-site/ephemeral/initinfra/patch_bmo_config.yaml +++ b/manifests/site/test-site/ephemeral/initinfra/patch_bmo_config.yaml @@ -7,4 +7,3 @@ metadata: data: PROVISIONING_IP: "10.23.24.101" DHCP_RANGE: "10.23.24.200,10.23.24.250" - PROVISIONING_INTERFACE: "enp0s4" diff --git a/manifests/site/test-site/shared/catalogues/hosts.yaml b/manifests/site/test-site/shared/catalogues/hosts.yaml index 68630208f..618f936fb 100644 --- a/manifests/site/test-site/shared/catalogues/hosts.yaml +++ b/manifests/site/test-site/shared/catalogues/hosts.yaml @@ -17,11 +17,15 @@ hosts: macAddresses: oam: 52:54:00:9b:27:4c pxe: 52:54:00:b6:ed:31 + bootMode: legacy node02: - macAddress: 00:3b:8b:0c:ec:8b + macAddress: 52:54:00:b6:ed:02 bmcAddress: redfish+http://10.23.25.2:8000/redfish/v1/Systems/air-target-2 bmcUsername: username bmcPassword: password ipAddresses: oam-ipv4: 10.23.25.101 pxe-ipv4: 10.23.24.101 + macAddresses: + oam: 52:54:00:9b:27:02 + pxe: 52:54:00:b6:ed:02 diff --git a/manifests/type/airship-core/shared/catalogues/common-networking.yaml b/manifests/type/airship-core/shared/catalogues/common-networking.yaml index 89c751c42..38f855bee 100644 --- a/manifests/type/airship-core/shared/catalogues/common-networking.yaml +++ b/manifests/type/airship-core/shared/catalogues/common-networking.yaml @@ -7,12 +7,12 @@ metadata: commonNetworking: links: - id: oam - name: enp0s3 + name: oam type: phy mtu: "1500" # ethernet_mac_address: (optional) - id: pxe - name: enp0s4 + name: pxe type: phy mtu: "1500" # ethernet_mac_address: (optional) diff --git a/playbooks/airship-collect-logs.yaml b/playbooks/airship-collect-logs.yaml new file mode 100644 index 000000000..2fb51d775 --- /dev/null +++ b/playbooks/airship-collect-logs.yaml @@ -0,0 +1,30 @@ +# 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" + roles: + - gather-system-logs + - airship-gather-apache-logs + - airship-gather-libvirt-logs + - airship-gather-runtime-logs + - airship-airshipctl-gather-configs + environment: + LIBVIRT_DEFAULT_URI: qemu:///system + + tasks: + - name: save logs for ephemeral cluster + include_role: + name: airship-gather-pod-logs diff --git a/playbooks/airship-treasuremap-build-gate.yaml b/playbooks/airship-treasuremap-build-gate.yaml new file mode 100644 index 000000000..753e34fe5 --- /dev/null +++ b/playbooks/airship-treasuremap-build-gate.yaml @@ -0,0 +1,124 @@ +# 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 + 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.project.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 MACs from BareMetalHost objects + include_tasks: + file: get-mac-addresses.yaml + vars: + name: "{{ roleinputvar.name }}" + path: "{{ roleinputvar.path }}" + loop: + - { name: 'target', path: 'ephemeral/controlplane' } + - { name: 'ephemeral', path: 'ephemeral/bootstrap' } + 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: + target_vm_memory_mb: 4096 + target_vm_vcpus: 2 + ephemeral_vm_memory_mb: 6124 + ephemeral_vm_vcpus: 4 + ephemeral_disk_size: 20G + ephemeral_vm_nics: "{{ ephemeral_vm_nics }}" + target_disk_size: 10G + disk_format: qcow2 + target_vms_count: 1 + target_vm_nics: "{{ target_vm_nics }}" + worker_vm_memory_mb: 1024 + worker_vm_vcpus: 1 + worker_disk_size: 10G + 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/airship-treasuremap-deploy-docker.yaml b/playbooks/airship-treasuremap-deploy-docker.yaml new file mode 100644 index 000000000..095b0b864 --- /dev/null +++ b/playbooks/airship-treasuremap-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/airship-treasuremap-gate-runner.yaml b/playbooks/airship-treasuremap-gate-runner.yaml new file mode 100644 index 000000000..fe95d0e4c --- /dev/null +++ b/playbooks/airship-treasuremap-gate-runner.yaml @@ -0,0 +1,32 @@ +# 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/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 + + - name: "Run gate scripts" + include_role: + name: airshipctl-run-script + vars: + gate_script_path: "{{ item }}" + with_items: "{{ gate_scripts | default(gate_scripts_default) }}" diff --git a/playbooks/airship-treasuremap-update-github-issues.yaml b/playbooks/airship-treasuremap-update-github-issues.yaml new file mode 100644 index 000000000..dbadfc94e --- /dev/null +++ b/playbooks/airship-treasuremap-update-github-issues.yaml @@ -0,0 +1,35 @@ +# 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: Install python setuptools + package: + name: + - python3-pip + - python3-setuptools + state: present + become: yes + + - name: Install script dependencies + pip: + name: + - PyGithub==1.46 + executable: pip3 + - name: Run python script + script: > + update_github_issues.py "{{ github_credentials.username }}" \ + "{{ github_credentials.password }}" \ + "{{ zuul.message | b64decode }}" \ + "{{ zuul.change_url }}" + args: + executable: python3 diff --git a/playbooks/files/update_github_issues.py b/playbooks/files/update_github_issues.py new file mode 100755 index 000000000..1d2c36c80 --- /dev/null +++ b/playbooks/files/update_github_issues.py @@ -0,0 +1,83 @@ +# 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. +import logging +import re +import sys + +import github + +GH_USER = sys.argv[1] +GH_PW = sys.argv[2] +ZUUL_MESSAGE = sys.argv[3] +GERRIT_URL = sys.argv[4] +REPO_NAME = 'airshipit/airshipctl' +PROCESS_LABELS = ['wip', 'ready for review', 'triage', 'blocked'] + + +def construct_issue_list(match_list: list) -> set: + new_list = [] + for _issue in match_list: + try: + new_list.append(int(_issue)) + except ValueError: + logging.warning(f'Value {_issue} could not be converted to `int` type') + return set(new_list) + + +def parse_issue_number(commit_msg: str) -> dict: + # Searches for Relates-To or Closes tags first to match and return + logging.debug(f'Parsing commit message: {commit_msg}') + related = re.findall(r'(?<=Relates-To: #)([0-9]+?)(?=\n)', commit_msg) + logging.debug(f'Captured related issues: {related}') + closes = re.findall(r'(?<=Closes: #)([0-9]+?)(?=\n)', commit_msg) + logging.debug(f'Captured closes issues: {closes}') + if related or closes: + return { + 'related': construct_issue_list(related), + 'closes': construct_issue_list(closes) + } + # If no Relates-To or Closes tags are defined, find legacy [#X] style tags + logging.debug('Falling back to legacy tags') + legacy_matches = re.findall(r'(?<=\[#)([0-9]+?)(?=\])', commit_msg) + logging.debug(f'Captured legacy issues: {legacy_matches}') + if not legacy_matches: + return {} + return { + 'related': construct_issue_list(legacy_matches) + } + + +def remove_duplicated_issue_numbers(issue_dict: dict) -> dict: + if 'closes' in issue_dict: + issue_dict['related'] = [x for x in issue_dict.get('related', []) if x not in issue_dict['closes']] + return issue_dict + + +if __name__ == '__main__': + issue_number_dict = parse_issue_number(ZUUL_MESSAGE) + issue_number_dict = remove_duplicated_issue_numbers(issue_number_dict) + gh = github.Github(GH_USER, GH_PW) + repo = gh.get_repo(REPO_NAME) + for key, issue_list in issue_number_dict.items(): + for issue_number in issue_list: + issue = repo.get_issue(number=issue_number) + comment_msg = '' + link_exists = False + if key == 'closes': + issue.create_comment(f'The [Change]({GERRIT_URL}) that closes this issue was merged.') + for label in PROCESS_LABELS: + try: + issue.remove_from_labels(label) + except github.GithubException: + pass + else: + issue.create_comment(f'A [Related Change]({GERRIT_URL} was merged. This issue may be ready to close.') diff --git a/playbooks/get-mac-addresses.yaml b/playbooks/get-mac-addresses.yaml new file mode 100644 index 000000000..f1e8a263c --- /dev/null +++ b/playbooks/get-mac-addresses.yaml @@ -0,0 +1,64 @@ +# 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. + +- 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 + set_fact: + vm_nic: "{{ dict(['nat_mac', 'provision_mac'] | zip([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_nic_fact +- set_fact: + "{{ name }}_vm_nics": "{{ vm_nic_fact.results | map(attribute='ansible_facts.vm_nic') | list }}" diff --git a/playbooks/vars/airship-ipam.yaml b/playbooks/vars/airship-ipam.yaml new file mode 100644 index 000000000..d484b0261 --- /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 000000000..17bde54c7 --- /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 000000000..c6c35d0d9 --- /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: "{{ remote_work_dir | default(zuul.project.src_dir) | default(local_src_dir) }}" +airship_config_ephemeral_ip: "{{ airship_gate_ipam.nat_network.ephemeral_ip }}" +airship_config_iso_builder_docker_image: "quay.io/airshipit/isogen:latest-debian_stable" +airship_config_site_path: manifests/site/test-site +airship_config_ca_data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN5RENDQWJDZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRFNU1USXlOakE0TWpneU5Gb1hEVEk1TVRJeU16QTRNamd5TkZvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTTFSClM0d3lnajNpU0JBZjlCR0JUS1p5VTFw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XFYUjN1NUNpamlJNApnbnhZdUxKQzM0Y2JBSXJtaGpEOEcxa3dmZ2hneGpwNFoxa290LzJhYU5ZVTIvNGhScmhFWE1PY01pdUloWVpKCjJrem1jNnM3RklkdDVjOU5aWUFyeUZSYk1mYlY3UnQwbEppZllWb1V3Y3FYUzJkUG5jYzlNUW9qTEdUYXN1TlUKRy9EWmw5ZWtjV3hFSXlLWGNuY2QzZnhiK3p6OUJFbUxaRDduZjlacnhHU2IrZmhGeDdzWFJRRWc1YkQvdHdkbwpFWFcvbTU1YmJEZnhhNzFqZG5NaDJxdVEzRGlWT0ZFNGZMTERxcjlDRWlsaDMySFJNeHJJNGcwWTVRUFFaazMwCnFZTldmbktWUllOTHYrWC9DeGZ6ZkVacGpxRkVPRkVsQW9JQkFRQ0t6R2JGdmx6d1BaUmh4czd2VXYxOXlIUXAKQzFmR3gwb0tpRDFSNWZwWVBrT0VRQWVudEFKRHNyYVRsNy9rSDY5V09VbUQ1T3gxbWpyRFB0a1M4WnhXYlJXeApGYjJLK3JxYzRtcGFacGROV09OTkszK3RNZmsrb0FRcWUySU1JV253NUhmbVpjNE1QY0t0bkZQYlJTTkF0aktwCkQ2aG9oL3BXMmdjRFA0cVpNWVZvRW04MVZYZEZDUGhOYitNYnUvU3gyaFB4U0dXYTVGaTczeEtwWWp5M3BISlQKWFoyY2lHN0VNQ3NKZW9HS2FRdmNCY1kvNGlSRGFoV0hWcmlsSVhJQXJQdXdmVUIybzZCZFR0allHeU5sZ2NmeApxWEt4aXBTaEE2VlNienVnR3pkdEdNeEUyekRHVEkxOXFSQy96OUNEREM1ZTJTQUZqbEJUV0QyUHJjcU4KLS0tLS1FTkQgUlNBIFBSSVZBVEUgS0VZLS0tLS0K diff --git a/tools/deployment/01_install_kubectl.sh b/tools/deployment/01_install_kubectl.sh new file mode 100755 index 000000000..59e7191b9 --- /dev/null +++ b/tools/deployment/01_install_kubectl.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +# 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 + +: ${AIRSHIPCTL_PROJECT:="../airshipctl"} + +cd ${AIRSHIPCTL_PROJECT} +./tools/deployment/01_install_kubectl.sh diff --git a/tools/deployment/21_systemwide_executable.sh b/tools/deployment/21_systemwide_executable.sh new file mode 100755 index 000000000..9ad6a3c38 --- /dev/null +++ b/tools/deployment/21_systemwide_executable.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +# 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 + +: ${AIRSHIPCTL_PROJECT:="../airshipctl"} + +cd ${AIRSHIPCTL_PROJECT} +./tools/deployment/21_systemwide_executable.sh diff --git a/tools/deployment/22_test_configs.sh b/tools/deployment/22_test_configs.sh new file mode 100755 index 000000000..8b4008de8 --- /dev/null +++ b/tools/deployment/22_test_configs.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +# 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 + +: ${AIRSHIPCTL_PROJECT:="../airshipctl"} +: ${TREASUREMAP_PROJECT:="$(pwd)"} +export AIRSHIPCTL_WS=${AIRSHIPCTL_WS:-$AIRSHIPCTL_PROJECT} +export AIRSHIP_SITE_NAME="${TREASUREMAP_PROJECT}/manifests/site/test-site" + +cd ${AIRSHIPCTL_PROJECT} +./tools/deployment/22_test_configs.sh + +# TODO: may not need/want this since treasuremap repo is already present, +# and branch checkout seems not to be working anyway for some reason? + +# Add the manifest defintion for Treasuremap +#airshipctl config set-manifest dummy_manifest \ +# --repo treasuremap \ +# --url https://opendev.org/airship/treasuremap \ +# --branch v2 \ +# --primary + diff --git a/tools/deployment/24_build_ephemeral_iso.sh b/tools/deployment/24_build_ephemeral_iso.sh new file mode 100755 index 000000000..8f3ecfb12 --- /dev/null +++ b/tools/deployment/24_build_ephemeral_iso.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +# 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 + +: ${AIRSHIPCTL_PROJECT:="../airshipctl"} + +cd ${AIRSHIPCTL_PROJECT} +./tools/deployment/24_build_ephemeral_iso.sh + diff --git a/tools/deployment/25_deploy_ephemeral_node.sh b/tools/deployment/25_deploy_ephemeral_node.sh new file mode 100755 index 000000000..2e0bb4fb8 --- /dev/null +++ b/tools/deployment/25_deploy_ephemeral_node.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +# 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 + +: ${AIRSHIPCTL_PROJECT:="../airshipctl"} + +cd ${AIRSHIPCTL_PROJECT} +./tools/deployment/25_deploy_ephemeral_node.sh diff --git a/tools/deployment/26_deploy_metal3_capi_ephemeral_node.sh b/tools/deployment/26_deploy_metal3_capi_ephemeral_node.sh new file mode 100755 index 000000000..4e382de96 --- /dev/null +++ b/tools/deployment/26_deploy_metal3_capi_ephemeral_node.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +# 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 + +: ${AIRSHIPCTL_PROJECT:="../airshipctl"} + +cd ${AIRSHIPCTL_PROJECT} +./tools/deployment/26_deploy_metal3_capi_ephemeral_node.sh diff --git a/tools/deployment/30_deploy_controlplane.sh b/tools/deployment/30_deploy_controlplane.sh new file mode 100755 index 000000000..e7dac9b1c --- /dev/null +++ b/tools/deployment/30_deploy_controlplane.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +# 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 -ex + +: ${AIRSHIPCTL_PROJECT:="../airshipctl"} + +cd ${AIRSHIPCTL_PROJECT} +./tools/deployment/30_deploy_controlplane.sh diff --git a/tools/validate_docs b/tools/validate_docs new file mode 100755 index 000000000..431387f30 --- /dev/null +++ b/tools/validate_docs @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +# 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. + +# The makefile entrypoint driver for document validation +# Expected to be run from the project root +set -xe + +: ${AIRSHIPCTL_PROJECT:="../airshipctl"} + +export MANIFEST_ROOT="${PWD}" +export SITE_ROOTS="/manifests/site" +cd ${AIRSHIPCTL_PROJECT} +./tools/validate_docs + diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml new file mode 100644 index 000000000..51a72bf1a --- /dev/null +++ b/zuul.d/jobs.yaml @@ -0,0 +1,75 @@ +# 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: airship-treasuremap-update-github-issues + description: Updates and/or closes related issues on Github on merge + run: playbooks/airship-treasuremap-update-github-issues.yaml + nodeset: airship-treasuremap-single-node + secrets: + - name: github_credentials + secret: airship_treasuremap_airshipit_github_username_password + +- job: + name: airship-treasuremap-validate-site-docs + required-projects: + - airship/airshipctl + roles: + - zuul: airship/airshipctl + pre-run: + - playbooks/airship-treasuremap-deploy-docker.yaml + run: playbooks/airship-treasuremap-gate-runner.yaml + nodeset: airship-treasuremap-single-node + vars: + gate_scripts: + - ./tools/deployment/01_install_kubectl.sh + - ./tools/deployment/21_systemwide_executable.sh + - ./tools/validate_docs + +- job: + name: treasuremap-upload-git-mirror + parent: upload-git-mirror + description: Mirrors airship/treasuremap to airshipit/treasuremap + vars: + git_mirror_repository: airshipit/treasuremap + secrets: + - name: git_mirror_credentials + secret: airship_treasuremap_airshipit_github_key + pass-to-parent: true + +- job: + name: airship-treasuremap-gate-script-runner-test + attempts: 1 + timeout: 3600 + required-projects: + - airship/airshipctl + roles: + - zuul: airship/airshipctl + pre-run: + - playbooks/airship-treasuremap-deploy-docker.yaml + - playbooks/airship-treasuremap-build-gate.yaml + post-run: playbooks/airship-collect-logs.yaml + run: playbooks/airship-treasuremap-gate-runner.yaml + nodeset: airship-treasuremap-single-16GB-bionic-node + vars: + site_name: test-site + gate_scripts: + - ./tools/deployment/01_install_kubectl.sh + - ./tools/deployment/22_test_configs.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 + 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 000000000..30c2396e9 --- /dev/null +++ b/zuul.d/nodesets.yaml @@ -0,0 +1,44 @@ +# 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: airship-treasuremap-single-node + nodes: + - name: primary + label: ubuntu-bionic +- nodeset: + name: airship-treasuremap-full-4-nodes-bionic-cluster + nodes: + - name: primary + label: ubuntu-bionic-32GB + - name: compute-1 + label: ubuntu-bionic-expanded + - name: compute-2 + label: ubuntu-bionic-expanded + - name: compute-3 + label: ubuntu-bionic-expanded + groups: + - name: compute + nodes: + - compute-1 + - compute-2 + - compute-3 +- nodeset: + name: airship-treasuremap-single-16GB-bionic-node + nodes: + - name: primary + label: ubuntu-bionic-expanded +- nodeset: + name: airship-treasuremap-single-32GB-bionic-node + nodes: + - name: primary + label: ubuntu-bionic-32GB diff --git a/zuul.d/projects.yaml b/zuul.d/projects.yaml new file mode 100644 index 000000000..2048d8a4f --- /dev/null +++ b/zuul.d/projects.yaml @@ -0,0 +1,32 @@ +# 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. + +- project: + vars: + sphinx_build_dir: docs/build + check: + jobs: + - airship-treasuremap-validate-site-docs +# - airship-treasuremap-functional-existing-k8s TODO: Enable this when functional tests exist, and a cluster is up + - airship-treasuremap-gate-script-runner-test + gate: + jobs: + - noop + - airship-treasuremap-validate-site-docs +# - airship-treasuremap-functional-existing-k8s TODO: Enable this when functional tests exist, and a cluster is up + post: + jobs: + - treasuremap-upload-git-mirror + promote: + jobs: + - airship-treasuremap-update-github-issues + diff --git a/.zuul.yaml b/zuul.d/secrets.yaml similarity index 80% rename from .zuul.yaml rename to zuul.d/secrets.yaml index c8cf7a1d6..69c5e13a7 100644 --- a/.zuul.yaml +++ b/zuul.d/secrets.yaml @@ -9,27 +9,9 @@ # 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. ---- -- project: - check: - jobs: - - noop - gate: - jobs: - - noop - post: - jobs: - - treasuremap-upload-git-mirror - - -- nodeset: - name: treasuremap-single-node - nodes: - - name: ubuntu-bionic - label: ubuntu-bionic - secret: - name: airshipit-github-secret + name: airship_treasuremap_airshipit_github_key data: user: git host: github.com @@ -76,13 +58,19 @@ 4+kMmn8VTejOT2zQfny3zBoxMt30hYsAjHfDS62lxYJL/404uShhAi+1bpnyy+uxU39nQ v3QSn8NtjBdh/WKptpsma1yZEHKAJJjfU9pmSrFHBfvokOmvTygjIC2uxP0ppo= -- job: - name: treasuremap-upload-git-mirror - parent: upload-git-mirror - description: Mirrors airship/treasuremap to airshipit/treasuremap - vars: - git_mirror_repository: airshipit/treasuremap - secrets: - - name: git_mirror_credentials - secret: airshipit-github-secret - pass-to-parent: true +- secret: + name: airship_treasuremap_airshipit_github_username_password + data: + username: airshipbot + password: !encrypted/pkcs1-oaep + - mobuf8PHUrohOWaJn5r+a8POAvUuTduZWzJIg5QNSFoDs92g/vENOxGCHlPwKAPkkfzi0 + Wrix1mK46Mx+NDDtZeCwPCO3CTmDsujWh2XouZ7GoQgRGsfIVLQqcRFAEjPtqitiCnJCJ + sED7LWRjpg67Ief6M0AX+qzKKTjCAIw9Rkg2ni9Lr6WHSRcYX3hqAl3MFxBQHymock1qI + fWxBy5C5rmSITfqf97dUSFwGF/RXsLVztS/dr2MVu21YXWXnW5+zMkyBT6G71ZN9hv5z4 + TESfIiEiJKCzn0NeLs1Jn79QGhnpLPBEd7To2ybAFX5uToIP3f5+uNZPwdskpqc1O6drW + A00R+94LZosXpiaUFjcH3iSyuZQeG/qjr4m8sppe6krzNzA1y8b7vNqzQ/5dttrorc6Mi + qvLNirrGOL84ZvmDGBoTdF+M4PZLuMsO58jk3Mck87q505L9jd5LJCvudIbNCQkQSqX+X + 0qrZT1NVZJaMJRFSbbfxOwqjfcbI+Cr9mRM0h2ZH8hEMl9uIIB7bwADfoJIgVLxnN/2u0 + 11ZWrZayUH/Kc9KO6sjeuHHf6D08fKb8UMWDqVwzgXjz4ZpDvxTeWAR0D9NNlHbmMbuJ5 + XN/+OZrQLeIcGF0Y7wajzm/+Gy42iQ2KZ/WROf4p2tJYABAKb1wMJvsMOxen2U= +