By: Jeeva S. Chelladhurai

Similar documents
DevOps Workflow. From 0 to kube in 60 min. Christian Kniep, v Technical Account Manager, Docker Inc.

Developing and Testing Java Microservices on Docker. Todd Fasullo Dir. Engineering

INFRASTRUCTURE AS CODE

Creating pipelines that build, test and deploy containerized artifacts Slides: Tom Adams

Welcome to Docker Birthday # Docker Birthday events (list available at Docker.Party) RSVPs 600 mentors Big thanks to our global partners:

Think Small to Scale Big

Technical Manual. Software Quality Analysis as a Service (SQUAAD) Team No.1. Implementers: Aleksandr Chernousov Chris Harman Supicha Phadungslip

DCCN Docker Swarm Cluster Documentation

Sunil Shah SECURE, FLEXIBLE CONTINUOUS DELIVERY PIPELINES WITH GITLAB AND DC/OS Mesosphere, Inc. All Rights Reserved.

CONTINUOUS DELIVERY WITH DC/OS AND JENKINS

CONTINUOUS DELIVERY WITH MESOS, DC/OS AND JENKINS

The age of orchestration

ASP.NET Core & Docker

利用 Mesos 打造高延展性 Container 環境. Frank, Microsoft MTC

Your Apache ssl.conf in /etc/httpd.conf.d directory has the following SSLCertificate related directives.

/ Cloud Computing. Recitation 5 February 14th, 2017

DEPLOYMENT MADE EASY!

Continuous Integration using Docker & Jenkins

How Docker Compose Changed My Life

DEVOPS TRAINING COURSE CONTENT

Containers, Serverless and Functions in a nutshell. Eugene Fedorenko

Docker on VDS. Aurelijus Banelis

Container-based virtualization: Docker

Performance Tuning NGINX

Midterm Presentation Schedule

LAB EXERCISE: RedHat OpenShift with Contrail 5.0

CONTINUOUS INTEGRATION; TIPS & TRICKS

Distributed CI: Scaling Jenkins on Mesos and Marathon. Roger Ignazio Puppet Labs, Inc. MesosCon 2015 Seattle, WA

Using NGiNX for release automation at The Atlantic

Installing VMR with V2PC

LET S ENCRYPT WITH PYTHON WEB APPS. Joe Jasinski Imaginary Landscape

NetApp Jenkins Plugin Documentation

OpenShift-Build-Pipelines Build Test Run! Tobias Schneck Software Loodse GmbH ConSol Software GmbH (bis Juli 18)

UCServer Webservice Release. Best Practice

/ Cloud Computing. Recitation 5 September 26 th, 2017

Portainer Documentation

DevOps Online Training

An introduction to Docker

Jenkins CI for MacDevOps. Tim Sutton Concordia University, Faculty of Fine Arts Montreal

Chapter 1 - Continuous Delivery and the Jenkins Pipeline

VNS3:turret WAF Guide Sept 2015

T.A.D / ABS - Installation

DevOps Course Content

Anchore Container Image Scanner Plugin

SBB. Java User Group 27.9 & Tobias Denzler, Philipp Oser

Continuous Delivery for Cloud Native Applications

Index. Bessel function, 51 Big data, 1. Cloud-based version-control system, 226 Containerization, 30 application, 32 virtualize processes, 30 31

Using DC/OS for Continuous Delivery

INDIGO PAAS TUTORIAL. ! Marica Antonacci RIA INFN-Bari

Container Orchestration on Amazon Web Services. Arun

Openshift: Key to modern DevOps

Docker for Development: Getting Started

SCALING DRUPAL TO THE CLOUD WITH DOCKER AND AWS

Docker and Oracle Everything You Wanted To Know

Revamped and Automated the infrastructure for NTN Buzztime

Accelerate at DevOps Speed With Openshift v3. Alessandro Vozza & Samuel Terburg Red Hat

Fixing the "It works on my machine!" Problem with Docker

Installing VMR with V2PC

Ingress Kubernetes Tutorial

TECHNICAL BRIEF. Scheduling and Orchestration of Heterogeneous Docker-Based IT Landscapes. January 2017 Version 2.0 For Public Use

N different strategies to automate OWASP ZAP

TM DevOps Use Case. 2017TechMinfy All Rights Reserved

TangeloHub Documentation

Getting Started With Containers

IBM Planning Analytics Workspace Local Distributed Soufiane Azizi. IBM Planning Analytics

/ Cloud Computing. Recitation 5 September 27 th, 2016

Step 1: Setup a Gitlab account

Red Hat OpenShift Roadmap Q4 CY16 and H1 CY17 Releases. Lutz Lange Solution

Investigating Containers for Future Services and User Application Support

EasyLogin. Intro to the Alpha version

stalun Documentation Release 0.2 Leonidas Poulopoulos, George Kargiotakis, GRNET NOC, GRNET

70-532: Developing Microsoft Azure Solutions

Taming your heterogeneous cloud with Red Hat OpenShift Container Platform.

70-532: Developing Microsoft Azure Solutions

Leveraging the OO Jenkins Plugin in DevOps scenarios

DevOps examples on NonStop Tools Overview. Cor Geboers, ATC Consultant

Simplified CICD with Jenkins and Git on the ZeroStack Platform

TM DevOps Use Case. 2017TechMinfy All Rights Reserved

Automate NetScaler with Ansible

DEVOPS COURSE CONTENT

The Long Road from Capistrano to Kubernetes

GoDocker. A batch scheduling system with Docker containers

Microsoft Cloud Workshop. Containers and DevOps Hackathon Learner Guide

Important Prerequisites and Setup

Deploying Rails with Kubernetes

Configure IBM Security Privileged Identity Manager Appliance with a Load Balancer

OpenShift 3 Technical Architecture. Clayton Coleman, Dan McPherson Lead Engineers

Go Faster: Containers, Platforms and the Path to Better Software Development (Including Live Demo)

Getting Started with Hadoop

Arup Nanda VP, Data Services Priceline.com

TEN LAYERS OF CONTAINER SECURITY. Kirsten Newcomer Security Strategist

CMSilex Documentation

Making Non-Distributed Databases, Distributed. Ioannis Papapanagiotou, PhD Shailesh Birari

Advanced Continuous Delivery Strategies for Containerized Applications Using DC/OS

Package your Java Application using Docker and Kubernetes. Arun

GitLab-CI and Docker Registry

Important DevOps Technologies (3+2+3days) for Deployment

EVERYTHING AS CODE A Journey into IT Automation and Standardization. Raphaël Pinson

Follow me!

StreamSets Control Hub Installation Guide

Transcription:

CI CD By: Jeeva S. Chelladhurai

Tools SCM: www.github.com CI/CD: Jenkins 2.0 Important Plugins: Pipeline (for Jenkinsfile), git, github, SSH Slaves (for build slave) Platform: docker Container Orchestration: docker compose

CI/CD Architecture github dev test stage prod Jenki nsfile* docker engine docker swarm cluster docker swarm cluster docker swarm cluster jenkins docker-compose.*.yml docker container docker-registry

CI/CD: docker-birthday-3 github Jenki nsfile jenkins docker-compose.yml docker engine volume: db-data docker container

docker-birthday-3: voting app Birthday App Docker Inc introduce it as training/challenge app A Python webapp which lets you vote between several options A Redis queue which collects new votes A Java worker which consumes votes and stores them in A Postgres database backed by a Docker volume A Node.js webapp showing the results of the voting in real time Fork: https://github.com/sjeeva/docker-birthday-3 Source: https://github.com/docker/docker-birthday-3

Jenkins 2.0

Containerizing Jenkins Jenkins without SSL Create a docker volume Launch Jenkins by attaching the volume Jenkins with SSL Create key and certificate Create volume Launch Jenkins by attaching the volume Launch nginx (apache or haproxy) as a https offloader/reverse proxy for Jenkins $ docker volume create --name jenkins-data-store $ docker run -d -p 8888:8080 \ -v jenkins-data-store:/var/jenkins-home jenkins:2.0 $ cat docker-compose.yml version: "2" services: jenkins: image: jenkins:2.0 volumes: - jenkins-data-store:/var/jenkins_home $ cat Dockerfile FROM nginx ADD conf.d /etc/nginx/conf.d ENTRYPOINT ["nginx", "-g", "daemon off;"] ls conf.d/ default.conf https-server.crt https-server.key nginx-https: build: nginx-https ports: - 443:443 depends_on: - jenkins volumes: jenkins-data-store:

Containerizing Jenkins. $ cat conf.d/default.conf server { listen 443 default_server; server_name www.example.com; ssl on; ssl_certificate /etc/nginx/conf.d/https-server.crt; ssl_certificate_key /etc/nginx/conf.d/https-server.key; ssl_session_cache shared:ssl:10m; location / { proxy_pass http://jenkins:8080; proxy_set_header Host $host; # re-write redirects to http as to https, example: /home proxy_redirect http:// https://; } } $ cat genkey.sh openssl req -x509 -nodes -days 365 -newkey rsa:2048 \ -keyout conf.d/https-server.key \ -out conf.d/https-server.crt

Containerized Jenkins & Building Docker Images Build Docker image inside a docker container It is not recommended to build on master Jenkins container needs additional privilege SSH Node with access to docker engine Create a node Enter Remote root directory Used for job workspace must have read, write and access permission for the slave node user Add label docker required to direct the job to the node Select Launch slave agents on Unix machines via SSH and configure Host and Credentials

Pipeline as a Code. Traditional UI Based, Manual Create multiple jobs (build, test, deploy) Laborious and not repeatable Pipeline as a Code Build, test, and deploy pipeline are implemented in Jenkinsfile Pipeline code can be stored in source control $ cat Jenkinsfile node ('docker') { stage "Checkout App Code" checkout scm dir ('example-voting-app') { stage "Build Images" sh "docker-compose -f docker-compose.yml build" stage "Deploy Application" sh "docker-compose -f docker-compose.yml -f docker-compose.singlenode.yml stop" sh "docker-compose -f docker-compose.yml -f docker-compose.singlenode.yml rm -f" sh "docker-compose -f docker-compose.yml -f docker-compose.singlenode.yml up -d" } } stage "Publish Application Details" sh "docker-compose -f docker-compose.yml -f docker-compose.singlenode.yml ps"

Activating the Pipeline

Auto-trigger Build

Container Orchestration $ cat docker-compose.yml version: "2" services: voting-app: build:./voting-app/. networks: - front-tier - back-tier result-app: build:./result-app/. networks: - front-tier - back-tier worker: image: manomarks/worker networks: - back-tier redis: image: redis:alpine container_name: redis ports: ["6379"] networks: - back-tier db: image: postgres:9.4 container_name: db volumes: - "db-data:/var/lib/postgresql/data" networks: - back-tier volumes: db-data: networks: front-tier: back-tier: }

Container Orchestration $ cat docker-compose.singlenode.yml version: "2" services: voting-app: volumes: -./voting-app:/app ports: - "5000:80" result-app: volumes: -./result-app:/app ports: - "5001:80"

DEMO github Jenki nsfile jenkins docker-compose.yml docker engine volume: db-data