Skip to content
Snippets Groups Projects
Verified Commit 407fc8b4 authored by David Hoese's avatar David Hoese
Browse files

Attempt to add other components to testing

parent 300286cc
No related branches found
No related tags found
No related merge requests found
Showing
with 207 additions and 319 deletions
......@@ -157,17 +157,7 @@ get_chart_client_test:
extends: .helm_based_job
stage: deploy WMS
script:
- ns=$(./helpers/get_namespace.sh)
- cd geosphere-mapserver/chart
- source geosphere-mapserver/cibuild.env
# copy secret kubeconfig to the mounted (pwd) directory
- cp $kubekorner_k3s_config .
- kubeconfig=$(basename $kubekorner_k3s_config)
- echo "Deploying version $docker_tag to cluster namespace $ns"
# copy extra values files to the local directory (where helm has access via docker mount)
- cp ../../${VALUES_DIR}/values-mapserver.yaml .
# namespace names are the same as domain names
- helm upgrade -v 2 --install --kubeconfig $kubeconfig --namespace $ns -f values-mapserver.yaml geosphere-mapserver geosphere-mapserver/
- ./helpers/deploy_mapserver.sh "${VALUES_DIR}"
dependencies:
- get_chart_mapserver
......@@ -177,17 +167,17 @@ get_chart_client_test:
extends: .helm_based_job
stage: deploy WMTS
script:
- ns=$(./helpers/get_namespace.sh)
- cd geosphere-mapcache/chart
- source geosphere-mapcache/cibuild.env
# copy secret kubeconfig to the mounted (pwd) directory
- cp $kubekorner_k3s_config .
- kubeconfig=$(basename $kubekorner_k3s_config)
- echo "Deploying version $docker_tag to cluster namespace $ns"
# copy extra values files to the local directory (where helm has access via docker mount)
- cp ../../${VALUES_DIR}/values-mapcache.yaml .
# namespace names are the same as domain names
- helm upgrade -v 2 --install --kubeconfig $kubeconfig --namespace $ns -f values-mapcache.yaml geosphere-mapcache geosphere-mapcache/
- ./helpers/deploy_mapcache.sh "${VALUES_DIR}"
dependencies:
- get_chart_mapcache
.deploy_client:
variables:
VALUES_DIR: ""
extends: .helm_based_job
stage: deploy Client
script:
- ./helpers/deploy_client.sh "${VALUES_DIR}"
dependencies:
- get_chart_client
......@@ -130,24 +130,12 @@ gstest deploy client:
environment:
name: geosphere-test
url: http://geosphere-test.ssec.wisc.edu
extends: .helm_based_job
stage: deploy Client
script:
- ns="geosphere-test"
- cd geosphere-client/chart
- source geosphere-client/cibuild.env
# copy secret kubeconfig to the mounted (pwd) directory
- cp $kubekorner_k3s_config .
- kubeconfig=$(basename $kubekorner_k3s_config)
- echo "Deploying version $docker_tag to cluster namespace $ns"
# copy extra values files to the local directory (where helm has access via docker mount)
- cp ../../ci_geosphere-test/values-client.yaml .
# namespace names are the same as domain names
- helm upgrade -v 2 --install --kubeconfig $kubeconfig --namespace $ns -f values-client.yaml geosphere-client geosphere-client/
variables:
VALUES_DIR: "ci_geosphere-test"
extends: .deploy_client
dependencies:
- get_chart_client_test
rules:
- if: $CI_COMMIT_TAG !~ /$GEOSPHERE_TEST_TAG_REGEX/
when: never
- when: on_success
rabbitIn:
# use the rabbitmq from the production environment (geosphere)
host: "geosphere-rabbit-rabbitmq.geosphere"
username: "user"
passwordSecret: "geosphere-rabbit-rabbitmq-production"
topic: "data.goes.g16.abi.radc.l1b.geotiff.all.complete"
rabbitOut:
host: "geosphere-rabbit-rabbitmq"
username: "user"
passwordSecret: "geosphere-rabbit-rabbitmq"
source:
existingClaim: "cspp-geo-geo2grid"
destination:
# s3Endpoint: "http://geosphere-minio:9000"
persistence:
enabled: true
storageClass: "longhorn"
existingClaim: "geosphere-tile-gen-shapefiles"
rabbitIn:
# use the rabbitmq from the production environment (geosphere)
host: "geosphere-rabbit-rabbitmq.geosphere"
username: "user"
passwordSecret: "geosphere-rabbit-rabbitmq-production"
topic: "data.goes.g16.abi.radf.l1b.geotiff.all.complete"
rabbitOut:
host: "geosphere-rabbit-rabbitmq"
username: "user"
passwordSecret: "geosphere-rabbit-rabbitmq"
source:
existingClaim: "cspp-geo-geo2grid"
destination:
# s3Endpoint: "http://geosphere-minio:9000"
persistence:
enabled: true
storageClass: "longhorn"
existingClaim: "geosphere-tile-gen-shapefiles"
rabbitIn:
# use the rabbitmq from the production environment (geosphere)
host: "geosphere-rabbit-rabbitmq.geosphere"
username: "user"
passwordSecret: "geosphere-rabbit-rabbitmq-production"
topic: "data.goes.g16.abi.radm2.l1b.geotiff.all.complete"
rabbitOut:
host: "geosphere-rabbit-rabbitmq"
username: "user"
passwordSecret: "geosphere-rabbit-rabbitmq"
source:
existingClaim: "cspp-geo-geo2grid"
destination:
# s3Endpoint: "http://geosphere-minio:9000"
persistence:
enabled: true
storageClass: "longhorn"
existingClaim: "geosphere-tile-gen-shapefiles"
......@@ -193,22 +193,9 @@ gs deploy client:
environment:
name: geosphere
url: http://geosphere.ssec.wisc.edu
extends: .helm_based_job
stage: deploy Client
script:
- ns="geosphere"
- cd geosphere-client/chart
- source geosphere-client/cibuild.env
# copy secret kubeconfig to the mounted (pwd) directory
- cp $kubekorner_k3s_config .
- kubeconfig=$(basename $kubekorner_k3s_config)
- echo "Deploying version $docker_tag to cluster namespace $ns"
# copy extra values files to the local directory (where helm has access via docker mount)
- cp ../../ci_geosphere/values-client.yaml .
# namespace names are the same as domain names
- helm upgrade -v 2 --install --kubeconfig $kubeconfig --namespace $ns -f values-client.yaml geosphere-client geosphere-client/
dependencies:
- get_chart_client
variables:
VALUES_DIR: "ci_geosphere"
extends: .deploy_client
rules:
- if: $CI_COMMIT_TAG !~ /$GEOSPHERE_TAG_REGEX/
when: never
......
......@@ -2,7 +2,8 @@
export RELEASE_PREFIX="${CI_JOB_NAME//_/-}-${CI_JOB_ID//_/-}-"
export GRB_RELEASE_NAME="${RELEASE_PREFIX}cspp-geo-grb"
export RABBITMQ_RELEASE_NAME="geosphere-rabbit"
export RABBITMQ_RELEASE_NAME="${RELEASE_PREFIX}geosphere-rabbit"
export RABBITMQ_SERVICE_NAME="${RABBITMQ_RELEASE_NAME}-rabbitmq"
export GEO2GRID_RELEASE_NAME="${RELEASE_PREFIX}cspp-geo-geo2grid-g16-radm1"
export TILEGEN_RELEASE_NAME="${RELEASE_PREFIX}geosphere-tilegen-g16-radm1"
export MAPSERVER_RELEASE_NAME="${RELEASE_PREFIX}geosphere-mapserver"
......
......@@ -7,65 +7,6 @@
# Create TLS certificate secret:
# kubectl create -n geosphere secret tls geosphere-tls-certs --cert=geosphere_ssec_wisc_edu.crt --key=geosphere_ssec_wisc_edu.key
#gs create geotiff storage:
# extends: .helm_based_job
# stage: create storage
# script:
# - ns=$(./helpers/get_namespace.sh)
# # copy secret kubeconfig to the mounted (pwd) directory
# - cp $kubekorner_k3s_config .
# - kubeconfig=$(basename $kubekorner_k3s_config)
# - ./helpers/create_pvc.sh "$ns" "ci_geosphere/geotiff-pvc.yaml" "cspp-geo-geo2grid" "$kubeconfig"
# # this job doesn't actually need any artifacts from previous jobs
# dependencies: []
# rules:
# - if: $CI_COMMIT_TAG !~ $GEOSPHERE_TAG_REGEX
# when: never
# - if: $CREATE_STORAGE
#
#gs create shapefile storage:
# extends: .helm_based_job
# stage: create storage
# script:
# - ns=$(./helpers/get_namespace.sh)
# # copy secret kubeconfig to the mounted (pwd) directory
# - cp $kubekorner_k3s_config .
# - kubeconfig=$(basename $kubekorner_k3s_config)
# - ./helpers/create_pvc.sh "$ns" "ci_geosphere/shapefiles-pvc.yaml" "geosphere-tile-gen-shapefiles" "$kubeconfig"
# # this job doesn't actually need any artifacts from previous jobs
# dependencies: []
# rules:
# - if: $CI_COMMIT_TAG !~ $GEOSPHERE_TAG_REGEX
# when: never
# # this will always be true for tags
# - changes:
# - ci_geosphere/shapefiles-pvc.yaml
# - if: $CREATE_STORAGE
#
#gs deploy rabbit:
# environment:
# name: geosphere
# url: http://geosphere.ssec.wisc.edu
# extends: .helm_based_job
# stage: deploy rabbit
# script:
# - ./helpers/deploy_rabbitmq.sh ci_geosphere
# - cp ${kubekorner_k3s_config} .
# - kubeconfig=$(basename ${kubekorner_k3s_config})
# - |-
# kubectl get secret --kubeconfig "${kubeconfig}" geosphere-rabbit-rabbitmq --namespace=geosphere -oyaml | grep -v '^\s*namespace:\s' | grep -v "[Hh]elm" | grep -v "[tT]ime" | grep -v "selfLink" | grep -v "uid" | grep -v "resourceVersion" | sed 's/ name: .*/ name: geosphere-rabbit-rabbitmq-production/' | kubectl_stdin apply --kubeconfig "${kubeconfig}" --namespace=geosphere-test -f -
# # this job doesn't actually need any artifacts from previous jobs
# dependencies: []
# rules:
# - if: $CI_COMMIT_TAG !~ $GEOSPHERE_TAG_REGEX
# when: never
# # no need to build if another project triggered us
# - if: $CI_PIPELINE_SOURCE == "pipeline"
# when: never
# - changes:
# - ci_geosphere/values-geosphere-rabbit.yaml
# - if: $DEPLOY_RABBIT
#
test_basic_grb:
extends: .helm_based_job
stage: test
......@@ -82,132 +23,3 @@ test_basic_grb:
- get_chart_client
rules:
- when: on_success
#
#gs deploy geo2grid g16 radf:
# extends: .deploy_geo2grid
# variables:
# VALUES_DIR: "ci_geosphere"
# DEPLOY_SUFFIX: "-g16-radf"
# rules:
# - if: $CI_COMMIT_TAG !~ $GEOSPHERE_TAG_REGEX
# when: never
# - when: on_success
#
#gs deploy geo2grid g16 radc:
# extends: .deploy_geo2grid
# variables:
# VALUES_DIR: "ci_geosphere"
# DEPLOY_SUFFIX: "-g16-radc"
# rules:
# - if: $CI_COMMIT_TAG !~ $GEOSPHERE_TAG_REGEX
# when: never
# - when: on_success
#
#gs deploy geo2grid g16 radm1:
# extends: .deploy_geo2grid
# variables:
# VALUES_DIR: "ci_geosphere"
# DEPLOY_SUFFIX: "-g16-radm1"
# rules:
# - if: $CI_COMMIT_TAG !~ $GEOSPHERE_TAG_REGEX
# when: never
# - when: on_success
#
#gs deploy geo2grid g16 radm2:
# extends: .deploy_geo2grid
# variables:
# VALUES_DIR: "ci_geosphere"
# DEPLOY_SUFFIX: "-g16-radm2"
# rules:
# - if: $CI_COMMIT_TAG !~ $GEOSPHERE_TAG_REGEX
# when: never
# - when: on_success
#
#gs deploy tile gen g16 radf:
# extends: .deploy_tile_gen
# variables:
# VALUES_DIR: "ci_geosphere"
# DEPLOY_SUFFIX: "-g16-radf"
# rules:
# - if: $CI_COMMIT_TAG !~ $GEOSPHERE_TAG_REGEX
# when: never
# - when: on_success
#
#gs deploy tile gen g16 radc:
# extends: .deploy_tile_gen
# variables:
# VALUES_DIR: "ci_geosphere"
# DEPLOY_SUFFIX: "-g16-radc"
# rules:
# - if: $CI_COMMIT_TAG !~ $GEOSPHERE_TAG_REGEX
# when: never
# - when: on_success
#
#gs deploy_tile_gen_g16_radm1:
# extends: .deploy_tile_gen
# variables:
# VALUES_DIR: "ci_geosphere"
# DEPLOY_SUFFIX: "-g16-radm1"
# rules:
# - if: $CI_COMMIT_TAG !~ $GEOSPHERE_TAG_REGEX
# when: never
# - when: on_success
#
#gs deploy_tile_gen_g16_radm2:
# extends: .deploy_tile_gen
# variables:
# VALUES_DIR: "ci_geosphere"
# DEPLOY_SUFFIX: "-g16-radm2"
# rules:
# - if: $CI_COMMIT_TAG !~ $GEOSPHERE_TAG_REGEX
# when: never
# - when: on_success
#
#gs deploy mapserver:
# environment:
# name: geosphere
# url: http://geosphere.ssec.wisc.edu
# variables:
# VALUES_DIR: "ci_geosphere"
# extends: .deploy_mapserver
# rules:
# - if: $CI_COMMIT_TAG !~ $GEOSPHERE_TAG_REGEX
# when: never
# - when: on_success
#
#gs deploy mapcache:
# environment:
# name: geosphere
# url: http://geosphere.ssec.wisc.edu
# variables:
# VALUES_DIR: "ci_geosphere"
# extends: .deploy_mapcache
# rules:
# - if: $CI_COMMIT_TAG !~ $GEOSPHERE_TAG_REGEX
# when: never
# - when: on_success
#
#gs deploy client:
# environment:
# name: geosphere
# url: http://geosphere.ssec.wisc.edu
# extends: .helm_based_job
# stage: deploy Client
# script:
# - ns="geosphere"
# - cd geosphere-client/chart
# - source geosphere-client/cibuild.env
# # copy secret kubeconfig to the mounted (pwd) directory
# - cp $kubekorner_k3s_config .
# - kubeconfig=$(basename $kubekorner_k3s_config)
# - echo "Deploying version $docker_tag to cluster namespace $ns"
# # copy extra values files to the local directory (where helm has access via docker mount)
# - cp ../../ci_geosphere/values-client.yaml .
# # namespace names are the same as domain names
# - helm upgrade -v 2 --install --kubeconfig $kubeconfig --namespace $ns -f values-client.yaml geosphere-client geosphere-client/
# dependencies:
# - get_chart_client
# rules:
# - if: $CI_COMMIT_TAG !~ $GEOSPHERE_TAG_REGEX
# when: never
# - when: on_success
......@@ -11,17 +11,40 @@ error() {
install_charts() {
# use the production rabbitmq config
./helpers/deploy_rabbitmq.sh "ci_tests"
./helpers/deploy_rabbitmq.sh "ci_tests" "${RELEASE_PREFIX}"
# GRB
pushd geosphere-grb/chart
sed -i "s/geosphere-rabbit-rabbitmq/${RABBITMQ_SERVICE_NAME}/g" "ci_tests/values-grb-g16.yaml"
helm upgrade -v 2 --install --namespace $ns -f ../../ci_tests/values-grb-g16.yaml ${GRB_RELEASE_NAME} cspp-geo-grb/
popd
# Geo2Grid
grb_pvc=$(get_pvc_name ${GRB_RELEASE_NAME})
sed -i "s/geosphere-rabbit-rabbitmq/${RABBITMQ_SERVICE_NAME}/g" "ci_tests/values-geo2grid-g16-radm1.yaml"
sed -i "s/cspp-geo-grb/${GRB_RELEASE_NAME}/g" "ci_tests/values-geo2grid-g16-radm1.yaml"
./helpers/deploy_geo2grid.sh "ci_tests" "${RELEASE_PREFIX}" "-g16-radm1"
# Tile Gen
geotiff_pvc=$(get_pvc_name ${GEO2GRID_RELEASE_NAME})
sed -i "s/geosphere-rabbit-rabbitmq/${RABBITMQ_SERVICE_NAME}/g" "ci_tests/values-tile-gen-g16-radm1.yaml"
sed -i "s/cspp-geo-geo2grid/${GEO2GRID_RELEASE_NAME}/g" "ci_tests/values-tile-gen-g16-radm1.yaml"
./helpers/deploy_tile_gen.sh "ci_tests" "${RELEASE_PREFIX}" "-g16-radm1"
# MapServer
sed -i "s/cspp-geo-geo2grid/${GEO2GRID_RELEASE_NAME}/g" "ci_tests/values-mapserver.yaml"
sed -i "s/geosphere-tile-gen-shapefiles/${TILEGEN_RELEASE_NAME}/g" "ci_tests/values-mapserver.yaml"
./helpers/deploy_mapserver.sh "ci_test"
# MapCache
sed -i "s/geosphere-rabbit-rabbitmq/${RABBITMQ_SERVICE_NAME}/g" "ci_tests/values-mapcache.yaml"
sed -i "s/geosphere-mapserver/${MAPSERVER_RELEASE_NAME}/g" "ci_tests/values-mapcache.yaml"
./helpers/deploy_mapcache.sh "ci_test"
# Client
sed -i "s/geosphere-mapserver/${MAPSERVER_RELEASE_NAME}/g" "ci_tests/values-client.yaml"
sed -i "s/geosphere-mapcache/${MAPCACHE_RELEASE_NAME}/g" "ci_tests/values-client.yaml"
./helpers/deploy_client.sh "ci_test"
}
get_pod_name() {
......@@ -46,7 +69,7 @@ run_grb_checks() {
num_files=$(kubectl exec -n $ns ${GRB_POD_NAME} -c cspp-geo-grb-notifier -- ls -1 /dst | wc -l || echo 0)
let count=count+1
if [[ $num_files -gt 16 ]]; then
debug "Got at least 16 files"
debug "Got at least 16 files ($num_files)"
break
fi
if [[ $count -gt 10 ]]; then
......@@ -62,15 +85,32 @@ run_geo2grid_checks() {
num_files=$(kubectl exec -n $ns ${GEO2GRID_POD_NAME} -- ls -1 /dst/geotiffs/g16/abi/radm1/ | wc -l || echo 0)
let count=count+1
if [[ $num_files -gt 16 ]]; then
debug "Got at least 16 files"
debug "Got at least 16 files ($num_files)"
break
fi
if [[ $count -gt 10 ]]; then
error "Took too long for Geo2Grid to produce files"
error "Took too long for Geo2Grid to produce files ($num_files so far)"
fi
sleep 10
done
}
run_tile_gen_checks() {
return 0
}
run_mapserver_checks() {
return 0
}
run_mapcache_checks() {
return 0
}
run_client_checks() {
# just try to load the webpage at all
curl -s "http://${CLIENT_RELEASE_NAME}/"
}
set -e
ns=$(./helpers/get_namespace.sh)
......@@ -85,9 +125,25 @@ GRB_POD_NAME=$(get_pod_name "${GRB_RELEASE_NAME}")
debug "GRB pod name: ${GRB_POD_NAME}"
GEO2GRID_POD_NAME=$(get_pod_name "${GEO2GRID_RELEASE_NAME}")
debug "Geo2Grid pod name: ${GEO2GRID_POD_NAME}"
TILEGEN_POD_NAME=$(get_pod_name "${TILEGEN_RELEASE_NAME}")
debug "Tile Generation pod name: ${TILEGEN_POD_NAME}"
MAPSERVER_POD_NAME=$(get_pod_name "${MAPSERVER_RELEASE_NAME}")
debug "MapServer pod name: ${MAPSERVER_POD_NAME}"
MAPCACHE_POD_NAME=$(get_pod_name "${MAPCACHE_RELEASE_NAME}")
debug "MapCache pod name: ${MAPCACHE_POD_NAME}"
CLIENT_POD_NAME=$(get_pod_name "${CLIENT_RELEASE_NAME}")
debug "Client pod name: ${CLIENT_POD_NAME}"
wait_for_pod ${GRB_POD_NAME} || error "GRB pod was never ready"
run_grb_checks || error "GRB checks failed"
wait_for_pod ${GEO2GRID_POD_NAME} || error "Geo2Grid pod was never ready"
run_geo2grid_checks || error "Geo2Grid checks failed"
wait_for_pod ${TILEGEN_POD_NAME} || error "Tile Gen pod was never ready"
run_tile_gen_checks || error "Tile Generation checks failed"
wait_for_pod ${MAPSERVER_POD_NAME} || error "MapServer pod was never ready"
run_mapserver_checks || error "MapServer checks failed"
wait_for_pod ${MAPCACHE_POD_NAME} || error "MapCache pod was never ready"
run_mapcache_checks || error "MapCache checks failed"
wait_for_pod ${CLIENT_POD_NAME} || error "Client pod was never ready"
run_client_checks || error "Client checks failed"
infoServer: "geosphere-mapserver"
tileServer: "geosphere-mapcache"
rabbitIn:
host: "geosphere-rabbit-rabbitmq"
username: "user"
passwordSecret: "geosphere-rabbit-rabbitmq"
topic: "data.goes.g16.abi.*.l1b.tiles.*.complete"
wms:
host: "geosphere-mapserver"
cache:
persistence:
enabled: true
storageClass: "local-path"
size: 1Ti
cleanup:
# every 6 hours
schedule: "0 */6 * * *"
age: "+2"
seed:
images: true
overlays: true
......@@ -3,14 +3,3 @@ imageSource:
existingClaim: "cspp-geo-geo2grid"
tileSource:
existingClaim: "geosphere-tile-gen-shapefiles"
ingress:
enabled: true
annotations:
ingress.kubernetes.io/ssl-redirect: "true"
hosts:
- host: geosphere-test.ssec.wisc.edu
paths: ["/wms", "/wms_times"]
tls:
- hosts:
- "geosphere-test.ssec.wisc.edu"
secretName: "geosphere-tls-certs"
rabbitIn:
# use the rabbitmq from the production environment (geosphere)
host: "geosphere-rabbit-rabbitmq.geosphere"
host: "geosphere-rabbit-rabbitmq"
username: "user"
passwordSecret: "geosphere-rabbit-rabbitmq-production"
passwordSecret: "geosphere-rabbit-rabbitmq"
topic: "data.goes.g16.abi.radm1.l1b.geotiff.all.complete"
rabbitOut:
host: "geosphere-rabbit-rabbitmq"
......@@ -11,8 +10,8 @@ rabbitOut:
source:
existingClaim: "cspp-geo-geo2grid"
destination:
# s3Endpoint: "http://geosphere-minio:9000"
persistence:
enabled: true
storageClass: "longhorn"
existingClaim: "geosphere-tile-gen-shapefiles"
cleanup:
enabled: false
#!/usr/bin/env bash
set -e
if [ $# -ne 2 ] && [ $# -ne 3 ]; then
echo "Usage: ./helpers/deploy_client.sh <values_base_dir> [<release_prefix>]"
exit 1
fi
# ci_geosphere-test
values_base="$1"
# Prefix Example: testing-YYYYMMDD-
if [[ $# -eq 1 ]]; then
release_prefix=""
else
release_prefix="$2"
fi
ns=$(./helpers/get_namespace.sh)
cd geosphere-client/chart
source geosphere-client/cibuild.env
echo "Deploying version $docker_tag to cluster namespace $ns"
helm upgrade -v 2 --install --namespace $ns -f ../../${values_base}/values-client.yaml "${release_prefix}geosphere-client" geosphere-client/
#!/usr/bin/env bash
set -e
if [ $# -ne 2 ] && [ $# -ne 3 ]; then
echo "Usage: ./helpers/deploy_mapcache.sh <values_base_dir> [<release_prefix>]"
exit 1
fi
# ci_geosphere-test
values_base="$1"
# Prefix Example: testing-YYYYMMDD-
if [[ $# -eq 1 ]]; then
release_prefix=""
else
release_prefix="$2"
fi
ns=$(./helpers/get_namespace.sh)
cd geosphere-mapcache/chart
source geosphere-mapcache/cibuild.env
echo "Deploying version $docker_tag to cluster namespace $ns"
helm upgrade -v 2 --install --namespace $ns -f ../../${values_base}/values-mapcache.yaml "${release_prefix}geosphere-mapcache" geosphere-mapcache/
#!/usr/bin/env bash
set -e
if [ $# -ne 2 ] && [ $# -ne 3 ]; then
echo "Usage: ./helpers/deploy_mapserver.sh <values_base_dir> [<release_prefix>]"
exit 1
fi
# ci_geosphere-test
values_base="$1"
# Prefix Example: testing-YYYYMMDD-
if [[ $# -eq 1 ]]; then
release_prefix=""
else
release_prefix="$2"
fi
ns=$(./helpers/get_namespace.sh)
cd geosphere-mapserver/chart
source geosphere-mapserver/cibuild.env
echo "Deploying version $docker_tag to cluster namespace $ns"
helm upgrade -v 2 --install --namespace $ns -f ../../${values_base}/values-mapserver.yaml "${release_prefix}geosphere-mapserver" geosphere-mapserver/
......@@ -10,6 +10,14 @@ fi
# ci_geosphere-test
values_base="$1"
# Prefix Example: testing-YYYYMMDD-
if [[ $# -eq 1 ]]; then
release_prefix=""
else
release_prefix="$2"
fi
ns=$(./helpers/get_namespace.sh)
# get password from any previous installation
# if we don't do this the password will get out of sync
......@@ -32,11 +40,13 @@ fi
echo "Adding extra arguments: $EXTRA_ARGS"
# install third-party rabbitmq server
helm repo add bitnami "https://charts.bitnami.com/bitnami"
helm upgrade -v 2 --install -f ${values_base}/values-geosphere-rabbit.yaml $EXTRA_ARGS --namespace $ns geosphere-rabbit bitnami/rabbitmq
release_name="${release_prefix}geosphere-rabbit"
helm upgrade -v 2 --install -f ${values_base}/values-geosphere-rabbit.yaml $EXTRA_ARGS --namespace $ns "${release_name}" bitnami/rabbitmq
# do a little waiting for the rabbitmq pod to be ready so future stages
# don't fail to communicate with it
echo "Start waiting for rabbitmq: $(date +%Y%m%dT%H%M%S)"
kubectl wait -n $ns pod/geosphere-rabbit-rabbitmq-0 --timeout 120s --for=condition=Ready
kubectl wait -n $ns pod/"${release_name}-rabbitmq-0" --timeout 120s --for=condition=Ready
status=$?
echo "Done waiting for rabbitmq: $(date +%Y%m%dT%H%M%S) : $status"
exit $status
......@@ -2,24 +2,26 @@
set -e
if [ $# -ne 2 ]; then
echo "Usage: ./helpers/deploy_tile_gen.sh <values_base_dir> <deploy_suffix>"
if [ $# -ne 2 ] && [ $# -ne 3 ]; then
echo "Usage: ./helpers/deploy_tile_gen.sh <values_base_dir> [<release_prefix>] <release_suffix>"
exit 1
fi
# ci_geosphere-test
values_base="$1"
# Example: -g16-radf
deploy_suffix="$2"
# Prefix Example: testing-YYYYMMDD-
# Suffix Example: -g16-radf
if [[ $# -eq 2 ]]; then
release_prefix=""
release_suffix="$2"
else
release_prefix="$2"
release_suffix="$3"
fi
ns=$(./helpers/get_namespace.sh)
cd geosphere-tile-gen/chart
source geosphere-tile-gen/cibuild.env
# copy secret kubeconfig to the mounted (pwd) directory
cp $kubekorner_k3s_config .
kubeconfig=$(basename $kubekorner_k3s_config)
echo "Deploying version $docker_tag to cluster namespace $ns"
# copy extra values files to the local directory (where helm has access via docker mount)
cp ../../${values_base}/values-tile-gen${deploy_suffix}.yaml .
# namespace names are the same as domain names
helm upgrade -v 2 --install --kubeconfig $kubeconfig --namespace $ns -f values-tile-gen${deploy_suffix}.yaml geosphere-tile-gen${deploy_suffix} geosphere-tile-gen/
helm upgrade -v 2 --install --namespace $ns -f ../../${values_base}/values-tile-gen${release_suffix}.yaml "${release_prefix}geosphere-tile-gen${release_suffix}" geosphere-tile-gen/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment