summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Hussey <sh8121@att.com>2018-11-07 22:03:30 +0000
committerKaspars Skels <kaspars.skels@gmail.com>2018-12-11 17:30:33 -0600
commit05172723330b4332948a7182ed8d8999c7e31166 (patch)
tree3b543c97d33142253893b0646d76ee2ec58b6fc7
parent7a0cbb466eaf9572698cad2efe5b67d50f1654ff (diff)
Make the gate more configurable
Updates to make the gate more configurable Change-Id: I9080267a869cae757b67a9603f99fbdacc78b9e3
Notes
Notes (review): Code-Review+2: Kaspars Skels <kaspars.skels@gmail.com> Code-Review+1: Evgeniy L <eli@mirantis.com> Code-Review+1: Ahmad Mahmoudi <am495p@att.com> Code-Review+2: Craig Anderson <craig.anderson@att.com> Workflow+1: Kaspars Skels <kaspars.skels@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Thu, 13 Dec 2018 16:38:06 +0000 Reviewed-on: https://review.openstack.org/616625 Project: openstack/airship-in-a-bottle Branch: refs/heads/master
-rw-r--r--deployment_files/global/v1.0demo/software/charts/ucp/drydock/drydock.yaml35
-rw-r--r--deployment_files/global/v1.0demo/software/charts/ucp/drydock/maas.yaml38
-rw-r--r--deployment_files/global/v1.0demo/software/config/endpoints.yaml20
-rw-r--r--deployment_files/global/v1.0demo/software/config/versions.yaml14
-rw-r--r--deployment_files/site/gate-multinode/software/charts/ucp/drydock/drydock.yaml2
-rw-r--r--deployment_files/site/gate-multinode/software/charts/ucp/drydock/maas.yaml25
-rw-r--r--deployment_files/site/gate-multinode/software/configs/endpoints.yaml6
-rwxr-xr-xtools/multi_nodes_gate/airship_gate/bin/shipyard.sh3
-rw-r--r--tools/multi_nodes_gate/airship_gate/lib/airship.sh40
-rw-r--r--tools/multi_nodes_gate/airship_gate/lib/config.sh27
-rw-r--r--tools/multi_nodes_gate/airship_gate/lib/ingress.sh2
-rw-r--r--tools/multi_nodes_gate/airship_gate/lib/virsh.sh17
-rw-r--r--tools/multi_nodes_gate/airship_gate/manifests/deploy_site.json61
-rw-r--r--tools/multi_nodes_gate/airship_gate/manifests/multinode_deploy.json17
-rw-r--r--tools/multi_nodes_gate/airship_gate/manifests/multinode_genesis.json16
-rwxr-xr-xtools/multi_nodes_gate/airship_gate/stages/pegleg-collect.sh2
-rwxr-xr-xtools/multi_nodes_gate/airship_gate/stages/validate-genesis.sh30
-rw-r--r--tools/multi_nodes_gate/airship_gate/templates/ingress_corefile.sub2
-rw-r--r--tools/multi_nodes_gate/airship_gate/templates/network-config.sub4
-rw-r--r--tools/multi_nodes_gate/airship_gate/templates/user-data.sub2
20 files changed, 242 insertions, 121 deletions
diff --git a/deployment_files/global/v1.0demo/software/charts/ucp/drydock/drydock.yaml b/deployment_files/global/v1.0demo/software/charts/ucp/drydock/drydock.yaml
index a531f43..091a2ca 100644
--- a/deployment_files/global/v1.0demo/software/charts/ucp/drydock/drydock.yaml
+++ b/deployment_files/global/v1.0demo/software/charts/ucp/drydock/drydock.yaml
@@ -47,37 +47,12 @@ metadata:
47 path: .ucp.physicalprovisioner 47 path: .ucp.physicalprovisioner
48 dest: 48 dest:
49 path: .values.endpoints.physicalprovisioner 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 - src: 50 - src:
75 schema: pegleg/CommonAddresses/v1 51 schema: pegleg/EndpointCatalogue/v1
76 name: common-addresses 52 name: ucp_endpoints
77 path: .node_ports.maas_api 53 path: .ucp.maas_region
78 dest: 54 dest:
79 path: .values.conf.drydock.maasdriver.maas_api_url 55 path: .values.endpoints.maas_region
80 pattern: 'MAAS_PORT'
81 56
82 # Credentials 57 # Credentials
83 58
@@ -172,8 +147,6 @@ data:
172 enabled: true 147 enabled: true
173 conf: 148 conf:
174 drydock: 149 drydock:
175 maasdriver:
176 maas_api_url: http://MAAS_IP:MAAS_PORT/MAAS/api/2.0/
177 plugins: 150 plugins:
178 ingester: drydock_provisioner.ingester.plugins.deckhand.DeckhandIngester 151 ingester: drydock_provisioner.ingester.plugins.deckhand.DeckhandIngester
179 oob_driver: 152 oob_driver:
diff --git a/deployment_files/global/v1.0demo/software/charts/ucp/drydock/maas.yaml b/deployment_files/global/v1.0demo/software/charts/ucp/drydock/maas.yaml
index f25798a..c39b1e0 100644
--- a/deployment_files/global/v1.0demo/software/charts/ucp/drydock/maas.yaml
+++ b/deployment_files/global/v1.0demo/software/charts/ucp/drydock/maas.yaml
@@ -43,34 +43,6 @@ metadata:
43 path: .values.conf.drydock.bootaction_url 43 path: .values.conf.drydock.bootaction_url
44 pattern: '(DRYDOCK_PORT)' 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 # MaaS Config 47 # MaaS Config
76 - src: 48 - src:
@@ -111,6 +83,12 @@ metadata:
111 path: .ucp.physicalprovisioner 83 path: .ucp.physicalprovisioner
112 dest: 84 dest:
113 path: .values.endpoints.physicalprovisioner 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 # Account and credential substitutions 93 # Account and credential substitutions
116 - src: 94 - src:
@@ -180,6 +158,10 @@ data:
180 labels: 158 labels:
181 release_group: airship-maas 159 release_group: airship-maas
182 values: 160 values:
161 pod:
162 replicas:
163 rack: 1
164 region: 1
183 labels: 165 labels:
184 rack: 166 rack:
185 node_selector_key: ucp-control-plane 167 node_selector_key: ucp-control-plane
diff --git a/deployment_files/global/v1.0demo/software/config/endpoints.yaml b/deployment_files/global/v1.0demo/software/config/endpoints.yaml
index be02e2d..8ad6c03 100644
--- a/deployment_files/global/v1.0demo/software/config/endpoints.yaml
+++ b/deployment_files/global/v1.0demo/software/config/endpoints.yaml
@@ -128,12 +128,10 @@ data:
128 default: http 128 default: http
129 host_fqdn_override: 129 host_fqdn_override:
130 default: null 130 default: null
131 public: drydock.gate.local
132 maas_region: 131 maas_region:
133 name: maas-region 132 name: maas-region
134 hosts: 133 hosts:
135 default: maas-region 134 default: maas-region
136 public: maas
137 scheme: 135 scheme:
138 default: "http" 136 default: "http"
139 port: 137 port:
@@ -142,6 +140,24 @@ data:
142 public: 80 140 public: 80
143 host_fqdn_override: 141 host_fqdn_override:
144 default: null 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 kubernetesprovisioner: 161 kubernetesprovisioner:
146 name: promenade 162 name: promenade
147 hosts: 163 hosts:
diff --git a/deployment_files/global/v1.0demo/software/config/versions.yaml b/deployment_files/global/v1.0demo/software/config/versions.yaml
index ff108dc..82a413c 100644
--- a/deployment_files/global/v1.0demo/software/config/versions.yaml
+++ b/deployment_files/global/v1.0demo/software/config/versions.yaml
@@ -177,12 +177,12 @@ data:
177 type: git 177 type: git
178 drydock: 178 drydock:
179 location: https://git.openstack.org/openstack/airship-drydock 179 location: https://git.openstack.org/openstack/airship-drydock
180 reference: 3470f89519d018c572905566891bafc8a3c51c3b 180 reference: 485f919822c7e425741a19ab507f83ea075529c5
181 subpath: charts/drydock 181 subpath: charts/drydock
182 type: git 182 type: git
183 drydock-htk: 183 drydock-htk:
184 location: https://git.openstack.org/openstack/openstack-helm-infra 184 location: https://git.openstack.org/openstack/openstack-helm-infra
185 reference: 5d356f9265b337b75f605dee839faa8cd0ed3ab2 185 reference: 4ad893eb1a5ebd7c7660c70d44d1316862268cf1
186 subpath: helm-toolkit 186 subpath: helm-toolkit
187 type: git 187 type: git
188 ingress: 188 ingress:
@@ -207,12 +207,12 @@ data:
207 type: git 207 type: git
208 maas: 208 maas:
209 location: https://git.openstack.org/openstack/airship-maas 209 location: https://git.openstack.org/openstack/airship-maas
210 reference: 2e003450cceb16b9bda71aa69a939a8466516582 210 reference: refs/changes/83/619283/11
211 subpath: charts/maas 211 subpath: charts/maas
212 type: git 212 type: git
213 maas-htk: 213 maas-htk:
214 location: https://git.openstack.org/openstack/openstack-helm-infra 214 location: https://git.openstack.org/openstack/openstack-helm-infra
215 reference: 5d356f9265b337b75f605dee839faa8cd0ed3ab2 215 reference: 4ad893eb1a5ebd7c7660c70d44d1316862268cf1
216 subpath: helm-toolkit 216 subpath: helm-toolkit
217 type: git 217 type: git
218 mariadb: 218 mariadb:
@@ -461,9 +461,9 @@ data:
461 divingbell: docker.io/ubuntu:16.04 461 divingbell: docker.io/ubuntu:16.04
462 drydock: 462 drydock:
463 dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.3.1 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 drydock_db_init: docker.io/postgres:9.5 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 ks_endpoints: docker.io/openstackhelm/heat:ocata 467 ks_endpoints: docker.io/openstackhelm/heat:ocata
468 ks_service: docker.io/openstackhelm/heat:ocata 468 ks_service: docker.io/openstackhelm/heat:ocata
469 ks_user: docker.io/openstackhelm/heat:ocata 469 ks_user: docker.io/openstackhelm/heat:ocata
@@ -474,7 +474,7 @@ data:
474 dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.3.1 474 dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.3.1
475 export_api_key: quay.io/airshipit/maas-region-controller:2e003450cceb16b9bda71aa69a939a8466516582 475 export_api_key: quay.io/airshipit/maas-region-controller:2e003450cceb16b9bda71aa69a939a8466516582
476 maas_cache: quay.io/airshipit/sstream-cache:2e003450cceb16b9bda71aa69a939a8466516582 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 maas_region: quay.io/airshipit/maas-region-controller:2e003450cceb16b9bda71aa69a939a8466516582 478 maas_region: quay.io/airshipit/maas-region-controller:2e003450cceb16b9bda71aa69a939a8466516582
479 promenade: 479 promenade:
480 dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.3.1 480 dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.3.1
diff --git a/deployment_files/site/gate-multinode/software/charts/ucp/drydock/drydock.yaml b/deployment_files/site/gate-multinode/software/charts/ucp/drydock/drydock.yaml
index eb24512..2c2a1ce 100644
--- a/deployment_files/site/gate-multinode/software/charts/ucp/drydock/drydock.yaml
+++ b/deployment_files/site/gate-multinode/software/charts/ucp/drydock/drydock.yaml
@@ -26,8 +26,6 @@ data:
26 secret_ssh_key: true 26 secret_ssh_key: true
27 conf: 27 conf:
28 drydock: 28 drydock:
29 maasdriver:
30 maas_api_url: 'http://maas.gate.local:9085/MAAS/api/2.0/'
31 plugins: 29 plugins:
32 oob_driver: 30 oob_driver:
33 - 'drydock_provisioner.drivers.oob.pyghmi_driver.driver.PyghmiDriver' 31 - 'drydock_provisioner.drivers.oob.pyghmi_driver.driver.PyghmiDriver'
diff --git a/deployment_files/site/gate-multinode/software/charts/ucp/drydock/maas.yaml b/deployment_files/site/gate-multinode/software/charts/ucp/drydock/maas.yaml
index 64fe75b..2023a1b 100644
--- a/deployment_files/site/gate-multinode/software/charts/ucp/drydock/maas.yaml
+++ b/deployment_files/site/gate-multinode/software/charts/ucp/drydock/maas.yaml
@@ -32,29 +32,4 @@ data:
32 network: 32 network:
33 maas_ingress: 33 maas_ingress:
34 addr: '172.24.1.5/32' 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...
diff --git a/deployment_files/site/gate-multinode/software/configs/endpoints.yaml b/deployment_files/site/gate-multinode/software/configs/endpoints.yaml
index 7af1c28..f1657d6 100644
--- a/deployment_files/site/gate-multinode/software/configs/endpoints.yaml
+++ b/deployment_files/site/gate-multinode/software/configs/endpoints.yaml
@@ -17,6 +17,12 @@ metadata:
17# dns server 17# dns server
18data: 18data:
19 ucp: 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 identity: 26 identity:
21 host_fqdn_override: 27 host_fqdn_override:
22 public: keystone.gate.local 28 public: keystone.gate.local
diff --git a/tools/multi_nodes_gate/airship_gate/bin/shipyard.sh b/tools/multi_nodes_gate/airship_gate/bin/shipyard.sh
index 63e8917..5a0e263 100755
--- a/tools/multi_nodes_gate/airship_gate/bin/shipyard.sh
+++ b/tools/multi_nodes_gate/airship_gate/bin/shipyard.sh
@@ -1,4 +1,3 @@
1
2#!/usr/bin/env bash 1#!/usr/bin/env bash
3# Copyright 2018 AT&T Intellectual Property. All other rights reserved. 2# Copyright 2018 AT&T Intellectual Property. All other rights reserved.
4# 3#
@@ -14,7 +13,7 @@
14# See the License for the specific language governing permissions and 13# See the License for the specific language governing permissions and
15# limitations under the License. 14# limitations under the License.
16 15
17set -e 16set -x
18 17
19SCRIPT_DIR=$(realpath $(dirname $0)) 18SCRIPT_DIR=$(realpath $(dirname $0))
20WORKSPACE=$(realpath ${SCRIPT_DIR}/../../..) 19WORKSPACE=$(realpath ${SCRIPT_DIR}/../../..)
diff --git a/tools/multi_nodes_gate/airship_gate/lib/airship.sh b/tools/multi_nodes_gate/airship_gate/lib/airship.sh
index 9ed44ce..edb1f4b 100644
--- a/tools/multi_nodes_gate/airship_gate/lib/airship.sh
+++ b/tools/multi_nodes_gate/airship_gate/lib/airship.sh
@@ -1,7 +1,31 @@
1#!/bin/bash 1#!/bin/bash
2 2
3install_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
3shipard_cmd_stdout() { 16shipard_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
7shipyard_cmd() { 31shipyard_cmd() {
@@ -16,7 +40,19 @@ shipyard_cmd() {
16} 40}
17 41
18drydock_cmd_stdout() { 42drydock_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}
21drydock_cmd() { 57drydock_cmd() {
22 if [[ ! -z "${LOG_FILE}" ]] 58 if [[ ! -z "${LOG_FILE}" ]]
diff --git a/tools/multi_nodes_gate/airship_gate/lib/config.sh b/tools/multi_nodes_gate/airship_gate/lib/config.sh
index 25f917a..ff22d6e 100644
--- a/tools/multi_nodes_gate/airship_gate/lib/config.sh
+++ b/tools/multi_nodes_gate/airship_gate/lib/config.sh
@@ -16,6 +16,7 @@ export SHIPYARD_PASSWORD=${SHIPYARD_OS_PASSWORD:-password18}
16export REGISTRY_DATA_DIR=${REGISTRY_DATA_DIR:-/mnt/registry} 16export REGISTRY_DATA_DIR=${REGISTRY_DATA_DIR:-/mnt/registry}
17export VIRSH_POOL=${VIRSH_POOL:-airship} 17export VIRSH_POOL=${VIRSH_POOL:-airship}
18export VIRSH_POOL_PATH=${VIRSH_POOL_PATH:-/var/lib/libvirt/airship} 18export VIRSH_POOL_PATH=${VIRSH_POOL_PATH:-/var/lib/libvirt/airship}
19export VIRSH_CPU_OPTS=${VIRSH_CPU_OPTS:-host}
19export UPSTREAM_DNS=${UPSTREAM_DNS:-"8.8.8.8 208.67.220.220"} 20export UPSTREAM_DNS=${UPSTREAM_DNS:-"8.8.8.8 208.67.220.220"}
20 21
21config_vm_memory() { 22config_vm_memory() {
@@ -37,6 +38,16 @@ config_vm_mac() {
37 jq -cr ".vm.${nodename}.mac" < "${GATE_MANIFEST}" 38 jq -cr ".vm.${nodename}.mac" < "${GATE_MANIFEST}"
38} 39}
39 40
41config_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
40config_vm_vcpus() { 51config_vm_vcpus() {
41 nodename=${1} 52 nodename=${1}
42 jq -cr ".vm.${nodename}.vcpus" < "${GATE_MANIFEST}" 53 jq -cr ".vm.${nodename}.vcpus" < "${GATE_MANIFEST}"
@@ -62,12 +73,20 @@ config_vm_userdata() {
62 echo "${val}" 73 echo "${val}"
63 fi 74 fi
64} 75}
76
65config_ingress_domain() { 77config_ingress_domain() {
66 jq -cr '.ingress.domain' < "${GATE_MANIFEST}" 78 jq -cr '.ingress.domain' < "${GATE_MANIFEST}"
67} 79}
68 80
81config_ingress_ca() {
82 if [[ ! -z "$GATE_MANIFEST" ]]
83 then
84 jq -cr '.ingress.ca' < "${GATE_MANIFEST}"
85 fi
86}
87
69config_ingress_ips() { 88config_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
73config_ingress_entries() { 92config_ingress_entries() {
@@ -86,3 +105,9 @@ config_pegleg_sitename() {
86config_pegleg_aux_repos() { 105config_pegleg_aux_repos() {
87 jq -cr '.configuration.aux_repos | join(" ")' < "${GATE_MANIFEST}" 106 jq -cr '.configuration.aux_repos | join(" ")' < "${GATE_MANIFEST}"
88} 107}
108
109join_array() {
110 local IFS=$1
111 shift
112 echo "$*"
113}
diff --git a/tools/multi_nodes_gate/airship_gate/lib/ingress.sh b/tools/multi_nodes_gate/airship_gate/lib/ingress.sh
index dd5dc9c..2cbc9c4 100644
--- a/tools/multi_nodes_gate/airship_gate/lib/ingress.sh
+++ b/tools/multi_nodes_gate/airship_gate/lib/ingress.sh
@@ -17,7 +17,7 @@ ingress_dns_config() {
17 done 17 done
18 done 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
23ingress_dns_start() { 23ingress_dns_start() {
diff --git a/tools/multi_nodes_gate/airship_gate/lib/virsh.sh b/tools/multi_nodes_gate/airship_gate/lib/virsh.sh
index 8b89b73..eec96b8 100644
--- a/tools/multi_nodes_gate/airship_gate/lib/virsh.sh
+++ b/tools/multi_nodes_gate/airship_gate/lib/virsh.sh
@@ -51,6 +51,8 @@ iso_gen() {
51 fi 51 fi
52 52
53 envsubst < "${TEMPLATE_DIR}/meta-data.sub" > meta-data 53 envsubst < "${TEMPLATE_DIR}/meta-data.sub" > meta-data
54
55 export DNS_SERVERS=$(join_array ',' $UPSTREAM_DNS)
54 envsubst < "${TEMPLATE_DIR}/network-config.sub" > network-config 56 envsubst < "${TEMPLATE_DIR}/network-config.sub" > network-config
55 57
56 { 58 {
@@ -129,7 +131,16 @@ vm_clean_all() {
129vm_create() { 131vm_create() {
130 NAME=${1} 132 NAME=${1}
131 MAC_ADDRESS=$(config_vm_mac "${NAME}") 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 vol_create_root "${NAME}" 144 vol_create_root "${NAME}"
134 wait 145 wait
135 146
@@ -141,7 +152,7 @@ vm_create() {
141 virt-install \ 152 virt-install \
142 --name "${NAME}" \ 153 --name "${NAME}" \
143 --virt-type kvm \ 154 --virt-type kvm \
144 --cpu host \ 155 --cpu ${VIRSH_CPU_OPTS} \
145 --graphics vnc,listen=0.0.0.0 \ 156 --graphics vnc,listen=0.0.0.0 \
146 --noautoconsole \ 157 --noautoconsole \
147 --network "network=airship_gate,model=virtio" \ 158 --network "network=airship_gate,model=virtio" \
@@ -161,7 +172,7 @@ vm_create() {
161 virt-install \ 172 virt-install \
162 --name "${NAME}" \ 173 --name "${NAME}" \
163 --virt-type kvm \ 174 --virt-type kvm \
164 --cpu host \ 175 --cpu ${VIRSH_CPU_OPTS} \
165 --graphics vnc,listen=0.0.0.0 \ 176 --graphics vnc,listen=0.0.0.0 \
166 --noautoconsole \ 177 --noautoconsole \
167 --network "network=airship_gate,model=virtio" \ 178 --network "network=airship_gate,model=virtio" \
diff --git a/tools/multi_nodes_gate/airship_gate/manifests/deploy_site.json b/tools/multi_nodes_gate/airship_gate/manifests/deploy_site.json
new file mode 100644
index 0000000..3e66589
--- /dev/null
+++ b/tools/multi_nodes_gate/airship_gate/manifests/deploy_site.json
@@ -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\nBAYTAlVTMRAwDgYDVQQDDAdyb290LWNhMB4XDTE4MTEwMjE1MTgyNVoXDTM4MTAy\nODE1MTgyNVowHzELMAkGA1UEBhMCVVMxEDAOBgNVBAMMB3Jvb3QtY2EwggIiMA0G\nCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDVJt2qJILBhd5i0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9KYo5MtKNfF21XpoK0T6/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}
diff --git a/tools/multi_nodes_gate/airship_gate/manifests/multinode_deploy.json b/tools/multi_nodes_gate/airship_gate/manifests/multinode_deploy.json
index f44dcf4..9f0ae84 100644
--- a/tools/multi_nodes_gate/airship_gate/manifests/multinode_deploy.json
+++ b/tools/multi_nodes_gate/airship_gate/manifests/multinode_deploy.json
@@ -6,6 +6,7 @@
6 }, 6 },
7 "ingress": { 7 "ingress": {
8 "domain": "gate.local", 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+fncdH9aicszS99e8jiIuCVpnKE/1qoo/Jhi4uR7l5uedxnXM2EqTSA/\nd9b849oTwm22Ykzu1EFCdkYtAU326yAoNEsgaBm8SHVGQ6O1W3iVFYpsTIZ65toB\n6uRv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uJq3o/QJjQivF\n-----END CERTIFICATE-----",
9 "172.24.1.5": ["maas"], 10 "172.24.1.5": ["maas"],
10 "172.24.1.6": ["drydock","shipyard","keystone"] 11 "172.24.1.6": ["drydock","shipyard","keystone"]
11 }, 12 },
@@ -19,10 +20,6 @@
19 "script": "pegleg-collect.sh" 20 "script": "pegleg-collect.sh"
20 }, 21 },
21 { 22 {
22 "name": "Populate Image Cache",
23 "script": "registry-load.sh"
24 },
25 {
26 "name": "Generate Certificates", 23 "name": "Generate Certificates",
27 "script": "generate-certificates.sh" 24 "script": "generate-certificates.sh"
28 }, 25 },
@@ -45,6 +42,11 @@
45 "on_error": "collect_genesis_info.sh" 42 "on_error": "collect_genesis_info.sh"
46 }, 43 },
47 { 44 {
45 "name": "Validate Genesis",
46 "script": "validate-genesis.sh",
47 "on_error": "collect_genesis_info.sh"
48 },
49 {
48 "name": "Load Site Design", 50 "name": "Load Site Design",
49 "script": "shipyard-load-design.sh" 51 "script": "shipyard-load-design.sh"
50 }, 52 },
@@ -59,14 +61,16 @@
59 "vcpus": 2, 61 "vcpus": 2,
60 "mac": "52:54:00:00:be:31", 62 "mac": "52:54:00:00:be:31",
61 "ip": "172.24.1.9", 63 "ip": "172.24.1.9",
64 "io_profile": "fast",
62 "bootstrap": true, 65 "bootstrap": true,
63 "userdata": "packages: [docker.io]" 66 "userdata": "packages: [docker.io]"
64 }, 67 },
65 "n0" : { 68 "n0" : {
66 "memory": 32768, 69 "memory": 32768,
67 "vcpus": 8, 70 "vcpus": 12,
68 "mac": "52:54:00:00:a4:31", 71 "mac": "52:54:00:00:a4:31",
69 "ip": "172.24.1.10", 72 "ip": "172.24.1.10",
73 "io_profile": "fast",
70 "bootstrap": true 74 "bootstrap": true
71 }, 75 },
72 "n1" : { 76 "n1" : {
@@ -74,6 +78,7 @@
74 "vcpus": 2, 78 "vcpus": 2,
75 "mac": "52:54:00:00:a3:31", 79 "mac": "52:54:00:00:a3:31",
76 "ip": "172.24.1.11", 80 "ip": "172.24.1.11",
81 "io_profile": "fast",
77 "bootstrap": false 82 "bootstrap": false
78 }, 83 },
79 "n2" : { 84 "n2" : {
@@ -81,6 +86,7 @@
81 "vcpus": 2, 86 "vcpus": 2,
82 "mac": "52:54:00:1a:95:0d", 87 "mac": "52:54:00:1a:95:0d",
83 "ip": "172.24.1.12", 88 "ip": "172.24.1.12",
89 "io_profile": "fast",
84 "bootstrap": false 90 "bootstrap": false
85 }, 91 },
86 "n3" : { 92 "n3" : {
@@ -88,6 +94,7 @@
88 "vcpus": 2, 94 "vcpus": 2,
89 "mac": "52:54:00:31:c2:36", 95 "mac": "52:54:00:31:c2:36",
90 "ip": "172.24.1.13", 96 "ip": "172.24.1.13",
97 "io_profile": "fast",
91 "bootstrap": false 98 "bootstrap": false
92 } 99 }
93 } 100 }
diff --git a/tools/multi_nodes_gate/airship_gate/manifests/multinode_genesis.json b/tools/multi_nodes_gate/airship_gate/manifests/multinode_genesis.json
index dd422f0..c135ba4 100644
--- a/tools/multi_nodes_gate/airship_gate/manifests/multinode_genesis.json
+++ b/tools/multi_nodes_gate/airship_gate/manifests/multinode_genesis.json
@@ -6,8 +6,9 @@
6 }, 6 },
7 "ingress": { 7 "ingress": {
8 "domain": "gate.local", 8 "domain": "gate.local",
9 "172.24.1.5": ["maas"], 9 "ca": "-----BEGIN CERTIFICATE-----\nMIIFJzCCAw+gAwIBAgIJAJrXqOA54qn/MA0GCSqGSIb3DQEBCwUAMB8xCzAJBgNV\nBAYTAlVTMRAwDgYDVQQDDAdyb290LWNhMB4XDTE4MTEwMjE1MTgyNVoXDTM4MTAy\nODE1MTgyNVowHzELMAkGA1UEBhMCVVMxEDAOBgNVBAMMB3Jvb3QtY2EwggIiMA0G\nCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDVJt2qJILBhd5i0NOCfENWD07r3wlb\nI1MSy2pgt2qNzSpn3+gLfnQSMEDtdPFzNcU9FceE8It/W9QYeOx1V2bRX9Jjld2R\n8MFkoHlO+WHd55tblz2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wkIHI0rK2cr1VYi2EFcEGsm\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.6": ["drydock","shipyard","keystone"] 10 "172.24.1.5": ["maas-nc"],
11 "172.24.1.6": ["drydock-nc","shipyard-nc","iam-nc"]
11 }, 12 },
12 "stages": [ 13 "stages": [
13 { 14 {
@@ -19,10 +20,6 @@
19 "script": "pegleg-collect.sh" 20 "script": "pegleg-collect.sh"
20 }, 21 },
21 { 22 {
22 "name": "Populate Image Cache",
23 "script": "registry-load.sh"
24 },
25 {
26 "name": "Generate Certificates", 23 "name": "Generate Certificates",
27 "script": "generate-certificates.sh" 24 "script": "generate-certificates.sh"
28 }, 25 },
@@ -43,6 +40,11 @@
43 "name": "Genesis", 40 "name": "Genesis",
44 "script": "genesis.sh", 41 "script": "genesis.sh",
45 "on_error": "collect_genesis_info.sh" 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 "vm": { 50 "vm": {
@@ -56,7 +58,7 @@
56 }, 58 },
57 "n0" : { 59 "n0" : {
58 "memory": 16384, 60 "memory": 16384,
59 "vcpus": 8, 61 "vcpus": 12,
60 "mac": "52:54:00:00:a4:31", 62 "mac": "52:54:00:00:a4:31",
61 "ip": "172.24.1.10", 63 "ip": "172.24.1.10",
62 "bootstrap": true 64 "bootstrap": true
diff --git a/tools/multi_nodes_gate/airship_gate/stages/pegleg-collect.sh b/tools/multi_nodes_gate/airship_gate/stages/pegleg-collect.sh
index 103278f..3880792 100755
--- a/tools/multi_nodes_gate/airship_gate/stages/pegleg-collect.sh
+++ b/tools/multi_nodes_gate/airship_gate/stages/pegleg-collect.sh
@@ -39,7 +39,7 @@ render_pegleg_cli() {
39 then 39 then
40 for r in ${aux_repos[*]} 40 for r in ${aux_repos[*]}
41 do 41 do
42 cli_string="${cli_string} -a ${r}" 42 cli_string="${cli_string} -a /workspace/${r}"
43 done 43 done
44 fi 44 fi
45 45
diff --git a/tools/multi_nodes_gate/airship_gate/stages/validate-genesis.sh b/tools/multi_nodes_gate/airship_gate/stages/validate-genesis.sh
new file mode 100755
index 0000000..16c1d81
--- /dev/null
+++ b/tools/multi_nodes_gate/airship_gate/stages/validate-genesis.sh
@@ -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
16set -e
17
18source "${GATE_UTILS}"
19
20# Copies script and virtmgr private key to genesis VM
21rsync_cmd "${SCRIPT_DEPOT}/validate-genesis.sh" "${GENESIS_NAME}:/root/airship/"
22
23set -o pipefail
24ssh_cmd "${GENESIS_NAME}" /root/airship/validate-genesis.sh 2>&1 | tee -a "${LOG_FILE}"
25set +o pipefail
26
27if ! 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}"
30fi
diff --git a/tools/multi_nodes_gate/airship_gate/templates/ingress_corefile.sub b/tools/multi_nodes_gate/airship_gate/templates/ingress_corefile.sub
index 146e8a5..4ac181c 100644
--- a/tools/multi_nodes_gate/airship_gate/templates/ingress_corefile.sub
+++ b/tools/multi_nodes_gate/airship_gate/templates/ingress_corefile.sub
@@ -4,6 +4,6 @@ ${DNS_DOMAIN} {
4} 4}
5 5
6. { 6. {
7 forward . ${UPSTREAM_DNS} 7 forward . ${DNS_SERVERS}
8 log 8 log
9} 9}
diff --git a/tools/multi_nodes_gate/airship_gate/templates/network-config.sub b/tools/multi_nodes_gate/airship_gate/templates/network-config.sub
index fe4472f..b41b60d 100644
--- a/tools/multi_nodes_gate/airship_gate/templates/network-config.sub
+++ b/tools/multi_nodes_gate/airship_gate/templates/network-config.sub
@@ -8,6 +8,4 @@ config:
8 address: ${BR_IP_NODE}/24 8 address: ${BR_IP_NODE}/24
9 gateway: 172.24.1.1 9 gateway: 172.24.1.1
10 - type: nameserver 10 - type: nameserver
11 address: 11 address: [${DNS_SERVERS}]
12 - 8.8.8.8
13 - 8.8.4.4
diff --git a/tools/multi_nodes_gate/airship_gate/templates/user-data.sub b/tools/multi_nodes_gate/airship_gate/templates/user-data.sub
index a1193c8..dd29de4 100644
--- a/tools/multi_nodes_gate/airship_gate/templates/user-data.sub
+++ b/tools/multi_nodes_gate/airship_gate/templates/user-data.sub
@@ -4,6 +4,8 @@ disable_root: false
4 4
5hostname: ${NAME} 5hostname: ${NAME}
6manage_etc_hosts: false 6manage_etc_hosts: false
7package_update: true
8apt_preserve_sources_list: true
7 9
8ssh_authorized_keys: 10ssh_authorized_keys:
9 - ${SSH_PUBLIC_KEY} 11 - ${SSH_PUBLIC_KEY}