SlideShare uma empresa Scribd logo
1 de 59
Baixar para ler offline
Slice of DevOps - Automate Everything
Packer, Ansible, OpenSCAP, Vagrant and Kubernetes
Mihai Criveti, Cloud Native Competency Leader at IBM
October 12, 2019
1
1 Packer: Image Build Automation
2 OpenSCAP: Automate Security Baselines
3 Ansible: Provisioning and Configuration Management
4 Molecule: Test your Ansible Playbooks on Docker, Vagrant or Cloud
5 Vagrant: Test images with vagrant
6 Package Python Applications with setuptools
7 Kubernetes: Container Orchestration at Scale
8 DevOps Culture and Practice 2
Introduction
Mihai Criveti, IBM Cloud Solutions
• Cloud Native & Red Hat Solutions Leader
• Builds multi-cloud environments for large customers
• Migrating his current build environment to cloud
Base OS Image Automation
• Build OS master golden images using Packer and Ansible
• Automate your image pipeline using CI/CD with Jenkins
• Continuous Compliance with OpenSCAP
This talk is not affiliated with my employer
• This talk reflects personal opinions and projects
3
Example Workflow: Build, Secure and Test Images for Multiple Environments
0. GitHub / GitLab: Configuration & Infrastructure as Code
1. Packer & OpenSCAP: build secure virtual and cloud images
2. Ansible & Molecule: configuration management & testing
3. Jenkins / Travis: setup CI/CD pipelines
4. Vagrant Cloud: publish your images
5. Python Setuptools: Package your Code
6. Black, Yapf, SonarQube, Bandit: Static Analysis
7. Kubernetes, Helm, OpenShift: deploy your application
4
1 Packer: Image Build
Automation
Packer: build multiple images from a single source
5
Packer: Variables
Variables to parametrized builds and hide secrets
{
"variables": {
"my_secret": "{{env `MY_SECRET`}}",
"not_a_secret": "plaintext",
"foo": "bar"
},
"sensitive-variables": ["my_secret", "foo"],
}
6
Packer: Builders
Virtualbox builder with kickstart grub prompt
"builders": [ {
"type": "virtualbox-iso",
"boot_command": [
"<up><wait><tab>",
" text inst.ks=
http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `vm_name`}}.cfg",
"<enter><wait>"
]}],
7
Provisioners: run post-install tasks
Chaining multiple provisioners
"provisioners": [
{
"type": "shell",
"script": "setup.sh"
},
{
"type": "ansible",
"playbook_file": "{{user `playbook_file`}}"
}],
8
Post-processors: compress or upload your image
Compress, post-process and upload the results
{
"post-processors": [
{
"type": "compress",
"format": "tar.gz"
},
{
"type": "upload",
"endpoint": "http://example.com"
}
]
}
9
Building a VirtualBox image for RHEL 8 using Kickstart
10
2 OpenSCAP: Automate Security
Baselines
OpenSCAP security report
11
Automatic Remediation as shell, ansible or puppet
12
Continuous Inspection and Automated Compliance
Install OpenSCAP
dnf install openscap-scanner
Generate a report
sudo oscap xccdf eval --report report.html 
--profile xccdf_org.ssgproject.content_profile_pci-dss 
/usr/share/xml/scap/ssg/content/ssg-rhel7-ds.xml
13
3 Ansible: Provisioning and
Configuration Management
Application Deployment, Configuration Management, Continuous Delivery
Figure 1: Ansible Overview
14
What can I do with Ansible?
Figure 2: Ansible Features 15
Ansible Supports Technologies You Use Today
Figure 3: Ansible Technologies
16
Ansible Overview
Figure 4: Ansible Overview
17
Ansible Tower
Figure 5: Ansible Tower
18
Ansible for Enterprise: Architecture
19
Getting Started with Ansible
Install ansible from pip
pip install ansible
Running ad-hoc commands
ansible -m setup localhost
localhost | SUCCESS => {
"ansible_facts": {
"ansible_all_ipv4_addresses": [
"172.18.0.1",
"172.19.0.1",
"172.17.0.1",
"141.125.85.138",
"10.196.49.9",
"192.168.122.1"
20
Getting Help
Search for an appropriate module (~3000 existing) and get help
ansible-doc -l | grep pip
Using the examples section
ansible-doc pip
# Install (Bottle) into the specified (virtualenv), using Python 2.7
- pip:
name: bottle
virtualenv: /my_app/venv
virtualenv_command: virtualenv-2.7
21
Using ansible-doc snippet
ansible-doc -s pip
- name: Manages Python library dependencies
pip:
chdir: # cd into this directory
editable: # Pass the editable flag.
executable: # The explicit executable or a pathname
extra_args: # Extra arguments passed to pip.
name: # Python library to install or the url
requirements: # The path to a pip requirements file
state: # absent, forcereinstall, latest, present
22
Ansible Playbooks
Run ansible:
ansible-playbook -i localhost, playbook.yml
playbook.yml
- hosts: all
connection: local
become: yes
gather_facts: yes
roles:
- role: kvm
23
What’s inside a playbook?
tasks/install.yml
- name: install RedHat packages
package:
name: "{{ redhat_packages }}"
state: present
become: yes
vars/main.yml
redhat_packages:
- policycoreutils-python-utils
- qemu-kvm
- qemu-img
24
4 Molecule: Test your Ansible
Playbooks on Docker, Vagrant or
Cloud
Ansible Molecule
Creating a vagrant or docker machine and trigger goss tests:
molecule create -s vagrant-centos-7
molecule converge -s vagrant-centos-7
molecule login
In one step
molecule test
Another OS:
molecule create -s docker-ubuntu-18.04
25
Inside Molecule
molecule.yml with Fedora 30 running on Docker
driver:
name: docker
provider:
name: docker
lint:
name: yamllint
platforms:
- name: pandoc-fedora-30
image: fedora:30
dockerfile: ../resources/Dockerfile.j2
provisioner:
name: ansible
26
Molecule Cookie Cutter Templates
Cookiecutter: Better Project Templates
• Cookiecutter creates projects from project templates, e.g. Ansible role structure,
with molecule tests.
• Molecule provides a native cookiecutter interface, so developers can provide their
own templates.
Create a new role from a template, with molecule tests included
molecule init template 
--url https://github.com/crivetimihai/ansible_cookiecutter.git 
--role-name httpd
27
5 Vagrant: Test images with
vagrant
Test images locally with Vagrant
Run vagrant up on a Vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "centos-8-base"
config.vm.hostname = "centos8.lab.local"
config.vm.network "private_network", ip: "172.16.6.4"
config.vm.provider "virtualbox" do |vb|
vb.cpus = "2"
vb.memory = "2048"
vb.customize ["modifyvm", :id, "--vram", "256"]
end
end
28
6 Package Python Applications
with setuptools
Package python code with setuptools
hello/init.py
def hello():
return "Hello"
setup.py
from setuptools import setup
setup(name=‘hello', version='0.1’,
description=’My Package’,
url='http://github.com/crivetimihai/hello’,
author=‘Mihai Criveti’,
license='MIT’,
packages=[‘hello’],
zip_safe=False)
29
Python setuptools commands
Create a source distribution
python setup.py sdist
Install
python setup.py install
Register with pypi
python setup.py register
Upload your package
python setup.py sdist upload
30
Moving to setup.cfg
[metadata]
name = hello
version = 0.1.0
description = Hello World
long_description = file: README.md, CHANGELOG.md, LICENSE.md
long_description_content_type = text/markdown
keywords = hello
author = Mihai Criveti
author_email = crivetimihai@gmail.com
31
Integrating tests and coverage
Integrate pytest, py-test-cov
python setup.py test
Automate testing with tox
# tox.ini
[tox]
envlist=py35,py36,py37
[testenv]
commands=py.test
deps=pytest
32
Continuous Integration with Travis
.travis.yml
language: python
matrix:
include:
- python: 3.7
env: TOXENV=py37
install: pip install tox
script: tox
notifications:
email: false
33
Indenting code: Black and Yapf
Indent code with black
black -l 79 code.py
…or yapf
yapf --style google --style-help > ~/.style.yapf
yapf --style google -i code.py
34
Tools: what do we integrate?
Static Analysis
• Pycodestyle
• Pylint
• Pyflakes
• Mypy
• Pydocstyle
Security
• Bandit
• SonarQube
• Zap Scan
• Arachni
Test
• tox
• Coverage (pytest-cover)
• Performance testing
• Selenium
Package
• setuptools
• Helm Charts
Deploy (Dev/Test/Prod)
• Ansible
• Kubernetes
35
Python Packaging: Cookiecutter
Install and use cookiecutter templates:
pip install cookiecutter
cookiecutter https://github.com/audreyr/cookiecutter-pypackage
Example output
email [audreyr@example.com]: crivetimihai@gmail.com
github_username [audreyr]: crivetimihai
project_name [Python Boilerplate]: MyProject
project_slug [myproject]:
pypi_username [crivetimihai]:
version [0.1.0]:
use_pytest [n]:
use_pypi_deployment_with_travis [y]:
36
7 Kubernetes: Container
Orchestration at Scale
Kubernetes is Desired State Management
37
Multi-Zone or Multi-Cluster
38
Static Analysis and Vulnerability Checks
Figure 7: Vulnerability Scanner: Check your Containers too!
39
Buildah: build images without root priviledges
Figure 8: Buildah 40
Kubernetes Pipeline
41
8 DevOps Culture and Practice
DevOps Tools and Practices
DevOps: People, Processes and Tools working together to bring continuous delivery
of value to clients.
Continuous integration/Continuous delivery
• Continuous Integration: merging changes to the main branch as often as possible.
Running automated builds and tests against the build.
• Continuous Delivery: making sure you can release new changes to customers quickly.
Automated release process to deploy your application.
• Continuous Deployment: every change that passes all stages of your pipeline is
released automatically.
Various tools and notifications (ex: Slack to report failed builds) can be integrated
as part of your DevOps toolchain.
42
Collaborate to continuously deliver
Figure 9: Practices to implement DevOps 43
Cultural Transformation
• Culture: Build trust and align your team with better communication and
transparency.
• Discover: Understand the problem domain and align on common goals.
• Think: Know your audience and meet its needs faster than the competition.
• Develop: Collaborate to build, continuously integrate and deliver high-quality code.
• Reason: Apply AI techniques so that you can make better decisions.
• Operate: Harness the power of the cloud to quickly get your minimum viable product
(MVP) into production, and monitor and manage your applications to a high degree of
quality and meet your service level agreements. Grow or shrink your resources
based on demand.
• Learn: Gain insights from your users as they interact with your application.
44
The Open Practice Library
Figure 10: openpracticelibrary.com: A
community-driven repository of practices and tools
An Outcome Delivery framework:
• Discovery - generate the Outcomes
• Options - identify how to get there
• Delivery - implement and put ideas to the
test. Learn what works and what doesn’t.
45
The Open Practice Library - Discovery
Figure 11: What problems are you trying to solve, for whom and why? 46
The Open Practice Library - Options Pivot
Figure 12: What are the different options? What do you need to make this happen? 47
The Open Practice Library - Delivery
Figure 13: What was measured impact? What did you learn? 48
The Open Practice Library - Foundation
Figure 14: Creating a team culture 49
Visualize your Pipeline
Figure 15: Information Radiators and Visualization of Pipelines 50
Questions and Contact
Thank you!
Twitter: @CrivetiMihai
LinkedIn: https://www.linkedin.com/in/crivetimihai/
GitHub: crivetimihai
Ansible Galaxy: https://galaxy.ansible.com/crivetimihai
All presentations: https://kubernetes-native.github.io/k8s-workshop/docs/
Ask me about jobs at IBM
51

Mais conteúdo relacionado

Mais procurados

You Want to Kubernetes? You MUST Know Containers!
You Want to Kubernetes? You MUST Know Containers!You Want to Kubernetes? You MUST Know Containers!
You Want to Kubernetes? You MUST Know Containers!VMware Tanzu
 
Analyze This! CloudBees Jenkins Cluster Operations and Analytics
Analyze This! CloudBees Jenkins Cluster Operations and AnalyticsAnalyze This! CloudBees Jenkins Cluster Operations and Analytics
Analyze This! CloudBees Jenkins Cluster Operations and AnalyticsCloudBees
 
Webinar: High velocity deployment with google cloud and weave cloud
Webinar: High velocity deployment with google cloud and weave cloudWebinar: High velocity deployment with google cloud and weave cloud
Webinar: High velocity deployment with google cloud and weave cloudWeaveworks
 
2016 - Continuously Delivering Microservices in Kubernetes using Jenkins
2016 - Continuously Delivering Microservices in Kubernetes using Jenkins2016 - Continuously Delivering Microservices in Kubernetes using Jenkins
2016 - Continuously Delivering Microservices in Kubernetes using Jenkinsdevopsdaysaustin
 
Git and GitHub for Documentation
Git and GitHub for DocumentationGit and GitHub for Documentation
Git and GitHub for DocumentationAnne Gentle
 
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison DowdneySetting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison DowdneyWeaveworks
 
Cloud Native Apps with GitOps
Cloud Native Apps with GitOps Cloud Native Apps with GitOps
Cloud Native Apps with GitOps Weaveworks
 
Automated Image Builds in OpenShift and Kubernetes
Automated Image Builds in OpenShift and KubernetesAutomated Image Builds in OpenShift and Kubernetes
Automated Image Builds in OpenShift and KubernetesGraham Dumpleton
 
Continuous Delivery with Jenkins Workflow
Continuous Delivery with Jenkins WorkflowContinuous Delivery with Jenkins Workflow
Continuous Delivery with Jenkins WorkflowUdaypal Aarkoti
 
Cloud Native CI/CD with Jenkins X and Knative Pipelines
Cloud Native CI/CD with Jenkins X and Knative PipelinesCloud Native CI/CD with Jenkins X and Knative Pipelines
Cloud Native CI/CD with Jenkins X and Knative PipelinesC4Media
 
Jenkins vs. AWS CodePipeline
Jenkins vs. AWS CodePipelineJenkins vs. AWS CodePipeline
Jenkins vs. AWS CodePipelineSteffen Gebert
 
DevOps with OpenShift - Fabien Dupont - ManageIQ Design Summit 2016
DevOps with OpenShift - Fabien Dupont - ManageIQ Design Summit 2016DevOps with OpenShift - Fabien Dupont - ManageIQ Design Summit 2016
DevOps with OpenShift - Fabien Dupont - ManageIQ Design Summit 2016ManageIQ
 
Gitlab Training with GIT and SourceTree
Gitlab Training with GIT and SourceTreeGitlab Training with GIT and SourceTree
Gitlab Training with GIT and SourceTreeTeerapat Khunpech
 
Javaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with JenkinsJavaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with JenkinsAndy Pemberton
 
Cloud foundry history
Cloud foundry historyCloud foundry history
Cloud foundry historyHristo Iliev
 
Continuous Delivery with Jenkins and Wildfly (2014)
Continuous Delivery with Jenkins and Wildfly (2014)Continuous Delivery with Jenkins and Wildfly (2014)
Continuous Delivery with Jenkins and Wildfly (2014)Tracy Kennedy
 
DCEU 18: Continuous Delivery with Docker Containers and Java: The Good, the B...
DCEU 18: Continuous Delivery with Docker Containers and Java: The Good, the B...DCEU 18: Continuous Delivery with Docker Containers and Java: The Good, the B...
DCEU 18: Continuous Delivery with Docker Containers and Java: The Good, the B...Docker, Inc.
 
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment ModelUsing Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment ModelDocker, Inc.
 
CI/CD Pipeline mit Gitlab CI und Kubernetes
CI/CD Pipeline mit Gitlab CI und KubernetesCI/CD Pipeline mit Gitlab CI und Kubernetes
CI/CD Pipeline mit Gitlab CI und Kubernetesinovex GmbH
 

Mais procurados (20)

You Want to Kubernetes? You MUST Know Containers!
You Want to Kubernetes? You MUST Know Containers!You Want to Kubernetes? You MUST Know Containers!
You Want to Kubernetes? You MUST Know Containers!
 
Analyze This! CloudBees Jenkins Cluster Operations and Analytics
Analyze This! CloudBees Jenkins Cluster Operations and AnalyticsAnalyze This! CloudBees Jenkins Cluster Operations and Analytics
Analyze This! CloudBees Jenkins Cluster Operations and Analytics
 
Webinar: High velocity deployment with google cloud and weave cloud
Webinar: High velocity deployment with google cloud and weave cloudWebinar: High velocity deployment with google cloud and weave cloud
Webinar: High velocity deployment with google cloud and weave cloud
 
2016 - Continuously Delivering Microservices in Kubernetes using Jenkins
2016 - Continuously Delivering Microservices in Kubernetes using Jenkins2016 - Continuously Delivering Microservices in Kubernetes using Jenkins
2016 - Continuously Delivering Microservices in Kubernetes using Jenkins
 
Git and GitHub for Documentation
Git and GitHub for DocumentationGit and GitHub for Documentation
Git and GitHub for Documentation
 
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison DowdneySetting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
 
Cloud Native Apps with GitOps
Cloud Native Apps with GitOps Cloud Native Apps with GitOps
Cloud Native Apps with GitOps
 
Automated Image Builds in OpenShift and Kubernetes
Automated Image Builds in OpenShift and KubernetesAutomated Image Builds in OpenShift and Kubernetes
Automated Image Builds in OpenShift and Kubernetes
 
Continuous Delivery with Jenkins Workflow
Continuous Delivery with Jenkins WorkflowContinuous Delivery with Jenkins Workflow
Continuous Delivery with Jenkins Workflow
 
Cloud Native CI/CD with Jenkins X and Knative Pipelines
Cloud Native CI/CD with Jenkins X and Knative PipelinesCloud Native CI/CD with Jenkins X and Knative Pipelines
Cloud Native CI/CD with Jenkins X and Knative Pipelines
 
Jenkins vs. AWS CodePipeline
Jenkins vs. AWS CodePipelineJenkins vs. AWS CodePipeline
Jenkins vs. AWS CodePipeline
 
DevOps with OpenShift - Fabien Dupont - ManageIQ Design Summit 2016
DevOps with OpenShift - Fabien Dupont - ManageIQ Design Summit 2016DevOps with OpenShift - Fabien Dupont - ManageIQ Design Summit 2016
DevOps with OpenShift - Fabien Dupont - ManageIQ Design Summit 2016
 
Gitlab Training with GIT and SourceTree
Gitlab Training with GIT and SourceTreeGitlab Training with GIT and SourceTree
Gitlab Training with GIT and SourceTree
 
Javaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with JenkinsJavaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with Jenkins
 
Cloud foundry history
Cloud foundry historyCloud foundry history
Cloud foundry history
 
Continuous Delivery with Jenkins and Wildfly (2014)
Continuous Delivery with Jenkins and Wildfly (2014)Continuous Delivery with Jenkins and Wildfly (2014)
Continuous Delivery with Jenkins and Wildfly (2014)
 
DCEU 18: Continuous Delivery with Docker Containers and Java: The Good, the B...
DCEU 18: Continuous Delivery with Docker Containers and Java: The Good, the B...DCEU 18: Continuous Delivery with Docker Containers and Java: The Good, the B...
DCEU 18: Continuous Delivery with Docker Containers and Java: The Good, the B...
 
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment ModelUsing Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
 
JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...
JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...
JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...
 
CI/CD Pipeline mit Gitlab CI und Kubernetes
CI/CD Pipeline mit Gitlab CI und KubernetesCI/CD Pipeline mit Gitlab CI und Kubernetes
CI/CD Pipeline mit Gitlab CI und Kubernetes
 

Semelhante a Mihai Criveti - PyCon Ireland - Automate Everything

ShipItCon - Continuous Deployment and Multicloud with Ansible and Kubernetes
ShipItCon - Continuous Deployment and Multicloud with Ansible and KubernetesShipItCon - Continuous Deployment and Multicloud with Ansible and Kubernetes
ShipItCon - Continuous Deployment and Multicloud with Ansible and KubernetesMihai Criveti
 
Build containerized application using Docker and Azure.pdf
Build containerized application using Docker and Azure.pdfBuild containerized application using Docker and Azure.pdf
Build containerized application using Docker and Azure.pdfHamida Rebai Trabelsi
 
Ansible Workshop for Pythonistas
Ansible Workshop for PythonistasAnsible Workshop for Pythonistas
Ansible Workshop for PythonistasMihai Criveti
 
Rome .NET Conference 2024 - Remote Conference
Rome .NET Conference 2024  - Remote ConferenceRome .NET Conference 2024  - Remote Conference
Rome .NET Conference 2024 - Remote ConferenceHamida Rebai Trabelsi
 
DevOps Workflow: A Tutorial on Linux Containers
DevOps Workflow: A Tutorial on Linux ContainersDevOps Workflow: A Tutorial on Linux Containers
DevOps Workflow: A Tutorial on Linux Containersinside-BigData.com
 
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...Docker, Inc.
 
Red Hat Forum Benelux 2015
Red Hat Forum Benelux 2015Red Hat Forum Benelux 2015
Red Hat Forum Benelux 2015Microsoft
 
OpenShift Build Pipelines @ Lightweight Java User Group Meetup
OpenShift Build Pipelines @ Lightweight Java User Group MeetupOpenShift Build Pipelines @ Lightweight Java User Group Meetup
OpenShift Build Pipelines @ Lightweight Java User Group MeetupTobias Schneck
 
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...Ambassador Labs
 
Kubernetes Story - Day 2: Quay.io Container Registry for Publishing, Building...
Kubernetes Story - Day 2: Quay.io Container Registry for Publishing, Building...Kubernetes Story - Day 2: Quay.io Container Registry for Publishing, Building...
Kubernetes Story - Day 2: Quay.io Container Registry for Publishing, Building...Mihai Criveti
 
2015 DockerCon Using Docker in production at bity.com
2015 DockerCon Using Docker in production at bity.com2015 DockerCon Using Docker in production at bity.com
2015 DockerCon Using Docker in production at bity.comMathieu Buffenoir
 
DockerCon EU 2015: Trading Bitcoin with Docker
DockerCon EU 2015: Trading Bitcoin with DockerDockerCon EU 2015: Trading Bitcoin with Docker
DockerCon EU 2015: Trading Bitcoin with DockerDocker, Inc.
 
Docker containers & the Future of Drupal testing
Docker containers & the Future of Drupal testing Docker containers & the Future of Drupal testing
Docker containers & the Future of Drupal testing Ricardo Amaro
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDocker, Inc.
 
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Ambassador Labs
 
Docker Indy Meetup - An Opinionated View of Building Docker Images and Pipelines
Docker Indy Meetup - An Opinionated View of Building Docker Images and PipelinesDocker Indy Meetup - An Opinionated View of Building Docker Images and Pipelines
Docker Indy Meetup - An Opinionated View of Building Docker Images and PipelinesMatt Bentley
 
Exploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in PythonExploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in PythonIvan Ma
 
Serverless Container with Source2Image
Serverless Container with Source2ImageServerless Container with Source2Image
Serverless Container with Source2ImageQAware GmbH
 
Serverless containers … with source-to-image
Serverless containers  … with source-to-imageServerless containers  … with source-to-image
Serverless containers … with source-to-imageJosef Adersberger
 

Semelhante a Mihai Criveti - PyCon Ireland - Automate Everything (20)

ShipItCon - Continuous Deployment and Multicloud with Ansible and Kubernetes
ShipItCon - Continuous Deployment and Multicloud with Ansible and KubernetesShipItCon - Continuous Deployment and Multicloud with Ansible and Kubernetes
ShipItCon - Continuous Deployment and Multicloud with Ansible and Kubernetes
 
Build containerized application using Docker and Azure.pdf
Build containerized application using Docker and Azure.pdfBuild containerized application using Docker and Azure.pdf
Build containerized application using Docker and Azure.pdf
 
Ansible Workshop for Pythonistas
Ansible Workshop for PythonistasAnsible Workshop for Pythonistas
Ansible Workshop for Pythonistas
 
Rome .NET Conference 2024 - Remote Conference
Rome .NET Conference 2024  - Remote ConferenceRome .NET Conference 2024  - Remote Conference
Rome .NET Conference 2024 - Remote Conference
 
DevOps Workflow: A Tutorial on Linux Containers
DevOps Workflow: A Tutorial on Linux ContainersDevOps Workflow: A Tutorial on Linux Containers
DevOps Workflow: A Tutorial on Linux Containers
 
Microservices in Java
Microservices in JavaMicroservices in Java
Microservices in Java
 
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...
 
Red Hat Forum Benelux 2015
Red Hat Forum Benelux 2015Red Hat Forum Benelux 2015
Red Hat Forum Benelux 2015
 
OpenShift Build Pipelines @ Lightweight Java User Group Meetup
OpenShift Build Pipelines @ Lightweight Java User Group MeetupOpenShift Build Pipelines @ Lightweight Java User Group Meetup
OpenShift Build Pipelines @ Lightweight Java User Group Meetup
 
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
 
Kubernetes Story - Day 2: Quay.io Container Registry for Publishing, Building...
Kubernetes Story - Day 2: Quay.io Container Registry for Publishing, Building...Kubernetes Story - Day 2: Quay.io Container Registry for Publishing, Building...
Kubernetes Story - Day 2: Quay.io Container Registry for Publishing, Building...
 
2015 DockerCon Using Docker in production at bity.com
2015 DockerCon Using Docker in production at bity.com2015 DockerCon Using Docker in production at bity.com
2015 DockerCon Using Docker in production at bity.com
 
DockerCon EU 2015: Trading Bitcoin with Docker
DockerCon EU 2015: Trading Bitcoin with DockerDockerCon EU 2015: Trading Bitcoin with Docker
DockerCon EU 2015: Trading Bitcoin with Docker
 
Docker containers & the Future of Drupal testing
Docker containers & the Future of Drupal testing Docker containers & the Future of Drupal testing
Docker containers & the Future of Drupal testing
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development Pipeline
 
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
 
Docker Indy Meetup - An Opinionated View of Building Docker Images and Pipelines
Docker Indy Meetup - An Opinionated View of Building Docker Images and PipelinesDocker Indy Meetup - An Opinionated View of Building Docker Images and Pipelines
Docker Indy Meetup - An Opinionated View of Building Docker Images and Pipelines
 
Exploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in PythonExploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in Python
 
Serverless Container with Source2Image
Serverless Container with Source2ImageServerless Container with Source2Image
Serverless Container with Source2Image
 
Serverless containers … with source-to-image
Serverless containers  … with source-to-imageServerless containers  … with source-to-image
Serverless containers … with source-to-image
 

Mais de Mihai Criveti

10 Limitations of Large Language Models and Mitigation Options
10 Limitations of Large Language Models and Mitigation Options10 Limitations of Large Language Models and Mitigation Options
10 Limitations of Large Language Models and Mitigation OptionsMihai Criveti
 
Retrieval Augmented Generation in Practice: Scalable GenAI platforms with k8s...
Retrieval Augmented Generation in Practice: Scalable GenAI platforms with k8s...Retrieval Augmented Generation in Practice: Scalable GenAI platforms with k8s...
Retrieval Augmented Generation in Practice: Scalable GenAI platforms with k8s...Mihai Criveti
 
Data Science at Scale - The DevOps Approach
Data Science at Scale - The DevOps ApproachData Science at Scale - The DevOps Approach
Data Science at Scale - The DevOps ApproachMihai Criveti
 
DevOps for Data Engineers - Automate Your Data Science Pipeline with Ansible,...
DevOps for Data Engineers - Automate Your Data Science Pipeline with Ansible,...DevOps for Data Engineers - Automate Your Data Science Pipeline with Ansible,...
DevOps for Data Engineers - Automate Your Data Science Pipeline with Ansible,...Mihai Criveti
 
Kubernetes Story - Day 3: Deploying and Scaling Applications on OpenShift
Kubernetes Story - Day 3: Deploying and Scaling Applications on OpenShiftKubernetes Story - Day 3: Deploying and Scaling Applications on OpenShift
Kubernetes Story - Day 3: Deploying and Scaling Applications on OpenShiftMihai Criveti
 
Kubernetes Story - Day 1: Build and Manage Containers with Podman
Kubernetes Story - Day 1: Build and Manage Containers with PodmanKubernetes Story - Day 1: Build and Manage Containers with Podman
Kubernetes Story - Day 1: Build and Manage Containers with PodmanMihai Criveti
 
Container Technologies and Transformational value
Container Technologies and Transformational valueContainer Technologies and Transformational value
Container Technologies and Transformational valueMihai Criveti
 
OpenShift Commons - Adopting Podman, Skopeo and Buildah for Building and Mana...
OpenShift Commons - Adopting Podman, Skopeo and Buildah for Building and Mana...OpenShift Commons - Adopting Podman, Skopeo and Buildah for Building and Mana...
OpenShift Commons - Adopting Podman, Skopeo and Buildah for Building and Mana...Mihai Criveti
 

Mais de Mihai Criveti (8)

10 Limitations of Large Language Models and Mitigation Options
10 Limitations of Large Language Models and Mitigation Options10 Limitations of Large Language Models and Mitigation Options
10 Limitations of Large Language Models and Mitigation Options
 
Retrieval Augmented Generation in Practice: Scalable GenAI platforms with k8s...
Retrieval Augmented Generation in Practice: Scalable GenAI platforms with k8s...Retrieval Augmented Generation in Practice: Scalable GenAI platforms with k8s...
Retrieval Augmented Generation in Practice: Scalable GenAI platforms with k8s...
 
Data Science at Scale - The DevOps Approach
Data Science at Scale - The DevOps ApproachData Science at Scale - The DevOps Approach
Data Science at Scale - The DevOps Approach
 
DevOps for Data Engineers - Automate Your Data Science Pipeline with Ansible,...
DevOps for Data Engineers - Automate Your Data Science Pipeline with Ansible,...DevOps for Data Engineers - Automate Your Data Science Pipeline with Ansible,...
DevOps for Data Engineers - Automate Your Data Science Pipeline with Ansible,...
 
Kubernetes Story - Day 3: Deploying and Scaling Applications on OpenShift
Kubernetes Story - Day 3: Deploying and Scaling Applications on OpenShiftKubernetes Story - Day 3: Deploying and Scaling Applications on OpenShift
Kubernetes Story - Day 3: Deploying and Scaling Applications on OpenShift
 
Kubernetes Story - Day 1: Build and Manage Containers with Podman
Kubernetes Story - Day 1: Build and Manage Containers with PodmanKubernetes Story - Day 1: Build and Manage Containers with Podman
Kubernetes Story - Day 1: Build and Manage Containers with Podman
 
Container Technologies and Transformational value
Container Technologies and Transformational valueContainer Technologies and Transformational value
Container Technologies and Transformational value
 
OpenShift Commons - Adopting Podman, Skopeo and Buildah for Building and Mana...
OpenShift Commons - Adopting Podman, Skopeo and Buildah for Building and Mana...OpenShift Commons - Adopting Podman, Skopeo and Buildah for Building and Mana...
OpenShift Commons - Adopting Podman, Skopeo and Buildah for Building and Mana...
 

Último

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 

Último (20)

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 

Mihai Criveti - PyCon Ireland - Automate Everything

  • 1. Slice of DevOps - Automate Everything Packer, Ansible, OpenSCAP, Vagrant and Kubernetes Mihai Criveti, Cloud Native Competency Leader at IBM October 12, 2019 1
  • 2. 1 Packer: Image Build Automation 2 OpenSCAP: Automate Security Baselines 3 Ansible: Provisioning and Configuration Management 4 Molecule: Test your Ansible Playbooks on Docker, Vagrant or Cloud 5 Vagrant: Test images with vagrant 6 Package Python Applications with setuptools 7 Kubernetes: Container Orchestration at Scale 8 DevOps Culture and Practice 2
  • 3. Introduction Mihai Criveti, IBM Cloud Solutions • Cloud Native & Red Hat Solutions Leader • Builds multi-cloud environments for large customers • Migrating his current build environment to cloud Base OS Image Automation • Build OS master golden images using Packer and Ansible • Automate your image pipeline using CI/CD with Jenkins • Continuous Compliance with OpenSCAP This talk is not affiliated with my employer • This talk reflects personal opinions and projects 3
  • 4. Example Workflow: Build, Secure and Test Images for Multiple Environments 0. GitHub / GitLab: Configuration & Infrastructure as Code 1. Packer & OpenSCAP: build secure virtual and cloud images 2. Ansible & Molecule: configuration management & testing 3. Jenkins / Travis: setup CI/CD pipelines 4. Vagrant Cloud: publish your images 5. Python Setuptools: Package your Code 6. Black, Yapf, SonarQube, Bandit: Static Analysis 7. Kubernetes, Helm, OpenShift: deploy your application 4
  • 5. 1 Packer: Image Build Automation
  • 6. Packer: build multiple images from a single source 5
  • 7. Packer: Variables Variables to parametrized builds and hide secrets { "variables": { "my_secret": "{{env `MY_SECRET`}}", "not_a_secret": "plaintext", "foo": "bar" }, "sensitive-variables": ["my_secret", "foo"], } 6
  • 8. Packer: Builders Virtualbox builder with kickstart grub prompt "builders": [ { "type": "virtualbox-iso", "boot_command": [ "<up><wait><tab>", " text inst.ks= http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `vm_name`}}.cfg", "<enter><wait>" ]}], 7
  • 9. Provisioners: run post-install tasks Chaining multiple provisioners "provisioners": [ { "type": "shell", "script": "setup.sh" }, { "type": "ansible", "playbook_file": "{{user `playbook_file`}}" }], 8
  • 10. Post-processors: compress or upload your image Compress, post-process and upload the results { "post-processors": [ { "type": "compress", "format": "tar.gz" }, { "type": "upload", "endpoint": "http://example.com" } ] } 9
  • 11. Building a VirtualBox image for RHEL 8 using Kickstart 10
  • 12. 2 OpenSCAP: Automate Security Baselines
  • 14. Automatic Remediation as shell, ansible or puppet 12
  • 15. Continuous Inspection and Automated Compliance Install OpenSCAP dnf install openscap-scanner Generate a report sudo oscap xccdf eval --report report.html --profile xccdf_org.ssgproject.content_profile_pci-dss /usr/share/xml/scap/ssg/content/ssg-rhel7-ds.xml 13
  • 16. 3 Ansible: Provisioning and Configuration Management
  • 17. Application Deployment, Configuration Management, Continuous Delivery Figure 1: Ansible Overview 14
  • 18. What can I do with Ansible? Figure 2: Ansible Features 15
  • 19. Ansible Supports Technologies You Use Today Figure 3: Ansible Technologies 16
  • 20. Ansible Overview Figure 4: Ansible Overview 17
  • 21. Ansible Tower Figure 5: Ansible Tower 18
  • 22. Ansible for Enterprise: Architecture 19
  • 23. Getting Started with Ansible Install ansible from pip pip install ansible Running ad-hoc commands ansible -m setup localhost localhost | SUCCESS => { "ansible_facts": { "ansible_all_ipv4_addresses": [ "172.18.0.1", "172.19.0.1", "172.17.0.1", "141.125.85.138", "10.196.49.9", "192.168.122.1" 20
  • 24. Getting Help Search for an appropriate module (~3000 existing) and get help ansible-doc -l | grep pip Using the examples section ansible-doc pip # Install (Bottle) into the specified (virtualenv), using Python 2.7 - pip: name: bottle virtualenv: /my_app/venv virtualenv_command: virtualenv-2.7 21
  • 25. Using ansible-doc snippet ansible-doc -s pip - name: Manages Python library dependencies pip: chdir: # cd into this directory editable: # Pass the editable flag. executable: # The explicit executable or a pathname extra_args: # Extra arguments passed to pip. name: # Python library to install or the url requirements: # The path to a pip requirements file state: # absent, forcereinstall, latest, present 22
  • 26. Ansible Playbooks Run ansible: ansible-playbook -i localhost, playbook.yml playbook.yml - hosts: all connection: local become: yes gather_facts: yes roles: - role: kvm 23
  • 27. What’s inside a playbook? tasks/install.yml - name: install RedHat packages package: name: "{{ redhat_packages }}" state: present become: yes vars/main.yml redhat_packages: - policycoreutils-python-utils - qemu-kvm - qemu-img 24
  • 28. 4 Molecule: Test your Ansible Playbooks on Docker, Vagrant or Cloud
  • 29. Ansible Molecule Creating a vagrant or docker machine and trigger goss tests: molecule create -s vagrant-centos-7 molecule converge -s vagrant-centos-7 molecule login In one step molecule test Another OS: molecule create -s docker-ubuntu-18.04 25
  • 30. Inside Molecule molecule.yml with Fedora 30 running on Docker driver: name: docker provider: name: docker lint: name: yamllint platforms: - name: pandoc-fedora-30 image: fedora:30 dockerfile: ../resources/Dockerfile.j2 provisioner: name: ansible 26
  • 31. Molecule Cookie Cutter Templates Cookiecutter: Better Project Templates • Cookiecutter creates projects from project templates, e.g. Ansible role structure, with molecule tests. • Molecule provides a native cookiecutter interface, so developers can provide their own templates. Create a new role from a template, with molecule tests included molecule init template --url https://github.com/crivetimihai/ansible_cookiecutter.git --role-name httpd 27
  • 32. 5 Vagrant: Test images with vagrant
  • 33. Test images locally with Vagrant Run vagrant up on a Vagrantfile Vagrant.configure("2") do |config| config.vm.box = "centos-8-base" config.vm.hostname = "centos8.lab.local" config.vm.network "private_network", ip: "172.16.6.4" config.vm.provider "virtualbox" do |vb| vb.cpus = "2" vb.memory = "2048" vb.customize ["modifyvm", :id, "--vram", "256"] end end 28
  • 34. 6 Package Python Applications with setuptools
  • 35. Package python code with setuptools hello/init.py def hello(): return "Hello" setup.py from setuptools import setup setup(name=‘hello', version='0.1’, description=’My Package’, url='http://github.com/crivetimihai/hello’, author=‘Mihai Criveti’, license='MIT’, packages=[‘hello’], zip_safe=False) 29
  • 36. Python setuptools commands Create a source distribution python setup.py sdist Install python setup.py install Register with pypi python setup.py register Upload your package python setup.py sdist upload 30
  • 37. Moving to setup.cfg [metadata] name = hello version = 0.1.0 description = Hello World long_description = file: README.md, CHANGELOG.md, LICENSE.md long_description_content_type = text/markdown keywords = hello author = Mihai Criveti author_email = crivetimihai@gmail.com 31
  • 38. Integrating tests and coverage Integrate pytest, py-test-cov python setup.py test Automate testing with tox # tox.ini [tox] envlist=py35,py36,py37 [testenv] commands=py.test deps=pytest 32
  • 39. Continuous Integration with Travis .travis.yml language: python matrix: include: - python: 3.7 env: TOXENV=py37 install: pip install tox script: tox notifications: email: false 33
  • 40. Indenting code: Black and Yapf Indent code with black black -l 79 code.py …or yapf yapf --style google --style-help > ~/.style.yapf yapf --style google -i code.py 34
  • 41. Tools: what do we integrate? Static Analysis • Pycodestyle • Pylint • Pyflakes • Mypy • Pydocstyle Security • Bandit • SonarQube • Zap Scan • Arachni Test • tox • Coverage (pytest-cover) • Performance testing • Selenium Package • setuptools • Helm Charts Deploy (Dev/Test/Prod) • Ansible • Kubernetes 35
  • 42. Python Packaging: Cookiecutter Install and use cookiecutter templates: pip install cookiecutter cookiecutter https://github.com/audreyr/cookiecutter-pypackage Example output email [audreyr@example.com]: crivetimihai@gmail.com github_username [audreyr]: crivetimihai project_name [Python Boilerplate]: MyProject project_slug [myproject]: pypi_username [crivetimihai]: version [0.1.0]: use_pytest [n]: use_pypi_deployment_with_travis [y]: 36
  • 44. Kubernetes is Desired State Management 37
  • 46. Static Analysis and Vulnerability Checks Figure 7: Vulnerability Scanner: Check your Containers too! 39
  • 47. Buildah: build images without root priviledges Figure 8: Buildah 40
  • 49. 8 DevOps Culture and Practice
  • 50. DevOps Tools and Practices DevOps: People, Processes and Tools working together to bring continuous delivery of value to clients. Continuous integration/Continuous delivery • Continuous Integration: merging changes to the main branch as often as possible. Running automated builds and tests against the build. • Continuous Delivery: making sure you can release new changes to customers quickly. Automated release process to deploy your application. • Continuous Deployment: every change that passes all stages of your pipeline is released automatically. Various tools and notifications (ex: Slack to report failed builds) can be integrated as part of your DevOps toolchain. 42
  • 51. Collaborate to continuously deliver Figure 9: Practices to implement DevOps 43
  • 52. Cultural Transformation • Culture: Build trust and align your team with better communication and transparency. • Discover: Understand the problem domain and align on common goals. • Think: Know your audience and meet its needs faster than the competition. • Develop: Collaborate to build, continuously integrate and deliver high-quality code. • Reason: Apply AI techniques so that you can make better decisions. • Operate: Harness the power of the cloud to quickly get your minimum viable product (MVP) into production, and monitor and manage your applications to a high degree of quality and meet your service level agreements. Grow or shrink your resources based on demand. • Learn: Gain insights from your users as they interact with your application. 44
  • 53. The Open Practice Library Figure 10: openpracticelibrary.com: A community-driven repository of practices and tools An Outcome Delivery framework: • Discovery - generate the Outcomes • Options - identify how to get there • Delivery - implement and put ideas to the test. Learn what works and what doesn’t. 45
  • 54. The Open Practice Library - Discovery Figure 11: What problems are you trying to solve, for whom and why? 46
  • 55. The Open Practice Library - Options Pivot Figure 12: What are the different options? What do you need to make this happen? 47
  • 56. The Open Practice Library - Delivery Figure 13: What was measured impact? What did you learn? 48
  • 57. The Open Practice Library - Foundation Figure 14: Creating a team culture 49
  • 58. Visualize your Pipeline Figure 15: Information Radiators and Visualization of Pipelines 50
  • 59. Questions and Contact Thank you! Twitter: @CrivetiMihai LinkedIn: https://www.linkedin.com/in/crivetimihai/ GitHub: crivetimihai Ansible Galaxy: https://galaxy.ansible.com/crivetimihai All presentations: https://kubernetes-native.github.io/k8s-workshop/docs/ Ask me about jobs at IBM 51