Support for new hyperkube source in promenade
New source is Docker image that can be used to exctract hyperkube binary. It can be done by running Docker container inside Promenade container and copy binary to mounted volume. Change-Id: Ie79ff4b349e6321e7a335359b2c461dac783b431
This commit is contained in:
parent
9a6b4012f3
commit
95d6266046
@ -15,6 +15,7 @@ export IMAGE_QUAGGA=${IMAGE_QUAGGA:-docker.io/cumulusnetworks/quagga:CL3.3.2}
|
|||||||
export IMAGE_DRYDOCK_CLI=${IMAGE_DRYDOCK_CLI:-quay.io/airshipit/drydock:d93d6d5a0a370ced536180612d1ade708e29cd47}
|
export IMAGE_DRYDOCK_CLI=${IMAGE_DRYDOCK_CLI:-quay.io/airshipit/drydock:d93d6d5a0a370ced536180612d1ade708e29cd47}
|
||||||
export IMAGE_DOCKER_REGISTRY=${IMAGE_DOCKER_REGISTRY:-"docker.io/registry:2"}
|
export IMAGE_DOCKER_REGISTRY=${IMAGE_DOCKER_REGISTRY:-"docker.io/registry:2"}
|
||||||
export PROMENADE_DEBUG=${PROMENADE_DEBUG:-0}
|
export PROMENADE_DEBUG=${PROMENADE_DEBUG:-0}
|
||||||
|
export PROMENADE_TMP_LOCAL=${PROMENADE_TMP_LOCAL:-tmp_bin}
|
||||||
export REGISTRY_DATA_DIR=${REGISTRY_DATA_DIR:-/mnt/registry}
|
export REGISTRY_DATA_DIR=${REGISTRY_DATA_DIR:-/mnt/registry}
|
||||||
export VIRSH_POOL=${VIRSH_POOL:-airship}
|
export VIRSH_POOL=${VIRSH_POOL:-airship}
|
||||||
export VIRSH_POOL_PATH=${VIRSH_POOL_PATH:-/var/lib/libvirt/airship}
|
export VIRSH_POOL_PATH=${VIRSH_POOL_PATH:-/var/lib/libvirt/airship}
|
||||||
|
@ -25,6 +25,14 @@ then
|
|||||||
KEYS_PATH=""
|
KEYS_PATH=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
PROMENADE_TMP_LOCAL="$(basename $PROMENADE_TMP_LOCAL)"
|
||||||
|
PROMENADE_TMP="${TEMP_DIR}/${PROMENADE_TMP_LOCAL}"
|
||||||
|
mkdir -p $PROMENADE_TMP
|
||||||
|
chmod 777 $PROMENADE_TMP
|
||||||
|
|
||||||
|
DOCKER_SOCK="/var/run/docker.sock"
|
||||||
|
sudo chmod o+rw $DOCKER_SOCK
|
||||||
|
|
||||||
log Building scripts
|
log Building scripts
|
||||||
docker run --rm -t \
|
docker run --rm -t \
|
||||||
-w /config \
|
-w /config \
|
||||||
@ -33,6 +41,11 @@ docker run --rm -t \
|
|||||||
-v "${GATE_DEPOT}:/gate" \
|
-v "${GATE_DEPOT}:/gate" \
|
||||||
-v "${CERT_DEPOT}:/certs" \
|
-v "${CERT_DEPOT}:/certs" \
|
||||||
-v "${SCRIPT_DEPOT}:/scripts" \
|
-v "${SCRIPT_DEPOT}:/scripts" \
|
||||||
|
-v "${PROMENADE_TMP}:/${PROMENADE_TMP_LOCAL}" \
|
||||||
|
-v "${DOCKER_SOCK}:${DOCKER_SOCK}" \
|
||||||
|
-e "DOCKER_HOST=unix:/${DOCKER_SOCK}" \
|
||||||
|
-e "PROMENADE_TMP=${PROMENADE_TMP}" \
|
||||||
|
-e "PROMENADE_TMP_LOCAL=/${PROMENADE_TMP_LOCAL}" \
|
||||||
-e "PROMENADE_ENCRYPTION_KEY=${PROMENADE_ENCRYPTION_KEY}" \
|
-e "PROMENADE_ENCRYPTION_KEY=${PROMENADE_ENCRYPTION_KEY}" \
|
||||||
${DOCKER_RUN_OPTS[*]} \
|
${DOCKER_RUN_OPTS[*]} \
|
||||||
"${IMAGE_PROMENADE_CLI}" \
|
"${IMAGE_PROMENADE_CLI}" \
|
||||||
@ -42,3 +55,4 @@ docker run --rm -t \
|
|||||||
-o /scripts \
|
-o /scripts \
|
||||||
/config/*.yaml ${CERTS_PATH} ${KEYS_PATH}
|
/config/*.yaml ${CERTS_PATH} ${KEYS_PATH}
|
||||||
|
|
||||||
|
sudo chmod o-rw $DOCKER_SOCK
|
||||||
|
@ -26,7 +26,7 @@ function upload_script() {
|
|||||||
# Copies script to genesis VM
|
# Copies script to genesis VM
|
||||||
rsync_cmd "$BASH_SOURCE" "$GENESIS_NAME:/root/airship/"
|
rsync_cmd "$BASH_SOURCE" "$GENESIS_NAME:/root/airship/"
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
ssh_cmd_raw "$GENESIS_NAME" "GATE_DEBUG=${GATE_DEBUG} NUM_NODES=$1 /root/airship/${BASENAME}" 2>&1 | tee -a "$LOG_FILE"
|
ssh_cmd_raw "$GENESIS_NAME" "KUBECONFIG=${KUBECONFIG} GATE_DEBUG=${GATE_DEBUG} NUM_NODES=$1 /root/airship/${BASENAME}" 2>&1 | tee -a "$LOG_FILE"
|
||||||
set +o pipefail
|
set +o pipefail
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,6 +99,7 @@ if [[ -n "$GATE_UTILS" ]]; then
|
|||||||
upload_script $NUM_NODES
|
upload_script $NUM_NODES
|
||||||
else
|
else
|
||||||
set +e
|
set +e
|
||||||
|
KUBECONFIG="${KUBECONFIG:-/etc/kubernetes/admin/kubeconfig.yaml}"
|
||||||
KUBECTL="${KUBECTL:-/usr/local/bin/kubectl}"
|
KUBECTL="${KUBECTL:-/usr/local/bin/kubectl}"
|
||||||
NUM_NODES="${NUM_NODES:-4}"
|
NUM_NODES="${NUM_NODES:-4}"
|
||||||
PAUSE="${PAUSE:-1}"
|
PAUSE="${PAUSE:-1}"
|
||||||
|
Loading…
Reference in New Issue
Block a user