From 25e7d92d48f48c02c976db8dca21cda5a13064f6 Mon Sep 17 00:00:00 2001 From: Dmitry Ukov Date: Wed, 29 Apr 2020 14:46:54 +0400 Subject: [PATCH] Rename gating test site * New name for gating site is 'test-site' * Renamed 'test-bootstrap' type. New name is 'gating'. * Moved BareMetalHost and its settings from ephemeral function to shared directory within the site Change-Id: I510e74c1a553bb2b1f84e66f8e4a7796640b59cc --- .../function/ephemeral/kustomization.yaml | 1 - manifests/function/ephemeral/secret.yaml | 50 ------------------- .../ephemeral/bootstrap/kustomization.yaml | 7 --- .../bootstrap/patch-baremetal-host.yaml | 7 --- .../bootstrap/patch-baremetal-secret.yaml | 7 --- .../ephemeral/bootstrap/kustomization.yaml | 5 ++ .../ephemeral/initinfra/kustomization.yaml | 0 .../baremetalhost/node02/baremetalhost.yaml} | 8 +-- .../baremetalhost/node02/kustomization.yaml | 16 ++++++ .../shared/baremetalhost/node02/networkData | 29 +++++++++++ .../kustomization.yaml | 0 .../defaults/main.yaml | 2 +- .../templates/airshipconfig.j2 | 2 +- tools/gate/config_template.yaml | 2 +- zuul.d/jobs.yaml | 4 +- 15 files changed, 59 insertions(+), 81 deletions(-) delete mode 100644 manifests/site/test-bootstrap/ephemeral/bootstrap/kustomization.yaml delete mode 100644 manifests/site/test-bootstrap/ephemeral/bootstrap/patch-baremetal-host.yaml delete mode 100644 manifests/site/test-bootstrap/ephemeral/bootstrap/patch-baremetal-secret.yaml create mode 100644 manifests/site/test-site/ephemeral/bootstrap/kustomization.yaml rename manifests/site/{test-bootstrap => test-site}/ephemeral/initinfra/kustomization.yaml (100%) rename manifests/{function/ephemeral/baremetal.yaml => site/test-site/shared/baremetalhost/node02/baremetalhost.yaml} (76%) create mode 100644 manifests/site/test-site/shared/baremetalhost/node02/kustomization.yaml create mode 100644 manifests/site/test-site/shared/baremetalhost/node02/networkData rename manifests/type/{test-bootstrap => gating}/kustomization.yaml (100%) diff --git a/manifests/function/ephemeral/kustomization.yaml b/manifests/function/ephemeral/kustomization.yaml index 70812872a..97a9721bd 100644 --- a/manifests/function/ephemeral/kustomization.yaml +++ b/manifests/function/ephemeral/kustomization.yaml @@ -1,3 +1,2 @@ resources: - secret.yaml - - baremetal.yaml diff --git a/manifests/function/ephemeral/secret.yaml b/manifests/function/ephemeral/secret.yaml index 5d4836e15..19d11c73c 100644 --- a/manifests/function/ephemeral/secret.yaml +++ b/manifests/function/ephemeral/secret.yaml @@ -108,53 +108,3 @@ stringData: - mount --bind /mnt/vda/var/lib/docker /var/lib/docker - mkdir -p /var/lib/docker-engine /mnt/vda/var/lib/docker-engine - mount --bind /mnt/vda/var/lib/docker-engine /var/lib/docker-engine ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - airshipit.org/deploy-k8s: "false" - name: ephemeral-network-data - namespace: default -type: Opaque -stringData: - networkData: | - links: - - id: enp0s3 - name: enp0s3 - type: phy - mtu: "1500" - - id: enp0s4 - name: enp0s4 - type: phy - mtu: "1500" - networks: - - id: private-ipv4 - type: ipv4 - link: enp0s3 - ip_address: 10.23.25.101 - netmask: 255.255.255.0 - routes: - - network: 0.0.0.0 - netmask: 0.0.0.0 - gateway: 10.23.25.1 - - id: private-ipv4 - type: ipv4 - link: enp0s4 - ip_address: 10.23.24.101 - netmask: 255.255.255.0 - services: - - address: 8.8.8.8 - type: dns - - address: 8.8.4.4 - type: dns ---- -apiVersion: v1 -kind: Secret -metadata: - name: master-0-bmc-secret - namespace: default -type: Opaque -stringData: - username: "" - password: "" diff --git a/manifests/site/test-bootstrap/ephemeral/bootstrap/kustomization.yaml b/manifests/site/test-bootstrap/ephemeral/bootstrap/kustomization.yaml deleted file mode 100644 index 4ca551ee6..000000000 --- a/manifests/site/test-bootstrap/ephemeral/bootstrap/kustomization.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - ../../../../type/test-bootstrap -patchesStrategicMerge: - - patch-baremetal-host.yaml - - patch-baremetal-secret.yaml diff --git a/manifests/site/test-bootstrap/ephemeral/bootstrap/patch-baremetal-host.yaml b/manifests/site/test-bootstrap/ephemeral/bootstrap/patch-baremetal-host.yaml deleted file mode 100644 index 2bdd0d7da..000000000 --- a/manifests/site/test-bootstrap/ephemeral/bootstrap/patch-baremetal-host.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: metal3.io/v1alpha1 -kind: BareMetalHost -metadata: - name: master-0 -spec: - bmc: - address: redfish+https://localhost:8443/redfish/v1/Systems/air-ephemeral diff --git a/manifests/site/test-bootstrap/ephemeral/bootstrap/patch-baremetal-secret.yaml b/manifests/site/test-bootstrap/ephemeral/bootstrap/patch-baremetal-secret.yaml deleted file mode 100644 index 43b519d9c..000000000 --- a/manifests/site/test-bootstrap/ephemeral/bootstrap/patch-baremetal-secret.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: master-0-bmc-secret -stringData: - username: username - password: password diff --git a/manifests/site/test-site/ephemeral/bootstrap/kustomization.yaml b/manifests/site/test-site/ephemeral/bootstrap/kustomization.yaml new file mode 100644 index 000000000..9bffed6d7 --- /dev/null +++ b/manifests/site/test-site/ephemeral/bootstrap/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ../../shared/baremetalhost/node02 + - ../../../../type/gating diff --git a/manifests/site/test-bootstrap/ephemeral/initinfra/kustomization.yaml b/manifests/site/test-site/ephemeral/initinfra/kustomization.yaml similarity index 100% rename from manifests/site/test-bootstrap/ephemeral/initinfra/kustomization.yaml rename to manifests/site/test-site/ephemeral/initinfra/kustomization.yaml diff --git a/manifests/function/ephemeral/baremetal.yaml b/manifests/site/test-site/shared/baremetalhost/node02/baremetalhost.yaml similarity index 76% rename from manifests/function/ephemeral/baremetal.yaml rename to manifests/site/test-site/shared/baremetalhost/node02/baremetalhost.yaml index c3b270256..21732713d 100644 --- a/manifests/function/ephemeral/baremetal.yaml +++ b/manifests/site/test-site/shared/baremetalhost/node02/baremetalhost.yaml @@ -5,16 +5,16 @@ metadata: labels: airshipit.org/ephemeral-node: "true" airshipit.org/deploy-k8s: "false" - name: master-0 + name: node02 spec: online: true bootMACAddress: 00:3b:8b:0c:ec:8b networkData: - name: ephemeral-network-data + name: node02-network-data namespace: default bmc: - address: redfish+http://localhost:8000/redfish/v1/Systems/air-ephemeral - credentialsName: master-0-bmc-secret + address: redfish+https://localhost:8443/redfish/v1/Systems/air-ephemeral + credentialsName: node02-bmc-secret status: provisioning: # we need this status to make sure, that the host is not going to be diff --git a/manifests/site/test-site/shared/baremetalhost/node02/kustomization.yaml b/manifests/site/test-site/shared/baremetalhost/node02/kustomization.yaml new file mode 100644 index 000000000..478d9f62a --- /dev/null +++ b/manifests/site/test-site/shared/baremetalhost/node02/kustomization.yaml @@ -0,0 +1,16 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - baremetalhost.yaml + +generatorOptions: + disableNameSuffixHash: true + +secretGenerator: + - name: node02-network-data + files: + - networkData + - name: node02-bmc-secret + literals: + - username=username + - password=password diff --git a/manifests/site/test-site/shared/baremetalhost/node02/networkData b/manifests/site/test-site/shared/baremetalhost/node02/networkData new file mode 100644 index 000000000..c5dc43a58 --- /dev/null +++ b/manifests/site/test-site/shared/baremetalhost/node02/networkData @@ -0,0 +1,29 @@ +links: + - id: enp0s3 + name: enp0s3 + type: phy + mtu: "1500" + - id: enp0s4 + name: enp0s4 + type: phy + mtu: "1500" +networks: + - id: private-ipv4 + type: ipv4 + link: enp0s3 + ip_address: 10.23.25.101 + netmask: 255.255.255.0 + routes: + - network: 0.0.0.0 + netmask: 0.0.0.0 + gateway: 10.23.25.1 + - id: private-ipv4 + type: ipv4 + link: enp0s4 + ip_address: 10.23.24.101 + netmask: 255.255.255.0 +services: + - address: 8.8.8.8 + type: dns + - address: 8.8.4.4 + type: dns diff --git a/manifests/type/test-bootstrap/kustomization.yaml b/manifests/type/gating/kustomization.yaml similarity index 100% rename from manifests/type/test-bootstrap/kustomization.yaml rename to manifests/type/gating/kustomization.yaml diff --git a/roles/airshipctl-test-configs/defaults/main.yaml b/roles/airshipctl-test-configs/defaults/main.yaml index e1054f67d..2206e7e22 100644 --- a/roles/airshipctl-test-configs/defaults/main.yaml +++ b/roles/airshipctl-test-configs/defaults/main.yaml @@ -18,7 +18,7 @@ airship_config_iso_builder_docker_image: quay.io/airshipit/isogen:latest airship_config_iso_port: 8099 airship_config_iso_serve_host: localhost airship_config_iso_name: debian-custom.iso -airship_site_name: manifests/site/test-bootstrap +airship_site_name: manifests/site/test-site remote_type: redfish remote_insecure: true remote_proxy: false diff --git a/roles/airshipctl-test-configs/templates/airshipconfig.j2 b/roles/airshipctl-test-configs/templates/airshipconfig.j2 index 519125341..159729b37 100644 --- a/roles/airshipctl-test-configs/templates/airshipconfig.j2 +++ b/roles/airshipctl-test-configs/templates/airshipconfig.j2 @@ -45,7 +45,7 @@ manifests: tag: "" url: {{ airship_config_primary_repo_url }} ## this is temporary hack, as soon as we use `document pull` command in gate process - ## this will subpath will be airshipctl/manifests/site/test-bootstrap, as airshipctl + ## this will subpath will be airshipctl/manifests/site/test-site, as airshipctl ## will be primary repository subPath: {{ airship_site_name }} targetPath: {{ airship_config_manifest_directory }} diff --git a/tools/gate/config_template.yaml b/tools/gate/config_template.yaml index 0cb177dc6..e918af709 100644 --- a/tools/gate/config_template.yaml +++ b/tools/gate/config_template.yaml @@ -15,7 +15,7 @@ serve_dir: /srv/iso serve_port: 8099 local_src_dir: "$AIRSHIPCTL_WS" ansible_user: root -site_name: test-bootstrap +site_name: test-site remote_work_dir: "$AIRSHIPCTL_WS" sphinx_build_dir: docs/build python_version: 3.7 diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index eec1fe094..0b46734dc 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -75,7 +75,7 @@ run: playbooks/airship-airshipctl-test-runner.yaml nodeset: airship-airshipctl-single-16GB-bionic-node vars: - site_name: test-bootstrap + site_name: test-site ## var files are the files that are located at playbooks/vars directory var_files: - airship-ipam.yaml @@ -100,7 +100,7 @@ run: playbooks/airship-airshipctl-test-runner.yaml timeout: 3600 vars: - site_name: test-bootstrap + site_name: test-site var_files: - airship-ipam.yaml - test-config.yaml