GithubHelp home page GithubHelp logo

atlantis-blog's Introduction

Atlantis integartion with GitHub

Commands to install Docker in Amazon Linux 3

sudo yum update -y
sudo yum search docker -y
sudo yum install docker -y
sudo systemctl enable docker.service
sudo systemctl start docker.service
sudo systemctl status docker.service

To Build the Docker Image

docker build -t atlantis .

To Run Atlantis as Docker contianer

docker run -itd -p 4000:4141 --name atlantis atlantis server --automerge --autoplan-modules --gh-user=<github-account-username> --gh-token=<github-usr-access-token> --repo-allowlist=<list of allowed repos>

Example for above command with single repository

docker run -itd -p 4000:4141 --name atlantis atlantis server --automerge --autoplan-modules --gh-user=jerinrathnam --gh-token=ghp_lj8nNeckni0N#C*54urnDBUCc0h3f#BFU --repo-allowlist=github.com/easydeploy-cloud/terraform-atlantis

Example for above command with all repositories in a GitHub account or organization

docker run -itd -p 4000:4141 --name atlantis atlantis server --automerge --autoplan-modules --gh-user=jerinrathnam --gh-token=nNeckni0N#C*54urnDBUCc0h3f#BFU --repo-allowlist=github.com/easydeploy-cloud/*

To ssh into the Atlantis Docker Container

docker exec -it atlantis /bin/sh

To add AWS credentials directly

aws configure

To edit the aws credentials file

vi /home/atlantis/.aws/credentials

Add the following content into the credentials file

[default]
aws_access_key_id = <ACCESS-KEY>
aws_secret_access_key = <SECRET-KEY>

Replace the following values in the above code

ACCESS-KEY: Access key ID of the AWS IAM user

SECRET-KEY: Secret Access key ID of the AWS IAM user

Note: If you have many profiles you can make entries accordingly in the above file and use it in the Terraform

To push the code to GitHub

git add *
git commit -m "Create EC2 Instance"
git checkout -b develop
git push origin develop

Atlantis commands to reference

atlantis plan -d . ⇨ to get a plan of the terraform code

atlantis apply -d . ⇨ to apply the terraform code

For more reference for Atlantis commands: Atlantis Commands

To find more blogs about Terraform: Terraform Blogs

atlantis-blog's People

Contributors

jerinrathnam avatar

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.