05 - Ansible and Ansible Tower Introduction
05 - Ansible and Ansible Tower Introduction
Ansible Tower
Markus Koch
Partner Enablement Manager SAP
INSTALL; CONFIGURE - REPEAT
AUTOMATE
2
THE GOOD OLD DAYS...
System Admin
OS Image And yes, you can work
The Cloud in the same
Deploy Configured Baseline
old way...
System Admin
Configured Server
Security Baselining
Information
Assurance Approved Server
App Delivery Team
3
NOTHING ROUTINE SHOULD BE DONE MANUALLY
Security
Create Validation
Security
Baseline
Maintenance
Provision
push the button
App
Security
Delivery
Configure Manager
Team
Patch
report deploy
4
WHAT IS ANSIBLE AUTOMATION?
---
- name: install and start apache
hosts: web
become: yes
vars:
http_port: 80
5
24,000+ 950+ 400,000+
Stars on GitHub Ansible modules Downloads a month
6
WHY ANSIBLE?
No special coding skills needed Configuration management Uses OpenSSH & WinRM
Get productive quickly Orchestrate the app lifecycle More efficient & more secure
7
THE ANSIBLE WAY
Agentless support for all major OS Perfectly describe and document Every change can be made by
variants, physical, virtual, cloud and every aspect of your application Playbooks, ensuring everyone is on
network devices. environment. the same page.
Playbooks are plain-text. Treat them Capture all the servers 100% of the Every change can be made by
like code in your existing version time, regardless of infrastructure, Playbooks, ensuring everyone is on
control. location, etc. the same page.
8
WHAT CAN I DO WITH ANSIBLE?
Do this...
On these...
9
HOW ANSIBLE WORKS
CMDB
PUBLIC / PRIVATE
CLOUD
PUBLIC / PRIVATE
CLOUD
USERS
HOSTS
INVENTORY API
MODULES PLUGINS
ANSIBLE PLAYBOOK
NETWORK
DEVICES
10
PLAYBOOK EXAMPLE: INSTALL & CONFIGURE APACHE
---
- name: install and start apache
hosts: all
vars:
http_port: 80
max_clients: 200
become_user: root
tasks:
- name: install httpd
yum: pkg=httpd state=latest
- name: write the apache config file
template: src=/https/www.scribd.com/srv/httpd.j2 dest=/etc/httpd.conf
- name: start httpd
service: name=httpd state=running
11
PLAYBOOK EXAMPLE: AWS CLOUD DEPLOYMENT
- hosts: localhost
connection: local
gather_facts: False
tasks:
- name: Provision a set of instances
ec2:
key_name: my_key
group: test
instance_type: t2.micro
image: "{{ ami_id }}"
wait: true
exact_count: 5
count_tag:
Name: Demo
instance_tags:
Name: Demo
register: ec2
12
PLAYBOOK EXAMPLE: AWS CLOUD DEPLOYMENT
- hosts: ec2hosts
name: configuration play
user: ec2-user
gather_facts: true
tasks:
- name: Check NTP service
service:
name: ntpd
state: started
13
SAP HANA DEPLOYMENT WITH ANSIBLE
yum install @base xfsprogs libaio net-tools bind-utils gtk2 libicu xulrunner tcsh
sudo libssh2 expect cairo graphviz iptraf-ng krb5-workstation krb5-libs libpng12
ntp ntpdate nfs-utils lm_sensors rsyslog openssl098e openssl
PackageKit-gtk3-module libcanberra-gtk2 libtool-ltdl xorg-x11-xauth numactl
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=permissive/' /etc/selinux/config
sestatus
...
handlers:
- name: regenerate grub2 conf
shell: grub2-mkconfig -o /boot/grub2/grub.cfg
SAP HANA DEPLOYMENT WITH ANSIBLE
- name: create logical volumes - name: mount and make fstab entries
lvol: state=present vg=vg00 \ mount:
lv=lv_hana size=”100%FREE” name: "/hana"
fstype: xfs
- name: create filesystems opts: defaults
filesystem: passno: 4
dev: /dev/vg01/lv_hana src: "/dev/vg01/lv_hana"
fstype: xfs state: mounted
force: no
ANSIBLE SHIPS WITH OVER 1250 MODULES
(THIS IS WHERE THE MAGIC HAPPENS)
VIRT AND
CLOUD WINDOWS NETWORK NOTIFY
CONTAINER
And more...
21
ANSIBLE GALAXY CONTAINS MANY READY TO USE ROLES
http://galaxy.ansible.com
22
HOW & WHERE TO GET ANSIBLE?
Install Ansible Engine on Red Hat Enterprise Linux 7 with any of the following methods:
If you have a Red Hat Ansible Engine Subscription, subscribe the system and enable
the Ansible Engine repository rhel-7-server-ansible-2.4-rpms.
If you are a RHEL only Customer enable the RHEL Extras repository. The Extras repo
release cycle may not update on the same cycle as the Ansible Engine repo.
https://access.redhat.com/articles/3174981
23
AUTOMATION FOR TEAMS
Ansible Tower technical introduction and overview
24
SIMPLE POWERFUL AGENTLESS
What is Missing?
25
CENTRAL INTEGRATION ACCESS
Central place for everyone Simple, powerful API Teams and users enable RBAC
Overview of present and past Uses REST for quick adoption Deposit credentials securely
Have one common view Integrate with everything Separate access and execution
26
WHAT IS ANSIBLE TOWER?
27
…. ANSIBLE CLI & CI SYSTEMS
ANSIBLE PLAYBOOKS
ADMINS
ROLE-BASED KNOWLEDGE SCHEDULED &
ANSIBLE ACCESS CONTROL & VISIBILITY CENTRALIZED JOBS
TOWER
SIMPLE USER INTERFACE TOWER API
USERS
TRANSPORT
USE
CASES
PROVISIONING CONFIGURATION APP CONTINUOUS SECURITY & ORCHESTRATION
MANAGEMENT DEPLOYMENT DELIVERY COMPLIANCE
28
ANSIBLE TOWER
29
ANSIBLE TOWER
ACTIVITY STREAM
30
ANSIBLE TOWER
SCALE-OUT CLUSTERING
31
ANSIBLE TOWER
SCHEDULE JOBS
32
ANSIBLE TOWER
33
ANSIBLE TOWER
SELF-SERVICE IT
34
ANSIBLE TOWER
35
ANSIBLE TOWER
MULTI-PLAYBOOK WORKFLOWS
36
ANSIBLE TOWER
INTEGRATED NOTIFICATIONS
37
Leverage Ansible from CloudForms
38
http://people.redhat.com/mkoch
39
THANK YOU
plus.google.com/+RedHat facebook.com/redhatinc
linkedin.com/company/red-hat twitter.com/RedHatNews
youtube.com/user/RedHatVideos