Commit d62c8c45 authored by Sjoerd Simons's avatar Sjoerd Simons Committed by Paweł Wieczorek
Browse files

Deploy lava using ansible playbooks



Generally we're standardizing on ansible as a tool to deploy $things;
Whether that's to kubernetes or otherwise.

Switch CI to deploy the staging setup via the lava-server-staging playbook in the
ansible core recipes.

Signed-off-by: Sjoerd Simons's avatarSjoerd Simons <sjoerd@collabora.com>
parent cb8d1fa3
......@@ -76,24 +76,13 @@ build docker image:
.deploy:
stage: deploy
image:
name: quay.io/roboll/helmfile:helm3-v0.139.9
name: registry.gitlab.collabora.com/sysadmin/ansible-core-services/core-ansible:main
entrypoint: [""]
tags:
- lightweight
script:
- export GITLAB_APP=$CI_PROJECT_PATH_SLUG
- export GITLAB_ENVIRONMENT=$CI_ENVIRONMENT_SLUG
- export HOST=$SERVICE_HOST
- export LAVA_SERVER_REPOSITORY="$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG"
- export LAVA_SERVER_TAG=$CI_COMMIT_SHA
- export POSTGRESQL_PASSWORD=$(kubectl get secret --ignore-not-found --namespace "$KUBE_NAMESPACE" postgresql -o jsonpath="{.data.postgresql-password}" | base64 -d)
- |
export POSTGRES=""
if [ -n "${POSTGRESQL_PASSWORD}" ] ; then
export POSTGRES="--set postgresqlPassword=${POSTGRESQL_PASSWORD}"
fi
- chmod 0400 ${KUBECONFIG}
- cd docker/collabora/helm && helmfile --namespace="$KUBE_NAMESPACE" sync ${POSTGRES}
- "git clone --depth=1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.collabora.com/sysadmin/ansible-core-services.git"
- cd ansible-core-services/digital-ocean-k8s && ansible-playbook -e IMAGE_TAG=$CI_COMMIT_SHA IMAGE_TAG= lava-server-staging.yaml
needs:
- build docker image
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment