Join Brandon Rich for an in-depth discussion in this video CodeDeploy: App creation, part of Amazon Web Services: Deploying and Provisioning.
- [Instructor] Now we're ready to create a CodeDeploy application and deployment group. I've got it here under Recently Viewed Services, but remember you can always go down here to Search services and start typing. Here we're looking at the initial view of the CodeDeploy page. There are no existing apps, so we'll click the Get Started Now button. You have an option here to do a Sample Deployment or a Custom Deployment. If you look at the text it says, "I have existing Amazon EC2 resources, and I want to deploy my own application". That describes our situation, so we'll click this radio button and say Skip Walkthrough.
Now we're at the Create New Application page. Let's name this application. Remember this is the art_gallery app. And we'll call our Deployment Group Name, the art_gallery_deployment_group. Next up, we'll define what instances go into that deployment group. You can see here that we have a reminder of all the prerequisites for the instances that we associate with this CodeDeploy app. We've already done these steps, so let's look at this part. We have a choice of Amazon EC2, Auto Scaling Group, or On-Premises Instances.
If we choose Amazon EC2, we can specify tag keys and values that will be used to identify instances. For example, we could tell CodeDeploy to identify all the EC2 instances that have a name tag with a certain value, or we could create our own tag, maybe we could call it, CodeDeploy group, and we could use different values to associate different instances with different CodeDeploy apps. In this case, we're not using any free floating EC2 instances, we've got an Auto Scaling Group that we want to use, so we'll take the second option, Auto Scaling Group.
Now of course we need to tell CodeDeploy which Auto Scaling Group to include in this deployment group. On our drop-down, you see, codedeploy-demo-asg. We get another row here, to use if we want. Remember that we can use any combination of these choices to create a deployment group. In this case, we're just going to go with the one Auto Scaling Group. As we move on, you see a Deployment Configuration. Unlike say, Beanstock, we don't have quite as much flexibility on how we deploy. We can choose OneAtATime, AllAtOnce, or HalfAtATime; we'll go OneAtATime.
The next few sections, allow us to create triggers and alarms that let us know when things happen to this CodeDeploy application. We don't want to do anything with that right now, so we'll just keep scrolling. Rollbacks. We can rollback when a deployment fails. Let's go ahead and check that. Finally the Service Role ARN. If you click the drop-down here, you'll see the identifier of the CodeDeployServiceRole that we created in a previous step. Make sure that you select CodeDeployServiceRole and not the CodeDeployDemoEC2Instance profile.
We want CodeDeployServiceRole. Now click, Create Application. Congratulations, it says. The application has been created, and we even get an indication of how we might use the AWS CLI to push an application to this deployment group. That will be our next step.
This course is also part of a series designed to help you prepare for the AWS Certified SysOps Administrator – Associate certification exam.
- Understanding AWS EC2
- Creating an EC2 instance
- Provisioning with CloudFormation
- Architecting apps for horizontal scaling
- Creating an Elastic Beanstalk environment and app
- Using OpsWorks
- Deploying apps with CodeDeploy