Get your Openshift OKD cluster up and running

People ask me how to do a simple OKD (Openshift) cluster setup, so here is my quick and dirty inventory file for 1 master and 2 nodes. Copy, modify where needed and have fun!


[OSEv3:children]
nodes
masters
nfs
etcd

[OSEv3:vars]
openshift_master_cluster_public_hostname=okdmaster.mcboek.local
openshift_master_default_subdomain=cloudapps.mcboek.local
ansible_ssh_user=root
openshift_master_cluster_hostname=None
openshift_override_hostname_check=true
deployment_type=origin
openshift_disable_check=disk_availability,memory_availability
containerized=true
openshift_use_etcd_system_container=True
# firewalld as firewall service
os_firewall_use_firewalld=True
# NFS for registry
openshift_hosted_registry_storage_kind=nfs
openshift_hosted_registry_storage_access_modes=[‘ReadWriteMany’]
openshift_hosted_registry_storage_nfs_directory=/exports
openshift_hosted_registry_storage_nfs_options=’*(rw,root_squash)’
openshift_hosted_registry_storage_volume_name=registry
openshift_hosted_registry_storage_volume_size=10Gi
# NFS for mtrics
openshift_metrics_install_metrics=true
openshift_metrics_storage_kind=nfs
openshift_metrics_storage_access_modes=[‘ReadWriteOnce’]
openshift_metrics_storage_nfs_directory=/exports
openshift_metrics_storage_nfs_options=’*(rw,root_squash)’
openshift_metrics_storage_volume_name=metrics
openshift_metrics_storage_volume_size=10Gi
openshift_enable_unsupported_configurations=True

# htpasswd auth
openshift_master_identity_providers=[{‘name’: ‘htpasswd_auth’, ‘login’: ‘true’, ‘challenge’: ‘true’, ‘kind’: ‘HTPasswdPasswordIdentityProvider’, ‘filename’: ‘/etc/origin/master/htpasswd’}]
# Defining htpasswd users
openshift_master_htpasswd_users={‘adm-username’: ‘password-hash-here’, ‘dev-username’: ‘password-hash-here’}
#openshift_master_htpasswd_file=<path to local pre-generated htpasswd file>

[nodes]
okdmaster1.mcboek.local openshift_public_ip=172.16.207.151 openshift_ip=172.16.207.151 openshift_public_hostname=okdmaster1.mcboek.local openshift_hostname=okdmaster1.mcboek.local openshift_hosted_registry_s
torage_kind=nfs openshift_schedulable=True openshift_node_group_name=’node-config-master-infra’ openshift_node_labels=”{‘region’:’infra’}”
okdnode1.mcboek.local openshift_public_ip=172.16.207.152 openshift_ip=172.16.207.152 openshift_public_hostname=okdnode1.mcboek.local openshift_hostname=okdnode1.mcboek.local openshift_node_labels=”{‘region’:
‘east’,’plan’: ‘infra’}” openshift_schedulable=True openshift_node_group_name=’node-config-compute’
okdnode2.mcboek.local openshift_public_ip=172.16.207.153 openshift_ip=172.16.207.153 openshift_public_hostname=okdnode2.mcboek.local openshift_hostname=okdnode2.mcboek.local openshift_node_labels=”{‘region’:
‘west’,’plan’: ‘dev’}” openshift_schedulable=True openshift_node_group_name=’node-config-compute’

[masters]
okdmaster1.mcboek.local openshift_public_ip=172.16.207.151 openshift_ip=172.16.207.151 openshift_public_hostname=okdmaster1.mcboek.local openshift_hostname=okdmaster1.mcboek.local openshift_hosted_registry_s
torage_kind=nfs

[nfs]
okdmaster1.mcboek.local openshift_public_ip=172.16.207.151 openshift_ip=172.16.207.151 openshift_public_hostname=okdmaster1.mcboek.local openshift_hostname=okdmaster1.mcboek.local openshift_hosted_registry_s
torage_kind=nfs

[etcd]
okdmaster1.mcboek.local openshift_public_ip=172.16.207.151 openshift_ip=172.16.207.151 openshift_public_hostname=okdmaster1.mcboek.local openshift_hostname=okdmaster1.mcboek.local openshift_hosted_registry_s
torage_kind=nfs

Rik has written 7 articles

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>