In the previous articles we created our infrastructure on AWS and configured the services. All this using Ansible and creating an infrastructure as code.
In this article we will describe the steps we have followed to migrate our infrastructure to AWS.
The switch off and switch on was done on the same day but before performing it we did some preparation to facilitate the move.
The operations performed were:
- Move static files from a shared NAS to S3
- Move external standalone services to ec2
- Configure Jenkins CI to AWS
- Move ELK stack to AWS
- Move Nuvola stage environment to AWS
So we left only production services to migrate on the switch day.
The operations for the switch off were:
- Create production environment infrastructure
- Stop the application in production
- Deploy the application to the new environment
- Copy database data
- Moving DNS from old provider to new. Remember to set the TTL, on the DNS zone, to a very low value, even 48 hours before
- Start production application on the new environment
The total time of data migration with its total infrastructure creation was ~50 minutes.