[version_1.0]
The exercises in this course will have an associated charge in your AWS account. In this exercise, you will create the following resources:
The final exercise includes instructions to delete all the resources that you create in the exercises.
Familiarize yourself with Amazon S3 pricing, AWS CodeDeploy, and AWS Free Tier.
In this exercise, you will create an S3 bucket and upload the blog to that bucket. You will also set up the CodeDeploy group and make a revision that will then be deployed.
In this task, you create an S3 bucket and upload the blog data to it.
Choose Services, then search for and open EC2.
In the navigation pane, choose Instances.
Confirm that the TEST-environment instance is running. If you need to restart the instance, choose Instance state and select Start instance.
Choose Services, then search for and open S3.
Choose Create bucket.
In Bucket name, enter a name. The bucket must have a unique name. As an example, you can use the following format: devops-exercise2-<your_initials>-<random_number> Note: If the bucket name you entered is already being used, try entering a different number.
Make sure that the AWS Region is US West (Oregon) us-west-2, which is the same Region where you will deploy your CodeDeploy group.
Choose Create bucket. The bucket you created should appear in the list of buckets.
Download the following file: Blog.zip
Back in the S3 console, choose the Name link for the bucket you created and then choose Upload.
Choose Add files, then browse to where you saved the Blog.zip file, open the file, and choose Upload.
Choose Close.
In this task, you create and configure the CodeDeploy application.
Choose Services, and search for and open CodeDeploy.
In the navigation pane under Deploy, choose Applications.
TestApplicationChoose Create application.
TestDeploymentGroupCodeDeployServiceRoleNameTEST-environmentChoose Create deployment group.
s3://devops-exercise2-<your_initials>-<random_number>/Blog.zip)Choose Create deployment.
In the Deployment lifecycle events section, choose the Instance ID link.
Select the TEST-environment instance.
Copy the Public IPv4 address or Public IPv4 DNS address and paste it in a new browser tab.
You should now see the DevOps blog.
In this task, you edit some of the code for the blog website. You then deploy the new changes to your bucket and the CodeDeploy group.
On your local computer, extract the Blog.zip file.
In a text editor, open the index.html file.
index.html file by changing the values for background-color and Version.
background-color: #0000FF; and change it to background-color: #FFC0CB;Version 1 and change to Version 2Save the file and re-compress the files into a Blog.zip file.
Back in the AWS Management Console, search for and open S3.
Under Buckets, choose the link for the bucket you created in Task 1.
Select Blog.zip and choose Delete.
In the Permanently delete objects? section, enter permanently delete and then choose Delete objects.
Choose Close.
Choose Upload, and then choose Add files.
Browse to the edited Blog.zip file that’s on your local computer, and open it.
Choose Upload.
Choose Services, and search for and open CodeDeploy.
In the navigation pane, choose Deploy > Application and choose the TestApplication link.
s3://devops-exercise2-<your_initials>-<random_number>/Blog.zip)Deploys version 2 of the application to the TEST environmentChoose Create deployment.
Under Deployment lifecycle events, choose the Instance ID.
Select the TEST-environment instance.
Copy the Public IPv4 address or Public IPv4 DNS address and paste it into a new browser tab.
You should now see the DevOps blog with the new revisions.