This playbook is written for RHEL 7.2 and OSE v3.1. It will perform the following steps which should take place before running the openshift-ansible byo playbook.
- Install prerequisite RPMs like docker, python, etc.
- Persist the systemd journal for easier debugging
- Setup docker ephemeral storage on 2nd disk
- Turn off swap
- Enable use of NFS in selinux
See my Testing OpenShift Enterprise V3 post for the prereqs.
The lastest version is available here.
--- # file: prep.yml # @dlbewley # Playbook to prep OpenShift Enterprise hosts for installation. Run this before # the openshift-ansible byo playbook. - hosts: all #----- vars: #----- - docker_storage_setup: | DEVS=/dev/vdb VG=docker-vg tasks: #----- - name: Remove NetworkManager yum: name: NetworkManager state: absent - name: Install prereqs yum: name: "" state: present with_items: - atomic-openshift-utils - bind-utils - bridge-utils - docker - gcc - git - iptables-services - net-tools - openssh-clients - python - python-virtualenv - wget - name: Install life enhancers on master yum: name: "" state: present with_items: - bash-completion - deltarpm - etcd - tmux - vim-enhanced when: "'masters' in group_names" - name: Make journald logs persistent to assist troubleshooting file: name: /var/log/journal state: directory notify: restart journald # openshift-ansible/roles/openshift_node/tasks/storage_plugins/nfs.yml # enables sebool 'virt_use_nfs', but i still had to use 'all_squash' rather # than 'root_squash' on the NFS export. # Will the following fix that? Not yet tested. - name: OpenShift use nfs files seboolean: name: openshift_use_nfs state: yes persistent: yes when: "'nodes' in group_names" # https://docs.openshift.com/enterprise/3.1/admin_guide/overcommit.html#disable-swap-memory - name: Remove swaps from fstab lineinfile: dest: /etc/fstab regexp: '^/[\S]+\s+swap\s+swap' state: absent notify: disable swap when: "'nodes' in group_names" - name: Setup docker storage config copy: content: "" dest: /etc/sysconfig/docker-storage-setup notify: docker storage setup when: "'nodes' in group_names" handlers: #------- - name: disable swap command: swapoff --all ignore_errors: yes - name: restart journald service: name: systemd-journald state: restarted - name: docker storage setup command: docker-storage-setup
- 29 Jan 2017 » Configuring OpenShift with Multiple Sharded Routers
- 14 Nov 2016 » OpenShift Cluster Metrics and Cassandra Troubleshooting
- 11 Jul 2016 » How to List Tags On Redhat Registry Images
- 16 Jun 2016 » Getting Started With RedHat Container Development Kit
- 16 Jun 2016 » Deploy Hawkular Metrics in CDK 2.1 OpenShift 3.2
- 17 May 2016 » Upgrading OpenShift Enterprise from 3.1 to 3.2
- 24 Mar 2016 » Changing the SSL Certificate for OpenShift Console
- 01 Mar 2016 » OpenShift High Availability - Routing
- 06 Dec 2015 » Ansible CMDB Inventory and Facts Reporting
- 28 Jul 2015 » Testing OpenShift Enterprise V3