Skip to content

Instantly share code, notes, and snippets.

@dmc5179
Created August 19, 2019 20:51
Show Gist options
  • Save dmc5179/721abf20ac7f629d673f8fd1964ff1a9 to your computer and use it in GitHub Desktop.
Save dmc5179/721abf20ac7f629d673f8fd1964ff1a9 to your computer and use it in GitHub Desktop.
Sample ansible inventory for deploying a OCP 3.11 cluster on a single KVM host
# Create an OSEv3 group that contains the masters, nodes, and etcd groups
[OSEv3:children]
masters
nodes
etcd
glusterfs
# Set variables common for all OSEv3 hosts
[OSEv3:vars]
debug_level=4
public_ip_address=192.168.1.173
host_key_checking=false
# SSH user, this user should allow ssh based auth without requiring a password
ansible_connection=ssh
ansible_user=root
#ansible_become=yes
#ansible_become_method=sudo
#ansible_become_user=root
openshift_deployment_type=openshift-enterprise
oreg_url=registry.redhat.io/openshift3/ose-${component}:${version}
oreg_auth_user=
oreg_auth_password=
#openshift_docker_additional_registries=openshift-registry.combine.io:5000
openshift_use_crio=false
openshift_release=v3.11
openshift_pkg_version=-3.11.117
openshift_image_tag=v3.11.117
openshift_examples_modify_imagestreams=true
#openshift_docker_insecure_registries=openshift-registry.combine.io:5000
#openshift_disable_check=disk_availability
#openshift_disable_check=docker_storage
openshift_disable_check=disk_availability,memory_availability
# Enable htpasswd auth
#openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider'}]
#openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider', 'filename': '/etc/origin/master/htpasswd'}]
# htpasswd -nb admin admin
#openshift_master_htpasswd_users={'admin': '$apr1$QLLh7/dS$a5r3kgD9gg6PhcyXavGNm0'}
openshift_master_identity_providers=[{'name': 'allow_all', 'login': 'true', 'challenge': 'true', 'kind': 'AllowAllPasswordIdentityProvider'}]
#osm_etcd_image=openshift-registry.combine.io:5000/rhel7/etcd:3.2.22
os_sdn_network_plugin_name=redhat/openshift-ovs-subnet
# K8s Service catalog issue
openshift_master_etcd_urls=['https://ip-192-168-1-173.nip.io:2379']
#openshift_hostname=192.168.1.173
openshift_master_cluster_public_hostname=192.168.1.173
openshift_master_default_subdomain=ip-192-168-1-173.nip.io
#openshift_master_cluster_method=native
openshift_master_cluster_hostname=ip-192-168-1-173.nip.io
openshift_enable_service_catalog=false
# Enable template service broker (requires service catalog to be enabled, above)
template_service_broker_install=true
template_service_broker_selector={'node-role.kubernetes.io/infra': 'true'}
# Enable ansible service broker
ansible_service_broker_install=true
ansible_service_broker_node_selector={'node-role.kubernetes.io/infra': 'true'}
os_firewall_use_firewalld=true
# Enable cockpit
osm_use_cockpit=true
#
# Set cockpit plugins
osm_cockpit_plugins=['cockpit-kubernetes']
# default project node selector
osm_default_node_selector='node-role.kubernetes.io/compute=true'
#
# Router selector (optional)
# Router will only be created if nodes matching this label are present.
# Default value: 'node-role.kubernetes.io/infra=true'
openshift_hosted_router_selector='node-role.kubernetes.io/infra=true'
# By default metrics are not automatically deployed, set this to enable them
#openshift_metrics_install_metrics=true
# Logging deployment
#
# Currently logging deployment is disabled by default, enable it by setting this
#openshift_logging_install_logging=true
#
# Logging storage config
#
#openshift_logging_es_pvc_dynamic=true
#openshift_logging_es_pvc_size=10Gi
#openshift_logging_es_pvc_storage_class_name=glusterfs-storage-block
#
# Other Logging Options -- Common items you may wish to reconfigure, for the complete
# list of options please see roles/openshift_logging/README.md
#
#openshift_logging_es_nodeselector={'node-role.kubernetes.io/infra': 'true'}
#openshift_logging_curator_nodeselector={'node-role.kubernetes.io/infra': 'true'}
#openshift_logging_kibana_nodeselector={'node-role.kubernetes.io/infra': 'true'}
# Configure master API and console ports.
openshift_master_api_port=443
openshift_master_console_port=443
openshift_web_console_install=true
# default subdomain to use for exposed routes, you should have wildcard dns
# for *.apps.test.example.com that points at your infra nodes which will run
# your router
#openshift_master_default_subdomain=apps.combine.io
#Set cluster_hostname
#openshift_master_cluster_hostname=openshift-master.combine.io
# Setting for the MTU
openshift_node_sdn_mtu=8900
# OpenShift Storage Options
#
openshift_storage_glusterfs_storageclass=true
openshift_storage_glusterfs_storageclass_default=true
openshift_storage_glusterfs_block_deploy=true
openshift_storage_glusterfs_block_storageclass=true
openshift_storage_glusterfs_block_storageclass_default=false
openshift_storage_glusterfs_block_host_vol_size=15
# FIX for gluster and 3.11.latest - uncomment to use (and pass --dev to op.py)
# see: https://access.redhat.com/solutions/3949971
openshift_storage_glusterfs_image=registry.redhat.io/rhgs3/rhgs-server-rhel7:v3.11
openshift_storage_glusterfs_block_image=registry.redhat.io/rhgs3/rhgs-gluster-block-prov-rhel7:v3.11
openshift_storage_glusterfs_heketi_image=registry.redhat.io/rhgs3/rhgs-volmanager-rhel7:v3.11
#openshift_storage_glusterfs_is_native=false
#openshift_storage_glusterfs_heketi_is_native=true
#openshift_storage_glusterfs_heketi_executor=ssh
#openshift_storage_glusterfs_heketi_ssh_port=22
#openshift_storage_glusterfs_heketi_ssh_user=root
#openshift_storage_glusterfs_heketi_ssh_sudo=false
#openshift_storage_glusterfs_heketi_ssh_keyfile="/root/.ssh/id_rsa"
# host group for masters
[masters]
#openshift_hostname=192.168.1.173
ip-192-168-1-173.nip.io openshift_public_hostname=ip-192-168-1-173.nip.io
# host group for etcd
[etcd]
ip-192-168-1-173.nip.io openshift_ip=192.168.1.173
# host group for nodes, includes region info
[nodes]
ip-192-168-1-173.nip.io openshift_node_group_name='node-config-master'
ip-192-168-1-174.nip.io openshift_node_group_name='node-config-compute'
ip-192-168-1-175.nip.io openshift_node_group_name='node-config-compute'
ip-192-168-1-176.nip.io openshift_node_group_name='node-config-infra'
[glusterfs]
ip-192-168-1-174.nip.io glusterfs_devices='[ "/dev/vdb" ]'
ip-192-168-1-175.nip.io glusterfs_devices='[ "/dev/vdb" ]'
ip-192-168-1-176.nip.io glusterfs_devices='[ "/dev/vdb" ]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment