Top Banner
Culture of Automation CI/CD Martin Sauvé Solutions Architect, [email protected]
14

Culture of Automation CI/CD - people.redhat.compeople.redhat.com/mlessard/ansiblemtl/presentations/nov2016/CICD.pdf · Why Automation Matters Process Deployment ... Developer Workflow

Mar 09, 2018

Download

Documents

vuongthuan
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Culture of Automation CI/CD - people.redhat.compeople.redhat.com/mlessard/ansiblemtl/presentations/nov2016/CICD.pdf · Why Automation Matters Process Deployment ... Developer Workflow

Culture of Automation CI/CD

Martin Sauvé Solutions Architect, [email protected]

Page 2: Culture of Automation CI/CD - people.redhat.compeople.redhat.com/mlessard/ansiblemtl/presentations/nov2016/CICD.pdf · Why Automation Matters Process Deployment ... Developer Workflow

Supply Chain

Source: Dave Gray, The Connected Company

Page 3: Culture of Automation CI/CD - people.redhat.compeople.redhat.com/mlessard/ansiblemtl/presentations/nov2016/CICD.pdf · Why Automation Matters Process Deployment ... Developer Workflow

Autonomy

Source: Dave Gray, The Connected Company

Page 4: Culture of Automation CI/CD - people.redhat.compeople.redhat.com/mlessard/ansiblemtl/presentations/nov2016/CICD.pdf · Why Automation Matters Process Deployment ... Developer Workflow

Why Automation Matters

Process

Deployment Frequency

Changes

Risks

Automation

Deployment Frequency

Changes

Risks

Reduces Increases

Increases Increases

Increases Reduces

Reduces

Culture of automation ●  Faster Delivery ●  Higher Quality ●  Less Risks

Increases/Refines

Page 5: Culture of Automation CI/CD - people.redhat.compeople.redhat.com/mlessard/ansiblemtl/presentations/nov2016/CICD.pdf · Why Automation Matters Process Deployment ... Developer Workflow

5

Small chunks - high throughput

Pressure ?

Automation Prioritization

Awareness Visibility Feedback

Page 6: Culture of Automation CI/CD - people.redhat.compeople.redhat.com/mlessard/ansiblemtl/presentations/nov2016/CICD.pdf · Why Automation Matters Process Deployment ... Developer Workflow

•  Single source of truth

•  Infrastructure as Code

•  Build Code for Production

•  Provide Visibility to everyone who needs

•  Automate to deployment in a clone of production/production – “Happy Path”

Page 7: Culture of Automation CI/CD - people.redhat.compeople.redhat.com/mlessard/ansiblemtl/presentations/nov2016/CICD.pdf · Why Automation Matters Process Deployment ... Developer Workflow

CODE

DEV Developer Workflow

UNIT TEST COMMIT

BUILD STATIC CODE

ANALYSIS CREATE

SNAPSHOT

INSTALL MySQL

INSTALL JBoss

START JBoss

DEPLOY

CONFIG JBoss

CI/CD Pipeline Provision Environment

Create Release

OWASP TESTING

CREATE RELEASE

Page 8: Culture of Automation CI/CD - people.redhat.compeople.redhat.com/mlessard/ansiblemtl/presentations/nov2016/CICD.pdf · Why Automation Matters Process Deployment ... Developer Workflow

DEV Developer Workflow What about Ansible ?

USE CASE #1 – Pipeline installation and configuration

•  Several Roles available in Galaxy or in Communities supporting the toolchain •  Strong Ecosystem •  Demo was installed exclusively with Ansible. Very few manual intervention

USE CASE #2 – Jenkins Ansible Plugin/Integration •  Several Jobs in the Pipeline are done by Ansible Playbooks •  For example, dynamic provisioning and configuration of dev environment

USE CASE #3 – Provision Environment •  Provision nodes and OS configuration •  Provision Application Server/Database

Page 9: Culture of Automation CI/CD - people.redhat.compeople.redhat.com/mlessard/ansiblemtl/presentations/nov2016/CICD.pdf · Why Automation Matters Process Deployment ... Developer Workflow

CODE

DEV Developer Workflow

UNIT TEST COMMIT

BUILD STATIC CODE

ANALYSIS CREATE

SNAPSHOT

INSTALL MySQL

INSTALL JBoss

START JBoss

DEPLOY

CONFIG JBoss

CI/CD Pipeline Provision Environment

Create Release

OWASP TESTING

CREATE RELEASE

Page 10: Culture of Automation CI/CD - people.redhat.compeople.redhat.com/mlessard/ansiblemtl/presentations/nov2016/CICD.pdf · Why Automation Matters Process Deployment ... Developer Workflow

DEMO !!!

Page 11: Culture of Automation CI/CD - people.redhat.compeople.redhat.com/mlessard/ansiblemtl/presentations/nov2016/CICD.pdf · Why Automation Matters Process Deployment ... Developer Workflow

•  Single source of truth - GitHub

•  Infrastructure as Code - Ansible playbooks/roles in source control

•  Build Code for Production – Sonar/ZAP/JUnit

•  Provide Visibility to everyone who needs - Jenkins UI, Sonar UI, ZAP Report

•  Automate to deployment in a clone of production/production – “Happy Path” – Jenkins/Ansible

In the demo:

Page 12: Culture of Automation CI/CD - people.redhat.compeople.redhat.com/mlessard/ansiblemtl/presentations/nov2016/CICD.pdf · Why Automation Matters Process Deployment ... Developer Workflow

CICD with Containers

Part 2 – Coming soon

Page 13: Culture of Automation CI/CD - people.redhat.compeople.redhat.com/mlessard/ansiblemtl/presentations/nov2016/CICD.pdf · Why Automation Matters Process Deployment ... Developer Workflow

Ansible plugin – This plugin lets you invoke Ansible playbooks using Jenkins and Ansible Core. You can also use Dynamic Inventories from places like Cobbler, OpenShift, OpenStack, Amazon EC2 and more.

OpenShift Sync plugin – Sync OpenShift Builds and BuildConfigs with the state of Jenkins and Jenkins Jobs.

OpenShift Pipeline plugin – Exposes OpenShift’s functionality (such as triggering builds/deployments, promoting images from dev to test to production, or scaling deployed apps) to Jenkins

WildFly / JBoss EAP plugin – Enables Jenkins to automatically deploy apps to local or remote, standalone or domain WildFly and/or JBoss EAP

Kubernetes plugin – The base Kubernetes plugin primarily exists to allow you to dynamically provision Jenkins slaves within a Kubernetes cluster, for scalability as well as providing pods with specific runtimes for specific jobs.

Jenkins in the Red Hat CI/CD Ecosystem

Page 14: Culture of Automation CI/CD - people.redhat.compeople.redhat.com/mlessard/ansiblemtl/presentations/nov2016/CICD.pdf · Why Automation Matters Process Deployment ... Developer Workflow

Follow me on Github: http://github.com/masauve/ http://github.com/masauve/cicd-pipeline - Demo setup to be posted soon