AWS CodePipeline is a (CI/CD) service.
- Create IAM Role for EC2 and AWS CodeDeploy
- Launch an EC2 Instance and Attach the EC2 Role
- Create a CodePipeline using GitHub, CodeBuild, and CodeDeploy
Step 1) Create IAM Role for EC2 and AWS CodeDeploy
- Create a new role for EC2 and attach AmazonS3ReadOnlyAccess policy which will allow EC2 instance to access stored artifacts from the Amazon S3 bucket.
- Create a new service role for CodeDeploy and attach AWSCodeDeployRole
policy which will provide the permissions for our service role to read
tags of our EC2 instance, publish information to Amazon SNS topics and
much more task.
Step 2) Launch an Ubuntu EC2 instance
- Kindly Select t3.medium Instance Type or above
- Add Port No 3009 In Security Group for React App
Step 3) Attach IAM EC2 Role with Newly Created Instance.
Step 3) Install code deploy agent by following Cmd.
- For Ubuntu & Debian Based
Step 4) Make a GitHub Public Repository.
- Download the source code and push on Newly Created Repository.
Step 5) Create Deploy Stage For Code-pipeline
Go To CodePipeline >> Deploy >> Applications
Go To CodePipeline >> Deploy >> Applications
- Create Application
Step 6) Create a CodePipeline using Github, CodeBuild and CodeDeploy
a) Create CodePipeline
- Go To CodePipeline >> Build Custom Pipeline
b) Choose GitHub in Code Source
- After selecting GitHub as the source provider, click on the Connect to GitHub button. You’ll then be prompt to enter your GitHub login credentials
- Once you grant AWS Code-pipeline access to your GitHub repository, you can select a repository and branch for Code-pipeline to upload commits to this repository to your pipeline
c) Configure Code Build (Optional)
- If you haven’t created a project prior to creating your pipeline,then you can create a project directly from here by clicking Create project button.
d) At the end, just review and create.
No comments:
Post a Comment
testing