Skip to content

Commit

Permalink
Move away from Helm
Browse files Browse the repository at this point in the history
  • Loading branch information
snoyberg committed Mar 23, 2020
1 parent 85b021a commit c9f58da
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 153 deletions.
33 changes: 6 additions & 27 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,6 @@ variables:
DEPLOYMENT_IMAGE: "${CI_REGISTRY_IMAGE}:${CI_BUILD_REF_SLUG}_${CI_PIPELINE_ID}"
DEPLOYMENT_NAME: "casa-curator-prod"

# This creates anchors for bits of script that are reused between builds
.anchors:
# The KUBE_* variables are set by Gitlab's Kubernetes deployment service
- &KUBELOGIN echo "$KUBE_CA_PEM" >"$HOME/ca.pem" &&
kubectl config set-cluster cluster --server="$KUBE_URL" --certificate-authority="$HOME/ca.pem" &&
kubectl config set-credentials cluster --token="$KUBE_TOKEN" && kubectl config set-context cluster --cluster=cluster --user=cluster --namespace="$KUBE_NAMESPACE" &&
kubectl config use-context cluster
- &HELMUPGRADE helm --tiller-namespace ${KUBE_NAMESPACE} upgrade --install --force "${DEPLOYMENT_NAME}" etc/helm --set hostEnvVar="${CASA_SERVICE}HOST" --set authEnvVar="${CASA_SERVICE}PORT_AUTHORIZED_PORT" --set portEnvVar="${CASA_SERVICE}PORT_PORT" --set name="${DEPLOYMENT_NAME}" --set app="${DEPLOYMENT_APP}" --set image.image="${DEPLOYMENT_IMAGE}" --values etc/helm/values/$CI_ENVIRONMENT_NAME.yaml --namespace ${KUBE_NAMESPACE}
- &HELMCHECK helm --tiller-namespace ${KUBE_NAMESPACE} ls &&
helm --tiller-namespace ${KUBE_NAMESPACE} status "${DEPLOYMENT_NAME}"

build:
stage: build
script:
Expand Down Expand Up @@ -61,20 +50,10 @@ deploy_prod:
KUBE_URL="$PROD_V2_KUBE_URL"
KUBE_TOKEN="$PROD_V2_KUBE_TOKEN"
KUBE_NAMESPACE="$PROD_V2_KUBE_NAMESPACE"
- *KUBELOGIN
- *HELMUPGRADE
- *HELMCHECK

deploy_ci:
stage: deploy
only:
- ci
environment:
name: staging
variables:
KUBE_NAMESPACE: "fpco-public"
DEPLOYMENT_NAME: "casa-curator-ci"
CASA_SERVICE: "CASA_SERVER_CI_SERVICE_"
script:
- *HELMUPGRADE
- *HELMCHECK
- echo "$KUBE_CA_PEM" >"$HOME/ca.pem" &&
kubectl config set-cluster cluster --server="$KUBE_URL" --certificate-authority="$HOME/ca.pem" &&
kubectl config set-credentials cluster --token="$KUBE_TOKEN" && kubectl config set-context cluster --cluster=cluster --user=cluster --namespace="$KUBE_NAMESPACE" &&
kubectl config use-context cluster
- kubectl set image "deployment/casa-curator-prod" casa-curator="$DEPLOYMENT_IMAGE"
- kubectl rollout status "deployment/casa-curator-prod"
21 changes: 0 additions & 21 deletions etc/helm/.helmignore

This file was deleted.

4 changes: 0 additions & 4 deletions etc/helm/Chart.yaml

This file was deleted.

45 changes: 0 additions & 45 deletions etc/helm/templates/deployment.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions etc/helm/templates/volume_claim.yaml

This file was deleted.

10 changes: 0 additions & 10 deletions etc/helm/values.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions etc/helm/values/production.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions etc/helm/values/staging.yaml

This file was deleted.

0 comments on commit c9f58da

Please sign in to comment.