Skip to content

Instantly share code, notes, and snippets.

@RobertKrawitz
Last active April 25, 2018 19:34
Show Gist options
  • Save RobertKrawitz/63d5115e2dcdb27fcc98ce57f33685b4 to your computer and use it in GitHub Desktop.
Save RobertKrawitz/63d5115e2dcdb27fcc98ce57f33685b4 to your computer and use it in GitHub Desktop.
WIP: Inventory file for OpenShift Ansible 3.10 deploy
#bare minimum hostfile
[OSEv3:children]
masters
nodes
etcd
lb
oo_first_master
[OSEv3:vars]
# if your target hosts are Fedora uncomment this
#ansible_python_interpreter=/usr/bin/python3
openshift_deployment_type=origin
# OpenShift 3.10 bits
#osm_cluster_network_cidr=10.128.0.0/14
#openshift_portal_net=172.17.0.0/16
#osm_host_subnet_length=9
# Docker bits
# See https://github.com/openshift/openshift-ansible/issues/7794
# rlk 2018-04-17
openshift_additional_repos=[{'id': 'origindevel', 'name': 'development', 'baseurl': 'https://cbs.centos.org/repos/paas7-openshift-origin310-testing/x86_64/os', 'enabled': 1, 'gpgcheck': 0}, {'id': 'origindevel1', 'name': 'development1', 'baseurl': 'https://cbs.centos.org/repos/paas7-openshift-origin310-candidate/x86_64/os', 'enabled': 1, 'gpgcheck': 0}]
# localhost likely doesn't meet the minimum requirements
openshift_disable_check=memory_availability,disk_availability,docker_storage,docker_image_availability,package_version
openshift_use_system_containers=true
openshift_image_tag='v3.10.0'
openshift_release='v3.10'
ansible_user=centos
ansible_become=yes
openshift_hostname_check=false
#Set cluster_hostname to point at your load balancer
openshift_master_cluster_hostname=centos7-vm-0.k8s.home
[masters]
centos7-vm-[0:1].k8s.home
[oo_first_master]
centos7-vm-0.k8s.home
[lb]
centos7-vm-0.k8s.home
[etcd]
centos7-vm-[0:1].k8s.home
[nodes]
centos7-vm-[0:1].k8s.home openshift_node_group_name=node-config-master openshift_schedulable=true openshift_node_labels="{ 'node-router': 'true', 'node-registry': 'true', 'node-app': 'true' }"
centos7-vm-[1:2].k8s.home openshift_node_group_name=node-config-infra openshift_schedulable=true
centos7-vm-3.k8s.home
@RobertKrawitz
Copy link
Author

This is an inventory file for OpenShift Ansible 3.10. It's very minimal, just about as empty-featured as it gets.

Notes (my observations):

  1. The oo_first_master group must exist and be populated.
  2. There need to be at least two masters.
  3. There need to be multiple hosts in the node-config-infra group.

Failure to do these items results in the installer timing out when checking for the control plane coming up.

At present, the cluster does not survive a reboot...when it comes back up, things are not working right. So, consider this a WIP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment