automation for everyone -...

37
AUTOMATION FOR EVERYONE Automating all the things across platforms - without the technical debt. Exclusively for Ecolab. Keith Resar Automation Architect [email protected] Mike Kohorst Account Executive [email protected]

Upload: others

Post on 11-Jun-2020

32 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

AUTOMATION FOR EVERYONEAutomating all the things across platforms - without the technical debt.Exclusively for Ecolab.

Keith ResarAutomation [email protected]

Mike KohorstAccount [email protected]

Page 2: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

AUTOMATION FOR EVERYONEAutomating all the things across platforms - without the technical debt.Exclusively for Truck People.

Keith ResarAutomation [email protected]

Page 3: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

AUTOMATE REPEAT IT

Page 4: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

WHAT IS ANSIBLE AUTOMATION?

Ansible Tower is an enterprise framework for controlling, securing and managing your Ansible automation with a UI and RESTful API.

Ansible is an open source community project sponsored by Red Hat. It’s a simple automation language that can perfectly describe IT application environments in Ansible Playbooks.

Page 5: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

2800+ Ansible modules

37,000+ Stars on GitHub

500,000+ Downloads a month

Page 6: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

SIMPLE POWERFUL AGENTLESS

App deployment

Configuration management

Workflow orchestration

Network automation

Orchestrate the app lifecycle

Human readable automation

No special coding skills needed

Tasks executed in order

Usable by every team

Get productive quickly

Agentless architecture

Uses OpenSSH & WinRM

No agents to exploit or update

Get started immediately

More efficient & more secure

WHY ANSIBLE?

Page 7: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

CROSS PLATFORM

Agentless support for all major OS variants, physical, virtual, cloud and network devices.

HUMAN READABLE

Perfectly describe and document every aspect of your application environment.

PERFECT DESCRIPTION OF APPLICATION

Every change can be made by Playbooks, ensuring everyone is on the same page.

VERSION CONTROLLED

Playbooks are plain-text. Treat them like code in your existing version control.

DYNAMIC INVENTORIES

Capture all the servers 100% of the time, regardless of infrastructure, location, etc.

ORCHESTRATION PLAYS WELL WITH OTHERS

Every change can be made by Playbooks, ensuring everyone is on the same page.

THE ANSIBLE WAY

Page 8: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

WHAT CAN I DO WITH ANSIBLE?

Automate the deployment and management of your entire IT footprint.

Orchestration

Do this...

Firewalls

Configuration Management

Application Deployment Provisioning Continuous

DeliverySecurity and Compliance

On these...

Load Balancers Applications Containers Clouds

Servers Infrastructure Storage And more...Network Devices

Page 9: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

WHY IS AUTOMATION IMPORTANT?

Your applications and systems are more than just collections of configurations. They’re a finely tuned and ordered list of tasks and processes that result in your working application. Ansible can automate across: • Provisioning

• App Deployment

• Configuration Management

• Multi-tier Orchestration

Page 10: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

ANSIBLE’S AUTOMATION ENGINE

CMDB

USERS

INVENTORYHOSTS

NETWORK DEVICES

PLUGINS

API

MODULES

PUBLIC / PRIVATECLOUD

PUBLIC / PRIVATECLOUD

ANSIBLE PLAYBOOK

ANSIBLE’S AUTOMATION ENGINE

CMDB

INVENTORYHOSTS

NETWORK DEVICES

PLUGINS

API

MODULES

PUBLIC / PRIVATECLOUD

PUBLIC / PRIVATECLOUD

USERS

ANSIBLE PLAYBOOK

PLAYBOOKS

• Written in YAML

• Tasks are executed sequentially

• Invokes Ansible modules

MODULES

• Tools in the toolkit

• Python, Powershell or

any language

• Extend Ansible simplicity

to entire stack

ANSIBLE’S AUTOMATION ENGINE

CMDB

INVENTORYHOSTS

NETWORK DEVICES

PLUGINS

API

PUBLIC / PRIVATECLOUD

PUBLIC / PRIVATECLOUD

USERS

ANSIBLE PLAYBOOK

MODULES

HOW ANSIBLE WORKS

CMDB PUBLIC / PRIVATE

CLOUD

PLUGINS

• Gears in the engine

• Python that plugs into the

core engine

• Adaptability for various uses

& platforms

USERS

ANSIBLE PLAYBOOK

ANSIBLE’S AUTOMATION ENGINE

HOSTS

NETWORK DEVICES

API

MODULES

PUBLIC / PRIVATECLOUD

INVENTORY

PLUGINS

USERS

ANSIBLE PLAYBOOK

[web]webserver1.example.comwebserver2.example.com

[db]dbserver1.example.com

ANSIBLE’S AUTOMATION ENGINE

CMDB

HOSTS

NETWORK DEVICES

PLUGINS

API

MODULES

PUBLIC / PRIVATECLOUD

PUBLIC / PRIVATECLOUD

INVENTORY

CLOUD

Satellite, VMware, EC2,

Rackspace, GCE, Azure,

Hanlon, Cobbler

CUSTOM CMDBUSERS

ANSIBLE PLAYBOOK

ANSIBLE’S AUTOMATION ENGINE

HOSTS

NETWORK DEVICES

PLUGINS

API

MODULES

PUBLIC / PRIVATECLOUD

INVENTORY

CMDB PUBLIC / PRIVATE

CLOUD

Page 11: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

ANSIBLETHE LANGUAGE OF DEVOPS

Page 12: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

PLAYBOOK EXAMPLE---

- name: install and start apache

hosts: web

become: yes

vars:

http_port: 80

tasks:

- name: httpd package is present

yum:

name: httpd

state: latest

- name: latest index.html file is present

copy:

src: files/index.html

dest: /var/www/html/

- name: httpd is started

service:

name: httpd

state: started

---

- name: install and start apache hosts: web

become: yes

vars:

http_port: 80

tasks:

- name: httpd package is present yum:

name: httpd

state: latest

- name: latest index.html file is present copy:

src: files/index.html

dest: /var/www/html/

- name: httpd is started service:

name: httpd

state: started

---

- name: install and start apache

hosts: web become: yes

vars:

http_port: 80

tasks:

- name: httpd package is present

yum:

name: httpd

state: latest

- name: latest index.html file is present

copy:

src: files/index.html

dest: /var/www/html/

- name: httpd is started

service:

name: httpd

state: started

---

- name: install and start apache

hosts: web

become: yes vars:

http_port: 80

tasks:

- name: httpd package is present

yum:

name: httpd

state: latest

- name: latest index.html file is present

copy:

src: files/index.html

dest: /var/www/html/

- name: httpd is started

service:

name: httpd

state: started

---

- name: install and start apache

hosts: web

become: yes

vars: http_port: 80

tasks:

- name: httpd package is present

yum:

name: httpd

state: latest

- name: latest index.html file is present

copy:

src: files/index.html

dest: /var/www/html/

- name: httpd is started

service:

name: httpd

state: started

---

- name: install and start apache

hosts: web

become: yes

vars:

http_port: 80

tasks:

- name: httpd package is present

yum: name: httpd state: latest

- name: latest index.html file is present

copy: src: files/index.html dest: /var/www/html/

- name: httpd is started

service: name: httpd

state: started

Page 13: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

CLOUD

SECURITY

NETWORK

DEVOPS

AWSAzure

CenturyLink

CloudScale

GoogleLinode

OpenStack

Rackspace

Docker Digital Ocean

PaloAlto

Check Point

Splunk

Snort

F5

AristaA10

Cumulus

Big Switch

Cisco

Dell

F5 JuniperPalo Alto

OpenSwitch

HipChat

IRC

Jabber

EmailRocketChat

Sendgrid

Slack

Twilio

INFRASTRUCTURERHEL

VMware

Windows

Netapp

Stacki

Page 14: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

CLOUD VIRT & CONTAINER WINDOWS NETWORK DEVOPS MONITORING

ANSIBLE AUTOMATES TECHNOLOGIES YOU USETime to automate is measured in minutes

AWSAzureDigital OceanGoogleOpenStackRackspace

DockerVMwareRHVOpenStackOpenShift

ACLsFilesPackagesIISRegeditsSharesServicesConfigsUsersDomains

AristaA10CumulusBigswitchCiscoCumulusDellF5JuniperPalo AltoOpenSwitch

JiraGitHubVagrantJenkinsBambooAtlassianSubversionSlackHipchat

DynatraceAirbrakeBigPandaDatadogLogicMonitorNagiosNew RelicPagerDutySensuStackDriverZabbix

STORAGENetAppRed Hat StorageInfinidat

OPERATING SYSTEMSRHEL and LinuxUNIXWindows

Page 15: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

docs.ansible.com

Page 16: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

570+ Networking Modules

40 Networking platforms

Use Ansible to manage, validate, and continuously track heterogeneous network device configurations and deployments.

Network modules are included as part of the Ansible distribution.

ANSIBLE NETWORK AUTOMATION

ansible.com/networking

Page 17: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

70+ Windows Modules

Use Ansible to deploy and manage Windows systems and applications.

ANSIBLE WINDOWS AUTOMATION

ansible.com/windows

350+ Powershell DSC

resources

Page 18: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

15,000 ROLES AT YOUR DISPOSAL

Reusable Roles and Container Apps that allow you to do more, faster

Built into the Ansible CLI and Tower

galaxy.ansible.com

Page 19: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

ENTERPRISE AUTOMATION JOB ENGINEAnsible Tower use cases for the newest release 3.5

Page 20: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

WHAT IS ANSIBLE TOWER?

• Role-based access control

• Deploy entire applications with push-button deployment access

• All automations are centrally logged

Ansible Tower is an enterprise framework for controlling, securing and managing your Ansible automation – with a UI and RESTful API.

Page 21: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

RED HAT ANSIBLE TOWER

RED HAT ANSIBLE ENGINE

Scale + operationalize your automation

Support for your Ansible automation

CONTROL KNOWLEDGE DELEGATION

SIMPLE POWERFUL AGENTLESS

FUELED BY AN INNOVATIVE OPEN SOURCE COMMUNITY

Page 22: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

Provision Apache

Pre-TasksIaaS provisionOS Hardening

Post-TasksTestingMonitoring

Page 23: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

Provision ApacheIaaS Harden Testing Monitor

Page 24: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

WORKFLOW EXAMPLE

Page 25: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

BRANCHING IN WORKFLOWS FOR PARALLEL EXECUTION

Page 26: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

WORKFLOW CONVERGENCE INTRODUCED IN 3.4

Page 27: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

CONSIDER WORKFLOW FAILURES

Page 28: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

FAILURE HANDLERS FOR ALL PATHS

Page 29: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

FAILURE HANDLERS FOR CONVERGENCE ARE AN “OR”

Page 30: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

CREATING “AND” LOGIC FOR CONVERGENCE FAILURE HANDLING

Page 31: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

---- hosts: localhost gather_facts: false

tasks: - name: "Get Workflow job id for which this job belongs" shell: tower-cli job get {{ job_id }} -f json | jq ".related.source_workflow_job" | sed 's/.*\///' register: workflow_job_id

- name: "Get Workflow node id for this job" uri: url: "{{ tower_base_url }}/workflow_job_nodes/?job_id={{ job_id }}" force_basic_auth: true user: "{{ tower_username }}" password: "{{ tower_password }}" register: result

- name: "Get parent workflow nodes for this workflow node" uri: url: "{{ tower_base_url }}/workflow_job_nodes/?success_nodes={{ result.json.results[0].id }}" force_basic_auth: true user: "{{ tower_username }}" password: "{{ tower_password }}" register: result

- name: "Fail this playbook if a parent node failed" fail: msg: "Parent workflow node {{ item }} failed" when: "item.summary_fields.job.status == 'failed'" loop: "{{ result.json.results }}"

Page 32: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms
Page 33: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms

Have you used Ansible already? Try Tower for free: ansible.com/tower-trial

Would you like to learn Ansible? It’s easy to get started: ansible.com/get-started

Want to learn more?

Videos, webinars, case studies, whitepapers: ansible.com/resources

GETTING STARTED

Page 34: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms
Page 35: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms
Page 36: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms
Page 37: AUTOMATION FOR EVERYONE - people.redhat.compeople.redhat.com/mskinner/MPC2019/Ansible-Technical...2019/06/11  · AUTOMATION FOR EVERYONE Automating all the things across platforms