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
- 09 May 2019 » Playbook to replace bootstrap.kubeconfig and node certificates on OpenShift 3.10 3.11
- 19 Feb 2019 » Downgrade Etcd 3.3.11 to 3.2.22 for OpenShift Compatibility
- 08 Feb 2019 » Migration of Etcd to Masters for OpenShift 3.9 to 3.10 Upgrade
- 08 Feb 2019 » Etcdctl v2 and v3 Aliases for Peer Authenticated Commands
- 21 Nov 2018 » How to Create and Use OpenStack Heat Orchestration Templates Part 1
- 30 Oct 2018 » Creating OpenStack Provider Network for Use by a Single Project
- 16 Feb 2018 » Load balancing of OpenShift HA Routers Mind the GARP
- 13 Oct 2017 » OpenShift 3.6 Upgrade Metrics Fails Missing heapster-certs Secret
- 20 Aug 2017 » Installing OpenShift on OpenStack
- 14 Aug 2017 » OpenStack Network Diagram