Fix deployment scripts
* fixes labeling issue with deployment scripts * allign scripts with airshipctl and treasuremap * update playbook and zuul job with script changes Signed-off-by: Sreejith Punnapuzha <Sreejith.Punnapuzha@outlook.com> Change-Id: I43221565ab29fc78a60fbd4978c058eec5c88640
This commit is contained in:
parent
0f0c7cc4e6
commit
40f7f38f7e
@ -31,9 +31,9 @@
|
||||
- ./tools/deployment/31_deploy_initinfra_target_node.sh
|
||||
- ./tools/deployment/32_cluster_init_target_node.sh
|
||||
- ./tools/deployment/33_cluster_move_target_node.sh
|
||||
- ./tools/deployment/34_deploy_worker_node.sh
|
||||
- ./tools/deployment/35_deploy_workload.sh
|
||||
- ./tools/deployment/36_verify_hwcc_profiles.sh
|
||||
- ./tools/deployment/35_deploy_worker_node.sh
|
||||
- ./tools/deployment/36_deploy_workload.sh
|
||||
- ./tools/deployment/37_verify_hwcc_profiles.sh
|
||||
|
||||
- name: "Run gate scripts"
|
||||
include_role:
|
||||
|
@ -18,26 +18,14 @@ export KUBECONFIG=${KUBECONFIG:-"$HOME/.airship/kubeconfig"}
|
||||
export KUBECONFIG_TARGET_CONTEXT=${KUBECONFIG_TARGET_CONTEXT:-"target-cluster"}
|
||||
: ${AIRSHIPCTL_PROJECT:="../airshipctl"}
|
||||
|
||||
TARGET_NODE=${TARGET_NODE:-"$(airshipctl phase render controlplane-ephemeral \
|
||||
-k BareMetalHost -l airshipit.org/k8s-role=controlplane-host \
|
||||
2> /dev/null | \
|
||||
yq .metadata.name | \
|
||||
sed 's/"//g')"}
|
||||
|
||||
cd ${AIRSHIPCTL_PROJECT}
|
||||
|
||||
kubectl \
|
||||
--kubeconfig $KUBECONFIG \
|
||||
--context $KUBECONFIG_TARGET_CONTEXT \
|
||||
--request-timeout 10s \
|
||||
label nodes $TARGET_NODE node-type=controlplane
|
||||
|
||||
./tools/deployment/31_deploy_initinfra_target_node.sh
|
||||
|
||||
hosts=$(`kubectl \
|
||||
hosts=(kubectl \
|
||||
--kubeconfig $KUBECONFIG \
|
||||
--context $KUBECONFIG_TARGET_CONTEXT \
|
||||
--request-timeout 10s get nodes -o name`)
|
||||
--request-timeout 10s get nodes -o name)
|
||||
|
||||
# Annotate node for hostconfig-operator
|
||||
for i in "${!hosts[@]}"
|
||||
@ -49,9 +37,9 @@ do
|
||||
kubectl \
|
||||
--kubeconfig $KUBECONFIG \
|
||||
--context $KUBECONFIG_TARGET_CONTEXT \
|
||||
--request-timeout 10s label ${hosts[i]} node-type=controlplane
|
||||
--request-timeout 10s label --overwrite ${hosts[i]} node-type=controlplane
|
||||
kubectl \
|
||||
--kubeconfig $KUBECONFIG \
|
||||
--context $KUBECONFIG_TARGET_CONTEXT \
|
||||
--request-timeout 10s label ${hosts[i]} kubernetes.io/role=master
|
||||
--request-timeout 10s label --overwrite ${hosts[i]} kubernetes.io/role=master
|
||||
done
|
||||
|
20
tools/deployment/34_deploy_controlplane_target.sh
Executable file
20
tools/deployment/34_deploy_controlplane_target.sh
Executable file
@ -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/34_deploy_controlplane_target.sh
|
@ -18,18 +18,35 @@ export KUBECONFIG=${KUBECONFIG:-"$HOME/.airship/kubeconfig"}
|
||||
export KUBECONFIG_TARGET_CONTEXT=${KUBECONFIG_TARGET_CONTEXT:-"target-cluster"}
|
||||
: ${AIRSHIPCTL_PROJECT:="../airshipctl"}
|
||||
|
||||
export WORKER_NODE=${WORKER_NODE:-"$(airshipctl phase render workers-target \
|
||||
-k BareMetalHost 2> /dev/null | \
|
||||
yq .metadata.name | \
|
||||
sed 's/"//g')"}
|
||||
|
||||
cd ${AIRSHIPCTL_PROJECT}
|
||||
./tools/deployment/34_deploy_worker_node.sh
|
||||
|
||||
hosts=$(`kubectl \
|
||||
# Annotate node for hostconfig-operator
|
||||
hosts=(kubectl \
|
||||
--kubeconfig $KUBECONFIG \
|
||||
--context $KUBECONFIG_TARGET_CONTEXT \
|
||||
--request-timeout 10s get nodes -o name`)
|
||||
--request-timeout 10s get nodes -o name)
|
||||
|
||||
for i in "${!hosts[@]}"
|
||||
do
|
||||
kubectl \
|
||||
--kubeconfig $KUBECONFIG \
|
||||
--context $KUBECONFIG_TARGET_CONTEXT \
|
||||
--request-timeout 10s annotate ${hosts[i]} secret=hco-ssh-auth
|
||||
kubectl \
|
||||
--kubeconfig $KUBECONFIG \
|
||||
--context $KUBECONFIG_TARGET_CONTEXT \
|
||||
--request-timeout 10s label --overwrite ${hosts[i]} node-type=controlplane
|
||||
kubectl \
|
||||
--kubeconfig $KUBECONFIG \
|
||||
--context $KUBECONFIG_TARGET_CONTEXT \
|
||||
--request-timeout 10s label --overwrite ${hosts[i]} kubernetes.io/role=master
|
||||
done
|
||||
|
||||
cd ${AIRSHIPCTL_PROJECT}
|
||||
./tools/deployment/35_deploy_worker_node.sh
|
||||
|
||||
hosts=(kubectl \
|
||||
--kubeconfig $KUBECONFIG \
|
||||
--context $KUBECONFIG_TARGET_CONTEXT \
|
||||
--request-timeout 10s get nodes -o name)
|
||||
|
||||
# Annotate node for hostconfig-operator
|
||||
for i in "${!hosts[@]}"
|
||||
@ -41,5 +58,5 @@ do
|
||||
kubectl \
|
||||
--kubeconfig $KUBECONFIG \
|
||||
--context $KUBECONFIG_TARGET_CONTEXT \
|
||||
--request-timeout 10s label ${hosts[i]} kubernetes.io/role=master
|
||||
--request-timeout 10s label --overwrite ${hosts[i]} kubernetes.io/role=master
|
||||
done
|
@ -29,4 +29,4 @@ export TARGET_PORT=${TARGET_PORT:-"$(airshipctl phase render controlplane-target
|
||||
|
||||
echo $TARGET_IP $TARGET_PORT
|
||||
cd ${AIRSHIPCTL_PROJECT}
|
||||
./tools/deployment/35_deploy_workload.sh
|
||||
./tools/deployment/36_deploy_workload.sh
|
@ -17,4 +17,4 @@ set -ex
|
||||
: ${AIRSHIPCTL_PROJECT:="../airshipctl"}
|
||||
|
||||
cd ${AIRSHIPCTL_PROJECT}
|
||||
./tools/deployment/36_verify_hwcc_profiles.sh
|
||||
./tools/deployment/37_verify_hwcc_profiles.sh
|
@ -79,9 +79,9 @@
|
||||
- ./tools/deployment/31_deploy_initinfra_target_node.sh
|
||||
- ./tools/deployment/32_cluster_init_target_node.sh
|
||||
- ./tools/deployment/33_cluster_move_target_node.sh
|
||||
- ./tools/deployment/34_deploy_worker_node.sh
|
||||
- ./tools/deployment/35_deploy_workload.sh
|
||||
- ./tools/deployment/36_verify_hwcc_profiles.sh
|
||||
- ./tools/deployment/35_deploy_worker_node.sh
|
||||
- ./tools/deployment/36_deploy_workload.sh
|
||||
- ./tools/deployment/37_verify_hwcc_profiles.sh
|
||||
serve_dir: /srv/images
|
||||
serve_port: 8099
|
||||
voting: false
|
||||
|
Loading…
x
Reference in New Issue
Block a user