Upload the ISO into Cloudstack -> Templates -> Select view: ISO -> Register ISO
Name and Description: coreos-(alpha|beta|stable)-version
URL: The Cloudstack Management Server will download the file from the specified URL.
Zone: Choose the zone where you want the ISO to be available, or All Zones to make it available everywhere.
OS Type: Other 64-bit.
extractable: Your call. This determines whether users can generate a download URL for your ISO.
Featured: Your call. If featured it will be shown in the featured ISOs list of ISOs in the Instance deployment wizard.
Create an instance from the ISO choosing an appropriately sized disk offering. I choose 50gb as this is more than enough for my needs. You’ll want at least 2GB of RAM (selecting 512mb causes panic on startup, so aim higher).
Once the VM is created, navigate to the instance and click to view the console
NOTE: The wp instances will talk through to a single database server. While databases on CoreOS and containers is entirely possible, and done, I prefer to exclude the database from this setup. Set yourself up with a VM, install mariadb (/mysql) and follow the wordpress database installation instructions.
Edit the unit files for wordpress@.service and wordpress-admin.service.
Edit wordpress@.service …
… and change line 12 to incorporate your database and S3 creds:
Either follow clusterable-wordpress/README.md for instructions on how to run, or if you’re like me and like to cheat:
3d: Observe your mighty cluster firing up
The cluster deploys the following:
A discovery sidekick unit that watches for wordpress units that start and get destroyed. This particular unit is unique in that it can detect the type of wordpress container firing up, and configures the vulcand locations and paths as required.
vulcand, a “programmatic load balancer backed by etcd” that listens for etcd entries and reconfigures itself instantly as config changes.
wpadmin (the wordpress control panel) as a separate container. After much trial and error vulcand doesn’t support sticky session persistence and wp-admin isn’t written to deal with sessions moving all over the place.
customised wordpress containers, using the w3 total cache plugin, with wp-admin disabled by a custom .htaccess denying access.
The vulcan@.service, wordpress@.service and wordpress.service units all depend on docker images, which take a while to download the first time. As your cluster fires up watch the status of all units until all are up and running:
Since you’re firing these containers up at the same time, your containers may take some time to start and be in running state.
3e: Check and discover
fleetctl journal -f firstname.lastname@example.org
fleetctl journal -f email@example.com
fleetctl journal -f wordpress-admin.service
Ctrl+c at any time.
3f: Play with your brand new wordpress site
Add an entry to your hostfile:
sudo vim /etc/hosts
Add the following line:
Note, you must call the host wordpress.local because this is the value configured in our sample wordpress database.