Git Product home page Git Product logo

ari-hacks / infra-pipeline Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 1.0 46 KB

๐Ÿ›  [Work In Progress] Infrastructure pipeline for a Python service using Jenkins, Terraform, AWS, and Ansible

License: MIT License

Dockerfile 5.64% Python 27.86% HCL 35.97% Go 28.67% Smarty 1.87%
ansible-playbook terratest terrafrom jenkins-pipeline jenkins docker ansible aws infrastructure-pipeline infrastructure-as-code

infra-pipeline's Introduction

Infrastructure pipeline

Pipeline Features

  • Jenkins
    • Server
    • Slack plugin (configuration link)
    • Integrate Github
  • Terraform
    • AWS EC2 instance resources
    • Remote state
  • AWS
    • Key Pair for SSH
    • Two EC2 instances
  • Ansible
    • Jenkins playbook
    • Web playbook
  • Docker
    • Containerized FastApi service
    • Build & Push tagged repo to docker hub
  • Terratest (Infrastructure testing)
    • Docker
    • Terraform

Set up

Requirements

Deploying infrastructure

  1. Create EC2 instances

    navigate to: \terraform\jenkins

     โžœ terraform init
    
     โžœ terraform plan
    
     โžœ terraform apply

    navigate to: \terraform\web

     โžœ terraform init
    
     โžœ terraform plan
    
     โžœ terraform apply
  2. Configure Ansible host configuration

    navigate to: \etc\ansible\host

    #servers and key config
    [jenkins]
    ubuntu@<public-dns> ansible_user=ubuntu ansible_ssh_key_private_file=~/.ssh/infra-key.pem
    [webservers]
    ubuntu@<public-dns> ansible_user=ubuntu ansible_ssh_key_private_file=~/.ssh/infra-key.pem 
    
  3. Run Playbooks

    navigate to: \ansible

    sudo ansible-playbook jenkins.yaml

    sudo ansible-playbook web.yaml

  4. Configure Jenkins and AWS EC2 instances

Running Tests

โžœ cd test
โžœ go test

infra-pipeline's People

Contributors

ari-hacks avatar dependabot[bot] avatar

Stargazers

 avatar

Forkers

syllogy

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.