Merge "Switch to using phase documents"
This commit is contained in:
commit
5643084218
2
manifests/metadata.yaml
Normal file
2
manifests/metadata.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
phase:
|
||||
path: manifests/phases
|
11
manifests/phases/cluster-map.yaml
Normal file
11
manifests/phases/cluster-map.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
apiVersion: airshipit.org/v1alpha1
|
||||
kind: ClusterMap
|
||||
metadata:
|
||||
labels:
|
||||
airshipit.org/deploy-k8s: "false"
|
||||
name: main-map
|
||||
map:
|
||||
target-cluster:
|
||||
parent: ephemeral-cluster
|
||||
ephemeral-cluster: {}
|
66
manifests/phases/executors.yaml
Normal file
66
manifests/phases/executors.yaml
Normal file
@ -0,0 +1,66 @@
|
||||
---
|
||||
apiVersion: airshipit.org/v1alpha1
|
||||
kind: KubernetesApply
|
||||
metadata:
|
||||
labels:
|
||||
airshipit.org/deploy-k8s: "false"
|
||||
name: kubernetes-apply
|
||||
config:
|
||||
waitOptions:
|
||||
timeout: 2000
|
||||
pruneOptions:
|
||||
prune: false
|
||||
---
|
||||
apiVersion: airshipit.org/v1alpha1
|
||||
kind: Clusterctl
|
||||
metadata:
|
||||
name: clusterctl_move
|
||||
move-options: {}
|
||||
action: move
|
||||
---
|
||||
apiVersion: airshipit.org/v1alpha1
|
||||
kind: Clusterctl
|
||||
metadata:
|
||||
labels:
|
||||
airshipit.org/deploy-k8s: "false"
|
||||
name: clusterctl_init
|
||||
init-options:
|
||||
core-provider: "cluster-api:v0.3.7"
|
||||
bootstrap-providers:
|
||||
- "kubeadm:v0.3.7"
|
||||
infrastructure-providers:
|
||||
- "metal3:v0.3.2"
|
||||
control-plane-providers:
|
||||
- "kubeadm:v0.3.7"
|
||||
action: init
|
||||
providers:
|
||||
- name: "metal3"
|
||||
type: "InfrastructureProvider"
|
||||
variable-substitution: true
|
||||
versions:
|
||||
v0.3.2: manifests/function/capm3/v0.3.2
|
||||
- name: "kubeadm"
|
||||
type: "BootstrapProvider"
|
||||
variable-substitution: true
|
||||
versions:
|
||||
v0.3.7: manifests/function/cabpk/v0.3.7
|
||||
- name: "cluster-api"
|
||||
type: "CoreProvider"
|
||||
variable-substitution: true
|
||||
versions:
|
||||
v0.3.7: manifests/function/capi/v0.3.7
|
||||
- name: "kubeadm"
|
||||
type: "ControlPlaneProvider"
|
||||
variable-substitution: true
|
||||
versions:
|
||||
v0.3.7: manifests/function/cacpk/v0.3.7
|
||||
# These default images can be overridden via the `replacements/` entrypoint
|
||||
additional-vars:
|
||||
CONTAINER_CAPM3_MANAGER: quay.io/metal3-io/cluster-api-provider-metal3:v0.3.2
|
||||
CONTAINER_CACPK_MANAGER: us.gcr.io/k8s-artifacts-prod/cluster-api/kubeadm-control-plane-controller:v0.3.7
|
||||
CONTAINER_CABPK_MANAGER: us.gcr.io/k8s-artifacts-prod/cluster-api/kubeadm-bootstrap-controller:v0.3.7
|
||||
CONTAINER_CAPI_MANAGER: us.gcr.io/k8s-artifacts-prod/cluster-api/cluster-api-controller:v0.3.7
|
||||
CONTAINER_CAPM3_AUTH_PROXY: gcr.io/kubebuilder/kube-rbac-proxy:v0.4.0
|
||||
CONTAINER_CACPK_AUTH_PROXY: gcr.io/kubebuilder/kube-rbac-proxy:v0.4.1
|
||||
CONTAINER_CABPK_AUTH_PROXY: gcr.io/kubebuilder/kube-rbac-proxy:v0.4.1
|
||||
CONTAINER_CAPI_AUTH_PROXY: gcr.io/kubebuilder/kube-rbac-proxy:v0.4.1
|
38
manifests/phases/kubeconfig.yaml
Normal file
38
manifests/phases/kubeconfig.yaml
Normal file
@ -0,0 +1,38 @@
|
||||
apiVersion: airshipit.org/v1alpha1
|
||||
kind: KubeConfig
|
||||
metadata:
|
||||
name: default
|
||||
labels:
|
||||
airshipit.org/deploy-k8s: "false"
|
||||
config:
|
||||
apiVersion: v1
|
||||
clusters:
|
||||
- cluster:
|
||||
certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURWREND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QoxK1NlUFErdU5JemN6bzNEdWhXR0ZoQjk3VjZwRitFUTBlVWN5bk05c2hkL3AwWVFzWDR1ZlhxaENENVpzZnZUCnBka3UvTWkyWnVGUldUUUtNeGpqczV3Z2RBWnBsNnN0L2ZkbmZwd1Q5cC9WTjRuaXJnMEsxOURTSFFJTHVrU2MKb013bXNBeDJrZmxITWhPazg5S3FpMEloL2cyczRFYTRvWURZemt0Y2JRZ24wd0lqZ2dmdnVzM3pRbEczN2lwYQo4cVRzS2VmVGdkUjhnZkJDNUZNQ0F3RUFBYU1qTUNFd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0RRWUpLb1pJaHZjTkFRRUxCUUFEZ2dFQkFJek9BL00xWmRGUElzd2VoWjFuemJ0VFNURG4KRHMyVnhSV0VnclFFYzNSYmV3a1NkbTlBS3MwVGR0ZHdEbnBEL2tRYkNyS2xEeFF3RWg3NFZNSFZYYkFadDdsVwpCSm90T21xdXgxYThKYklDRTljR0FHRzFvS0g5R29jWERZY0JzOTA3ckxIdStpVzFnL0xVdG5hN1dSampqZnBLCnFGelFmOGdJUHZIM09BZ3B1RVVncUx5QU8ya0VnelZwTjZwQVJxSnZVRks2TUQ0YzFmMnlxWGxwNXhrN2dFSnIKUzQ4WmF6d0RmWUVmV3Jrdld1YWdvZ1M2SktvbjVEZ0Z1ZHhINXM2Snl6R3lPVnZ0eG1TY2FvOHNxaCs3UXkybgoyLzFVcU5ZK0hlN0x4d04rYkhwYkIxNUtIMTU5ZHNuS3BRbjRORG1jSTZrVnJ3MDVJMUg5ZGRBbGF0bz0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
|
||||
server: https://10.23.25.101:6443
|
||||
name: ephemeral-cluster
|
||||
contexts:
|
||||
- context:
|
||||
cluster: target-cluster
|
||||
user: target-cluster-admin
|
||||
name: target-cluster
|
||||
- context:
|
||||
cluster: ephemeral-cluster
|
||||
user: ephemeral-cluster-admin
|
||||
name: ephemeral-cluster
|
||||
current-context: ""
|
||||
kind: Config
|
||||
preferences: {}
|
||||
users:
|
||||
- name: ephemeral-cluster-admin
|
||||
user:
|
||||
client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUQwRENDQXJnQ0ZFdFBveEZYSjVrVFNWTXQ0OVlqcHBQL3hCYnlNQTBHQ1NxR1NJYjNEUUVCQ3dVQU1CVXgKRXpBUkJnTlZCQU1UQ210MVltVnlibVYwWlhNd0hoY05NakF3TVRJME1Ua3hOVEV3V2hjTk1qa3hNakF5TVRreApOVEV3V2pBME1Sa3dGd1lEVlFRRERCQnJkV0psY201bGRHVnpMV0ZrYldsdU1SY3dGUVlEVlFRS0RBNXplWE4wClpXMDZiV0Z6ZEdWeWN6Q0NBaUl3RFFZSktvWklodmNOQVFFQkJRQURnZ0lQQURDQ0Fnb0NnZ0lCQU1iaFhUUmsKVjZiZXdsUjBhZlpBdTBGYWVsOXRtRThaSFEvaGtaSHhuTjc2bDZUUFltcGJvaDRvRjNGMFFqbzROS1o5NVRuWgo0OWNoV240eFJiZVlPU25EcDBpV0Qzd0pXUlZ5aVFvVUFyYTlNcHVPNkVFU1FpbFVGNXNxc0VXUVdVMjBETStBCkdxK1k0Z2c3eDJ1Q0hTdk1GUmkrNEw5RWlXR2xnRDIvb1hXUm5NWEswNExQajZPb3Vkb2Zid2RmT3J6dTBPVkUKUzR0eGtuS1BCY1BUU3YxMWVaWVhja0JEVjNPbExENEZ3dTB3NTcwcnczNzAraEpYdlZxd3Zjb2RjZjZEL1BXWQowamlnd2ppeUJuZ2dXYW04UVFjd1Nud3o0d05sV3hKOVMyWUJFb1ptdWxVUlFaWVk5ZXRBcEpBdFMzTjlUNlQ2ClovSlJRdEdhZDJmTldTYkxEck5qdU1OTGhBYWRMQnhJUHpBNXZWWk5aalJkdEMwU25pMlFUMTVpSFp4d1RxcjQKakRQQ0pYRXU3KytxcWpQVldUaUZLK3JqcVNhS1pqVWZVa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Z21HR0Z5d05sK0xlMzRmOElKcU42TjNCTjFLRjVxcFptCkFCNCtiaW00QVhHdXNJaHRBTy8rMHdLQmdHRFgwd01oU2lHUFYxSXR3eDcvdS9vRDQzVXZNUVJ3a3daUGxpZzMKbGdiUzh6TzlER2x5RE5jaS93Z1BZVDhxc0ExU3VLZnV1NEIzSEdiazlsZXZubXdCc05VVzJSSVJCTW1zNG5rNQpDcW9MUkp4YnhOaTd6Y1lEK2k1bkVITXdyYStrQzdpNGJVWkUveTBNT3NoZEd4a0gvTUJmTVlHQzcyS1o5eWNlClA0aXhBb0dCQU5BdmJiL3h4VDhvOW1hU0FaV2MvblNWdEw5ckFiMGtHQlBTS3J0QW1wYkdxMitDNjlOeTVBMUUKdW9iN2dzdjJ3NDJIUHJnLzBUTElTSUZhV2kvUi9XUWRkRjFqclFqNTV6N0VpWFFVQ1I0c0NxRGRPU2FZdjAxVgp1NnlsQ2pmVUlGZVVQb3hIQzliTzdpZ01PYkJtcEhHU0RLZzE1cWp4blVpOFpxajRaK24yCi0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tCg==
|
6
manifests/phases/kustomization.yaml
Normal file
6
manifests/phases/kustomization.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
resources:
|
||||
- phases.yaml
|
||||
- plan.yaml
|
||||
- executors.yaml
|
||||
- cluster-map.yaml
|
||||
- kubeconfig.yaml
|
83
manifests/phases/phases.yaml
Normal file
83
manifests/phases/phases.yaml
Normal file
@ -0,0 +1,83 @@
|
||||
---
|
||||
apiVersion: airshipit.org/v1alpha1
|
||||
kind: Phase
|
||||
metadata:
|
||||
name: initinfra-ephemeral
|
||||
clusterName: ephemeral-cluster
|
||||
config:
|
||||
executorRef:
|
||||
apiVersion: airshipit.org/v1alpha1
|
||||
kind: KubernetesApply
|
||||
name: kubernetes-apply
|
||||
documentEntryPoint: manifests/site/test-site/ephemeral/initinfra
|
||||
---
|
||||
apiVersion: airshipit.org/v1alpha1
|
||||
kind: Phase
|
||||
metadata:
|
||||
name: controlplane-ephemeral
|
||||
clusterName: ephemeral-cluster
|
||||
config:
|
||||
executorRef:
|
||||
apiVersion: airshipit.org/v1alpha1
|
||||
kind: KubernetesApply
|
||||
name: kubernetes-apply
|
||||
documentEntryPoint: manifests/site/test-site/ephemeral/controlplane
|
||||
---
|
||||
apiVersion: airshipit.org/v1alpha1
|
||||
kind: Phase
|
||||
metadata:
|
||||
name: initinfra-target
|
||||
clusterName: target-cluster
|
||||
config:
|
||||
cluster: target-cluster
|
||||
executorRef:
|
||||
apiVersion: airshipit.org/v1alpha1
|
||||
kind: KubernetesApply
|
||||
name: kubernetes-apply
|
||||
documentEntryPoint: manifests/site/test-site/target/initinfra
|
||||
---
|
||||
apiVersion: airshipit.org/v1alpha1
|
||||
kind: Phase
|
||||
metadata:
|
||||
name: workers-target
|
||||
clusterName: target-cluster
|
||||
config:
|
||||
cluster: target-cluster
|
||||
executorRef:
|
||||
apiVersion: airshipit.org/v1alpha1
|
||||
kind: KubernetesApply
|
||||
name: kubernetes-apply
|
||||
documentEntryPoint: manifests/site/test-site/target/workers
|
||||
---
|
||||
apiVersion: airshipit.org/v1alpha1
|
||||
kind: Phase
|
||||
metadata:
|
||||
name: clusterctl-init-ephemeral
|
||||
clusterName: ephemeral-cluster
|
||||
config:
|
||||
executorRef:
|
||||
apiVersion: airshipit.org/v1alpha1
|
||||
kind: Clusterctl
|
||||
name: clusterctl_init
|
||||
---
|
||||
apiVersion: airshipit.org/v1alpha1
|
||||
kind: Phase
|
||||
metadata:
|
||||
name: clusterctl-init-target
|
||||
clusterName: target-cluster
|
||||
config:
|
||||
executorRef:
|
||||
apiVersion: airshipit.org/v1alpha1
|
||||
kind: Clusterctl
|
||||
name: clusterctl_init
|
||||
---
|
||||
apiVersion: airshipit.org/v1alpha1
|
||||
kind: Phase
|
||||
metadata:
|
||||
name: clusterctl-move
|
||||
clusterName: target-cluster
|
||||
config:
|
||||
executorRef:
|
||||
apiVersion: airshipit.org/v1alpha1
|
||||
kind: Clusterctl
|
||||
name: clusterctl_move
|
12
manifests/phases/plan.yaml
Normal file
12
manifests/phases/plan.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
apiVersion: airshipit.org/v1alpha1
|
||||
kind: PhasePlan
|
||||
metadata:
|
||||
name: phasePlan
|
||||
phaseGroups:
|
||||
- name: group1
|
||||
phases:
|
||||
- name: initinfra-ephemeral
|
||||
- name: clusterctl-init-ephemeral
|
||||
- name: controlplane-ephemeral
|
||||
- name: initinfra-target
|
||||
- name: workers-target
|
@ -17,7 +17,7 @@ set -xe
|
||||
#Default wait timeout is 3600 seconds
|
||||
export TIMEOUT=${TIMEOUT:-3600}
|
||||
export KUBECONFIG=${KUBECONFIG:-"$HOME/.airship/kubeconfig"}
|
||||
export KUBECONFIG_EPHEMERAL_CONTEXT=${KUBECONFIG_EPHEMERAL_CONTEXT:-"ephemeral-context"}
|
||||
export KUBECONFIG_EPHEMERAL_CONTEXT=${KUBECONFIG_EPHEMERAL_CONTEXT:-"ephemeral-cluster"}
|
||||
|
||||
echo "Deploy ephemeral node using redfish with iso"
|
||||
airshipctl baremetal remotedirect --debug
|
||||
|
@ -15,17 +15,16 @@
|
||||
set -xe
|
||||
|
||||
export KUBECONFIG=${KUBECONFIG:-"$HOME/.airship/kubeconfig"}
|
||||
export WAIT_TIMEOUT=${WAIT_TIMEOUT:-"2000s"}
|
||||
export KUBECONFIG_EPHEMERAL_CONTEXT=${KUBECONFIG_EPHEMERAL_CONTEXT:-"ephemeral-context"}
|
||||
export KUBECONFIG_EPHEMERAL_CONTEXT=${KUBECONFIG_EPHEMERAL_CONTEXT:-"ephemeral-cluster"}
|
||||
|
||||
echo "Deploy metal3.io components to ephemeral node"
|
||||
airshipctl phase apply initinfra --wait-timeout $WAIT_TIMEOUT --debug
|
||||
airshipctl phase run initinfra-ephemeral --debug
|
||||
|
||||
echo "Getting metal3 pods as debug information"
|
||||
kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_EPHEMERAL_CONTEXT --namespace metal3 get pods
|
||||
|
||||
echo "Deploy cluster components to ephemeral node"
|
||||
airshipctl cluster init --debug
|
||||
echo "Deploy cluster-api components to ephemeral node"
|
||||
airshipctl phase run clusterctl-init-ephemeral --debug
|
||||
|
||||
echo "Waiting for clusterapi pods to come up"
|
||||
kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_EPHEMERAL_CONTEXT wait --for=condition=available deploy --all --timeout=1000s -A
|
||||
|
@ -17,9 +17,8 @@ set -ex
|
||||
TARGET_IMAGE_DIR="/srv/iso"
|
||||
EPHEMERAL_DOMAIN_NAME="air-ephemeral"
|
||||
TARGET_IMAGE_URL="https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img"
|
||||
export WAIT_TIMEOUT=${WAIT_TIMEOUT:-"2000s"}
|
||||
export KUBECONFIG=${KUBECONFIG:-"$HOME/.airship/kubeconfig"}
|
||||
export KUBECONFIG_TARGET_CONTEXT=${KUBECONFIG_TARGET_CONTEXT:-"target-context"}
|
||||
export KUBECONFIG_TARGET_CONTEXT=${KUBECONFIG_TARGET_CONTEXT:-"target-cluster"}
|
||||
|
||||
# TODO (dukov) this is needed due to sushy tools inserts cdrom image to
|
||||
# all vms. This can be removed once sushy tool is fixed
|
||||
@ -49,31 +48,20 @@ fi
|
||||
md5sum /srv/iso/target-image.qcow2 | cut -d ' ' -f 1 > ${TARGET_IMAGE_DIR}/target-image.qcow2.md5sum
|
||||
|
||||
echo "Create target k8s cluster resources"
|
||||
airshipctl phase apply controlplane --wait-timeout $WAIT_TIMEOUT --debug
|
||||
airshipctl phase run controlplane-ephemeral --debug
|
||||
|
||||
echo "Switch context to target cluster and set manifest"
|
||||
airshipctl config use-context target-context
|
||||
airshipctl config set-context target-context --manifest dummy_manifest
|
||||
echo "List all nodes in target cluster"
|
||||
kubectl \
|
||||
--kubeconfig $KUBECONFIG \
|
||||
--context $KUBECONFIG_TARGET_CONTEXT \
|
||||
--request-timeout 10s \
|
||||
get node
|
||||
|
||||
echo "Wait for apiserver to become available"
|
||||
N=0
|
||||
MAX_RETRY=30
|
||||
DELAY=60
|
||||
until [ "$N" -ge ${MAX_RETRY} ]
|
||||
do
|
||||
if timeout 20 kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_TARGET_CONTEXT get node; then
|
||||
break
|
||||
fi
|
||||
|
||||
N=$((N+1))
|
||||
echo "$N: Retrying to reach the apiserver"
|
||||
sleep ${DELAY}
|
||||
done
|
||||
|
||||
if [ "$N" -ge ${MAX_RETRY} ]; then
|
||||
echo "Could not reach the apiserver"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "List all pods"
|
||||
kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_TARGET_CONTEXT get pods --all-namespaces
|
||||
echo "List all pods in target cluster"
|
||||
kubectl \
|
||||
--kubeconfig $KUBECONFIG \
|
||||
--context $KUBECONFIG_TARGET_CONTEXT \
|
||||
--request-timeout 10s \
|
||||
get pods \
|
||||
--all-namespaces
|
||||
|
@ -15,38 +15,22 @@
|
||||
set -xe
|
||||
|
||||
export KUBECONFIG=${KUBECONFIG:-"$HOME/.airship/kubeconfig"}
|
||||
export TIMEOUT=${TIMEOUT:-60}
|
||||
NODENAME="node01"
|
||||
export WAIT_TIMEOUT=${WAIT_TIMEOUT:-"2000s"}
|
||||
export KUBECONFIG_TARGET_CONTEXT=${KUBECONFIG_TARGET_CONTEXT:-"target-context"}
|
||||
|
||||
# TODO need to run another config command after use-context to update kubeconfig
|
||||
echo "Switch context to target cluster and set manifest"
|
||||
airshipctl config use-context target-context
|
||||
airshipctl config set-context target-context --manifest dummy_manifest
|
||||
|
||||
end=$(($(date +%s) + $TIMEOUT))
|
||||
echo "Waiting $TIMEOUT seconds for $NODENAME to be created."
|
||||
while true; do
|
||||
if (kubectl --request-timeout 10s --kubeconfig $KUBECONFIG --context $KUBECONFIG_TARGET_CONTEXT get nodes | grep -q $NODENAME) ; then
|
||||
echo -e "\n$NODENAME found"
|
||||
break
|
||||
else
|
||||
now=$(date +%s)
|
||||
if [ $now -gt $end ]; then
|
||||
echo -e "\n$NODENAME was not ready before TIMEOUT."
|
||||
exit 1
|
||||
fi
|
||||
echo -n .
|
||||
sleep 10
|
||||
fi
|
||||
done
|
||||
export KUBECONFIG_TARGET_CONTEXT=${KUBECONFIG_TARGET_CONTEXT:-"target-cluster"}
|
||||
|
||||
# TODO remove taint
|
||||
kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_TARGET_CONTEXT taint node $NODENAME node-role.kubernetes.io/master-
|
||||
kubectl \
|
||||
--kubeconfig $KUBECONFIG \
|
||||
--context $KUBECONFIG_TARGET_CONTEXT \
|
||||
--request-timeout 10s \
|
||||
taint node $NODENAME node-role.kubernetes.io/master-
|
||||
|
||||
echo "Deploy infra to cluster"
|
||||
airshipctl phase apply initinfra --debug --wait-timeout $WAIT_TIMEOUT
|
||||
airshipctl phase run initinfra-target --debug
|
||||
|
||||
echo "List all pods"
|
||||
kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_TARGET_CONTEXT get pods --all-namespaces
|
||||
kubectl \
|
||||
--kubeconfig $KUBECONFIG \
|
||||
--context $KUBECONFIG_TARGET_CONTEXT \
|
||||
get pods \
|
||||
--all-namespaces
|
||||
|
@ -15,15 +15,10 @@
|
||||
set -xe
|
||||
|
||||
export KUBECONFIG=${KUBECONFIG:-"$HOME/.airship/kubeconfig"}
|
||||
export KUBECONFIG_TARGET_CONTEXT=${KUBECONFIG_TARGET_CONTEXT:-"target-context"}
|
||||
export KUBECONFIG_TARGET_CONTEXT=${KUBECONFIG_TARGET_CONTEXT:-"target-cluster"}
|
||||
|
||||
# TODO need to run another config command after use-context to update kubeconfig
|
||||
echo "Switch context to target cluster and set manifest"
|
||||
airshipctl config use-context target-context
|
||||
airshipctl config set-context target-context --manifest dummy_manifest
|
||||
|
||||
echo "Deploy CAPI components"
|
||||
airshipctl cluster init --debug
|
||||
echo "Deploy CAPI components to target cluster"
|
||||
airshipctl phase run clusterctl-init-target --debug
|
||||
|
||||
echo "Waiting for pods to be ready"
|
||||
kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_TARGET_CONTEXT wait --all-namespaces --for=condition=Ready pods --all --timeout=600s
|
||||
|
@ -17,12 +17,8 @@ set -xe
|
||||
#Default wait timeout is 3600 seconds
|
||||
export TIMEOUT=${TIMEOUT:-3600}
|
||||
export KUBECONFIG=${KUBECONFIG:-"$HOME/.airship/kubeconfig"}
|
||||
export KUBECONFIG_EPHEMERAL_CONTEXT=${KUBECONFIG_EPHEMERAL_CONTEXT:-"ephemeral-context"}
|
||||
export KUBECONFIG_TARGET_CONTEXT=${KUBECONFIG_TARGET_CONTEXT:-"target-context"}
|
||||
|
||||
echo "Switch context to ephemeral cluster and set manifest"
|
||||
airshipctl config use-context ephemeral-context
|
||||
airshipctl config set-context ephemeral-context --manifest dummy_manifest
|
||||
export KUBECONFIG_EPHEMERAL_CONTEXT=${KUBECONFIG_EPHEMERAL_CONTEXT:-"ephemeral-cluster"}
|
||||
export KUBECONFIG_TARGET_CONTEXT=${KUBECONFIG_TARGET_CONTEXT:-"target-cluster"}
|
||||
|
||||
echo "Check Cluster Status"
|
||||
kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_EPHEMERAL_CONTEXT get cluster target-cluster -o json | jq '.status.controlPlaneReady'
|
||||
@ -30,13 +26,10 @@ kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_EPHEMERAL_CONTEXT get clu
|
||||
echo "Annotate BMH for target node"
|
||||
kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_EPHEMERAL_CONTEXT annotate bmh node01 baremetalhost.metal3.io/paused=true
|
||||
|
||||
# Switch to airshipctl phase clusterctl-move when it is working
|
||||
echo "Move Cluster Object to Target Cluster"
|
||||
clusterctl --v 20 move --kubeconfig $KUBECONFIG --kubeconfig-context $KUBECONFIG_EPHEMERAL_CONTEXT --to-kubeconfig $KUBECONFIG --to-kubeconfig-context $KUBECONFIG_TARGET_CONTEXT
|
||||
|
||||
echo "Switch context to target cluster and set manifest"
|
||||
airshipctl config use-context target-context
|
||||
airshipctl config set-context target-context --manifest dummy_manifest
|
||||
|
||||
echo "Waiting for pods to be ready"
|
||||
kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_TARGET_CONTEXT wait --all-namespaces --for=condition=Ready pods --all --timeout=3000s
|
||||
kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_TARGET_CONTEXT get pods --all-namespaces
|
||||
|
@ -17,17 +17,13 @@ set -xe
|
||||
#Default wait timeout is 3600 seconds
|
||||
export TIMEOUT=${TIMEOUT:-3600}
|
||||
export KUBECONFIG=${KUBECONFIG:-"$HOME/.airship/kubeconfig"}
|
||||
export KUBECONFIG_TARGET_CONTEXT=${KUBECONFIG_TARGET_CONTEXT:-"target-context"}
|
||||
|
||||
echo "Switch context to target cluster and set manifest"
|
||||
airshipctl config use-context target-context
|
||||
airshipctl config set-context target-context --manifest dummy_manifest
|
||||
export KUBECONFIG_TARGET_CONTEXT=${KUBECONFIG_TARGET_CONTEXT:-"target-cluster"}
|
||||
|
||||
echo "Stop ephemeral node"
|
||||
sudo virsh destroy air-ephemeral
|
||||
|
||||
echo "Deploy worker node"
|
||||
airshipctl phase apply workers --debug
|
||||
airshipctl phase run workers-target --debug
|
||||
|
||||
#Wait till node is created
|
||||
end=$(($(date +%s) + $TIMEOUT))
|
||||
|
@ -35,13 +35,13 @@ clusters:
|
||||
clusterKubeconf: target-cluster_target
|
||||
managementConfiguration: dummy_management_config
|
||||
contexts:
|
||||
ephemeral-context:
|
||||
ephemeral-cluster:
|
||||
contextKubeconf: ephemeral-context
|
||||
manifest: dummy_manifest
|
||||
target-context:
|
||||
target-cluster:
|
||||
contextKubeconf: target-context
|
||||
manifest: dummy_manifest
|
||||
currentContext: ephemeral-context
|
||||
currentContext: ephemeral-cluster
|
||||
kind: Config
|
||||
manifests:
|
||||
dummy_manifest:
|
||||
@ -54,6 +54,7 @@ manifests:
|
||||
remoteRef: ""
|
||||
tag: ""
|
||||
url: ${AIRSHIP_CONFIG_PRIMARY_REPO_URL}
|
||||
metadataPath: manifests/metadata.yaml
|
||||
subPath: ${AIRSHIP_SITE_NAME}
|
||||
targetPath: ${AIRSHIP_CONFIG_MANIFEST_DIRECTORY}
|
||||
users:
|
||||
|
@ -12,12 +12,12 @@ contexts:
|
||||
- context:
|
||||
cluster: ephemeral-cluster_ephemeral
|
||||
user: ephemeral-cluster-admin
|
||||
name: ephemeral-context
|
||||
name: ephemeral-cluster
|
||||
- context:
|
||||
cluster: target-cluster_target
|
||||
user: target-cluster-admin
|
||||
name: target-context
|
||||
current-context: ephemeral-context
|
||||
name: target-cluster
|
||||
current-context: ephemeral-cluster
|
||||
kind: Config
|
||||
preferences: {}
|
||||
users:
|
||||
|
Loading…
Reference in New Issue
Block a user