Skip to content

Instantly share code, notes, and snippets.

@detiber
Last active August 30, 2018 17:17
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save detiber/da042623b26522fcd5767825eafe97a0 to your computer and use it in GitHub Desktop.
Save detiber/da042623b26522fcd5767825eafe97a0 to your computer and use it in GitHub Desktop.
openshift-ansible-installer config example
---
version: v3
variant: openshift-enterprise
variant_version: '3.1'
# The deployment key specifies the hosts and roles fo rthe deployment
# and configuration values that apply to the deployment as a whole
deployment:
ansible_config: /usr/share/atomic-openshift-utils/ansible.cfg
ansible_log_path: /tmp/ansible.log
ansible_ssh_user: cloud-user
# any unmapped variables for the entire deployment can go here
# they are passed through to the generated inventory as is
openshift_hosted_registry_storage_host: nfs.example.com
openshift_hosted_registry_storage_nfs_options: '*(rw,root_squash)'
openshift_hosted_registry_storage_nfs_directory: /exports
openshift_hosted_registry_storage_volume_name: registry
openshift_hosted_registry_storage_access_modes: ['ReadWriteMany']
# the hosts key represents settings applied at the host level
hosts:
- connect_to: 10.0.1.1
hostname: smunilla-newt.os1.phx2.redhat.com
ip: 10.0.1.1
public_ip: 51.41.51.41
public_hostname: openshift.public.redhat.com
# any unmapped variables for a host can go here
# they are passed through to the generated inventory as is
node_labels:
region: master
zone: default
roles:
- etcd
- master
- node
- connect_to: 10.0.0.2
hostname: smunilla-gecko.os1.phx2.redhat.com
ip: 10.0.1.2
containerized: false
node_labels:
region: primary
zone: default
roles:
- node
- connect_to: 10.1.0.1
hostname: smunilla-anole.os1.phx2.redhat.com
ip: 10.1.0.1
node_labels:
region: infra
zone: default
roles:
- storage
- loadbalancer
- dns
roles:
master:
containerized: true
# cluster_* variables are only used for configuring ha masters.
cluster_method: native
cluster_hostname: openshift-ansible.test.example.com
cluster_public_hostname: openshift-ansible.test.example.com
# any unmapped variables for a host can go here
# they are passed through to the generated inventory as is
openshift_master_identity_providers:
- name: htpasswd_auth
login: true
challenge: true
kind: HTPasswdPasswordIdentityProvider
filename: /etc/origin/master/htpasswd
openshift_master_htpasswd_users:
user1: pass1
user2: pass2
node:
containerized: true
loadbalancer:
containerized: false
etcd:
containerized: true
storage:
dns:
...
@akostadinov
Copy link

Hosts need to have username/private_key or password specified so that ssh can work. Also not sure about ip vs hostname. I think we need to refer to hosts by hostname, it is cumbersome to ask users specify both - ip and hostname. Or is the idea to also add DNS records?
In the flexy installer I allow creating DNS records for hosts without a hostname when desired. Also allow for creating wildcard DNS for routers. It would be preferable to have DNS implementation pluggable. e.g. support Dyn, bind dynamic dns updates, etc.
The DNS stuff can be handled in a separate step/playbook though. Bringing it up just so you can keep it in mind.

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