Day 50 - Your CI/CD pipeline on AWS - Part-1 ๐Ÿš€ โ˜

Day 50 - Your CI/CD pipeline on AWS - Part-1 ๐Ÿš€ โ˜

ยท

3 min read

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?

How to integrate AWS CodeCommit with Buddy | Buddy: The DevOps Automation  Platform

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.

  1. 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'. ๐Ÿ› ๏ธ

  2. 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'. ๐Ÿง‘โ€๐Ÿ’ป

  3. 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

  1. 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". ๐Ÿ“

  2. 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! ๐ŸŽ‰

Did you find this article valuable?

Support Nilkanth Mistry by becoming a sponsor. Any amount is appreciated!

ย