Reputation: 145
Recently I have been involved in a project where I have set up a LAMP stack in AWS and also helping out the team for building other infrastructure. As per company policy, we need to create a new instance in every 60 days taking the latest ami and kill the previous one. For this reason, I requested the development team to move the php code to git repo. This would help me automate the build so that I can directly pull the code from git. But, they are saying they don't want to move the code in git for some licensing reason as the code they are using have been purchased from phpgrid (vendor). This is little strange to me...anyways, if the code is NOT in git, how can we automate the code deployment in webserver? Any thoughts on the best practices? Don't want to ftp the code from someone's machine :(
Upvotes: 0
Views: 853
Reputation: 13648
AWS Code Deploy service is purpose-built for code deployments like this.
AWS CodeDeploy is part of a family of AWS deployment services that includes AWS Elastic Beanstalk, AWS CodePipeline, AWS CloudFormation, and AWS OpsWorks. AWS CodeDeploy coordinates application deployments to Amazon EC2 instances, on-premises instances, or both. (On-premises instances are physical devices that are not Amazon EC2 instances.)
An application can contain deployable content like code, web, and configuration files, executables, packages, scripts, and so on. AWS CodeDeploy deploys applications from Amazon S3 buckets and GitHub repositories.
You can use any repository really. You just need a process to move the code from its repo to an designated S3 bucket. The code can be anywhere: SVN, on-premise, etc. Just zip it up, move to S3 and register the revision and deploy as needed. A GIT repository is not required, but it is directly supported by CodeDeploy.
We integrate the process with Jenkins our Continuous Integration server so all builds are sent to S3 as a CodeDeploy-ready revision.
There is no cost for using this feature when deploying to AWS instances - its free!
Upvotes: 3