Originally posted on CharlesGreen.org
As SCORE grows in size and scope it got me thinking that we really should put an overall deployment process in place. No only will this help to include deployment as part of the overall development process but also it will help to speedup the overall development process while ensuring that deployment is rock solid for even the first release.
Coming from a development background the “Infrastructure as Code” concept really makes sense. As such we will be using Amazon’s Ruby SDK and Cloud Formation to script and automate the process of hardware and OS provisioning on AWS. From there we will be using Chef-Solo to install and setup the environments needed to support our application. Lastly, we will be using Capistrano to deploy and version or application while bootstrapping the entire process from start to finish.
Infrastructure Provisioning Process:
- Start Capistrano Deployment Script on local system
- Capistrano will use SDK and Cloud Formation Templates to deploy new environment (EC2 Ubuntu instances, Load Balladeer, RDS PostgreSQL, etc.)
- Capistrano will use Chef-Solo to install and configure required applications on EC2 instances.
In my opinion, one of the greatest challenges being faced by organizations is the is the time, energy, and speed of releasing new features, updates, and big fixes to their production systems. One of the many reasons for this is that in many companies development changes are grouped together and manually pushed through each phase. To address this we will be using the concept of automated deployment while following many of the principles from Continuous Delivery.
SCORE Deployment Process:
- A change is submitted as a Pull Request on GitHub
- The commit is reviewed and either accepted or rejected
- If accepted the Pull Request will be merged and automatically submitted to Travis CI for automated testing.
- If all tests are passed the updated code will be automatically pushed to Amazon S3.
- A deployment script will monitor the bucket and automatically launch new server instances with the update SCORE package.
- The deployment script will then run a set of health checks on the services.
- If all health checks pass the updated services will be added to the load balancer and the outdated servers will be retired.