Enhanced deployment scripts to support baremetal multi-node
Additionally aligned between Treasuremap and Airshipctl to use the same environment variable name "SITE" for a site name. Change-Id: Id6405b7074d34bc73d730eea76d9dd6ab7901405 Signed-off-by: James Gu <james.gu@att.com>
This commit is contained in:
parent
d485dcc9c8
commit
89fc29184a
@ -18,8 +18,20 @@ export KUBECONFIG=${KUBECONFIG:-"$HOME/.airship/kubeconfig"}
|
|||||||
export KUBECONFIG_TARGET_CONTEXT=${KUBECONFIG_TARGET_CONTEXT:-"target-cluster"}
|
export KUBECONFIG_TARGET_CONTEXT=${KUBECONFIG_TARGET_CONTEXT:-"target-cluster"}
|
||||||
: ${AIRSHIPCTL_PROJECT:="../airshipctl"}
|
: ${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}
|
cd ${AIRSHIPCTL_PROJECT}
|
||||||
|
|
||||||
|
kubectl \
|
||||||
|
--kubeconfig $KUBECONFIG \
|
||||||
|
--context $KUBECONFIG_TARGET_CONTEXT \
|
||||||
|
--request-timeout 10s \
|
||||||
|
label --overwrite nodes $TARGET_NODE node-type=controlplane
|
||||||
|
|
||||||
./tools/deployment/31_deploy_initinfra_target_node.sh
|
./tools/deployment/31_deploy_initinfra_target_node.sh
|
||||||
|
|
||||||
hosts=$(kubectl \
|
hosts=$(kubectl \
|
||||||
|
@ -16,5 +16,17 @@ set -ex
|
|||||||
|
|
||||||
: ${AIRSHIPCTL_PROJECT:="../airshipctl"}
|
: ${AIRSHIPCTL_PROJECT:="../airshipctl"}
|
||||||
|
|
||||||
|
export TARGET_IP=${TARGET_IP:-"$(airshipctl phase render controlplane-target \
|
||||||
|
-k Metal3Cluster \
|
||||||
|
-l airshipit.org/stage=initinfra \
|
||||||
|
2> /dev/null | \
|
||||||
|
yq .spec.controlPlaneEndpoint.host |
|
||||||
|
sed 's/"//g')"}
|
||||||
|
export TARGET_PORT=${TARGET_PORT:-"$(airshipctl phase render controlplane-target \
|
||||||
|
-k Metal3Cluster -l airshipit.org/stage=initinfra \
|
||||||
|
2> /dev/null | \
|
||||||
|
yq .spec.controlPlaneEndpoint.port)"}
|
||||||
|
|
||||||
|
echo $TARGET_IP $TARGET_PORT
|
||||||
cd ${AIRSHIPCTL_PROJECT}
|
cd ${AIRSHIPCTL_PROJECT}
|
||||||
./tools/deployment/34_deploy_controlplane_target.sh
|
./tools/deployment/34_deploy_controlplane_target.sh
|
||||||
|
@ -16,5 +16,10 @@ set -ex
|
|||||||
|
|
||||||
: ${AIRSHIPCTL_PROJECT:="../airshipctl"}
|
: ${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}
|
cd ${AIRSHIPCTL_PROJECT}
|
||||||
./tools/deployment/37_verify_hwcc_profiles.sh
|
./tools/deployment/37_verify_hwcc_profiles.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user