Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backup prod env for testing BCP #6157

Merged
merged 27 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f0c1e3a
changes from older backup-production
AmitPhulera Oct 25, 2023
cd89408
Replace us-west-1 with us-east-2 in backup env
AmitPhulera Oct 25, 2023
4a7156b
remove elasticache from terraform.yml in backup env
AmitPhulera Oct 25, 2023
b233710
remove unused cache_parameter_group from backup env
AmitPhulera Oct 25, 2023
b1829dd
Make backup env use the dimagi-terraform bucket
AmitPhulera Oct 25, 2023
714f963
update terraform version in backup env
AmitPhulera Oct 25, 2023
f594cef
update redis version in backup env
AmitPhulera Oct 25, 2023
05950cb
add us-east-2 in aws_elb_account_map
AmitPhulera Oct 25, 2023
f5d2059
make changes to public.yml
AmitPhulera Oct 27, 2023
bb122ad
update app-processes.yml
AmitPhulera Oct 27, 2023
27f4748
update terraform.yml with values that made sense
AmitPhulera Oct 27, 2023
746adc6
replace bionic with jammy on all the machines
AmitPhulera Oct 27, 2023
d37c9a1
fix typo
AmitPhulera Oct 30, 2023
bc6515c
set monitoring interval to 0 for all rds instances
AmitPhulera Oct 30, 2023
ff17685
remove ubuntu pro from os list
AmitPhulera Oct 31, 2023
b66895c
run aws-fill-inventory
AmitPhulera Nov 2, 2023
f5d2272
add defaults for route table
AmitPhulera Nov 10, 2023
6576fde
Merge remote-tracking branch 'origin/master' into ap/backup-prod
AmitPhulera Nov 13, 2023
8536ba8
updated local hosts
AmitPhulera Nov 13, 2023
8b12cd8
Remove CDN from bakcup prod env config
AmitPhulera Nov 14, 2023
ee38400
update es data hosts to 5 in backup-production env which matches prod…
AmitPhulera Nov 17, 2023
5104782
run aws-fill-inventory
AmitPhulera Nov 17, 2023
5e15b01
remove hardcoded es memory conf from backup prod env
AmitPhulera Nov 17, 2023
659c8fe
Use seperate repeaters db in backup-production (just like in production)
dannyroberts Nov 17, 2023
21bc17b
remove unnecessary comment
AmitPhulera Nov 29, 2023
51ab09d
Merge branch 'master' into ap/backup-prod
AmitPhulera Jan 4, 2024
50bd45d
Merge remote-tracking branch 'origin/master' into ap/backup-prod
AmitPhulera Jan 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions environments/backup-production/app-processes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
datadog_pythonagent: True
django_command_prefix: ''
celery_command_prefix: ''
gunicorn_workers_static_factor: 0
gunicorn_workers_factor: 2
formplayer_memory: "1g"
formplayer_g1heapregionsize: "2m"
management_commands:
celery_a000:
pillow_a000:
celery_processes:
celery_a000:
background_queue:
concurrency: 1
email_queue,repeat_record_queue,analytics_queue,reminder_case_update_queue:
pooling: gevent
concurrency: 1
saved_exports_queue:
concurrency: 1
celery,export_download_queue,reminder_rule_queue,case_import_queue,case_rule_queue:
concurrency: 1
flower: {}
beat: {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We actually specifically do not want this to ever be running on the backup. Probably worth leaving a comment about that. That is because celery beat triggers scheduled events like sending SMS's and such, and we don't want those to get kicked off on the backup environment when we restore the data.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same reason we don't have management_commands above defined. Those contain various enqueuing / scheduling mechanisms that we also don't want to run.


pillows:
pillow_a000:
case-pillow:
num_processes: 1
dedicated_migration_process: True
user-pillow:
num_processes: 1
group-pillow:
num_processes: 1
AppDbChangeFeedPillow:
num_processes: 1
ApplicationToElasticsearchPillow:
num_processes: 1
CacheInvalidatePillow:
num_processes: 1
DefaultChangeFeedPillow:
num_processes: 1
DomainDbKafkaPillow:
num_processes: 1
KafkaDomainPillow:
num_processes: 1
LedgerToElasticsearchPillow:
num_processes: 1
SqlSMSPillow:
num_processes: 1
UpdateUserSyncHistoryPillow:
num_processes: 1
UserCacheInvalidatePillow:
num_processes: 1
UserGroupsDbKafkaPillow:
num_processes: 1
xform-pillow:
num_processes: 1
dedicated_migration_process: True
74 changes: 74 additions & 0 deletions environments/backup-production/aws-resources.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
celery_a000-bk-production: 10.212.11.21
celery_a000-bk-production.instance_id: i-014652d6e4e15f4d0
control_a0-bk-production: 10.212.11.99
control_a0-bk-production.instance_id: i-08f5a14c78a8149d1
couch_a0-bk-production: 10.212.41.52
couch_a0-bk-production.instance_id: i-00f7cb989ae65337e
couch_alb-bk-production: internal-couch-alb-bk-production-570726758.us-east-2.elb.amazonaws.com
djangomanage_a0-bk-production: 10.212.11.234
djangomanage_a0-bk-production.instance_id: i-0c01c56d272bedd4c
efs_bk-production-efs: fs-0ee852a97ec443b8c.efs.us-east-2.amazonaws.com
es_a1000-bk-production: 10.212.41.70
es_a1000-bk-production.instance_id: i-01d058b240a0b663e
es_a1001-bk-production: 10.212.41.217
es_a1001-bk-production.instance_id: i-086669620d868c894
es_a1002-bk-production: 10.212.41.75
es_a1002-bk-production.instance_id: i-0727214460d04cd6f
es_a1003-bk-production: 10.212.41.30
es_a1003-bk-production.instance_id: i-078a98e8ba5c724f4
es_a1004-bk-production: 10.212.41.224
es_a1004-bk-production.instance_id: i-001feba4103a8fcc8
es_b1000-bk-production: 10.212.40.245
es_b1000-bk-production.instance_id: i-0d9d95077b59be7cf
es_b1001-bk-production: 10.212.40.68
es_b1001-bk-production.instance_id: i-049c2ea43e3052c7d
es_b1002-bk-production: 10.212.40.114
es_b1002-bk-production.instance_id: i-003d309890ba2ce0b
es_b1003-bk-production: 10.212.40.15
es_b1003-bk-production.instance_id: i-0843e919706a66004
es_b1004-bk-production: 10.212.40.90
es_b1004-bk-production.instance_id: i-0b3ee03210106b082
esmaster_a0-bk-production: 10.212.41.26
esmaster_a0-bk-production.instance_id: i-0501db0ab5efd51b5
esmaster_b0-bk-production: 10.212.40.20
esmaster_b0-bk-production.instance_id: i-052b29e399439e9b3
esmaster_c0-bk-production: 10.212.41.188
esmaster_c0-bk-production.instance_id: i-03ced389d44616449
formplayer-efs: fs-0c22e45dbdace6a92.efs.us-east-2.amazonaws.com
formplayer_a000-bk-production: 10.212.11.118
formplayer_a000-bk-production.instance_id: i-0d5db6e9b846db617
frontend_alb-bk-production: internal-frontend-alb-bk-production-1008771324.us-east-2.elb.amazonaws.com
kafka_a0-bk-production: 10.212.41.29
kafka_a0-bk-production.instance_id: i-0c32c31029d29159b
pgauditcare0-bk-production: pgauditcare0-bk-production.czikvdpwvdww.us-east-2.rds.amazonaws.com
pgbouncer_a0-bk-production: 10.212.41.144
pgbouncer_a0-bk-production.instance_id: i-0ae4b8dc862b9a907
pgformplayer0-bk-production: pgformplayer0-bk-production.czikvdpwvdww.us-east-2.rds.amazonaws.com
pgformplayer_nlb-bk-production: pgformplayer-nlb-bk-production-f797fb3fde805f94.elb.us-east-2.amazonaws.com
pgmain0-bk-production: pgmain0-bk-production.czikvdpwvdww.us-east-2.rds.amazonaws.com
pgmain_nlb-bk-production: pgmain-nlb-bk-production-8446f665b914487d.elb.us-east-2.amazonaws.com
pgshard1-bk-production: pgshard1-bk-production.czikvdpwvdww.us-east-2.rds.amazonaws.com
pgshard2-bk-production: pgshard2-bk-production.czikvdpwvdww.us-east-2.rds.amazonaws.com
pgshard3-bk-production: pgshard3-bk-production.czikvdpwvdww.us-east-2.rds.amazonaws.com
pgshard4-bk-production: pgshard4-bk-production.czikvdpwvdww.us-east-2.rds.amazonaws.com
pgshard5-bk-production: pgshard5-bk-production.czikvdpwvdww.us-east-2.rds.amazonaws.com
pgshard_nlb-bk-production: pgshard-nlb-bk-production-bfb526d091fa5582.elb.us-east-2.amazonaws.com
pgsynclog0-bk-production: pgsynclog0-bk-production.czikvdpwvdww.us-east-2.rds.amazonaws.com
pgsynclogs_nlb-bk-production: pgsynclogs-nlb-bk-production-61fafd35b64450de.elb.us-east-2.amazonaws.com
pgucr0-bk-production: pgucr0-bk-production.czikvdpwvdww.us-east-2.rds.amazonaws.com
pgucr_nlb-bk-production: pgucr-nlb-bk-production-76a67cdc0fe5a956.elb.us-east-2.amazonaws.com
pillow_a000-bk-production: 10.212.11.49
pillow_a000-bk-production.instance_id: i-0754a06433fbd5e05
proxy_a0-bk-production: 10.212.21.167
proxy_a0-bk-production.instance_id: i-0b40a4c2c5a349d3a
proxy_a0-bk-production.public_ip: 13.59.76.26
rabbit_a0-bk-production: 10.212.41.130
rabbit_a0-bk-production.instance_id: i-0dc29b125d34a9e29
web_a000-bk-production: 10.212.11.97
web_a000-bk-production.instance_id: i-0bdaa6e7653c00336
web_a001-bk-production: 10.212.11.102
web_a001-bk-production.instance_id: i-0fac37441378cbf99
web_b000-bk-production: 10.212.10.67
web_b000-bk-production.instance_id: i-0c18ccbff05858df4
web_b001-bk-production: 10.212.10.78
web_b001-bk-production.instance_id: i-091ae5ffe10ee0909
6 changes: 6 additions & 0 deletions environments/backup-production/aws.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
credential_style: sso
sso_config:
sso_start_url: https://dimagi.awsapps.com/start/
sso_region: us-east-1
sso_account_id: '213307118311'
region: us-east-2
7 changes: 7 additions & 0 deletions environments/backup-production/fab-settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tag_deploy_commits: True
use_shared_dir_for_staticfiles: True
shared_dir_for_staticfiles: /mnt/shared/temp
acceptable_maintenance_window:
hour_start: 1
hour_end: 3
timezone: US/Eastern
Loading