Slide 1

Slide 1 text

Ansible AWX Jan-Piet Mens November 2017
 @jpmens the upstream project from which Tower is produced

Slide 2

Slide 2 text

@jpmens: consultant, author, architect, part-time admin, small-scale fiddler, created OwnTracks, loves DNS, plain text, and contributed to Ansible.

Slide 3

Slide 3 text

AWX project web-based user interface, REST API, and task engine built on top of Ansible https://github.com/ansible/awx

Slide 4

Slide 4 text

AWX ..?

Slide 5

Slide 5 text

why?

Slide 6

Slide 6 text

Ansible AWX

Slide 7

Slide 7 text

Features real-time playbook output, push-button deployment, Galaxy integration, authentication, projects/jobs/workflows, security, notifications, logging, scheduling

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

Authentication local data, social (Github, Google), enterprise (AD, SAML, RADIUS), LDAP, Kerberos

Slide 10

Slide 10 text

Security playbooks executed via awx user, run in namespaces/chroots, can’t access other data, RBAC

Slide 11

Slide 11 text

RBAC: Execute

Slide 12

Slide 12 text

Inventories comparable to Ansible inventory files, multiple, sync with AWS, GCE, Rackspace, custom scripts, inventory from SCM, smart inventory, imported

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

Projects / jobs collection of playbooks, on filesystem or SCM, sync with SCM, Job Templates, workflows link jobs

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

Jobs list

Slide 17

Slide 17 text

Workflow

Slide 18

Slide 18 text

Logging … detailed logging, management jobs { "cluster_host_id": "awx", "level": "INFO", "@timestamp": "2017-10-14T14:42:43.060Z", "host": "awx", "logger_name": "awx.main.scheduler", "message": "Submitting project_update 70 (waiting) to instance group 1.", "type": "logstash" }

Slide 19

Slide 19 text

… Logstash aggregator services (Splunk, Loggly, Sumologic, Elastic),

Slide 20

Slide 20 text

Notifiers e-mail Slack Twilio PagerDuty Hipchat IRC Webhook

Slide 21

Slide 21 text

credentials AWS, Google, machine, SCM, Vault, VMware, custom

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

{ "status": "successful", "credential": "ww-machines", "name": "t-job1", "started": "2017-10-14T13:34:30.06452 "extra_vars": "{\"poem\": \"Mary had "friendly_name": "Job", "created_by": "admin", "project": "demo-talk", "url": "https://towerhost/#/jobs/46", "finished": "2017-10-14T13:34:47.1608 "hosts": { "roo": { "skipped": 0, "ok": 3, "changed": 1, "dark": 0, "failed": false, "failures": 0 } }, "playbook": "touchem.yml", "id": 46, "inventory": "west-wing" } Webhooks

Slide 24

Slide 24 text

clustering redundancy, load-sharing, UI/API

Slide 25

Slide 25 text

REST API curl -H 'Content-type: application/json' \ -d '{"extra_vars":{"newpoem":"hello good world"}}' \ -u admin:password \ http://awx.example.net/api/v2/job_templates/t-job1/launch/ curl -H "Content-type: application/json" \ -d "$(jo username=jog1 first_name=Joanne last_name=Guest \ email=jog1@example.net password=sikret)” \ -u admin:password \ http://awx.example.net/api/v2/users/

Slide 26

Slide 26 text

tower-cli $ tower-cli job launch --job-template=t-job1 --> $EDITOR # Specify extra variables (if any) here as YAML. # Lines beginning with "#" denote comments. poem: Mary had something newpoem: which was as white as snow Resource changed. === ============ ======================== ======= ======= id job_template created status elapsed === ============ ======================== ======= ======= 152 8 2017-10-15T15:42:21.084Z pending 0.0 === ============ ======================== ======= ======= https://github.com/ansible/tower-cli/

Slide 27

Slide 27 text

provisioning callbacks initiate playbook run for host on host (cron, firstboot)

Slide 28

Slide 28 text

hooks and repositories

Slide 29

Slide 29 text

Installing AWX OpenShift / MiniShift Docker PostgreSQL https://github.com/ansible/awx/blob/devel/INSTALL.md

Slide 30

Slide 30 text

you own the parts

Slide 31

Slide 31 text

angry potato https://github.com/nanobeep/awx-logos fix

Slide 32

Slide 32 text

safer automation!