Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Automation Tear Down – Review IaaS, PaaS, and App Deploy Playbooks

Keith Resar
February 15, 2018

Automation Tear Down – Review IaaS, PaaS, and App Deploy Playbooks

Take a look at the actual code I've been building to provision a bunch of software. See the patterns used for individual tasks, some hairy variable and string manipulation, and how the roles are structured.

Delivered while wearing my bullet proof vest - much of this is likely not "pretty" - but we've got so many experts coming that the ensuing discussion will be awesome!

Keith Resar

February 15, 2018
Tweet

More Decks by Keith Resar

Other Decks in Technology

Transcript

  1. AUTOMATION TEAR DOWN ACTUAL CODE PATTERNS IN TASKS, HAIRY VARIABLE

    AND STRING MANIPULATION, AND ROLE STRUCTURES. THIS IS NOT SHOWING OFF "PRETTY" AUTOMATION, KEEP THE EXPERT DISCUSSION GOING. Keith Resar @KeithResar
  2. @KeithResar Keith Resar: Bio Wear many hats [email protected] Recovering Developer

    Open Source Contributor and Advocate Cloud Automation Engineer @KeithResar
  3. deploy.yml Pre-flight Check - name: Pre-flight checks hosts: localhost gather_facts:

    no tasks: - fail: msg: "Missing required parameter" when: deploy_id is not defined @KeithResar
  4. deploy.yml Provision - hosts: localhost tasks: - include_role: name: rhev_satellite_provision

    vars: instance_name: "ocp-{{ deploy_id }}-master" instance_count: 1 instance_cpu: 2 instance_disks: - size: 40GiB - size: 20GiB name: root name: docker@KeithResar
  5. deploy.yml Provision - hosts: localhost tasks: - include_role: name: rhev_satellite_provision

    vars: instance_name: "ocp-{{ deploy_id }}-master" instance_count: 1 instance_cpu: 2 instance_disks: - size: 40GiB - size: 20GiB name: root name: docker@KeithResar
  6. deploy.yml Provision # rhev_satellite_provision/tasks/main.yml - import_tasks: verify_inventory.yml - block: -

    import_tasks: satellite_provision.yml - import_tasks: rhev_configure.yml - import_tasks: satellite_wait_for_build.yml - meta: refresh_inventory when: to_build @KeithResar
  7. deploy.yml OpenShift Install # ocp_install_master/tasks/main.yml - include_tasks: set_aws_cluster_hostnames.yml - include_tasks:

    write_dns.yml - include_tasks: ready_master.yml - include_tasks: install.yml @KeithResar