Welcome to Day 50 of your DevOps journey! Today, we're diving into setting up a CI/CD pipeline on AWS using some powerful tools. Over the next 4 days, we'll be working with:
๐น CodeCommit ๐ฆ
๐น CodeBuild ๐ ๏ธ
๐น CodeDeploy ๐
๐น CodePipeline ๐
๐น S3 ๐
Let's start with understanding CodeCommit:
What is CodeCommit?
CodeCommit is like your supercharged digital vault in the cloud. It's a service by AWS that lets you securely store, manage, and version your source code and artifacts. Think of it as a super organized and secure warehouse for all your code goodies. It plays well with other AWS services, supports Git, and even keeps track of who's been peeking at your code with its audit logs and compliance reports.
Task-01: Set up a code repository on CodeCommit and clone it on your local.
Create a CodeCommit repository:
Log in to the AWS Management Console and navigate to CodeCommit.
Click on Create repository.
Enter a name for your repository and click on 'Create'. ๐ ๏ธ
Set up Git Credentials in your AWS IAM:
Go to IAM console.
Click on Users, then your username.
Scroll down to Security credentials.
In 'HTTPS Git credentials for AWS CodeCommit', click on 'Generate credentials'.
Download your Git credentials and click 'close'. ๐งโ๐ป
Clone the repository from CodeCommit:
In your CodeCommit repository, click on 'Clone URL', choose 'Clone HTTPS'.
Open a terminal on your local machine.
Navigate to the directory where you want to clone the repository.
Run the following command:
git clone <your-codecommit-repo-clone-https-url>
Enter the username and password you downloaded earlier when prompted. ๐
Task-02: Add a new file from local and commit to your local branch
Create a new file in the local repository directory.
Check status using
git status
.Add the new file to your local branch using
git add <filename>
.Commit the changes to your local branch using
git commit -m "added new file"
. ๐
Push the local changes to CodeCommit repository:
Push the changes from your local branch to the CodeCommit repository using
git push origin master
.Verify the changes in the CodeCommit repository. ๐
And that's it! You've successfully set up a CodeCommit repository, cloned it locally, added a new file, and pushed changes back to the repository. Keep exploring and Happy Learning! ๐