Code Monkey home page Code Monkey logo

cicd_pipeline_java's Introduction

Building A CI/CD Pipeline

Purpose

The purpose of building a CI/CD pipeline is to automate steps in software delivery process

Tools

The tools we would be using to build a CI/CD pipeline

Tools
Jenkins Maven Ansible
Docker Docker Hub Tomcat
Git Github AWS EC2

Infrastructure Design

Infrastructure Design

Process

CICD Process

Overview of Steps

AWS

  1. Create Security Groups
  2. Launch AWS EC2 instances
  3. Allocate each AWS EC2 instance a pulblic ip address

OS

  1. Change server hostname and SSH timeout for all servers
  2. Create users
  3. Add uses to necessary groups
  4. Grant sudo access to ansibleadm user
  5. Genetate SSH keys for users
  6. Copy SSH keys over to necessary servers
  7. Enable yum repositories
  8. Install packages

Github

  1. Get jenkinsadm SSH key from Jenkins host
  2. Copy jenkinsadm SSH key from Jenkins host to Github
  3. Fork "helloworld" repo

Docker

  1. Create a Access Tokens
  2. Create a repository
  3. Connect Docker host to Docker Hub
  4. Pull Tomcat 8.5 Docker image
  5. Run a Docker container using Tomcat 8.5 image
  6. Check if Docker container is running
  7. Create a Docker image out of the running container
  8. Push created Docker image to Docker Hub
  9. Create a directory with appropriate permissions to store Java artifacts

Ansible

  1. Create a diretory for Ansible
  2. Create an Ansible skeleton role
  3. Create a hosts directory
  4. Create a hosts file in hosts directory with contents of this file
  5. Create an Ansible Playbook named docker-container.yml with contents of this file
  6. Give ansible folder and its contents the appropriate owners

Jenkins

  1. Login to jenkins
  2. Configure Maven plugin
  3. Configuring Github plugin
  4. Configuring Github webhook trigger
  5. Configure Publish Over SSH plugin
  6. Copy SSH keys to /var/lib/jenkins/.ssh

Pipeline

  1. Start a new project
  2. Configure the project
  3. Run the build manually
  4. Trigger an automatic build

cicd_pipeline_java's People

Contributors

hadriane avatar

Watchers

 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.