
Ensure to complete LAB 1 through LAB 3 including pre-requisite as stated in AWS Developer Tools CI CD Lab blog.
Login to AWS Console as `codedeploy_user` and perform the following
Login to AWS Console as `codedeploy_user` and perform the following
Create EC2 Instance:
Create Security Group:
Go to EC2 -> Create Security -> Create Security group as sg_codedeploy with the following inbound rules
Create IAM Instance Profile Role:
Go to IAM -> Roles to create an Instance profile role named codedeploy_InstanceProfile_role with the following permissions
- CloudWatchFullAccess
- AmazonS3ReadOnlyAccess
Create Code Deploy Service Role:
Go to IAM -> Roles to create a Service Role with the policy AWSCodeDeployRole attached.
Create EC2 instance(s):
Go to EC2 -> Launch Instances to create 1 or more t2.micro EC2 instance based out of Amazon Linux AMI along with the above Security Group, IAM Instance Profile Role and Add Tag as codedeploy_demo_EC2
SSH to the instance & install Code Deploy Agent as follows
SSH to the instance & install Code Deploy Agent as follows
$ ssh -i <path to Keyfile/keyfilename.pem> ec2-user@<public ip>$ yum update -y
$ yum install wget
$ cd /home/ec2-user
$ wget https://aws-codedeploy-${AWS::Region}.s3.amazonaws.com/latest/install
$ chmod +X ./install
$ ./install auto
$ sudo service codedeploy-agent status
$ sudo service codedeploy-agent start
Create, Configure & Execute CodeDeploy Project:
Here is the closer look of appspec.yml used in this example.
No comments:
Post a Comment