Code Monkey home page Code Monkey logo

devops-assessment's Introduction

DevOps Hiring Assignment: Automating Docker Image Upload to AWS ECR using GitHub Actions

Hello all

Prerequisites:

  • AWS account with OIDC connect for Github
  • IAM permission to perform actions

1. GitHub Repository Setup:

  • Created a Repo - DevOps Assessment
  • Including Python app with Docker file

2. Docker Image Creation:

  • Docker file is successfully build Image

3. AWS ECR Setup:

  • Created a ECR repository - devops-assessment
  • Setup the OIDC Connection for connecting AWS to Github
  • Configured necessary IAM roles and policies for access management.

4. GitHub Actions Workflow:

  • Created workflow file - pipeline.yaml which will trigger on push or pull request event with appropiate caching to optimize workflow runs.

Explaination:

  • When someone make any change to code and push code to GitHub repo the workflow file automatically triggered.
  • It start with checking all dependencies install all packages, then enters in Build stage do AWS login, Docker login
  • After that it build docker image and push it to AWS ECR.

5. Security and Best Practices:

  • Use Github secret for storing AWS creadentials.
  • Used Achore-Engine for scanning for vulnerabilities in docker file.
  • After sscanning image pushed to ECR.

6. Permission to given Account:

  • I provided the permission with required ecr policy to view the AWS ECR image.
  • Follow the AWS official support link AWS DOCS LINKS for the diffrent account permission to ECR.

devops-assessment's People

Contributors

abhisheksoni2 avatar

Watchers

 avatar

Forkers

md11osama

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.