![]() Use below commands to deploy code deploy agent on EC2 instance using putty ssh client. The CodeDeploy agent is a software package that, when installed and configured on an instance, makes it possible for that instance to be used in CodeDeploy deployments. Install the required packages by running the command below. Login into an instance with a public IP, username, and PPK file. Since we are using Node Application, we must install nodejs related packages and a git module to enable the server environment to use the git services. To ensure our application can run properly on the EC2 server, we need to install the required packages. Install CodeDeploy Agent on EC2 Instance and nodejs. Let’s catch up on the AWS CodeDeploy configurations. Convert generated PEM file into PPK and log in using putty ssh client software.Īlright, now our EC2 is set up. We will be logging into the instance using the PPK file. You can connect to an instance using an ssh client. Take note of the public IP and username on the connect to instance page. Go to EC2 Dashboard, right-click on the EC2 instance generated earlier, and click on connect. Wait for a few minutes to launch EC2 Instance.ĭownload key/pair if you want to login into an instance using ssh. Review all details once and click on the Launch button. In the Configure Security Group page, Add Rule called Custom TCP Rule, a select source called anywhere. Click on the Next: Configure Security Group button. In our case, I have added blog_app/nodejs The tag will require creating a code deploy service. On the tag page, add the tag as key/value pair. To establish the connection between the EC2 instance and code deploy, Select ec2_role in IAM Role, which we created before and click on Next: Add Storage Click on Next: Configure Instance Details Click on select.Ĭhoose an Instance Type as t2.micro. Ubuntu Server 18.04 LTS (HVM), SSD Volume Type (64-bit Arm). Select AMI setup as per your project requirement. Search for EC2 service in the search bar.Ĭlick on the EC2 Dashboard on the right side ![]() Open codedeploy_role role and go to the Trust Relationships tab. ![]() Pass codedeploy_role as Role name and click on Create Role button. On the permission page, add below policiesĬlick on the Next: Tags button. Copy-paste the below content and click on the Update Trust Policy button. Open the ec2_role role and go to the Trust Relationships tab.Ĭlick on the Edit trust relationship tab. Pass ec2_role as Role name and click on Create Role button. Leave the Tags tab as it is optional and click on the Next: Review button. On the permission page, select AmazonEC2RoleforAWSCodeDeploy policy and click on the Next: Tagsbutton. Select type of trusted entity as AWS Service Search for IAM Service in the search bar. Quick Note: Please select a particular region of AWS Services where you will deploy this application and, CodeDeploy, Github will use the selected region. We will be using ap-south-1, an AWS region, for this blog setup. Install CodeDeploy Agent on EC2 Instance and nodejs.Once it is done, GitHub Actions will run the deployment job, which will trigger the AWS CodeDeploy to do the deployment part.ĬodeDeploy will help to automate the deployment by fetching the latest committed code in GitHub and updating GitHub. It will perform the code build process and run the automated tests. It takes place once the user triggers a push event to the respective repository. GitHub Actions makes it easy to automate all your software workflows, now with world-class CI/CD. GitHub Actions: Performs the build and test (Continuous Integration)ĪWS CodeDeploy: Automates the deployment process to EC2 (Continuous Deployment)Īll the project codes are committed in the GitHub repository. Continuous Integration and Deployment (CI/CD).Test Design & Test Automation Framework Design.Digital Transformation Services in USA and India.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |