In this lab, we will verify the Ansible inventory file, so it fits our lab cluster. The Inventory file describes, how the cluster will be built. First we will download the default example hosts file from the Openshift Github repository and compare it to the prepared inventory for the lab. We will use the default Openshift 3.7 template, as we will later upgrade to OSE 3.7 and like this we already have the right variables in place.
Login to the first master and compare the Ansible Inventories
[ec2-user@master0 ~]$ wget https://raw.githubusercontent.com/openshift/openshift-ansible/release-3.7/inventory/byo/hosts.example
[ec2-user@master0 ~]$ vimdiff /etc/ansible/hosts hosts.example
As we can see there are the following differences:
- [OSEv3:children]
- lb, nfs, new_masters and new_nodes are commented out.
- glusterfs hostgroup: Deploy Container Native Storage.
- ansible_ssh_user: Run Ansible playbook as ec2-user.
- ansible_become: The ec2-user is not in the root group, so we need the ansible_become=yes set.
- openshift_deployment: Deploy "openshift-enterprise".
- openshift_release: Deploy Openshift 3.6, then upgrade to 3.7.
- openshift_master_extensions: Make the oc client available on console
- openshift_master_htpasswd_users: Create a default user, so we can login after the installation.
- openshift_master_cluster_hostname: Set the cluster private hostname.
- openshift_master_cluster_public_hostname: Set the cluster-public hostname.
- openshift_master_default_subdomain: Set the subdomain for our apps.
- openshift_hosted_router_replicas: Run at least 2 router pods. They will be running on each of the two infra-node.
- openshift_hosted_manage_router: Let Openshift manage routers.
- openshift_hosted_registry_replicas: Run two router pods for fail-over
- openshift_hosted_registry_storage_kind: Use container native storage for the registry persistent volume.
- openshift_metrics_install_metrics: Deploy Openshift metrics.
- openshift_metrics_hawkular_hostname: Define metrics url
- openshift_logging_install_logging: Deploy Openshift logging.
- openshift_logging_es_memory_limit: Adjust the memory limit, because the lab environment is not sized as a production environment.
- openshift_logging_kibana_hostname: Define URL to access logs
- openshift_master_api_port: Set Port to 443 for master API
- openshift_master_console_port: Set Port to 443 for master API
- openshift_pkg_version: Define the exact package version.
- openshift_set_node_ip: It's recommended to set this setting to avoid CDN DNS issues, if using multiple network interfaces.
- openshift_master_dynamic_provisioning_enabled: Deploy Container Native Storage.
- openshift_storage_glusterfs_namespace
- openshift_storage_glusterfs_storageclass_default
- openshift_storage_glusterfs_wipe
- openshift_disable_check: Disable a few checks, because the lab environment is not sized as a production environment.
- [masters],[etcd],[lb],[nodes],[new_nodes],[new_masters],[glusterfs]: Specify all hosts, that it fits with the environment.
End of Lab 3.2.1