Jan 022016
One advantage of Docker is the easy move to other Docker providers. In my case: Moving from Google Cloud to Amazon’s AWS. Same instance size, same OS (CoreOS 877). The main difference is the location: Google’s one is in TW, AWS’s one is in JP.
So I start with my MySQL/Wordpress instance from here to AWS.
- Create a t1.micro instance with CoreOS 877 (1 shared CPU, 0.6 GB RAM)
- Set up ssh authentication for the main user (core for CoreOS, root usually)
- Create 3 docker containers and populate them with the last backup of the current instance of MySQL/Wordpress.
- Stop WordPress/MySQL. Mount the data volumes to the backup volume. Run a backup.
- Start MySQL/WordPress again
- Copy those 2 tar files to the new CoreOS AWS server.
- Restore the data volumes.
- Here wish that Docker would allow copying data volumes from A to B.
- Run the very same docker commands to run MySQL and WordPress.
- Change DNS (or test by faking a DNS change on the desktop client which runs the browser)
And lo-and-behold, it worked as expected. No issue at all.
When you can read this, then this blog already moved to run on AWS. I’ll keep it here for a while.