# Copyright 2020 Dell Inc. or its subsidiaries. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. --- - name: add kubernetes repo copy: src=kubernetes.repo dest=/etc/yum.repos.d/ owner=root group=root mode=644 tags: install # add ElRepo GPG Key - name: add ElRepo GPG Key rpm_key: state: present key: https://www.elrepo.org/RPM-GPG-KEY-elrepo.org tags: install - name: add ElRepo (Nvidia kmod drivers) yum: name: http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm state: present tags: install - name: update sysctl to handle incorrectly routed traffic when iptables is bypassed copy: src=k8s.conf dest=/etc/sysctl.d/ owner=root group=root mode=644 tags: install - name: update sysctl command: /sbin/sysctl --system tags: install - name: Install EPEL Repository yum: name=epel-release state=present tags: install #likely need to add a reboot hook in here #- name: update kernel and all other system packages #yum: name=* state=latest #tags: install - name: disable swap command: /sbin/swapoff -a tags: install - name: Disable SELinux selinux: state: disabled tags: install - name: install common packages package: name: - yum-plugin-versionlock - gcc - nfs-utils - python-pip - docker - bash-completion - kubelet-1.16.7 - kubeadm-1.16.7 - kubectl-1.16.7 - nvidia-detect state: present tags: install - name: versionlock kubernetes command: yum versionlock kubelet-1.16.7 kubectl-1.16.7 kubeadm-1.16.7 tags: install - name: install InfiniBand Support package: name: "@Infiniband Support" state: present - name: upgrade pip command: /bin/pip install --upgrade pip tags: install #- name: Enable DevicePlugins for all GPU nodes (nvidia-container-runtime-hook) #copy: src=nvidia dest=/usr/libexec/oci/hooks.d/ owner=root group=root mode=755 #tags: install - name: Add KUBE_EXTRA_ARGS to enable GPUs lineinfile: path: /usr/lib/systemd/system/kubelet.service.d/10-kubeadm.conf line: 'Environment="KUBELET_EXTRA_ARGS=--feature-gates=DevicePlugins=true"' insertbefore: 'KUBELET_KUBECONFIG_ARGS=' tags: install - name: Start and Enable docker service service: name: docker state: restarted enabled: yes tags: install - name: Start and Enable Kubernetes - kubelet service: name: kubelet state: restarted enabled: yes tags: install - name: Start and rpcbind service service: name: rpcbind state: restarted enabled: yes tags: install - name: Start and nfs-server service service: name: nfs-server state: restarted enabled: yes tags: install - name: Start and nfs-lock service service: name: nfs-lock #state: restarted enabled: yes tags: install - name: Start and nfs-idmap service service: name: nfs-idmap state: restarted enabled: yes tags: install