This repo contains playbooks to automate the setup of an Azure subscription in order to install a private OpenShift cluster.
- Install Azure.Azcollection, pay attention to python library requirements after collection install.
- Create an environment with Azure login informations:
export AZURE_SUBSCRIPTION_ID="redacted" export AZURE_CLIENT_ID="redacted" export AZURE_SECRET="redacted" export AZURE_TENANT="redacted"
- Alternatively, login with Azure CLI, ansible will reuse the credentials obtained.
- Configure
vars.yml
variable file - Run
setup.ansible.yml
playbook
The playbook will create
- one resource group
- one vnet
- two private subnets, one for masters node, one for worker nodes
- one (optional) Nat gateway that will be linked to master and worker subnets
- two security groups, one for the private master and worker subnets, one for the public subnet to allow to ssh to bastion host
Without Nat Gateway, master and worker subnets will not have direct internet access, a proxy can be added to the bastion host to simulate this use case as well.
A playbook is provided to teardown all the objects created: destroy.ansible.yml
.
A sample install-config.yaml
is provided as a reference.