Skip to content

Commit c2c80b4

Browse files
authored
Merge pull request #1322 from alphagov/2494-remove-aws-copilot
2494: Remove AWS copilot
2 parents ca3908f + cdd5540 commit c2c80b4

34 files changed

Lines changed: 12 additions & 1824 deletions

.env.example

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
DEBUG=TRUE
22
SECRET_KEY=12345678
33
ALLOWED_HOSTS='localhost 127.0.0.1'
4-
DB_SECRET={"dbClusterIdentifier":"none","password":"secret","dbname":"accessibility_monitoring_app","engine":"postgres","port":5432,"host":"localhost","username":"admin"}
5-
DB_NAME=amp-app-2-prod-env-addonsstac-reportstoragebucket-ieda2c374sq7
4+
TERRAFORM=TRUE
5+
DB_HOST=localhost
6+
DB_NAME=accessibility_monitoring_app
7+
DB_USER=admin
8+
BUCKET_NAME=amp-app-prod-env-prod-env-files
9+
DB_PASSWORD={"username": "admin", "password": "secret"}
610

711
SMOKE_TESTS_USERNAME=
812
SMOKE_TESTS_PASSWORD=

.github/workflows/deploy-to-prod.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
7474
- name: Backup databases
7575
run: |
76-
python terraform_stack/terraform_deploy/terraform_deployment.py --environment prod --function exec --command "python aws_tools/dump_rds_to_s3_as_sql.py" && \
76+
python terraform_stack/terraform_deploy/terraform_deployment.py --environment prod --function exec --command "python terraform_stack/terraform_deploy/dump_rds_to_s3_as_sql.py" && \
7777
sleep 30 && \
7878
aws s3 sync s3://amp-app-prod-env-prod-env-files/ s3://amp-aurora-backup-prod/
7979
env:
@@ -86,6 +86,7 @@ jobs:
8686
aws s3 sync s3://amp-app-prod-env-prod-env-files/ s3://amp-app-staging-env-staging-env-files/ && \
8787
python terraform_stack/terraform_deploy/terraform_deployment.py --environment staging --function exec --command 'python terraform_stack/terraform_deploy/prod_deploy_tools.py' && \
8888
python terraform_stack/terraform_deploy/terraform_deployment.py --environment staging --function up && \
89+
sleep 300 && \
8990
docker compose --file stack_tests/smoke_tests/staging-platform.docker-compose.yml up --abort-on-container-exit && \
9091
docker compose --file stack_tests/smoke_tests_viewer/staging-viewer.docker-compose.yml up --abort-on-container-exit
9192
env:

accessibility_monitoring_platform/settings/base.py

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -171,34 +171,14 @@
171171
"CONN_MAX_AGE": 0,
172172
"ENGINE": "django.db.backends.postgresql",
173173
}
174-
bucket_name: str = os.environ["BUCKET_NAME"]
175174
DATABASES["aws-s3-bucket"] = {
176-
"bucket_name": bucket_name,
175+
"bucket_name": os.environ["BUCKET_NAME"],
177176
"aws_access_key_id": None,
178177
"aws_secret_access_key": None,
179178
"aws_region": "eu-west-2",
180179
}
181180
elif os.getenv("DB_SECRET") and os.getenv("DB_NAME"):
182-
db_secrets: str = os.environ["DB_SECRET"]
183-
json_acceptable_string: str = db_secrets.replace("'", '"')
184-
db_secrets_dict = json.loads(json_acceptable_string)
185-
DATABASES["default"] = {
186-
"NAME": db_secrets_dict["dbname"],
187-
"USER": db_secrets_dict["username"],
188-
"PASSWORD": db_secrets_dict["password"],
189-
"HOST": db_secrets_dict["host"],
190-
"PORT": db_secrets_dict["port"],
191-
"CONN_MAX_AGE": 0,
192-
"ENGINE": "django.db.backends.postgresql",
193-
}
194-
bucket_name: str = os.environ["DB_NAME"]
195-
DATABASES["aws-s3-bucket"] = {
196-
"bucket_name": bucket_name,
197-
"aws_access_key_id": None,
198-
"aws_secret_access_key": None,
199-
"aws_region": "us-east-1",
200-
}
201-
181+
raise Exception(">>> Database credentials incorrectly entered")
202182

203183
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
204184

amp_platform.DockerFile

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

amp_viewer.DockerFile

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

aws_prototype/__init__.py

Whitespace-only changes.

aws_prototype/aws_secrets.py

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

aws_prototype/create_dummy_account.py

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

aws_prototype/ecs_prepare_db.py

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

0 commit comments

Comments
 (0)