Update for customized images build

Change-Id: Ice149ff94055b0a92525c23fc6810ce2e6ac0c70
This commit is contained in:
Sergiy Markin 2024-08-30 19:30:00 +00:00
parent 27b49dab6e
commit 6810a529c9
3 changed files with 56 additions and 28 deletions

View File

@ -139,6 +139,13 @@ data:
pod: pod:
replicas: replicas:
deckhand: 2 deckhand: 2
security_context:
deckhand:
pod:
runAsUser: 1000
db_sync:
pod:
runAsUser: 1000
conf: conf:
deckhand: deckhand:
DEFAULT: DEFAULT:

View File

@ -27,6 +27,7 @@ set -xe
: "${CLONE_SHIPYARD:=true}" : "${CLONE_SHIPYARD:=true}"
: "${CLONE_PORTHOLE:=true}" : "${CLONE_PORTHOLE:=true}"
: "${CLONE_PROMENADE:=true}" : "${CLONE_PROMENADE:=true}"
: "${CLONE_PEGLEG:=true}"
: "${CLONE_KUBERNETES_ENTRYPOINT:=true}" : "${CLONE_KUBERNETES_ENTRYPOINT:=true}"
: "${CLONE_MAAS:=true}" : "${CLONE_MAAS:=true}"
: "${CLONE_OSH:=true}" : "${CLONE_OSH:=true}"
@ -38,6 +39,7 @@ CLONE_DECKHAND=$(echo "$CLONE_DECKHAND" | tr '[:upper:]' '[:lower:]')
CLONE_SHIPYARD=$(echo "$CLONE_SHIPYARD" | tr '[:upper:]' '[:lower:]') CLONE_SHIPYARD=$(echo "$CLONE_SHIPYARD" | tr '[:upper:]' '[:lower:]')
CLONE_PORTHOLE=$(echo "$CLONE_PORTHOLE" | tr '[:upper:]' '[:lower:]') CLONE_PORTHOLE=$(echo "$CLONE_PORTHOLE" | tr '[:upper:]' '[:lower:]')
CLONE_PROMENADE=$(echo "$CLONE_PROMENADE" | tr '[:upper:]' '[:lower:]') CLONE_PROMENADE=$(echo "$CLONE_PROMENADE" | tr '[:upper:]' '[:lower:]')
CLONE_PEGLEG=$(echo "$CLONE_PEGLEG" | tr '[:upper:]' '[:lower:]')
CLONE_KUBERNETES_ENTRYPOINT=$(echo "$CLONE_KUBERNETES_ENTRYPOINT" | tr '[:upper:]' '[:lower:]') CLONE_KUBERNETES_ENTRYPOINT=$(echo "$CLONE_KUBERNETES_ENTRYPOINT" | tr '[:upper:]' '[:lower:]')
CLONE_MAAS=$(echo "$CLONE_MAAS" | tr '[:upper:]' '[:lower:]') CLONE_MAAS=$(echo "$CLONE_MAAS" | tr '[:upper:]' '[:lower:]')
CLONE_OSH=$(echo "$CLONE_OSH" | tr '[:upper:]' '[:lower:]') CLONE_OSH=$(echo "$CLONE_OSH" | tr '[:upper:]' '[:lower:]')
@ -49,6 +51,7 @@ export CLONE_DECKHAND
export CLONE_SHIPYARD export CLONE_SHIPYARD
export CLONE_PORTHOLE export CLONE_PORTHOLE
export CLONE_PROMENADE export CLONE_PROMENADE
export CLONE_PEGLEG
export CLONE_KUBERNETES_ENTRYPOINT export CLONE_KUBERNETES_ENTRYPOINT
export CLONE_MAAS export CLONE_MAAS
export CLONE_OSH export CLONE_OSH
@ -74,6 +77,9 @@ fi
if [[ ${CLONE_PROMENADE} = true ]] ; then if [[ ${CLONE_PROMENADE} = true ]] ; then
git clone https://opendev.org/airship/promenade.git git clone https://opendev.org/airship/promenade.git
fi fi
if [[ ${CLONE_PEGLEG} = true ]] ; then
git clone https://opendev.org/airship/pegleg.git
fi
if [[ ${CLONE_KUBERNETES_ENTRYPOINT} = true ]] ; then if [[ ${CLONE_KUBERNETES_ENTRYPOINT} = true ]] ; then
git clone https://opendev.org/airship/kubernetes-entrypoint.git git clone https://opendev.org/airship/kubernetes-entrypoint.git
fi fi

View File

@ -28,6 +28,7 @@ CURRENT_DIR="$(pwd)"
: "${MAKE_SHIPYARD_IMAGES:=false}" : "${MAKE_SHIPYARD_IMAGES:=false}"
: "${MAKE_PORTHOLE_IMAGES:=false}" : "${MAKE_PORTHOLE_IMAGES:=false}"
: "${MAKE_PROMENADE_IMAGES:=false}" : "${MAKE_PROMENADE_IMAGES:=false}"
: "${MAKE_PEGLEG_IMAGES:=false}"
: "${MAKE_KUBERTENES_ENTRYPOINT_IMAGES:=false}" : "${MAKE_KUBERTENES_ENTRYPOINT_IMAGES:=false}"
# Convert both values to lowercase (or uppercase) # Convert both values to lowercase (or uppercase)
@ -38,6 +39,7 @@ MAKE_DECKHAND_IMAGES=$(echo "$MAKE_DECKHAND_IMAGES" | tr '[:upper:]' '[:lower:]'
MAKE_SHIPYARD_IMAGES=$(echo "$MAKE_SHIPYARD_IMAGES" | tr '[:upper:]' '[:lower:]') MAKE_SHIPYARD_IMAGES=$(echo "$MAKE_SHIPYARD_IMAGES" | tr '[:upper:]' '[:lower:]')
MAKE_PORTHOLE_IMAGES=$(echo "$MAKE_PORTHOLE_IMAGES" | tr '[:upper:]' '[:lower:]') MAKE_PORTHOLE_IMAGES=$(echo "$MAKE_PORTHOLE_IMAGES" | tr '[:upper:]' '[:lower:]')
MAKE_PROMENADE_IMAGES=$(echo "$MAKE_PROMENADE_IMAGES" | tr '[:upper:]' '[:lower:]') MAKE_PROMENADE_IMAGES=$(echo "$MAKE_PROMENADE_IMAGES" | tr '[:upper:]' '[:lower:]')
MAKE_PEGLEG_IMAGES=$(echo "$MAKE_PEGLEG_IMAGES" | tr '[:upper:]' '[:lower:]')
MAKE_KUBERTENES_ENTRYPOINT_IMAGES=$(echo "$MAKE_KUBERTENES_ENTRYPOINT_IMAGES" | tr '[:upper:]' '[:lower:]') MAKE_KUBERTENES_ENTRYPOINT_IMAGES=$(echo "$MAKE_KUBERTENES_ENTRYPOINT_IMAGES" | tr '[:upper:]' '[:lower:]')
export MAKE_ARMADA_IMAGES export MAKE_ARMADA_IMAGES
@ -47,6 +49,7 @@ export MAKE_DECKHAND_IMAGES
export MAKE_SHIPYARD_IMAGES export MAKE_SHIPYARD_IMAGES
export MAKE_PORTHOLE_IMAGES export MAKE_PORTHOLE_IMAGES
export MAKE_PROMENADE_IMAGES export MAKE_PROMENADE_IMAGES
export MAKE_PEGLEG_IMAGES
export MAKE_KUBERTENES_ENTRYPOINT_IMAGES export MAKE_KUBERTENES_ENTRYPOINT_IMAGES
cd "${INSTALL_PATH}" cd "${INSTALL_PATH}"
@ -60,86 +63,98 @@ curl -Ik "http://${DOCKER_REGISTRY}"
if [[ ${MAKE_ARMADA_IMAGES} = true ]] ; then if [[ ${MAKE_ARMADA_IMAGES} = true ]] ; then
pushd armada pushd armada
make images make images
docker push "${DOCKER_REGISTRY}/airshipit/armada:latest-${DISTRO}"
popd popd
pushd treasuremap pushd treasuremap
sed -i "s#quay.io/airshipit/armada:latest-${DISTRO}#${DOCKER_REGISTRY}/airshipit/armada:latest-${DISTRO}#g" ./site/airskiff/software/config/versions.yaml sed -i "s#quay.io/airshipit/armada:latest-#${DOCKER_REGISTRY}/airshipit/armada:latest-#g" ./site/airskiff/software/config/versions.yaml
sed -i "s#quay.io/airshipit/armada:latest-${DISTRO}#${DOCKER_REGISTRY}/airshipit/armada:latest-${DISTRO}#g" ./global/software/config/versions.yaml sed -i "s#quay.io/airshipit/armada:latest-#${DOCKER_REGISTRY}/airshipit/armada:latest-#g" ./global/software/config/versions.yaml
grep armada global/software/config/versions.yaml
grep armada site/airskiff/software/config/versions.yaml
popd popd
fi fi
if [[ ${MAKE_ARMADA_GO_IMAGES} = true ]] ; then if [[ ${MAKE_ARMADA_GO_IMAGES} = true ]] ; then
pushd armada-go pushd armada-go
make images make images
docker push "${DOCKER_REGISTRY}/airshipit/armada-go:latest-${DISTRO}"
popd popd
pushd treasuremap pushd treasuremap
sed -i "s#quay.io/airshipit/armada-go:latest-${DISTRO}#${DOCKER_REGISTRY}/airshipit/armada-go:latest-${DISTRO}#g" ./site/airskiff/software/config/versions.yaml sed -i "s#quay.io/airshipit/armada-go:latest-#${DOCKER_REGISTRY}/airshipit/armada-go:latest-#g" ./global/software/config/versions.yaml
sed -i "s#quay.io/airshipit/armada-go:latest-${DISTRO}#${DOCKER_REGISTRY}/airshipit/armada-go:latest-${DISTRO}#g" ./global/software/config/versions.yaml grep armada-go global/software/config/versions.yaml
popd popd
fi fi
if [[ ${MAKE_ARMADA_OPERATOR_IMAGES} = true ]] ; then if [[ ${MAKE_ARMADA_OPERATOR_IMAGES} = true ]] ; then
pushd armada-operator pushd armada-operator
make images make images
docker push "${DOCKER_REGISTRY}/airshipit/armada-operator:latest-${DISTRO}"
popd popd
pushd treasuremap pushd treasuremap
sed -i "s#quay.io/airshipit/armada-operator:latest-${DISTRO}#${DOCKER_REGISTRY}/airshipit/armada-operator:latest-${DISTRO}#g" ./site/airskiff/software/config/versions.yaml sed -i "s#quay.io/airshipit/armada-operator:latest-#${DOCKER_REGISTRY}/airshipit/armada-operator:latest-#g" ./global/software/config/versions.yaml
sed -i "s#quay.io/airshipit/armada-operator:latest-${DISTRO}#${DOCKER_REGISTRY}/airshipit/armada-operator:latest-${DISTRO}#g" ./global/software/config/versions.yaml grep armada-operator global/software/config/versions.yaml
popd popd
fi fi
if [[ ${MAKE_DECKHAND_IMAGES} = true ]] ; then if [[ ${MAKE_DECKHAND_IMAGES} = true ]] ; then
pushd deckhand pushd deckhand
make images make images
docker push "${DOCKER_REGISTRY}/airshipit/deckhand:latest-${DISTRO}"
popd popd
pushd treasuremap pushd treasuremap
sed -i "s#quay.io/airshipit/deckhand:latest-${DISTRO}#${DOCKER_REGISTRY}/airshipit/deckhand:latest-${DISTRO}#g" ./site/airskiff/software/config/versions.yaml sed -i "s#quay.io/airshipit/deckhand:latest-#${DOCKER_REGISTRY}/airshipit/deckhand:latest-#g" ./site/airskiff/software/config/versions.yaml
sed -i "s#quay.io/airshipit/deckhand:latest-${DISTRO}#${DOCKER_REGISTRY}/airshipit/deckhand:latest-${DISTRO}#g" ./global/software/config/versions.yaml sed -i "s#quay.io/airshipit/deckhand:latest-#${DOCKER_REGISTRY}/airshipit/deckhand:latest-#g" ./global/software/config/versions.yaml
grep deckhand global/software/config/versions.yaml
grep deckhand site/airskiff/software/config/versions.yaml
popd popd
fi fi
if [[ ${MAKE_SHIPYARD_IMAGES} = true ]] ; then if [[ ${MAKE_SHIPYARD_IMAGES} = true ]] ; then
pushd shipyard pushd shipyard
make images make images
docker push "${DOCKER_REGISTRY}/airshipit/airflow:latest-${DISTRO}"
docker push "${DOCKER_REGISTRY}/airshipit/shipyard:latest-${DISTRO}"
popd popd
pushd treasuremap pushd treasuremap
sed -i "s#quay.io/airshipit/airflow:latest-${DISTRO}#${DOCKER_REGISTRY}/airshipit/airflow:latest-${DISTRO}#g" ./site/airskiff/software/config/versions.yaml sed -i "s#quay.io/airshipit/airflow:latest-#${DOCKER_REGISTRY}/airshipit/airflow:latest-#g" ./site/airskiff/software/config/versions.yaml
sed -i "s#quay.io/airshipit/shipyard:latest-${DISTRO}#${DOCKER_REGISTRY}/airshipit/shipyard:latest-${DISTRO}#g" ./site/airskiff/software/config/versions.yaml sed -i "s#quay.io/airshipit/shipyard:latest-#${DOCKER_REGISTRY}/airshipit/shipyard:latest-#g" ./site/airskiff/software/config/versions.yaml
sed -i "s#quay.io/airshipit/airflow:latest-${DISTRO}#${DOCKER_REGISTRY}/airshipit/airflow:latest-${DISTRO}#g" ./global/software/config/versions.yaml sed -i "s#quay.io/airshipit/airflow:latest-#${DOCKER_REGISTRY}/airshipit/airflow:latest-#g" ./global/software/config/versions.yaml
sed -i "s#quay.io/airshipit/shipyard:latest-${DISTRO}#${DOCKER_REGISTRY}/airshipit/shipyard:latest-${DISTRO}#g" ./global/software/config/versions.yaml sed -i "s#quay.io/airshipit/shipyard:latest-#${DOCKER_REGISTRY}/airshipit/shipyard:latest-#g" ./global/software/config/versions.yaml
grep airflow global/software/config/versions.yaml
grep airflow site/airskiff/software/config/versions.yaml
grep shipyard global/software/config/versions.yaml
grep shipyard site/airskiff/software/config/versions.yaml
popd popd
fi fi
if [[ ${MAKE_PORTHOLE_IMAGES} = true ]] ; then if [[ ${MAKE_PORTHOLE_IMAGES} = true ]] ; then
pushd porthole pushd porthole
make images make images
popd
# Define a list of images # Define a list of images
IMAGE_LIST=("calicoctl-utility" "ceph-utility" "compute-utility" "etcdctl-utility" "mysqlclient-utility" "openstack-utility" "postgresql-utility") IMAGE_LIST=("calicoctl-utility" "ceph-utility" "compute-utility" "etcdctl-utility" "mysqlclient-utility" "openstack-utility" "postgresql-utility")
for IMAGE in "${IMAGE_LIST}" for IMAGE in ${IMAGE_LIST}
do do
docker push "${DOCKER_REGISTRY}/airshipit/porthole-${IMAGE}:latest-${DISTRO}"
pushd treasuremap
sed -i "s#quay.io/airshipit/porthole-${IMAGE}:latest-#${DOCKER_REGISTRY}/airshipit/porthole-${IMAGE}:latest-#g" ./global/software/config/versions.yaml
grep ${IMAGE} global/software/config/versions.yaml
popd
done done
popd
pushd treasuremap
sed -i "s#quay.io/airshipit/porthole-${IMAGE}:latest-${DISTRO}#${DOCKER_REGISTRY}/airshipit/porthole-${IMAGE}:latest-${DISTRO}#g" ./global/software/config/versions.yaml
popd
fi fi
if [[ ${MAKE_PROMENADE_IMAGES} = true ]] ; then if [[ ${MAKE_PROMENADE_IMAGES} = true ]] ; then
pushd promenade pushd promenade
make images make images
docker push "${DOCKER_REGISTRY}/airshipit/promenade:latest-${DISTRO}"
popd popd
pushd treasuremap pushd treasuremap
sed -i "s#quay.io/airshipit/promenade:latest-${DISTRO}#${DOCKER_REGISTRY}/airshipit/promenade:latest-${DISTRO}#g" ./global/software/config/versions.yaml sed -i "s#quay.io/airshipit/promenade:latest-#${DOCKER_REGISTRY}/airshipit/promenade:latest-#g" ./global/software/config/versions.yaml
grep promenade global/software/config/versions.yaml
popd
fi
if [[ ${MAKE_PEGLEG_IMAGES} = true ]] ; then
pushd pegleg
make images
popd
pushd treasuremap
sed -i "s#quay.io/airshipit/pegleg:latest-#${DOCKER_REGISTRY}/airshipit/pegleg:latest-#g" ./global/software/config/versions.yaml
grep pegleg global/software/config/versions.yaml
popd popd
fi fi
if [[ ${MAKE_KUBERTENES_ENTRYPOINT_IMAGES} = true ]] ; then if [[ ${MAKE_KUBERTENES_ENTRYPOINT_IMAGES} = true ]] ; then
pushd kubernetes-entrypoint pushd kubernetes-entrypoint
make images make images
docker push "${DOCKER_REGISTRY}/airshipit/kubernetes-entrypoint:latest-${DISTRO}"
popd popd
pushd treasuremap pushd treasuremap
sed -i "s#quay.io/airshipit/kubernetes-entrypoint:latest-${DISTRO}#${DOCKER_REGISTRY}/airshipit/kubernetes-entrypoint:latest-${DISTRO}#g" ./global/software/config/versions.yaml sed -i "s#quay.io/airshipit/kubernetes-entrypoint:latest-#${DOCKER_REGISTRY}/airshipit/kubernetes-entrypoint:latest-#g" ./global/software/config/versions.yaml
grep kubernetes-entrypoint global/software/config/versions.yaml
popd popd
fi fi