Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

@KeithResar Keith Resar: Bio Wear many hats [email protected] Recovering Developer Open Source Contributor and Advocate Cloud Automation Engineer @KeithResar

Slide 3

Slide 3 text

> ansible-playbook deploy.yml \ -e deploy_id=b @KeithResar

Slide 4

Slide 4 text

Node Master OpenShift K8s Cluster Node ... @KeithResar

Slide 5

Slide 5 text

RHEV Hypervisor Satellite Ansible @KeithResar

Slide 6

Slide 6 text

RHEV Hypervisor VM VM ... Satellite Ansible @KeithResar

Slide 7

Slide 7 text

RHEV Hypervisor VM VM ... Satellite Ansible @KeithResar

Slide 8

Slide 8 text

RHEV Hypervisor VM VM ... Satellite Ansible @KeithResar

Slide 9

Slide 9 text

RHEV Hypervisor Satellite Ansible Node Master OpenShift K8s Cluster Node ... @KeithResar

Slide 10

Slide 10 text

RHEV Hypervisor Satellite Ansible Node Master OpenShift K8s Cluster Node ... DNS @KeithResar

Slide 11

Slide 11 text

Node Master OpenShift K8s Cluster Node ... @KeithResar

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

deploy.yml Pre-flight Check Provision Bootstrap OpenShift Install @KeithResar

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

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

Slide 16

Slide 16 text

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

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

RHEV Hypervisor VM VM ... Satellite Ansible @KeithResar

Slide 19

Slide 19 text

RHEV Hypervisor VM VM ... Satellite Ansible @KeithResar

Slide 20

Slide 20 text

deploy.yml Bootstrap - hosts: "ocp-{{ deploy_id }}-*.example.com" tags: prep roles: - host_prep - ocp_prep_common @KeithResar

Slide 21

Slide 21 text

deploy.yml Bootstrap # ocp_prep_common/tasks/main.yml - include_tasks: yum.yml - include_tasks: docker.yml - include_tasks: ssh.yml - include_tasks: hosts.yml @KeithResar

Slide 22

Slide 22 text

deploy.yml OpenShift Install - hosts: "ocp-{{ deploy_id }}-master1.example.com" tags: install roles: - ocp_install_master @KeithResar

Slide 23

Slide 23 text

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

Slide 24

Slide 24 text

> ansible-playbook \ -i /root/.config/openshift/hosts \ openshift/playbooks/config.yml @KeithResar

Slide 25

Slide 25 text

RESOURCES OPENSHIFT LAB DEPLOY PLAYBOOKS https://github.com/.../ansible-...-openshift-lab-deploy @KeithResar

Slide 26

Slide 26 text

@KeithResar @KeithResar THANKS!