It was great to get a glimpse at Amazon Elastic Beanstalk + Docker, presented by Markku Lepisto, AWS Principal technologist at DrupalCamp Manila 2014 last month.
Elastic Beanstalk has been getting popular for deploying and managing applications in the AWS cloud. Once your application is up in the cloud, Elastic Beanstalk will provision, monitor, and scale capacity, and you also have the option to load balance all incoming requests across all your instances.
What interested me most is Docker Integration with AWS Beanstalk in a Drupal environment.
Most developers right now are excited for automated deployments. Knowing how to create instances from a wide variety of hypervisors (e.g. VirtualBox, VMware or Vagrant) was a milestone for developers.
It was also a breakthrough in a conflict between developers and operations, where projects were being compromised because it takes a long time to provision servers and set up environments, thus developers waste time waiting for a server to get up and running before they can start deploying their apps on those servers.
Seven months ago, Docker was a rather unknown project. It wasn’t until recently that a massive number of developers started to contribute to the project because Docker simplified and rocketed their development workflow and efficiency.
Packaging applications as Docker images makes them portable, reliable, easy to share with others and simple to test.
Now, developers with AWS accounts can take advantage of features like EC2, RDS (including fully-managed MySQL, PostgreSQL, Oracle, and SQL Server databases), and IAM.
25% of the US government’s sites are using Drupal as their platform, from publishing to Open Data Applications, and some media giants like CNN and Al Jazeera are already in engaged on this platform. This is just one of the reasons why Drupal is one of the most reliable content management framework out there.
A couple of weeks ago, X-Team launched our Alpha version of drush_deployment module, an extended feature of Drush (the “swiss army knife of Drupal”). Drush is a shell-based tool you can use in the console to automate Drupal, from setting up a site or simply adding a user, downloading and enabling modules, or migrating content and a lot more.
Our Drush Deployment module is using a gitElephant Library for git (a community-driven project on GitHub that is heavily used in symfony projects).
All commands in drush_deployment: (drush_deployment)
We next wanted to integrate our deployment module with AWS Beanstalk Docker.
After days of experimenting and testing we have come up with this docker image on github: https://github.com/fusionx1/aws-docker-drupal-deployment