Coder Social home page Coder Social logo

capstone---cloud-devops-engineer-nanodegree-progam's Introduction

Capstone project

This repository contains the source code for the capstone project of the cloud dev ops nanodegree course.

Directory description

Name Content
Root direcotyr Dockerfile, Jenkinsfile
ansible ansbile playbook used to configure the CI/CD environment and the kubernetes cluster
app Demo application to copy inside the docker container
bin Binaries for docker linting
cloudformation yml files used to create the network, jenkins and k8s cluster nodes.
script utiliy scripts to launch playbook and cloudformation

Inside the cloudformation folder there are three yml files, network.yml defines the network topology used, the image below shows the infrastructure diagram. jenkins.yml defines the EC2 instance used to deploy the jenkins server. kubernetes_cluster.yml defines two EC2 instances, the instances are registered in a target group associated to a load balancer. This file is used to deploy the cluster every time a commit is pushed to github.

drawing

Ansible folder contains the playbook used to configure the CI/CD environment and the kubernetes stack. The inventories are built dynamically with aws_ec2 plugin.

CI/CD description

Every time a new commit is pushed this steps are executed:

  • Linting of Dockerimage
  • Building of docker image
  • Vulnerabilites scanning of docker image
  • Pushing of docker image
  • Deployment of a new kubernetes stack on AWS
  • Stack configuration ( download of the docker image from dockerhub)
  • Update of the route53 recoder to point to the new load balancer

Setup CI/CD pipeline

Install ansible locally with this steps:

cd scripts/env
./install_ansible <virtual_env_path>

<virtual_env_path> is the directory where to create the virtual environment with ansible and aws dependencies.

The next step is to deploy the network stack and the jenkins node in AWS. The required steps are:

cd cloudformation
../scripts/cloudformation/cloud-formation-helper.sh create <network_stack_name> network.yml
../scripts/cloudformation/cloud-formation-helper.sh create <jenkins_stack_name> jenkins.yml

After the jenkins node has been deployed we can configure it.

scripts/ansible/configure_jenkins_node.sh <virtual_env_path> <jenkins_private_key_path>

Connect to <jenkins_node_ip>:8080 and use the initial password to login. The initial password is saved in ~/jenkins_initial_password/initialAdminPassword on the local machine. Install the suggested plugins plus BlueOcean, Docker, Aqua microscanner and 'Pipeline: AWS Steps'. Set up the repository and add the docker hub credential with id docker-credential, set up the microscanner token.

capstone---cloud-devops-engineer-nanodegree-progam's People

Contributors

giovannibaratta 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.