Skip to content

Commit dce54c3

Browse files
authored
terraform: migrated to different solution (#537)
1 parent 39c563a commit dce54c3

39 files changed

+29
-2288
lines changed

.gitlab-ci.yml

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -30,49 +30,3 @@ workflow:
3030
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
3131
when: never
3232
- when: always
33-
34-
plan_main:
35-
extends: .tf_setup
36-
stage: deploy
37-
only:
38-
- /^main_v.*/
39-
script:
40-
- (echo -n "$V3_PK" > terraform/modules/tor/v3.pk)
41-
- (echo -n "$V3_PUBK" > terraform/modules/tor/v3.pubk)
42-
- (cd terraform && terraform init -input=false &&
43-
terraform workspace select main &&
44-
terraform init -input=false &&
45-
terraform plan
46-
-var "prometheus_allowed_source_ip=$PROMETHEUS_ALLOWED_SOURCE_IP"
47-
-var "hosts=$HOSTS"
48-
-var "hosts_onion=$HOSTS_ONION"
49-
-var "cluster_size=$NODE_CLUSTER_SIZE"
50-
-var "instance_type=$NODE_INSTANCE_TYPE"
51-
-var "regions=$REGIONS"
52-
-var "zones=$ZONES"
53-
-var "ssl_certs=$SSL_CERTS"
54-
-var "image_source_project=$IMAGE_SOURCE_PROJECT"
55-
-input=false)
56-
57-
deploy_main:
58-
extends: .tf_setup
59-
when: manual
60-
only:
61-
- /^main_v.*/
62-
script:
63-
- (echo -n "$V3_PK" > terraform/modules/tor/v3.pk)
64-
- (echo -n "$V3_PUBK" > terraform/modules/tor/v3.pubk)
65-
- (cd terraform && terraform init -input=false &&
66-
terraform workspace select main &&
67-
terraform init -input=false &&
68-
terraform apply
69-
-var "prometheus_allowed_source_ip=$PROMETHEUS_ALLOWED_SOURCE_IP"
70-
-var "hosts=$HOSTS"
71-
-var "hosts_onion=$HOSTS_ONION"
72-
-var "cluster_size=$NODE_CLUSTER_SIZE"
73-
-var "instance_type=$NODE_INSTANCE_TYPE"
74-
-var "regions=$REGIONS"
75-
-var "zones=$ZONES"
76-
-var "ssl_certs=$SSL_CERTS"
77-
-var "image_source_project=$IMAGE_SOURCE_PROJECT"
78-
-input=false -auto-approve)

gitlab/functions.yaml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,3 @@
1212
extends: .dind_setup
1313
rules:
1414
- if: $CI_COMMIT_BRANCH
15-
16-
.tf_setup:
17-
stage: deploy
18-
before_script:
19-
- curl -s "${DOCKERHUB_ESPLORA_URL}" | grep -q "${CI_COMMIT_SHA}" ||
20-
(echo "No such image blockstream/esplora:${CI_COMMIT_SHA}. Needs to be built."; exit 1)
21-
- TMPF=$(mktemp) || exit 1
22-
- echo $GCLOUD_KEY > $TMPF
23-
- export GOOGLE_APPLICATION_CREDENTIALS=$TMPF
24-
- gcloud auth activate-service-account --key-file=$TMPF
25-
- gcloud auth list
26-
- gcloud --version
27-
28-
.k8s_setup:
29-
stage: deploy
30-
when: manual
31-
image: blockstream/kubectl:v1.24.8
32-
before_script:
33-
- curl -s "${DOCKERHUB_ESPLORA_URL}" | grep -q "${CI_COMMIT_SHA}" ||
34-
(echo "No such image blockstream/esplora:${CI_COMMIT_SHA}. Needs to be built."; exit 1)
35-
- kubectl --server=$KUBE_SERVER_US --token=$KUBE_TOKEN_US version
36-
script:
37-
- |
38-
kubectl --v=8 --server=$KUBE_SERVER_US --token=$KUBE_TOKEN_US \
39-
-n $KUBE_NAMESPACE set image $KUBE_WORKLOAD $KUBE_CONTAINER=$IMAGE:$CI_COMMIT_SHA

gitlab/prod.yaml

Lines changed: 0 additions & 191 deletions
This file was deleted.

gitlab/staging.yaml

Lines changed: 0 additions & 43 deletions
This file was deleted.

terraform/.terraform.lock.hcl

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)