diff --git a/roles/README b/roles/README index 7e79006853..f57626db0e 100644 --- a/roles/README +++ b/roles/README @@ -21,6 +21,7 @@ To re-import/update the OpenShift Ansible roles: etcd etcd_ca etcd_certificates + openshift_common openshift_examples openshift_facts openshift_manage_node diff --git a/roles/openshift_common/README.md b/roles/openshift_common/README.md new file mode 100644 index 0000000000..eb4ef26e85 --- /dev/null +++ b/roles/openshift_common/README.md @@ -0,0 +1,44 @@ +OpenShift Common +================ + +OpenShift common installation and configuration tasks. + +Requirements +------------ + +A RHEL 7.1 host pre-configured with access to the rhel-7-server-rpms, +rhel-7-server-extra-rpms, and rhel-7-server-ose-3.0-rpms repos. + +Role Variables +-------------- + +| Name | Default value | | +|---------------------------|-------------------|---------------------------------------------| +| openshift_cluster_id | default | Cluster name if multiple OpenShift clusters | +| openshift_debug_level | 0 | Global openshift debug log verbosity | +| openshift_hostname | UNDEF | Internal hostname to use for this host (this value will set the hostname on the system) | +| openshift_ip | UNDEF | Internal IP address to use for this host | +| openshift_public_hostname | UNDEF | Public hostname to use for this host | +| openshift_public_ip | UNDEF | Public IP address to use for this host | + +Dependencies +------------ + +os_firewall +openshift_facts +openshift_repos + +Example Playbook +---------------- + +TODO + +License +------- + +Apache License, Version 2.0 + +Author Information +------------------ + +Jason DeTiberus (jdetiber@redhat.com) diff --git a/roles/openshift_common/defaults/main.yml b/roles/openshift_common/defaults/main.yml new file mode 100644 index 0000000000..4d3e0fe9e7 --- /dev/null +++ b/roles/openshift_common/defaults/main.yml @@ -0,0 +1,3 @@ +--- +openshift_cluster_id: 'default' +openshift_debug_level: 0 diff --git a/roles/openshift_common/meta/main.yml b/roles/openshift_common/meta/main.yml new file mode 100644 index 0000000000..81363ec68a --- /dev/null +++ b/roles/openshift_common/meta/main.yml @@ -0,0 +1,17 @@ +--- +galaxy_info: + author: Jason DeTiberus + description: OpenShift Common + company: Red Hat, Inc. + license: Apache License, Version 2.0 + min_ansible_version: 1.7 + platforms: + - name: EL + versions: + - 7 + categories: + - cloud +dependencies: +- { role: os_firewall } +- { role: openshift_facts } +- { role: openshift_repos } diff --git a/roles/openshift_common/tasks/main.yml b/roles/openshift_common/tasks/main.yml new file mode 100644 index 0000000000..a7c5650670 --- /dev/null +++ b/roles/openshift_common/tasks/main.yml @@ -0,0 +1,17 @@ +--- +- name: Set common OpenShift facts + openshift_facts: + role: common + local_facts: + cluster_id: "{{ openshift_cluster_id | default('default') }}" + debug_level: "{{ openshift_debug_level | default(0) }}" + hostname: "{{ openshift_hostname | default(None) }}" + ip: "{{ openshift_ip | default(None) }}" + public_hostname: "{{ openshift_public_hostname | default(None) }}" + public_ip: "{{ openshift_public_ip | default(None) }}" + use_openshift_sdn: "{{ openshift_use_openshift_sdn | default(None) }}" + sdn_network_plugin_name: "{{ os_sdn_network_plugin_name | default(None) }}" + deployment_type: "{{ openshift_deployment_type }}" + +- name: Set hostname + hostname: name={{ openshift.common.hostname }} diff --git a/roles/openshift_common/vars/main.yml b/roles/openshift_common/vars/main.yml new file mode 100644 index 0000000000..8e7d71154f --- /dev/null +++ b/roles/openshift_common/vars/main.yml @@ -0,0 +1,9 @@ +--- +# TODO: Upstream kubernetes only supports iptables currently, if this changes, +# then these variable should be moved to defaults +# TODO: it might be possible to still use firewalld if we wire up the created +# chains with the public zone (or the zone associated with the correct +# interfaces) +os_firewall_use_firewalld: False + +openshift_data_dir: /var/lib/openshift