This document discusses infrastructure as code (IaC) and how Ansible can be used to deploy OpenShift Container Platform (OCP) on Microsoft Azure. It provides context on the evolution of software development practices and how infrastructure is now treated as code. Ansible modules can provision Azure virtual machines and configure OCP. Molecule can test Ansible roles. The presentation demonstrates deploying OCP on Azure using Ansible playbooks and includes a demo.
8. Infrastructure is part of the Squad
DEV OPS
Development
Evolution
IaC Ansible OCP Azure DemoMolecule
9. ● Management of infrastructure
in a descriptive model using the
same versioning model as
source code
○ Virtual Machines
○ Networking
○ Storage
○ Etc.
Infrastructure as Code (IaC)
Development
Evolution
IaC Ansible OCP Azure DemoMolecule
15. Immutable Infrastructure
● Infrastructure paradigm in which servers are never modified after
they're deployed.
● If something needs to be updated, fixed, or modified in any way, new
servers built from a common image with the appropriate changes are
provisioned to replace the old ones.
● After they're validated, they're put into use and the old ones are
decommissioned.
Development
Evolution
IaC Ansible OCP Azure DemoMolecule
16. Benefits of Immutable Infrastructure
● The benefits of an immutable infrastructure include more consistency
and reliability in your infrastructure and a simpler, more predictable
deployment process.
● It mitigates or entirely prevents issues that are common in mutable
infrastructures, like configuration drift and snowflake servers.
● Includes comprehensive deployment automation, fast server
provisioning in a cloud computing environment, and solutions for
handling stateful or ephemeral data like logs.
Development
Evolution
IaC Ansible OCP Azure DemoMolecule
17. Molecule
● Provisions Azure Virtual Machines and necessary hardware
● Runs role against the new VMs
● Performs linting and code analysis
● Executes automated tests like Testinfra
● Destroys all provisioned hardware
Development
Evolution
IaC Ansible OCP Azure DemoMolecule
20. Openshift on Azure
● Resource groups
● Azure DNS
● Azure Virtual Networks
● Network Security
Groups
● Availability set
● Virtual Machines
● Load Balancer
● Storage Account
● Service Principal
Development
Evolution
IaC Ansible OCP Azure DemoMolecule
21. Ansible Deployment of OCP in Azure
Development
Evolution
IaC Ansible OCP Azure DemoMolecule
bootstrap.sh
host-preparationbastionopenshift-infra
configuration.yml
prerequisites deploy_cluster
22. Ansible Deployment of OCP in Azure
● Provision the Microsoft Azure Instances
● Configuration the Openshift Bastion
● Openshift Host preparation
● Deploy cluster of OpenShift
● Post deployment activities
Development
Evolution
IaC Ansible OCP Azure DemoMolecule
23. Ansible Deployment of OCP in Azure
Development
Evolution
IaC Ansible OCP Azure DemoMolecule