AWS CodePipeline | AWS CodeDeploy | AWS CodeBuild | CodeCommit | Deploy WebApp a Hands on Lab

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi welcome to another Hands-On session on Amazon web services I'm yafrakhan from skill curb and in this lab you will have a walkthrough of code pipeline in the AWS AWS code pipeline is a continuous delivery service to model visualize and automate the steps required to release your software [Music] it helps you model and configure the different stages of the software release process there are multiple stages that come under the code pipeline first thing we have in the code pipeline is the source which is the code commit in AWS code commit provides us the source and Version Control for our code next we have the code build which deals with the build and test phases in the CI CD environment [Music] codebill is an automated build service which compiles the source code and comes under the built-in finally we have code deploy for the deploy phase in CISD code deploy provides us with automated deployment so it automates the code deployments and that works with any instance or server type this whole process is orchestrated by code pipeline the prerequisite for this lab is to have get installed and configured on your local machine now the first step is to get an IM policy for the code Pipeline and generate the https git credentials for the code command Repository so for that we'll go to iam [Music] from here we'll go to the users you already have a user with required credentials so we'll click on that so we've already Associated the code pipeline access policies with this user so we can see in the permissions if you have the full admin access now we'll go to the HTTP Crypt credentials for AWS code commit section and here we click on generate credentials this will generate credentials for us to connect our local gate command line to the AWS code commit Repository here will download the credentials and save it on a local machine which we'll use later file you can see our username and password that has been generated now our next step will be to create a repository inside a code commit so we'll go to code commit from the search bar it's the website that we want to upload to the code commit repository has already been downloaded here these are the contents of the website will search for code commit ment this repository will serve as a source code for iws code pipeline it's repository a name and our description click on create so repository has been successfully created so here if you are given guideline for several options so for cloning this repository to the gate on a local machine we need to clone the URL click here and then choose clone https so repository has been cloned we'll first take an empty folder to upload our content we call this sample I will open the get command line we'll CD to our new folder and then we'll write the command get clone and then paste the cloned URL over here so repository is being cloned here we'll provide the credentials which were generated from the iam paste the username and then the password foreign so over here we have a sample web app contents we'll copy and paste these to our repository and we'll see d2r web app folder we will check the git status so here we can see our contents of the web application but these are not tracked so they are red and there are no commits first we'll use git add minus a and then we'll again input the command get status so now we can see that the contents are green which means that they are tracked it will still need to commit the changes so for that we'll write the command get commit minus m and then the message uploading the contents so now our changes have been committed next thing we need to do is to push our code inside our code Repository of the code commit so we'll write get push so now our code has been pushed to the code command repository and we can see all the details so to verify we'll go to code commit repositories and then choose our Repository so here we can see the web app contents next we need to do is to create an ec2 instance and for creating an ec2 instance for the code deploy we need to input this user code so this includes some commands now we'll head to ec2 and here will launch a new instance first we need to give the instance a name we'll call this code pipeline instance [Music] we'll choose Amazon Linux then we are selecting Amazon Linux version [Music] the architecture will be 64-bit in the instance type is T2 dot micro then we need to select a key pair name which is already present inside our AWS console [Music] we'll chooses SC key pair which is auto generated then we have the firewall security groups option we leave this as default at the end we have the advanced details we'll extend this and when we scroll down you can see the user data option here we'll paste the commands that we saw then we launch the instance [Music] so our instance is being launched now instance has been successfully created now we are ready to create a code pipeline but first we need to go to code deploy to create a deploy application in the deployment group you'll have to code deploy we'll go to the applications from the left vertical menu click on create application if the application we'll call this sample app then we'll choose the compute platform which will be easy to slash on premises click on create application application has been created now we need to create a deployment group click on create deployment group it will give deployment group a name call this sample group then we need to choose a service role we already have a service role named code deploy my web app so we'll choose that deployment type will be in place in the environment configuration we need to choose Amazon ec2 instances [Music] and we have the key and value pair we will input the name in the key and the value will be our instance [Music] we leave rest of the settings as default [Music] we'll uncheck the load balancing and we'll click on create deployment group so deployment group has successfully been created so now we're ready to create our code pipeline so from the left menu we'll go to Pipelines and here we'll create pipeline we'll give this pipeline a name which will be sample pipeline and we are creating a new service role for this pipeline which is auto generated and then we'll click on next so this is the first stage of a code pipeline which is the source stage so in the source provider we'll select code commit as our source provider so here we'll choose a repositories name which is sample web app [Music] Branch will be master rest of the setting will remain the same and we click on next so the build stage is optional so we'll leave it for now you click on skip build stage the next stage is deploy so first we need to provide the deploy provider which will be AWS code deploy so we need to choose the region and then the application name that we created in the code deploy the name was Sample app you need to choose the deployment group that we created click on next now review the settings of the code pipeline so we can see all of the stages settings over here click on create pipeline a pipeline has been created now our stages of the pipeline are in progress so we first have the source stage then the deploy stage so Source stage has been successfully executed in the deploy stages currently in progress now deploy stage has also been succeeded [Music] by that a code has been deployed successfully we need to go to the ec2 instance where our code will be deployed we will go to the instance [Music] and over here we have the public ipv address so if we copy this address and paste it in our browser so over here we can see our application successfully deployed in this lab we went through the complete process of creating an AWS pipeline we use a sample web app as code we went through the process of creating a repository Insider code commit and then we deployed the application with the help of AWS code pipeline I hope it was helpful in getting you started with this concept if you have any queries feel free to mention in the comments section thank you and have a nice day
Info
Channel: SkillCurb
Views: 51,046
Rating: undefined out of 5
Keywords: Amazon Web Services, AWS Cloud, Cloud Computing, AWS CodeDeploy, AWS Certification, CI/CD, continuous delivery, AWS training, DevOps Training, AWS CodeBuild, AWS CodeCommit, AWS CodePipeline, Continuous Integration in AWS, Building a CI/CD Pipeline, aws codedeploy tutorial, aws services, aws essentials, aws for beginners, dp-900
Id: e90rz62rk-8
Channel Id: undefined
Length: 13min 17sec (797 seconds)
Published: Sun Jan 08 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.