Skip to content

Commit 145692a

Browse files
committed
Revert to very old but working version from 998addf
1 parent 06b78e2 commit 145692a

21 files changed

+804
-1530
lines changed

.docker/zscaler_cert.pem

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

.github/workflows/apply.yml

Lines changed: 61 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,58 @@ env:
1515
ENCRYPT: "true"
1616

1717
jobs:
18-
apply:
1918

20-
name: apply
19+
apply-staging:
20+
name: apply (staging)
21+
runs-on: ubuntu-latest
22+
environment: staging
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
TF_VAR_cf_username: ${{ secrets.TF_VAR_cf_username }}
26+
TF_VAR_cf_password: ${{ secrets.TF_VAR_cf_password }}
27+
TF_VAR_aws_access_key_id: ${{ secrets.TF_VAR_aws_access_key_id }}
28+
TF_VAR_aws_secret_access_key: ${{ secrets.TF_VAR_aws_secret_access_key }}
29+
TERRAFORM_PRE_RUN: |
30+
./install-tools.sh
31+
cp helm /usr/local/bin/
32+
cp kubectl /usr/local/bin/
33+
cp aws-iam-authenticator /usr/local/bin/
34+
aws-iam-authenticator help
35+
36+
steps:
37+
- name: checkout
38+
uses: actions/checkout@v3
39+
- name: prep applications
40+
run: |
41+
./app-setup-eks.sh
42+
./app-setup-solrcloud.sh
43+
./app-setup-smtp.sh
44+
- name: terraform apply (staging)
45+
uses: dflook/terraform-apply@v1
46+
with:
47+
path: .
48+
label: staging
49+
workspace: staging
50+
var_file: terraform.staging.tfvars
51+
backend_config: >
52+
bucket=${{ env.BUCKET }},
53+
key=${{ env.KEY }},
54+
region=${{ env.REGION }},
55+
encrypt=${{ env.ENCRYPT }},
56+
access_key=${{ env.AWS_ACCESS_KEY_ID }},
57+
secret_key=${{ env.AWS_SECRET_ACCESS_KEY }}
58+
# - name: Setup tmate session
59+
# if: ${{ failure() }}
60+
# uses: mxschmitt/action-tmate@v3
61+
# with:
62+
# limit-access-to-actor: true
63+
- name: test staging environment
64+
run: echo staging tests ok # TODO staging smoke tests
65+
66+
apply-production:
67+
needs: apply-staging
68+
69+
name: apply (production)
2170
runs-on: ubuntu-latest
2271
environment: production
2372
env:
@@ -26,16 +75,23 @@ jobs:
2675
TF_VAR_cf_password: ${{ secrets.TF_VAR_cf_password }}
2776
TF_VAR_aws_access_key_id: ${{ secrets.TF_VAR_aws_access_key_id }}
2877
TF_VAR_aws_secret_access_key: ${{ secrets.TF_VAR_aws_secret_access_key }}
78+
TERRAFORM_PRE_RUN: |
79+
./install-tools.sh
80+
cp helm /usr/local/bin/
81+
cp kubectl /usr/local/bin/
82+
cp aws-iam-authenticator /usr/local/bin/
83+
aws-iam-authenticator help
2984
3085
steps:
3186
- name: checkout
3287
uses: actions/checkout@v3
3388
- name: prep applications
3489
run: |
35-
./app-setup-solr.sh
90+
./app-setup-eks.sh
91+
./app-setup-solrcloud.sh
3692
./app-setup-smtp.sh
37-
- name: OpenTofu apply (production)
38-
uses: dflook/tofu-apply@v1
93+
- name: terraform apply (production)
94+
uses: dflook/terraform-apply@v1
3995
with:
4096
path: .
4197
label: production

.github/workflows/commit.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010
REGION: "${{ secrets.REGION }}"
1111
KEY: "ssb-tfstate"
1212
ENCRYPT: "true"
13-
13+
1414
jobs:
1515
test:
1616
name: test format and validity
@@ -19,13 +19,13 @@ jobs:
1919
- name: checkout
2020
uses: actions/checkout@v3
2121

22-
- name: OpenTofu fmt
23-
uses: dflook/tofu-fmt-check@v1
22+
- name: terraform fmt
23+
uses: dflook/terraform-fmt-check@v1
2424
with:
2525
path: .
2626

27-
- name: OpenTofu validate
28-
uses: dflook/tofu-validate@v1
27+
- name: terraform validate
28+
uses: dflook/terraform-validate@v1
2929
with:
3030
path: .
3131

@@ -40,17 +40,24 @@ jobs:
4040
TF_VAR_cf_password: ${{ secrets.TF_VAR_cf_password }}
4141
TF_VAR_aws_access_key_id: ${{ secrets.TF_VAR_aws_access_key_id }}
4242
TF_VAR_aws_secret_access_key: ${{ secrets.TF_VAR_aws_secret_access_key }}
43+
TERRAFORM_PRE_RUN: |
44+
./install-tools.sh
45+
cp helm /usr/local/bin/
46+
cp kubectl /usr/local/bin/
47+
cp aws-iam-authenticator /usr/local/bin/
48+
aws-iam-authenticator help
4349
4450
steps:
4551
- name: checkout
4652
uses: actions/checkout@v3
4753
- name: prep applications
4854
run: |
49-
./app-setup-solr.sh
55+
./app-setup-eks.sh
56+
./app-setup-solrcloud.sh
5057
./app-setup-smtp.sh
5158
52-
- name: OpenTofu apply (development)
53-
uses: dflook/tofu-apply@v1
59+
- name: terraform apply (development)
60+
uses: dflook/terraform-apply@v1
5461
with:
5562
path: .
5663
label: development

.github/workflows/disable-egress.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on: # yamllint disable-line rule:truthy
99
required: true
1010
type: choice
1111
options:
12+
- "ssb-eks"
1213
- "ssb-smtp"
1314
- "ssb-solrcloud"
1415
appSpace:

.github/workflows/enable-egress.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on: # yamllint disable-line rule:truthy
99
required: true
1010
type: choice
1111
options:
12+
- "ssb-eks"
1213
- "ssb-smtp"
1314
- "ssb-solrcloud"
1415
appSpace:

.github/workflows/plan.yml

Lines changed: 50 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,47 @@ env:
1414

1515
jobs:
1616

17+
plan-staging:
18+
name: plan (staging)
19+
runs-on: ubuntu-latest
20+
environment: staging
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
TF_VAR_cf_username: ${{ secrets.TF_VAR_cf_username }}
24+
TF_VAR_cf_password: ${{ secrets.TF_VAR_cf_password }}
25+
TF_VAR_aws_access_key_id: ${{ secrets.TF_VAR_aws_access_key_id }}
26+
TF_VAR_aws_secret_access_key: ${{ secrets.TF_VAR_aws_secret_access_key }}
27+
TERRAFORM_PRE_RUN: |
28+
./install-tools.sh
29+
cp helm /usr/local/bin/
30+
cp kubectl /usr/local/bin/
31+
cp aws-iam-authenticator /usr/local/bin/
32+
aws-iam-authenticator help
1733
18-
plan:
19-
name: plan
34+
steps:
35+
- name: checkout
36+
uses: actions/checkout@v3
37+
- name: prep applications
38+
run: |
39+
./app-setup-eks.sh
40+
./app-setup-solrcloud.sh
41+
./app-setup-smtp.sh
42+
- name: terraform plan (staging)
43+
uses: dflook/terraform-plan@v1
44+
with:
45+
path: .
46+
label: staging
47+
workspace: staging
48+
var_file: terraform.staging.tfvars
49+
backend_config: >
50+
bucket=${{ env.BUCKET }},
51+
key=${{ env.KEY }},
52+
region=${{ env.REGION }},
53+
encrypt=${{ env.ENCRYPT }},
54+
access_key=${{ env.AWS_ACCESS_KEY_ID }},
55+
secret_key=${{ env.AWS_SECRET_ACCESS_KEY }}
56+
plan-production:
57+
name: plan (production)
2058
runs-on: ubuntu-latest
2159
environment: production
2260
env:
@@ -25,16 +63,23 @@ jobs:
2563
TF_VAR_cf_password: ${{ secrets.TF_VAR_cf_password }}
2664
TF_VAR_aws_access_key_id: ${{ secrets.TF_VAR_aws_access_key_id }}
2765
TF_VAR_aws_secret_access_key: ${{ secrets.TF_VAR_aws_secret_access_key }}
66+
TERRAFORM_PRE_RUN: |
67+
./install-tools.sh
68+
cp helm /usr/local/bin/
69+
cp kubectl /usr/local/bin/
70+
cp aws-iam-authenticator /usr/local/bin/
71+
aws-iam-authenticator help
2872
2973
steps:
3074
- name: checkout
3175
uses: actions/checkout@v3
3276
- name: prep applications
3377
run: |
34-
./app-setup-solr.sh
78+
./app-setup-eks.sh
79+
./app-setup-solrcloud.sh
3580
./app-setup-smtp.sh
36-
- name: OpenTofu plan (production)
37-
uses: dflook/tofu-plan@v1
81+
- name: terraform plan (production)
82+
uses: dflook/terraform-plan@v1
3883
with:
3984
path: .
4085
label: production

0 commit comments

Comments
 (0)