fdupoux / devops

DevOps code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DevOps repository

This repository provides some DevOps code which uses AWS with Jenkins and Ansible to configure servers following the immutable infrastructure principles. A new version of an application AMI should be created each time a change is required so each change can be reverted by switching back to a previous version of the AMI.

Jenkins

The jenkins directory contains groovy files which are executed through the Jenkins-DSL in order to create and update the configuration of all Jenkins jobs from code so these jobs can never be lost and so we can track all changes easily. All sensitive information is excluded from this repository and will be loaded by Jenkins from properties files.

Ansible

The ansible directory contains many roles to build AMI images, EC2 environments using CloudFormation, and manage EC2 instances. All sensitive information such as AWS Access Keys is excluded from this repository and will be passed by the Jenkins jobs as environment variables or loaded from group_vars variables. Other Ansible roles and configuration (host_vars + group_vars) need to be added in order to make use of this code.

Workflow

This DevOps code implements the following jobs:

  • ansible_bldami_centos builds a minimal AMI image of CentOS 7.x from scratch

  • ansible_bldami_websrv derives the minimal AMI and builds an application AMI which contains specific packages required on a web server

  • ansible_deploy_websrv deploys the latest websrv application AMI into an Auto-Scaling Group in AWS using the Cloud-Formation module in Ansible

  • ansible_config_websrv allows to apply the latest changes to an existing EC2 server using Ansible but this job should normally not be used as new versions of AMIs should be created and deployed instead. This job can help save time during the development.

About

DevOps code


Languages

Language:Python 88.1%Language:Groovy 5.3%Language:Shell 4.8%Language:Dockerfile 1.7%Language:Makefile 0.1%Language:PHP 0.1%