From ec8bb513ebeeb6cffcc6664b4da35eaa6e2edbf5 Mon Sep 17 00:00:00 2001 From: Matthew Heler Date: Mon, 15 Oct 2018 16:54:50 -0500 Subject: [PATCH] Add RBD-NBD support to openstack-helm By default use rbd-nbd (librbd) instead of krbd. Applying this change on existing nodes will require reboots. Change-Id: I81829fb8666541e856ab402128a5192984b6fe05 --- .../tasks/support-packages.yaml | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/tools/images/kubeadm-aio/assets/opt/playbooks/roles/deploy-kubelet/tasks/support-packages.yaml b/tools/images/kubeadm-aio/assets/opt/playbooks/roles/deploy-kubelet/tasks/support-packages.yaml index d2766bc0..16884f52 100644 --- a/tools/images/kubeadm-aio/assets/opt/playbooks/roles/deploy-kubelet/tasks/support-packages.yaml +++ b/tools/images/kubeadm-aio/assets/opt/playbooks/roles/deploy-kubelet/tasks/support-packages.yaml @@ -10,6 +10,33 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: installing community ceph repository + when: kubelet.pv_support_ceph + block: + - name: ubuntu | ensure community ceph repository key is installed + when: ansible_distribution == 'Ubuntu' + apt_key: + id: "460F3994" + keyserver: "keyserver.ubuntu.com" + state: present + + - name: ubuntu | ensure community ceph repository exists + when: ansible_distribution == 'Ubuntu' + apt_repository: + repo: "deb https://download.ceph.com/debian-luminous/ {{ ansible_lsb.codename }} main" + state: present + update_cache: yes + + - name: centos | ensure community ceph repository exists + when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' + yum_repository: + name: ceph + description: "Ceph community packages for Redhat/Centos" + gpgkey: "https://download.ceph.com/keys/release.asc" + baseurl: "https://download.ceph.com/rpm-luminous/el7/$basearch" + gpgcheck: yes + state: present + - name: centos | installing epel-release when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' yum: @@ -43,8 +70,16 @@ packages: deb: - ceph-common + - rbd-nbd rpm: - ceph-common + - rbd-nbd + +- when: kubelet.pv_support_ceph + name: blacklist kernel RBD driver module + copy: + dest: "/etc/modprobe.d/rbd.conf" + content: "install rbd /bin/true" - when: kubelet.pv_support_nfs name: installing NFS support packages