This is a script for performing the database migration of the Web API using Helm, and basic configurations to carry out the migration
Requirements:
- Access to AWS OHM account
- Access to the staging and production clusters
export AWS_AVAILABILITY_ZONE=us-east-1a
export ENVIROMENT=staging
export EBS_DISK_SIZE=200
export POSTGRES_DB=db
export POSTGRES_PASSWORD=abc
export POSTGRES_USER=xyz
export PGUSER=xyz
export RESTORE_URL_FILE="https://osmseed-production-db.s3.us-east-1.amazonaws.com/database/db.sql.gz"
aws ec2 create-volume \
--volume-type gp2 \
--size $EBS_DISK_SIZE \
--availability-zone $AWS_AVAILABILITY_ZONE \
--tag-specifications \
"ResourceType=volume,Tags=[{Key=Enviroment,Value=$ENVIROMENT},{Key=Name,Value=osmseed-$ENVIROMENT-api-web-db}]"