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 12 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
82 changes: 82 additions & 0 deletions environments/backup-production/aws-resources.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
celery_a000-bk-production: 10.212.11.91
celery_a000-bk-production.instance_id: i-07c97f80ee9e33c17
control_a0-bk-production: 10.212.11.140
control_a0-bk-production.instance_id: i-07a00581fbdc8db25
couch_a0-bk-production: 10.212.41.177
couch_a0-bk-production.instance_id: i-03512491f4cf96829
couch_alb-bk-production: internal-couch-alb-bk-production-1743768862.us-east-2.elb.amazonaws.com
djangomanage_a0-bk-production: 10.212.11.144
djangomanage_a0-bk-production.instance_id: i-0234c0c30da41a83e
efs_bk-production-efs: fs-0f73c7bbf4c2e3bff.efs.us-east-2.amazonaws.com
es_a1000-bk-production: 10.212.41.145
es_a1000-bk-production.instance_id: i-09067f28237cd067f
es_a1001-bk-production: 10.212.41.136
es_a1001-bk-production.instance_id: i-0738eaa715933f3f6
es_a1002-bk-production: 10.212.41.47
es_a1002-bk-production.instance_id: i-00242779baebe6937
es_a1003-bk-production: 10.212.41.7
es_a1003-bk-production.instance_id: i-00718d2228c1559df
es_a1004-bk-production: 10.212.41.86
es_a1004-bk-production.instance_id: i-060785cd33304659d
es_a1005-bk-production: 10.212.41.254
es_a1005-bk-production.instance_id: i-0dc33fec88310a775
es_a1006-bk-production: 10.212.41.194
es_a1006-bk-production.instance_id: i-0542ceec697a753a7
es_b1000-bk-production: 10.212.40.93
es_b1000-bk-production.instance_id: i-01e8592673ff22cc5
es_b1001-bk-production: 10.212.40.177
es_b1001-bk-production.instance_id: i-0db9777476b240aea
es_b1002-bk-production: 10.212.40.220
es_b1002-bk-production.instance_id: i-0db460fbd2c692696
es_b1003-bk-production: 10.212.40.181
es_b1003-bk-production.instance_id: i-00fee3d995921a293
es_b1004-bk-production: 10.212.40.253
es_b1004-bk-production.instance_id: i-0b1f45d6d07d80e74
es_b1005-bk-production: 10.212.40.228
es_b1005-bk-production.instance_id: i-0ac0fb9549279c42e
es_b1006-bk-production: 10.212.40.68
es_b1006-bk-production.instance_id: i-031446cda71d239ab
esmaster_a0-bk-production: 10.212.41.118
esmaster_a0-bk-production.instance_id: i-0a42357d69363671f
esmaster_b0-bk-production: 10.212.40.162
esmaster_b0-bk-production.instance_id: i-00258f79edc01798b
esmaster_c0-bk-production: 10.212.41.170
esmaster_c0-bk-production.instance_id: i-0949dc4cc7faf9670
formplayer-efs: fs-0328bdaad37639dcf.efs.us-east-2.amazonaws.com
formplayer_a000-bk-production: 10.212.11.40
formplayer_a000-bk-production.instance_id: i-07e869020802e17ce
frontend_alb-bk-production: internal-frontend-alb-bk-production-2099219371.us-east-2.elb.amazonaws.com
kafka_a0-bk-production: 10.212.41.21
kafka_a0-bk-production.instance_id: i-035f64b1fdd5777a8
pgauditcare0-bk-production: pgauditcare0-bk-production.c91guuasbtml.us-east-2.rds.amazonaws.com
pgbouncer_a0-bk-production: 10.212.41.111
pgbouncer_a0-bk-production.instance_id: i-0bb3a4d4eb539c86e
pgformplayer0-bk-production: pgformplayer0-bk-production.c91guuasbtml.us-east-2.rds.amazonaws.com
pgformplayer_nlb-bk-production: pgformplayer-nlb-bk-production-0564368cae6f3a6f.elb.us-east-2.amazonaws.com
pgmain0-bk-production: pgmain0-bk-production.c91guuasbtml.us-east-2.rds.amazonaws.com
pgmain_nlb-bk-production: pgmain-nlb-bk-production-a8225d9923521f9d.elb.us-east-2.amazonaws.com
pgshard1-bk-production: pgshard1-bk-production.c91guuasbtml.us-east-2.rds.amazonaws.com
pgshard2-bk-production: pgshard2-bk-production.c91guuasbtml.us-east-2.rds.amazonaws.com
pgshard3-bk-production: pgshard3-bk-production.c91guuasbtml.us-east-2.rds.amazonaws.com
pgshard4-bk-production: pgshard4-bk-production.c91guuasbtml.us-east-2.rds.amazonaws.com
pgshard5-bk-production: pgshard5-bk-production.c91guuasbtml.us-east-2.rds.amazonaws.com
pgshard_nlb-bk-production: pgshard-nlb-bk-production-ff33a8d7fc7a4c2a.elb.us-east-2.amazonaws.com
pgsynclog0-bk-production: pgsynclog0-bk-production.c91guuasbtml.us-east-2.rds.amazonaws.com
pgsynclogs_nlb-bk-production: pgsynclogs-nlb-bk-production-7158341afa0269b2.elb.us-east-2.amazonaws.com
pgucr0-bk-production: pgucr0-bk-production.c91guuasbtml.us-east-2.rds.amazonaws.com
pgucr_nlb-bk-production: pgucr-nlb-bk-production-4ea5b9bba4e9f8d5.elb.us-east-2.amazonaws.com
pillow_a000-bk-production: 10.212.11.24
pillow_a000-bk-production.instance_id: i-07cb1ad00eff0a07c
proxy_a0-bk-production: 10.212.21.6
proxy_a0-bk-production.instance_id: i-0801717ff2244aa9e
proxy_a0-bk-production.public_ip: 13.57.194.84
rabbit_a0-bk-production: 10.212.41.32
rabbit_a0-bk-production.instance_id: i-0f6d3c27cf59e92a0
web_a000-bk-production: 10.212.11.196
web_a000-bk-production.instance_id: i-02a25b423cce814ee
web_a001-bk-production: 10.212.11.159
web_a001-bk-production.instance_id: i-0830723f088ba502e
web_b000-bk-production: 10.212.10.132
web_b000-bk-production.instance_id: i-01e22d2b31ca7850c
web_b001-bk-production: 10.212.10.121
web_b001-bk-production.instance_id: i-0a61eef0ad48497fc
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
Loading