Browse Source

Make the gate more configurable

Updates to make the gate more configurable

Change-Id: I9080267a869cae757b67a9603f99fbdacc78b9e3
changes/25/616625/15
Scott Hussey 7 months ago
parent
commit
0517272333

+ 4
- 31
deployment_files/global/v1.0demo/software/charts/ucp/drydock/drydock.yaml View File

@@ -47,37 +47,12 @@ metadata:
47 47
         path: .ucp.physicalprovisioner
48 48
       dest:
49 49
         path: .values.endpoints.physicalprovisioner
50
-
51
-    # Drydock IPs
52
-    - src:
53
-        schema: pegleg/CommonAddresses/v1
54
-        name: common-addresses
55
-        path: .node_ports.drydock_api
56
-      dest:
57
-        path: .values.network.drydock.node_port.port
58
-    - src:
59
-        schema: pegleg/CommonAddresses/v1
60
-        name: common-addresses
61
-        path: .node_ports.drydock_api
62
-      dest:
63
-        path: .values.endpoints.physicalprovisioner.port.api.nodeport
64
-
65
-    # MaaS IPs
66
-    - src:
67
-        schema: pegleg/CommonAddresses/v1
68
-        name: common-addresses
69
-        # TODO(mb874d): Can change once we have an accessible VIP from fresh nodes.
70
-        path: .genesis.ip
71
-      dest:
72
-        path: .values.conf.drydock.maasdriver.maas_api_url
73
-        pattern: 'MAAS_IP'
74 50
     - src:
75
-        schema: pegleg/CommonAddresses/v1
76
-        name: common-addresses
77
-        path: .node_ports.maas_api
51
+        schema: pegleg/EndpointCatalogue/v1
52
+        name: ucp_endpoints
53
+        path: .ucp.maas_region
78 54
       dest:
79
-        path: .values.conf.drydock.maasdriver.maas_api_url
80
-        pattern: 'MAAS_PORT'
55
+        path: .values.endpoints.maas_region
81 56
 
82 57
     # Credentials
83 58
 
@@ -172,8 +147,6 @@ data:
172 147
           enabled: true
173 148
     conf:
174 149
       drydock:
175
-        maasdriver:
176
-          maas_api_url: http://MAAS_IP:MAAS_PORT/MAAS/api/2.0/
177 150
         plugins:
178 151
           ingester: drydock_provisioner.ingester.plugins.deckhand.DeckhandIngester
179 152
           oob_driver:

+ 10
- 28
deployment_files/global/v1.0demo/software/charts/ucp/drydock/maas.yaml View File

@@ -43,34 +43,6 @@ metadata:
43 43
         path: .values.conf.drydock.bootaction_url
44 44
         pattern: '(DRYDOCK_PORT)'
45 45
 
46
-    # MaaS IPs
47
-    - src:
48
-        schema: pegleg/CommonAddresses/v1
49
-        name: common-addresses
50
-        # TODO(mb874d): Can change once we have an accessible VIP from fresh nodes.
51
-        path: .bootstrap.ip
52
-      dest:
53
-        path: .values.conf.maas.url.maas_url
54
-        pattern: '(MAAS_IP)'
55
-    - src:
56
-        schema: pegleg/CommonAddresses/v1
57
-        name: common-addresses
58
-        path: .node_ports.maas_api
59
-      dest:
60
-        path: .values.conf.maas.url.maas_url
61
-        pattern: '(MAAS_PORT)'
62
-    - src:
63
-        schema: pegleg/CommonAddresses/v1
64
-        name: common-addresses
65
-        path: .node_ports.maas_api
66
-      dest:
67
-        path: .values.network.gui.node_port.port
68
-    - src:
69
-        schema: pegleg/CommonAddresses/v1
70
-        name: common-addresses
71
-        path: .node_ports.maas_proxy
72
-      dest:
73
-        path: .values.network.proxy.node_port.port
74 46
 
75 47
     # MaaS Config
76 48
     - src:
@@ -111,6 +83,12 @@ metadata:
111 83
         path: .ucp.physicalprovisioner
112 84
       dest:
113 85
         path: .values.endpoints.physicalprovisioner
86
+    - src:
87
+        schema: pegleg/EndpointCatalogue/v1
88
+        name: ucp_endpoints
89
+        path: .ucp.maas_ingress
90
+      dest:
91
+        path: .values.endpoints.maas_ingress
114 92
 
115 93
     # Account and credential substitutions
116 94
     - src:
@@ -180,6 +158,10 @@ data:
180 158
           labels:
181 159
             release_group: airship-maas
182 160
   values:
161
+    pod:
162
+      replicas:
163
+        rack: 1
164
+        region: 1
183 165
     labels:
184 166
       rack:
185 167
         node_selector_key: ucp-control-plane

+ 18
- 2
deployment_files/global/v1.0demo/software/config/endpoints.yaml View File

@@ -128,12 +128,10 @@ data:
128 128
         default: http
129 129
       host_fqdn_override:
130 130
         default: null
131
-        public: drydock.gate.local
132 131
     maas_region:
133 132
       name: maas-region
134 133
       hosts:
135 134
         default: maas-region
136
-        public: maas
137 135
       scheme:
138 136
         default: "http"
139 137
       port:
@@ -142,6 +140,24 @@ data:
142 140
           public: 80
143 141
       host_fqdn_override:
144 142
         default: null
143
+    maas_ingress:
144
+      hosts:
145
+        default: maas-ingress
146
+        error_pages: maas-ingress-error
147
+      host_fqdn_override:
148
+        public: null
149
+      port:
150
+        http:
151
+          default: 80
152
+        https:
153
+          default: 443
154
+        error_pages:
155
+          default: 8080
156
+          podport: 8080
157
+        healthz:
158
+          podport: 10259
159
+        status:
160
+          podport: 18089
145 161
     kubernetesprovisioner:
146 162
       name: promenade
147 163
       hosts:

+ 7
- 7
deployment_files/global/v1.0demo/software/config/versions.yaml View File

@@ -177,12 +177,12 @@ data:
177 177
         type: git
178 178
       drydock:
179 179
         location: https://git.openstack.org/openstack/airship-drydock
180
-        reference: 3470f89519d018c572905566891bafc8a3c51c3b
180
+        reference: 485f919822c7e425741a19ab507f83ea075529c5
181 181
         subpath: charts/drydock
182 182
         type: git
183 183
       drydock-htk:
184 184
         location: https://git.openstack.org/openstack/openstack-helm-infra
185
-        reference: 5d356f9265b337b75f605dee839faa8cd0ed3ab2
185
+        reference: 4ad893eb1a5ebd7c7660c70d44d1316862268cf1
186 186
         subpath: helm-toolkit
187 187
         type: git
188 188
       ingress:
@@ -207,12 +207,12 @@ data:
207 207
         type: git
208 208
       maas:
209 209
         location: https://git.openstack.org/openstack/airship-maas
210
-        reference: 2e003450cceb16b9bda71aa69a939a8466516582
210
+        reference: refs/changes/83/619283/11
211 211
         subpath: charts/maas
212 212
         type: git
213 213
       maas-htk:
214 214
         location: https://git.openstack.org/openstack/openstack-helm-infra
215
-        reference: 5d356f9265b337b75f605dee839faa8cd0ed3ab2
215
+        reference: 4ad893eb1a5ebd7c7660c70d44d1316862268cf1
216 216
         subpath: helm-toolkit
217 217
         type: git
218 218
       mariadb:
@@ -461,9 +461,9 @@ data:
461 461
         divingbell: docker.io/ubuntu:16.04
462 462
       drydock:
463 463
         dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.3.1
464
-        drydock: quay.io/airshipit/drydock:3470f89519d018c572905566891bafc8a3c51c3b
464
+        drydock: quay.io/airshipit/drydock:485f919822c7e425741a19ab507f83ea075529c5
465 465
         drydock_db_init: docker.io/postgres:9.5
466
-        drydock_db_sync: quay.io/airshipit/drydock:3470f89519d018c572905566891bafc8a3c51c3b
466
+        drydock_db_sync: quay.io/airshipit/drydock:485f919822c7e425741a19ab507f83ea075529c5
467 467
         ks_endpoints: docker.io/openstackhelm/heat:ocata
468 468
         ks_service: docker.io/openstackhelm/heat:ocata
469 469
         ks_user: docker.io/openstackhelm/heat:ocata
@@ -474,7 +474,7 @@ data:
474 474
         dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.3.1
475 475
         export_api_key: quay.io/airshipit/maas-region-controller:2e003450cceb16b9bda71aa69a939a8466516582
476 476
         maas_cache: quay.io/airshipit/sstream-cache:2e003450cceb16b9bda71aa69a939a8466516582
477
-        maas_rack: quay.io/airshipit/maas-rack-controller:2e003450cceb16b9bda71aa69a939a8466516582
477
+        maas_rack: docker.io/sthussey/maas-rack-controller:dev
478 478
         maas_region: quay.io/airshipit/maas-region-controller:2e003450cceb16b9bda71aa69a939a8466516582
479 479
       promenade:
480 480
         dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.3.1

+ 0
- 2
deployment_files/site/gate-multinode/software/charts/ucp/drydock/drydock.yaml View File

@@ -26,8 +26,6 @@ data:
26 26
       secret_ssh_key: true
27 27
     conf:
28 28
       drydock:
29
-        maasdriver:
30
-          maas_api_url: 'http://maas.gate.local:9085/MAAS/api/2.0/'
31 29
         plugins:
32 30
           oob_driver:
33 31
             - 'drydock_provisioner.drivers.oob.pyghmi_driver.driver.PyghmiDriver'

+ 0
- 25
deployment_files/site/gate-multinode/software/charts/ucp/drydock/maas.yaml View File

@@ -32,29 +32,4 @@ data:
32 32
     network:
33 33
       maas_ingress:
34 34
         addr: '172.24.1.5/32'
35
-    endpoints:
36
-      maas_region:
37
-        host_fqdn_override:
38
-          public: maas.gate.local
39
-        port:
40
-          region_api:
41
-            public: 9085
42
-      maas_ingress:
43
-        hosts:
44
-          default: maas-ingress
45
-          error_pages: maas-ingress-error
46
-        host_fqdn_override:
47
-          public: null
48
-        port:
49
-          http:
50
-            default: 9080
51
-          https:
52
-            default: 9443
53
-          error_pages:
54
-            default: 8080
55
-            podport: 8080
56
-          healthz:
57
-            podport: 10259
58
-          status:
59
-            podport: 18089
60 35
 ...

+ 6
- 0
deployment_files/site/gate-multinode/software/configs/endpoints.yaml View File

@@ -17,6 +17,12 @@ metadata:
17 17
 # dns server
18 18
 data:
19 19
   ucp:
20
+    physicalprovisioner:
21
+      host_fqdn_override:
22
+        public: drydock.gate.local
23
+    maas_region:
24
+      host_fqdn_override:
25
+        public: maas.gate.local
20 26
     identity:
21 27
       host_fqdn_override:
22 28
         public: keystone.gate.local

+ 1
- 2
tools/multi_nodes_gate/airship_gate/bin/shipyard.sh View File

@@ -1,4 +1,3 @@
1
-
2 1
 #!/usr/bin/env bash
3 2
 # Copyright 2018 AT&T Intellectual Property.  All other rights reserved.
4 3
 #
@@ -14,7 +13,7 @@
14 13
 # See the License for the specific language governing permissions and
15 14
 # limitations under the License.
16 15
 
17
-set -e
16
+set -x
18 17
 
19 18
 SCRIPT_DIR=$(realpath $(dirname $0))
20 19
 WORKSPACE=$(realpath ${SCRIPT_DIR}/../../..)

+ 38
- 2
tools/multi_nodes_gate/airship_gate/lib/airship.sh View File

@@ -1,7 +1,31 @@
1 1
 #!/bin/bash
2 2
 
3
+install_ingress_ca() {
4
+  ingress_ca=$(config_ingress_ca)
5
+  if [[ -z "$ingress_ca" ]]
6
+  then
7
+    echo "Not installing ingress root CA."
8
+    return
9
+  fi
10
+  local_file="${TEMP_DIR}/ingress_ca.pem"
11
+  remote_file="${GENESIS_WORK_DIR}/ingress_ca.pem"
12
+  cat <<< "$ingress_ca" > "$local_file"
13
+  rsync_cmd "$local_file" "${GENESIS_NAME}":"$remote_file"
14
+}
15
+
3 16
 shipard_cmd_stdout() {
4
-  ssh_cmd "${GENESIS_NAME}" docker run -t --network host -v "${GENESIS_WORK_DIR}:/work" -e OS_AUTH_URL=http://keystone.ucp.svc.cluster.local:80/v3 -e OS_USERNAME=shipyard -e OS_USER_DOMAIN_NAME=default -e OS_PASSWORD="${SHIPYARD_PASSWORD}" -e OS_PROJECT_DOMAIN_NAME=default -e OS_PROJECT_NAME=service --entrypoint /usr/local/bin/shipyard "${IMAGE_SHIPYARD_CLI}" $* 2>&1
17
+  install_ingress_ca
18
+  ssh_cmd "${GENESIS_NAME}" \
19
+    docker run -t --network=host \
20
+    -v "${GENESIS_WORK_DIR}:/work" \
21
+    -e OS_AUTH_URL=http://keystone.ucp.svc.cluster.local:80/v3 \
22
+    -e OS_USERNAME=shipyard \
23
+    -e OS_USER_DOMAIN_NAME=default \
24
+    -e OS_PASSWORD="${SHIPYARD_PASSWORD}" \
25
+    -e OS_PROJECT_DOMAIN_NAME=default \
26
+    -e OS_PROJECT_NAME=service \
27
+    -e REQUESTS_CA_BUNDLE=/work/ingress_ca.pem \
28
+    --entrypoint /usr/local/bin/shipyard "${IMAGE_SHIPYARD_CLI}" $* 2>&1
5 29
 }
6 30
 
7 31
 shipyard_cmd() {
@@ -16,7 +40,19 @@ shipyard_cmd() {
16 40
 }
17 41
 
18 42
 drydock_cmd_stdout() {
19
-  ssh_cmd "${GENESIS_NAME}" docker run -t --network host -v "${GENESIS_WORK_DIR}:/work" -e DD_URL=http://drydock-api.ucp.svc.cluster.local:9000 -e OS_AUTH_URL=http://keystone.ucp.svc.cluster.local:80/v3 -e OS_USERNAME=shipyard -e OS_USER_DOMAIN_NAME=default -e OS_PASSWORD="${SHIPYARD_PASSWORD}" -e OS_PROJECT_DOMAIN_NAME=default -e OS_PROJECT_NAME=service --entrypoint /usr/local/bin/drydock "${IMAGE_DRYDOCK_CLI}" $* 2>&1
43
+  install_ingress_ca
44
+  ssh_cmd "${GENESIS_NAME}" \
45
+    docker run -t --network=host \
46
+    -v "${GENESIS_WORK_DIR}:/work" \
47
+    -e DD_URL=http://drydock-api.ucp.svc.cluster.local:9000 \
48
+    -e OS_AUTH_URL=http://keystone.ucp.svc.cluster.local:80/v3 \
49
+    -e OS_USERNAME=shipyard \
50
+    -e OS_USER_DOMAIN_NAME=default \
51
+    -e OS_PASSWORD="${SHIPYARD_PASSWORD}" \
52
+    -e OS_PROJECT_DOMAIN_NAME=default \
53
+    -e OS_PROJECT_NAME=service \
54
+    -e REQUESTS_CA_BUNDLE=/work/ingress_ca.pem \
55
+    --entrypoint /usr/local/bin/drydock "${IMAGE_DRYDOCK_CLI}" $* 2>&1
20 56
 }
21 57
 drydock_cmd() {
22 58
   if [[ ! -z "${LOG_FILE}" ]]

+ 26
- 1
tools/multi_nodes_gate/airship_gate/lib/config.sh View File

@@ -16,6 +16,7 @@ export SHIPYARD_PASSWORD=${SHIPYARD_OS_PASSWORD:-password18}
16 16
 export REGISTRY_DATA_DIR=${REGISTRY_DATA_DIR:-/mnt/registry}
17 17
 export VIRSH_POOL=${VIRSH_POOL:-airship}
18 18
 export VIRSH_POOL_PATH=${VIRSH_POOL_PATH:-/var/lib/libvirt/airship}
19
+export VIRSH_CPU_OPTS=${VIRSH_CPU_OPTS:-host}
19 20
 export UPSTREAM_DNS=${UPSTREAM_DNS:-"8.8.8.8 208.67.220.220"}
20 21
 
21 22
 config_vm_memory() {
@@ -37,6 +38,16 @@ config_vm_mac() {
37 38
     jq -cr ".vm.${nodename}.mac" < "${GATE_MANIFEST}"
38 39
 }
39 40
 
41
+config_vm_io() {
42
+    nodename=${1}
43
+    io_profile=$(jq -cr ".vm.${nodename}.io_profile" < "${GATE_MANIFEST}")
44
+    if [[ -z "$io_profile" ]]
45
+    then
46
+      io_profile="fast"
47
+    fi
48
+    echo -n "$io_profile"
49
+}
50
+
40 51
 config_vm_vcpus() {
41 52
     nodename=${1}
42 53
     jq -cr ".vm.${nodename}.vcpus" < "${GATE_MANIFEST}"
@@ -62,12 +73,20 @@ config_vm_userdata() {
62 73
       echo "${val}"
63 74
     fi
64 75
 }
76
+
65 77
 config_ingress_domain() {
66 78
     jq -cr '.ingress.domain' < "${GATE_MANIFEST}"
67 79
 }
68 80
 
81
+config_ingress_ca() {
82
+    if [[ ! -z "$GATE_MANIFEST" ]]
83
+    then
84
+      jq -cr '.ingress.ca' < "${GATE_MANIFEST}"
85
+    fi
86
+}
87
+
69 88
 config_ingress_ips() {
70
-    jq -cr '.ingress | keys | map(select(. != "domain")) | join(" ")' < "${GATE_MANIFEST}"
89
+    jq -cr '.ingress | keys | map(select(test("([0-9]{1,3}.?){4}"))) | join(" ")' < "${GATE_MANIFEST}"
71 90
 }
72 91
 
73 92
 config_ingress_entries() {
@@ -86,3 +105,9 @@ config_pegleg_sitename() {
86 105
 config_pegleg_aux_repos() {
87 106
     jq -cr '.configuration.aux_repos | join(" ")' < "${GATE_MANIFEST}"
88 107
 }
108
+
109
+join_array() {
110
+  local IFS=$1
111
+  shift
112
+  echo "$*"
113
+}

+ 1
- 1
tools/multi_nodes_gate/airship_gate/lib/ingress.sh View File

@@ -17,7 +17,7 @@ ingress_dns_config() {
17 17
     done
18 18
   done
19 19
 
20
-  DNS_DOMAIN=${ingress_domain} ZONE_FILE=$(basename $DNS_ZONE_FILE) envsubst < "${TEMPLATE_DIR}/ingress_corefile.sub" > "${COREFILE}"
20
+  DNS_DOMAIN=${ingress_domain} ZONE_FILE=$(basename $DNS_ZONE_FILE) DNS_SERVERS="$UPSTREAM_DNS" envsubst < "${TEMPLATE_DIR}/ingress_corefile.sub" > "${COREFILE}"
21 21
 }
22 22
 
23 23
 ingress_dns_start() {

+ 14
- 3
tools/multi_nodes_gate/airship_gate/lib/virsh.sh View File

@@ -51,6 +51,8 @@ iso_gen() {
51 51
     fi
52 52
 
53 53
     envsubst < "${TEMPLATE_DIR}/meta-data.sub" > meta-data
54
+
55
+    export DNS_SERVERS=$(join_array ',' $UPSTREAM_DNS)
54 56
     envsubst < "${TEMPLATE_DIR}/network-config.sub" > network-config
55 57
 
56 58
     {
@@ -129,7 +131,16 @@ vm_clean_all() {
129 131
 vm_create() {
130 132
     NAME=${1}
131 133
     MAC_ADDRESS=$(config_vm_mac "${NAME}")
132
-    DISK_OPTS="bus=virtio,cache=directsync,discard=unmap,format=qcow2"
134
+    IO_PROF=$(config_vm_io "${NAME}")
135
+    if [[ "$IO_PROF" == "fast" ]]
136
+    then
137
+      DISK_OPTS="bus=virtio,cache=none,format=qcow2,io=native"
138
+    elif [[ "$IO_PROF" == "safe" ]]
139
+    then
140
+      DISK_OPTS="bus=virtio,cache=directsync,discard=unmap,format=qcow2,io=native"
141
+    else
142
+      DISK_OPTS="bus=virtio,format=qcow2"
143
+    fi
133 144
     vol_create_root "${NAME}"
134 145
     wait
135 146
 
@@ -141,7 +152,7 @@ vm_create() {
141 152
         virt-install \
142 153
             --name "${NAME}" \
143 154
             --virt-type kvm \
144
-            --cpu host \
155
+            --cpu ${VIRSH_CPU_OPTS} \
145 156
             --graphics vnc,listen=0.0.0.0 \
146 157
             --noautoconsole \
147 158
             --network "network=airship_gate,model=virtio" \
@@ -161,7 +172,7 @@ vm_create() {
161 172
         virt-install \
162 173
             --name "${NAME}" \
163 174
             --virt-type kvm \
164
-            --cpu host \
175
+            --cpu ${VIRSH_CPU_OPTS} \
165 176
             --graphics vnc,listen=0.0.0.0 \
166 177
             --noautoconsole \
167 178
             --network "network=airship_gate,model=virtio" \

+ 61
- 0
tools/multi_nodes_gate/airship_gate/manifests/deploy_site.json View File

@@ -0,0 +1,61 @@
1
+{
2
+  "configuration": {
3
+    "site": "gate-multinode",
4
+    "primary_repo": "deployment_files",
5
+    "aux_repos": []
6
+  },
7
+  "ingress": {
8
+    "domain": "gate.local",
9
+    "ca": "-----BEGIN CERTIFICATE-----\nMIIFJzCCAw+gAwIBAgIJAJrXqOA54qn/MA0GCSqGSIb3DQEBCwUAMB8xCzAJBgNV\nBAYTAlVTMRAwDgYDVQQDDAdyb290LWNhMB4X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FeaDem\nNnNY9Ft+LL5fZ2SwRI+KA4DvRiFMMbZoJDu5q/LlxCJi32qDlSRpmZfaXymadO/T\nIokryRzBscPFznXTqia/cv6JeSapg3zzRA9r7hB3osJLVQQ5S6HzcYxAmyi7OFYv\n0ZBaEem9KYo5MtKNfF21XpoK0T6/z1Jryjz5uNfvLXGHrMW0/rfrRiTa60JiH5r9\nIwyboh/CVrPnU7jC4GtkkE9pCMvaJhrlquf3pCkPIwkIHI0rK2cr1VYi2EFcEGsm\niwqZcA+PX7NWVhJAcUiBRUYqXPltC2EKogX6GMnos7Gczr4f0AqXap3VG9oMRZu8\nDWBxwnfRQrnyAx1G+ZgpOVpbjbb/kpxKCurPEb7xyew9NAOipaKrXWioUiTu54Gn\nTeZXU3tW6nSgq/OV3xWN1hzFQJ0JG45APEjv1UCphvU1DVHOvpiFZXZGUAObDIvv\nZUO/ngtoFv5RRyHJ5EkSIO0jDKRU5dQ+J7LEXsH1aK/ErPX4n52oyD/xX9h6MF0m\nzaItjJ6r6d8+c4xCgsIjDbylU71IvmzUYneGN5cVsavEI93KDJLz0brouK12+UB2\nz4S968kA+qCbBOYTkiGJWyjuJq3o/QJjQivF\n-----END CERTIFICATE-----",
10
+    "172.24.1.5": ["maas-nc"],
11
+    "172.24.1.6": ["drydock-nc","shipyard-nc","keystone-nc"]
12
+  },
13
+  "stages": [
14
+    {
15
+      "name": "Load Site Design",
16
+      "script": "shipyard-load-design.sh"
17
+    },
18
+    {
19
+      "name": "Deploy Site",
20
+      "script": "shipyard-deploy-site.sh"
21
+    }
22
+  ],
23
+  "vm": {
24
+    "build": {
25
+      "memory": 3072,
26
+      "vcpus": 2,
27
+      "mac": "52:54:00:00:be:31",
28
+      "ip": "172.24.1.9",
29
+      "bootstrap": true,
30
+      "userdata": "packages: [docker.io]"
31
+    },
32
+    "n0" : {
33
+      "memory": 32768,
34
+      "vcpus": 8,
35
+      "mac": "52:54:00:00:a4:31",
36
+      "ip": "172.24.1.10",
37
+      "bootstrap": true
38
+    },
39
+    "n1" : {
40
+      "memory": 3072,
41
+      "vcpus": 2,
42
+      "mac": "52:54:00:00:a3:31",
43
+      "ip": "172.24.1.11",
44
+      "bootstrap": false
45
+    },
46
+    "n2" : {
47
+      "memory": 3072,
48
+      "vcpus": 2,
49
+      "mac": "52:54:00:1a:95:0d",
50
+      "ip": "172.24.1.12",
51
+      "bootstrap": false
52
+    },
53
+    "n3" : {
54
+      "memory": 3072,
55
+      "vcpus": 2,
56
+      "mac": "52:54:00:31:c2:36",
57
+      "ip": "172.24.1.13",
58
+      "bootstrap": false
59
+    }
60
+  }
61
+}

+ 12
- 5
tools/multi_nodes_gate/airship_gate/manifests/multinode_deploy.json View File

@@ -6,6 +6,7 @@
6 6
   },
7 7
   "ingress": {
8 8
     "domain": "gate.local",
9
+    "ca": "-----BEGIN CERTIFICATE-----\nMIIFJzCCAw+gAwIBAgIJAJrXqOA54qn/MA0GCSqGSIb3DQEBCwUAMB8xCzAJBgNV\nBAYTAlVTMRAwDgYDVQQDDAdyb290LWNhMB4XDTE4MTEwMjE1MTgyNVoXDTM4MTAy\nODE1MTgyNVowHzELMAkGA1UEBhMCVVMxEDAOBgNVBAMMB3Jvb3QtY2EwggIiMA0G\nCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDVJt2qJILBhd5i0NOCfENWD07r3wlb\nI1MSy2pgt2qNzSpn3+gLfnQSMEDtdPFzNcU9FceE8It/W9QYeOx1V2bRX9Jjld2R\n8MFkoHlO+WHd55tblz2Jel5QYlFbjRUscfH7OG65cxa2vao26vyskYLmeNrdY0bi\n03w480ph/152qoFGlKVL3Ozlm6pcrKEwfCzZx/wO1hqAqOxd3fTRbgo3MKKzP1Ov\nsurgxwdSTzO5xL7JPfK3h94G9BeIdfcjIqosg393jTDhFwJ6TxuJUG3jg08mscHb\n/89ZPg5PLF8mLlCKc7WZDbxuo/8Oy7Krlv48LV6hWDelAynMH3X1m7QP2l7gMK+u\nxWFIWcHZ+fncdH9aicszS99e8ji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1aK/ErPX4n52oyD/xX9h6MF0m\nzaItjJ6r6d8+c4xCgsIjDbylU71IvmzUYneGN5cVsavEI93KDJLz0brouK12+UB2\nz4S968kA+qCbBOYTkiGJWyjuJq3o/QJjQivF\n-----END CERTIFICATE-----",
9 10
     "172.24.1.5": ["maas"],
10 11
     "172.24.1.6": ["drydock","shipyard","keystone"]
11 12
   },
@@ -18,10 +19,6 @@
18 19
       "name": "Pegleg Collection",
19 20
       "script": "pegleg-collect.sh"
20 21
     },
21
-    {
22
-      "name": "Populate Image Cache",
23
-      "script": "registry-load.sh"
24
-    },
25 22
     {
26 23
       "name": "Generate Certificates",
27 24
       "script": "generate-certificates.sh"
@@ -44,6 +41,11 @@
44 41
       "script": "genesis.sh",
45 42
       "on_error": "collect_genesis_info.sh"
46 43
     },
44
+    {
45
+      "name": "Validate Genesis",
46
+      "script": "validate-genesis.sh",
47
+      "on_error": "collect_genesis_info.sh"
48
+    },
47 49
     {
48 50
       "name": "Load Site Design",
49 51
       "script": "shipyard-load-design.sh"
@@ -59,14 +61,16 @@
59 61
       "vcpus": 2,
60 62
       "mac": "52:54:00:00:be:31",
61 63
       "ip": "172.24.1.9",
64
+      "io_profile": "fast",
62 65
       "bootstrap": true,
63 66
       "userdata": "packages: [docker.io]"
64 67
     },
65 68
     "n0" : {
66 69
       "memory": 32768,
67
-      "vcpus": 8,
70
+      "vcpus": 12,
68 71
       "mac": "52:54:00:00:a4:31",
69 72
       "ip": "172.24.1.10",
73
+      "io_profile": "fast",
70 74
       "bootstrap": true
71 75
     },
72 76
     "n1" : {
@@ -74,6 +78,7 @@
74 78
       "vcpus": 2,
75 79
       "mac": "52:54:00:00:a3:31",
76 80
       "ip": "172.24.1.11",
81
+      "io_profile": "fast",
77 82
       "bootstrap": false
78 83
     },
79 84
     "n2" : {
@@ -81,6 +86,7 @@
81 86
       "vcpus": 2,
82 87
       "mac": "52:54:00:1a:95:0d",
83 88
       "ip": "172.24.1.12",
89
+      "io_profile": "fast",
84 90
       "bootstrap": false
85 91
     },
86 92
     "n3" : {
@@ -88,6 +94,7 @@
88 94
       "vcpus": 2,
89 95
       "mac": "52:54:00:31:c2:36",
90 96
       "ip": "172.24.1.13",
97
+      "io_profile": "fast",
91 98
       "bootstrap": false
92 99
     }
93 100
   }

+ 9
- 7
tools/multi_nodes_gate/airship_gate/manifests/multinode_genesis.json View File

@@ -6,8 +6,9 @@
6 6
   },
7 7
   "ingress": {
8 8
     "domain": "gate.local",
9
-    "172.24.1.5": ["maas"],
10
-    "172.24.1.6": ["drydock","shipyard","keystone"]
9
+    "ca": "-----BEGIN CERTIFICATE-----\nMIIFJzCCAw+gAwIBAgIJAJrXqOA54qn/MA0GCSqGSIb3DQEBCwUAMB8xCzAJBgNV\nBAYTAlVTMRAwDgYDVQQDDAdyb290LWNhMB4XDTE4MTEwMjE1MTgyNVoXDTM4MTAy\nODE1MTgyNVowHzELMAkGA1UEBhMCVVMxEDAOBgNVBAMMB3Jvb3QtY2EwggIiMA0G\nCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDVJt2qJILBhd5i0NOCfENWD07r3wlb\nI1MSy2pgt2qNzSpn3+gLfnQSMEDtdPFzNcU9FceE8It/W9QYeOx1V2bRX9Jjld2R\n8MFkoHlO+WHd55tblz2Jel5QYlFbjRUscfH7OG65cxa2vao26vyskYLmeNrdY0bi\n03w480ph/152qoFGlKVL3Ozlm6pcrKEwfCzZx/wO1hqAqOxd3fTRbgo3MKKzP1Ov\nsurgxwdSTzO5xL7JPfK3h94G9BeIdfcjIqosg393jTDhFwJ6TxuJUG3jg08mscHb\n/89ZPg5PLF8mLlCKc7WZDbxuo/8Oy7Krlv48LV6hWDelAynMH3X1m7QP2l7gMK+u\nxWFIWcHZ+fncdH9aicszS99e8jiIuCVpnKE/1qoo/Jhi4uR7l5uedxnXM2EqTSA/\nd9b849oTwm22Ykzu1EFCdkYtAU326yAoNEsgaBm8SHVGQ6O1W3iVFYpsTIZ65toB\n6uRv7YK7gIkeJFUCxn1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----END CERTIFICATE-----",
10
+    "172.24.1.5": ["maas-nc"],
11
+    "172.24.1.6": ["drydock-nc","shipyard-nc","iam-nc"]
11 12
   },
12 13
   "stages": [
13 14
     {
@@ -18,10 +19,6 @@
18 19
       "name": "Pegleg Collection",
19 20
       "script": "pegleg-collect.sh"
20 21
     },
21
-    {
22
-      "name": "Populate Image Cache",
23
-      "script": "registry-load.sh"
24
-    },
25 22
     {
26 23
       "name": "Generate Certificates",
27 24
       "script": "generate-certificates.sh"
@@ -43,6 +40,11 @@
43 40
       "name": "Genesis",
44 41
       "script": "genesis.sh",
45 42
       "on_error": "collect_genesis_info.sh"
43
+    },
44
+    {
45
+      "name": "Validate Genesis",
46
+      "script": "validate-genesis.sh",
47
+      "on_error": "collect_genesis_info.sh"
46 48
     }
47 49
   ],
48 50
   "vm": {
@@ -56,7 +58,7 @@
56 58
     },
57 59
     "n0" : {
58 60
       "memory": 16384,
59
-      "vcpus": 8,
61
+      "vcpus": 12,
60 62
       "mac": "52:54:00:00:a4:31",
61 63
       "ip": "172.24.1.10",
62 64
       "bootstrap": true

+ 1
- 1
tools/multi_nodes_gate/airship_gate/stages/pegleg-collect.sh View File

@@ -39,7 +39,7 @@ render_pegleg_cli() {
39 39
     then
40 40
         for r in ${aux_repos[*]}
41 41
         do
42
-          cli_string="${cli_string} -a ${r}"
42
+          cli_string="${cli_string} -a /workspace/${r}"
43 43
         done
44 44
     fi
45 45
 

+ 30
- 0
tools/multi_nodes_gate/airship_gate/stages/validate-genesis.sh View File

@@ -0,0 +1,30 @@
1
+#!/usr/bin/env bash
2
+# Copyright 2018 AT&T Intellectual Property.  All other rights reserved.
3
+#
4
+# Licensed under the Apache License, Version 2.0 (the "License");
5
+# you may not use this file except in compliance with the License.
6
+# You may obtain a copy of the License at
7
+#
8
+#     http://www.apache.org/licenses/LICENSE-2.0
9
+#
10
+# Unless required by applicable law or agreed to in writing, software
11
+# distributed under the License is distributed on an "AS IS" BASIS,
12
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+# See the License for the specific language governing permissions and
14
+# limitations under the License.
15
+
16
+set -e
17
+
18
+source "${GATE_UTILS}"
19
+
20
+# Copies script and virtmgr private key to genesis VM
21
+rsync_cmd "${SCRIPT_DEPOT}/validate-genesis.sh" "${GENESIS_NAME}:/root/airship/"
22
+
23
+set -o pipefail
24
+ssh_cmd "${GENESIS_NAME}" /root/airship/validate-genesis.sh 2>&1 | tee -a "${LOG_FILE}"
25
+set +o pipefail
26
+
27
+if ! ssh_cmd n0 docker images | tail -n +2 | grep -v registry:5000 ; then
28
+    log_warn "Using some non-cached docker images.  This will slow testing."
29
+    ssh_cmd n0 docker images | tail -n +2 | grep -v registry:5000 | tee -a "${LOG_FILE}"
30
+fi

+ 1
- 1
tools/multi_nodes_gate/airship_gate/templates/ingress_corefile.sub View File

@@ -4,6 +4,6 @@ ${DNS_DOMAIN} {
4 4
 }
5 5
 
6 6
 . {
7
-    forward . ${UPSTREAM_DNS}
7
+    forward . ${DNS_SERVERS}
8 8
     log
9 9
 }

+ 1
- 3
tools/multi_nodes_gate/airship_gate/templates/network-config.sub View File

@@ -8,6 +8,4 @@ config:
8 8
         address: ${BR_IP_NODE}/24
9 9
         gateway: 172.24.1.1
10 10
   - type: nameserver
11
-    address:
12
-      - 8.8.8.8
13
-      - 8.8.4.4
11
+    address: [${DNS_SERVERS}]

+ 2
- 0
tools/multi_nodes_gate/airship_gate/templates/user-data.sub View File

@@ -4,6 +4,8 @@ disable_root: false
4 4
 
5 5
 hostname: ${NAME}
6 6
 manage_etc_hosts: false
7
+package_update: true
8
+apt_preserve_sources_list: true
7 9
 
8 10
 ssh_authorized_keys:
9 11
   - ${SSH_PUBLIC_KEY}

Loading…
Cancel
Save