-
Create IAM Roles - CodeDeploy & EC2CodeDeploy
-
Create EC2 instance with the following software packages should install
-
Choose User Data: for installing required packages.
-
#!/bin/bash sudo yum -y update sudo yum -y install ruby sudo yum -y install wget cd /home/ec2-user wget https://aws-codedeploy-eu-central-1.s3.eu-central-1.amazonaws.com/latest/install sudo chmod +x ./install sudo ./install auto sudo yum install -y python-pip sudo pip install awscli
-
Security groups: which enable port SSH port 22 and HTTP 80 for application
-
Launch instance
-
Goto CodeDeploy Create Application
-
Create a DeploymentGroup
-
Go to CodePipeline and create a new pipeline
-
Choose the source provider as CodeCommit or Github
-
Add source, build, deploy stages
-
Try all the relevant AWS tools e.g. Cloud9, CodeCommit, CodeBuild, CodeDeploy and CodePipeline (No worries if some of these do not work instantly we can always try later :)
-
You can verify if codedeploy is running from this command in EC2 instance
sudo service codedeploy-agent status
Working app:
You should see the working application from here after succesussfully using above AWS services: http://3.122.59.14/
References:
Please read some of these references
https://aws.amazon.com/codecommit/
https://aws.amazon.com/codepipeline/
https://aws.amazon.com/codebuild/
https://aws.amazon.com/codedeploy/
https://aws.amazon.com/cloud9/
https://docs.aws.amazon.com/codedeploy/latest/userguide/instances-ec2-create.html
https://docs.aws.amazon.com/codedeploy/latest/userguide/getting-started-create-iam-instance-profile.html#getting-started-create-iam-instance-profile-console
https://docs.aws.amazon.com/codedeploy/latest/userguide/codedeploy-agent-operations-install-linux.html
Troubleshooting:
https://forums.aws.amazon.com/message.jspa?messageID=758542
https://forums.aws.amazon.com/thread.jspa?threadID=181032