Armada command integration
This PS integrates armada command to tools/airship wrapper script. Change-Id: I80fb6d8ebb14cc7a84f350a324ec3e847f5654d4
This commit is contained in:
parent
e8b6c62261
commit
051f8c7543
@ -119,6 +119,7 @@ Examples:
|
|||||||
tools/airship promenade generate-certs -o /target/certs /target/collect/*.yaml
|
tools/airship promenade generate-certs -o /target/certs /target/collect/*.yaml
|
||||||
tools/airship promenade build-all -o /target/bundle /target/collect/*.yaml /target/certs/*.yaml
|
tools/airship promenade build-all -o /target/bundle /target/collect/*.yaml /target/certs/*.yaml
|
||||||
tools/airship shipyard get actions
|
tools/airship shipyard get actions
|
||||||
|
tools/airship armada apply actions
|
||||||
"
|
"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -189,13 +190,29 @@ shipyard() {
|
|||||||
|
|
||||||
versions_lookup "['data']['images']['ucp']['shipyard']['shipyard']"
|
versions_lookup "['data']['images']['ucp']['shipyard']['shipyard']"
|
||||||
|
|
||||||
SHIPYARD_IMAGE=$RESULT
|
IMAGE_SHIPYARD=$IMAGE_URL
|
||||||
docker run --rm --net=host $TERM_OPTS \
|
docker run --rm --net=host $TERM_OPTS \
|
||||||
-u "${USER}:${GROUP}" \
|
-u "${USER}:${GROUP}" \
|
||||||
-w /target \
|
-w /target \
|
||||||
-v $(pwd):/target \
|
-v $(pwd):/target \
|
||||||
--env-file $ENV_FILE \
|
--env-file $ENV_FILE \
|
||||||
$IMAGE_URL $@
|
$IMAGE_SHIPYARD $@
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
armada() {
|
||||||
|
|
||||||
|
versions_lookup "['data']['images']['ucp']['armada']['api']"
|
||||||
|
|
||||||
|
IMAGE_ARMADA=$IMAGE_URL
|
||||||
|
docker run --rm --net host $TERM_OPTS \
|
||||||
|
-u "${USER}:${GROUP}" \
|
||||||
|
-v ${HOME}/.kube/config:/armada/.kube/config \
|
||||||
|
-v "$(pwd)"/airskiff.yaml:/airskiff.yaml \
|
||||||
|
-v "${REPO_DIR}"/../:/airship-components \
|
||||||
|
--env-file $ENV_FILE \
|
||||||
|
$IMAGE_ARMADA $@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -210,6 +227,10 @@ case "$1" in
|
|||||||
shift;
|
shift;
|
||||||
shipyard $@
|
shipyard $@
|
||||||
;;
|
;;
|
||||||
|
'armada')
|
||||||
|
shift;
|
||||||
|
armada $@
|
||||||
|
;;
|
||||||
*) help
|
*) help
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
@ -20,9 +20,8 @@ set -xe
|
|||||||
: "${INSTALL_PATH:="$(pwd)/../"}"
|
: "${INSTALL_PATH:="$(pwd)/../"}"
|
||||||
: "${PEGLEG:="./tools/airship pegleg"}"
|
: "${PEGLEG:="./tools/airship pegleg"}"
|
||||||
: "${PL_SITE:="airskiff"}"
|
: "${PL_SITE:="airskiff"}"
|
||||||
|
: "${ARMADA:="./tools/airship armada"}"
|
||||||
: "${TARGET_MANIFEST:="cluster-bootstrap"}"
|
: "${TARGET_MANIFEST:="cluster-bootstrap"}"
|
||||||
: "${DISTRO:=ubuntu_focal}"
|
|
||||||
: "${DOCKER_REGISTRY:=quay.io}"
|
|
||||||
|
|
||||||
|
|
||||||
# Render documents
|
# Render documents
|
||||||
@ -37,12 +36,7 @@ sudo chmod 0644 airskiff.yaml
|
|||||||
# sudo chmod 0644 ~/.kube/config
|
# sudo chmod 0644 ~/.kube/config
|
||||||
|
|
||||||
# Download latest Armada image and deploy Airship components
|
# Download latest Armada image and deploy Airship components
|
||||||
docker run --rm --net host -p 8000:8000 --name armada \
|
${ARMADA} apply /airskiff.yaml --debug --target-manifest "${TARGET_MANIFEST}"
|
||||||
-v ~/.kube/config:/armada/.kube/config \
|
|
||||||
-v "$(pwd)"/airskiff.yaml:/airskiff.yaml \
|
|
||||||
-v "${INSTALL_PATH}":/airship-components \
|
|
||||||
"${DOCKER_REGISTRY}/airshipit/armada:latest-${DISTRO}" \
|
|
||||||
apply /airskiff.yaml --debug --target-manifest "${TARGET_MANIFEST}"
|
|
||||||
|
|
||||||
# # Set back permissions of the files
|
# # Set back permissions of the files
|
||||||
sudo chmod "${AIRSKIFF_PERMISSIONS}" airskiff.yaml
|
sudo chmod "${AIRSKIFF_PERMISSIONS}" airskiff.yaml
|
||||||
|
Loading…
Reference in New Issue
Block a user