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

Add client deployment and rename directories to reflect environments

parent d17ce3bf
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,7 @@ stages: ...@@ -7,6 +7,7 @@ stages:
- deploy G2G - deploy G2G
- deploy WMS - deploy WMS
- deploy WMTS - deploy WMTS
- deploy Client
variables: variables:
DOCKER_TLS_CERTDIR: "" DOCKER_TLS_CERTDIR: ""
...@@ -64,12 +65,12 @@ create geotiff storage: ...@@ -64,12 +65,12 @@ create geotiff storage:
# copy secret kubeconfig to the mounted (pwd) directory # copy secret kubeconfig to the mounted (pwd) directory
- cp $kubekorner_k3s_config . - cp $kubekorner_k3s_config .
- kubeconfig=$(basename $kubekorner_k3s_config) - kubeconfig=$(basename $kubekorner_k3s_config)
- ./helpers/create_pvc.sh "$ns" "production/geotiff-pvc.yaml" "cspp-geo-geo2grid" "$kubeconfig" - ./helpers/create_pvc.sh "$ns" "ci_geosphere-test/geotiff-pvc.yaml" "cspp-geo-geo2grid" "$kubeconfig"
# this job doesn't actually need any artifacts from previous jobs # this job doesn't actually need any artifacts from previous jobs
dependencies: [] dependencies: []
rules: rules:
- changes: - changes:
- production/geotiff-pvc.yaml - ci_geosphere-test/geotiff-pvc.yaml
when: always when: always
- if: $CREATE_STORAGE - if: $CREATE_STORAGE
when: always when: always
...@@ -82,9 +83,10 @@ create geotiff storage: ...@@ -82,9 +83,10 @@ create geotiff storage:
# required: # required:
SUBCOMP_REPOS: "" SUBCOMP_REPOS: ""
SUBCOMP_CHART_DIR: "" SUBCOMP_CHART_DIR: ""
SUBCOMP_BRANCH: "master"
script: script:
- repos_url="${SUBCOMP_REPOS_BASE}/${SUBCOMP_REPOS}" - repos_url="${SUBCOMP_REPOS_BASE}/${SUBCOMP_REPOS}"
- git clone --depth 1 $repos_url - git clone --depth 1 --branch ${SUBCOMP_BRANCH} $repos_url
- cd ${SUBCOMP_REPOS} - cd ${SUBCOMP_REPOS}
# most recent docker image should be tagged with most recent SHA # most recent docker image should be tagged with most recent SHA
- docker_tag=$(git rev-parse --short=8 HEAD) - docker_tag=$(git rev-parse --short=8 HEAD)
...@@ -133,10 +135,23 @@ get_chart_mapcache: ...@@ -133,10 +135,23 @@ get_chart_mapcache:
SUBCOMP_REPOS: "geosphere-mapcache" SUBCOMP_REPOS: "geosphere-mapcache"
SUBCOMP_CHART_DIR: "geosphere-mapcache" SUBCOMP_CHART_DIR: "geosphere-mapcache"
get_chart_client:
extends: .get_chart_tmpl
variables:
SUBCOMP_REPOS: "geosphere-client"
SUBCOMP_CHART_DIR: "geosphere-client"
get_chart_client_test:
extends: .get_chart_tmpl
variables:
SUBCOMP_REPOS: "geosphere-client"
SUBCOMP_CHART_DIR: "geosphere-client"
SUBCOMP_BRANCH: "develop"
deploy_prod_rabbit: deploy_prod_rabbit:
environment: environment:
name: production name: geosphere-test
url: http://geosphere.ssec.wisc.edu url: http://geosphere-test.ssec.wisc.edu
extends: .helm_based_job extends: .helm_based_job
stage: deploy rabbit stage: deploy rabbit
script: script:
...@@ -157,7 +172,7 @@ deploy_prod_rabbit: ...@@ -157,7 +172,7 @@ deploy_prod_rabbit:
- echo $EXTRA_ARGS - echo $EXTRA_ARGS
# install third-party rabbitmq server # install third-party rabbitmq server
- helm repo add bitnami "https://charts.bitnami.com/bitnami" - helm repo add bitnami "https://charts.bitnami.com/bitnami"
- helm upgrade -v 2 --install --kubeconfig $kubeconfig -f production/values-geosphere-rabbit.yaml $EXTRA_ARGS --namespace $ns geosphere-rabbit bitnami/rabbitmq - helm upgrade -v 2 --install --kubeconfig $kubeconfig -f ci_geosphere-test/values-geosphere-rabbit.yaml $EXTRA_ARGS --namespace $ns geosphere-rabbit bitnami/rabbitmq
# this job doesn't actually need any artifacts from previous jobs # this job doesn't actually need any artifacts from previous jobs
dependencies: [] dependencies: []
rules: rules:
...@@ -167,16 +182,15 @@ deploy_prod_rabbit: ...@@ -167,16 +182,15 @@ deploy_prod_rabbit:
- if: $CI_PIPELINE_SOURCE == "pipeline" - if: $CI_PIPELINE_SOURCE == "pipeline"
when: never when: never
- changes: - changes:
- production/values-geosphere-rabbit.yaml - ci_geosphere-test/values-geosphere-rabbit.yaml
when: always when: always
- if: $DEPLOY_RABBIT - if: $DEPLOY_RABBIT
when: always when: always
deploy_g16_grb: deploy_g16_grb:
environment: environment:
name: production name: geosphere-test
url: http://geosphere.ssec.wisc.edu url: http://geosphere-test.ssec.wisc.edu
extends: .helm_based_job extends: .helm_based_job
stage: deploy GRB stage: deploy GRB
script: script:
...@@ -188,7 +202,7 @@ deploy_g16_grb: ...@@ -188,7 +202,7 @@ deploy_g16_grb:
- kubeconfig=$(basename $kubekorner_k3s_config) - kubeconfig=$(basename $kubekorner_k3s_config)
- echo "Deploying version $docker_tag to cluster namespace $ns" - echo "Deploying version $docker_tag to cluster namespace $ns"
# copy extra values files to the local directory (where helm has access via docker mount) # copy extra values files to the local directory (where helm has access via docker mount)
- cp ../../production/values-grb-g16.yaml . - cp ../../ci_geosphere-test/values-grb-g16.yaml .
# namespace names are the same as domain names # namespace names are the same as domain names
- helm upgrade -v 2 --install --kubeconfig $kubeconfig --namespace $ns --set persistence.enabled=true --set persistence.storageClass=longhorn -f values-grb-g16.yaml cspp-geo-grb cspp-geo-grb/ - helm upgrade -v 2 --install --kubeconfig $kubeconfig --namespace $ns --set persistence.enabled=true --set persistence.storageClass=longhorn -f values-grb-g16.yaml cspp-geo-grb cspp-geo-grb/
dependencies: dependencies:
...@@ -200,8 +214,8 @@ deploy_g16_grb: ...@@ -200,8 +214,8 @@ deploy_g16_grb:
deploy_geo2grid_g16_radf: deploy_geo2grid_g16_radf:
environment: environment:
name: production name: geosphere-test
url: http://geosphere.ssec.wisc.edu url: http://geosphere-test.ssec.wisc.edu
extends: .helm_based_job extends: .helm_based_job
stage: deploy G2G stage: deploy G2G
script: script:
...@@ -213,7 +227,7 @@ deploy_geo2grid_g16_radf: ...@@ -213,7 +227,7 @@ deploy_geo2grid_g16_radf:
- kubeconfig=$(basename $kubekorner_k3s_config) - kubeconfig=$(basename $kubekorner_k3s_config)
- echo "Deploying version $docker_tag to cluster namespace $ns" - echo "Deploying version $docker_tag to cluster namespace $ns"
# copy extra values files to the local directory (where helm has access via docker mount) # copy extra values files to the local directory (where helm has access via docker mount)
- cp ../../production/values-geo2grid-g16-radf.yaml . - cp ../../ci_geosphere-test/values-geo2grid-g16-radf.yaml .
# namespace names are the same as domain names # namespace names are the same as domain names
- helm upgrade -v 2 --install --kubeconfig $kubeconfig --namespace $ns -f values-geo2grid-g16-radf.yaml cspp-geo-geo2grid cspp-geo-geo2grid/ - helm upgrade -v 2 --install --kubeconfig $kubeconfig --namespace $ns -f values-geo2grid-g16-radf.yaml cspp-geo-geo2grid cspp-geo-geo2grid/
dependencies: dependencies:
...@@ -225,8 +239,8 @@ deploy_geo2grid_g16_radf: ...@@ -225,8 +239,8 @@ deploy_geo2grid_g16_radf:
deploy_mapserver: deploy_mapserver:
environment: environment:
name: production name: geosphere-test
url: http://geosphere.ssec.wisc.edu url: http://geosphere-test.ssec.wisc.edu
extends: .helm_based_job extends: .helm_based_job
stage: deploy WMS stage: deploy WMS
script: script:
...@@ -238,7 +252,7 @@ deploy_mapserver: ...@@ -238,7 +252,7 @@ deploy_mapserver:
- kubeconfig=$(basename $kubekorner_k3s_config) - kubeconfig=$(basename $kubekorner_k3s_config)
- echo "Deploying version $docker_tag to cluster namespace $ns" - echo "Deploying version $docker_tag to cluster namespace $ns"
# copy extra values files to the local directory (where helm has access via docker mount) # copy extra values files to the local directory (where helm has access via docker mount)
- cp ../../production/values-mapserver.yaml . - cp ../../ci_geosphere-test/values-mapserver.yaml .
# namespace names are the same as domain names # 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/ - helm upgrade -v 2 --install --kubeconfig $kubeconfig --namespace $ns -f values-mapserver.yaml geosphere-mapserver geosphere-mapserver/
dependencies: dependencies:
...@@ -250,8 +264,8 @@ deploy_mapserver: ...@@ -250,8 +264,8 @@ deploy_mapserver:
deploy_mapcache: deploy_mapcache:
environment: environment:
name: production name: geosphere-test
url: http://geosphere.ssec.wisc.edu url: http://geosphere-test.ssec.wisc.edu
extends: .helm_based_job extends: .helm_based_job
stage: deploy WMTS stage: deploy WMTS
script: script:
...@@ -263,7 +277,7 @@ deploy_mapcache: ...@@ -263,7 +277,7 @@ deploy_mapcache:
- kubeconfig=$(basename $kubekorner_k3s_config) - kubeconfig=$(basename $kubekorner_k3s_config)
- echo "Deploying version $docker_tag to cluster namespace $ns" - echo "Deploying version $docker_tag to cluster namespace $ns"
# copy extra values files to the local directory (where helm has access via docker mount) # copy extra values files to the local directory (where helm has access via docker mount)
- cp ../../production/values-mapcache.yaml . - cp ../../ci_geosphere-test/values-mapcache.yaml .
# namespace names are the same as domain names # 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/ - helm upgrade -v 2 --install --kubeconfig $kubeconfig --namespace $ns -f values-mapcache.yaml geosphere-mapcache geosphere-mapcache/
dependencies: dependencies:
...@@ -272,3 +286,53 @@ deploy_mapcache: ...@@ -272,3 +286,53 @@ deploy_mapcache:
- if: '$kubekorner_k3s_config == ""' - if: '$kubekorner_k3s_config == ""'
when: never when: never
- when: on_success - when: on_success
deploy_client_test:
environment:
name: geosphere-test
url: http://geosphere-test.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-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/
dependencies:
- get_chart_client_test
rules:
- if: '$kubekorner_k3s_config == ""'
when: never
- when: on_success
deploy_client_production:
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: '$kubekorner_k3s_config == ""'
when: never
- when: on_success
...@@ -17,8 +17,10 @@ repositories to use for building and testing their pieces. ...@@ -17,8 +17,10 @@ repositories to use for building and testing their pieces.
are **not** run as part of continuous integration. are **not** run as part of continuous integration.
* cichart: Docker image configuration used by certain CI jobs to build or * cichart: Docker image configuration used by certain CI jobs to build or
download helm charts. download helm charts.
* production: Extra helm chart "values" YAML files to configure GeoSphere for * ci_geosphere: Extra helm chart "values" YAML files to configure GeoSphere for
the production environment. the production environment.
* ci_geosphere-test: Extra helm chart "values" YAML files to configure GeoSphere for
the development (geosphere-test) environment.
* sidecars: Docker image configurations for various "sidecar" containers that * sidecars: Docker image configurations for various "sidecar" containers that
don't fit in one subcomponent's project. don't fit in one subcomponent's project.
* .gitlab-ci.yml: Continuous Integration (CI) configuration * .gitlab-ci.yml: Continuous Integration (CI) configuration
\ No newline at end of file
File moved
ingress:
enabled: true
hosts:
- host: geosphere-test.ssec.wisc.edu
paths: ["/"]
infoServer: "http://geosphere-test.ssec.wisc.edu"
tileServer: "http://geosphere-test.ssec.wisc.edu/mapcache/wmts"
ingress:
enabled: true
hosts:
- host: geosphere.ssec.wisc.edu
paths: ["/"]
infoServer: "http://presto.ssec.wisc.edu:8888"
tileServer: "http://g2g{1-4}.ssec.wisc.edu:8889/mapcache/wmts"
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