From e37fa65f4fd729014f12559d36becb5853c46fce Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Wed, 6 Apr 2016 01:55:31 -0400 Subject: [PATCH] Use proper CentOS repositories for ceph and qemu CentOS has a virtualization sig and storage sig which produces udpated ceph and qemu images. These images are then reused within the rest of Red Hat packaging. Install these repositories for CentOS and make use of them. This should work for OracleLinux as well. Still testing centos. Co-Authored-By: Vikram Hosakote Co-Authored-By: Paul Bourke Change-Id: Iea21fc4f33bbfdb973cf354d492c372bd3360acb Closes-Bug: #1566588 --- ansible/roles/nova/tasks/config.yml | 9 ++++-- .../roles/nova/templates/nova-libvirt.json.j2 | 6 ++++ ansible/roles/nova/templates/qemu.conf.j2 | 0 docker/base/Dockerfile.j2 | 28 ++++++++++++++----- docker/base/ceph.yum.repo | 19 ------------- docker/base/versionlock.list | 26 ++++++++--------- 6 files changed, 46 insertions(+), 42 deletions(-) create mode 100644 ansible/roles/nova/templates/qemu.conf.j2 delete mode 100644 docker/base/ceph.yum.repo diff --git a/ansible/roles/nova/tasks/config.yml b/ansible/roles/nova/tasks/config.yml index 8e2e7a8756..ab9981e83a 100644 --- a/ansible/roles/nova/tasks/config.yml +++ b/ansible/roles/nova/tasks/config.yml @@ -66,10 +66,13 @@ - "nova-scheduler" - "nova-spicehtml5proxy" -- name: Copying over libvirtd.conf +- name: Copying over libvirt configuration template: - src: "libvirtd.conf.j2" - dest: "{{ node_config_directory }}/nova-libvirt/libvirtd.conf" + src: "{{ item.src }}" + dest: "{{ node_config_directory }}/nova-libvirt/{{ item.dest }}" + with_items: + - { src: "qemu.conf.j2", dest: "qemu.conf" } + - { src: "libvirtd.conf.j2", dest: "libvirtd.conf" } - name: Copying files for nova-ssh template: diff --git a/ansible/roles/nova/templates/nova-libvirt.json.j2 b/ansible/roles/nova/templates/nova-libvirt.json.j2 index abc3159005..dca7056b27 100644 --- a/ansible/roles/nova/templates/nova-libvirt.json.j2 +++ b/ansible/roles/nova/templates/nova-libvirt.json.j2 @@ -6,6 +6,12 @@ "dest": "/etc/libvirt/libvirtd.conf", "owner": "root", "perm": "0644" + }, + { + "source": "{{ container_config_directory }}/qemu.conf", + "dest": "/etc/libvirt/qemu.conf", + "owner": "root", + "perm": "0644" }{% if enable_ceph | bool %}, { "source": "{{ container_config_directory }}/secrets", diff --git a/ansible/roles/nova/templates/qemu.conf.j2 b/ansible/roles/nova/templates/qemu.conf.j2 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index cddca0b650..cd147b43a3 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -38,12 +38,9 @@ COPY kibana.yum.repo /etc/yum.repos.d/kibana.yum.repo # Turns on MariaDB repos throughout the RPM build COPY mariadb.yum.repo /etc/yum.repos.d/MariaDB.repo -COPY ceph.yum.repo /etc/yum.repos.d/ceph.repo - RUN yum -y install http://repo.percona.com/release/7/RPMS/x86_64/percona-release-0.1-3.noarch.rpm RUN rpm --import http://yum.mariadb.org/RPM-GPG-KEY-MariaDB \ - && rpm --import https://download.ceph.com/keys/release.asc \ && rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-Percona \ && rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch @@ -67,8 +64,14 @@ RUN yum-config-manager --enable rhel-7-server-rpms \ {% if base_distro == 'centos' %} RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 \ - && yum install -y epel-release yum-plugin-priorities \ + && yum install -y \ + epel-release \ + yum-plugin-priorities \ + centos-release-ceph-hammer \ + centos-release-qemu-ev \ && rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 \ + && rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Storage \ + && rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Virtualization \ && yum clean all {% endif %} @@ -79,7 +82,7 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 \ # Enable couple required repositories for all RHEL builds # Turn on EPEL throughout the build RUN yum install -y \ - https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \ + https://mirror.centos.org/centos-7/7/extras/x86_64/Packages/epel-release-7-5.noarch.rpm \ && rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 \ && yum -y install yum-plugin-priorities \ && yum clean all \ @@ -92,12 +95,23 @@ RUN yum install -y \ {% if base_distro == 'oraclelinux' %} COPY oraclelinux-extras.repo /etc/yum.repos.d/oraclelinux-extras.repo + RUN yum install -y \ tar \ yum-utils \ - https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \ + http://mirror.centos.org/centos-7/7/extras/x86_64/Packages/epel-release-7-5.noarch.rpm \ + && yum clean all \ + && rpm -Uvh --nodeps \ + http://mirror.centos.org/centos/7/extras/x86_64/Packages/centos-release-openstack-mitaka-1-2.el7.centos.noarch.rpm \ + http://mirror.centos.org/centos-7/7/extras/x86_64/Packages/centos-release-ceph-hammer-1.0-5.el7.centos.noarch.rpm \ + http://mirror.centos.org/centos-7/7/extras/x86_64/Packages/centos-release-qemu-ev-1.0-1.el7.noarch.rpm \ + http://mirror.centos.org/centos-7/7/extras/x86_64/Packages/centos-release-virt-common-1-1.el7.centos.noarch.rpm \ + http://mirror.centos.org/centos-7/7/extras/x86_64/Packages/centos-release-storage-common-1-2.el7.centos.noarch.rpm \ + && sed -i 's/\$releasever/7/g' /etc/yum.repos.d/CentOS-*.repo \ && rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 \ - && yum clean all + && rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Storage \ + && rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Virtualization + RUN yum-config-manager --enable ol7_optional_latest ol7_addons RUN yum install -y yum-plugin-priorities \ && yum clean all diff --git a/docker/base/ceph.yum.repo b/docker/base/ceph.yum.repo deleted file mode 100644 index 91bb2ecf67..0000000000 --- a/docker/base/ceph.yum.repo +++ /dev/null @@ -1,19 +0,0 @@ -[ceph-x86_64] -name=Ceph x86_64 packages -baseurl=http://download.ceph.com/rpm-hammer/el7/x86_64 -enabled=1 -priority=2 -gpgcheck=1 -type=rpm-md -gpgkey=https://download.ceph.com/keys/release.asc -timeout=90 - -[ceph-noarch] -name=Ceph noarch packages -baseurl=http://download.ceph.com/rpm-hammer/el7/noarch -enabled=1 -priority=2 -gpgcheck=1 -type=rpm-md -gpgkey=https://download.ceph.com/keys/release.asc -timeout=90 diff --git a/docker/base/versionlock.list b/docker/base/versionlock.list index 4d480bc56b..9a4aa1bf42 100644 --- a/docker/base/versionlock.list +++ b/docker/base/versionlock.list @@ -1,13 +1,13 @@ -1:ceph-0.94.5-0.el7.centos.* -1:ceph-common-0.94.5-0.el7.centos.* -1:ceph-debuginfo-0.94.5-0.el7.centos.* -1:ceph-devel-compat-0.94.5-0.el7.centos.* -1:ceph-libs-compat-0.94.5-0.el7.centos.* -1:ceph-radosgw-0.94.5-0.el7.centos.* -1:libcephfs1-0.94.5-0.el7.centos.* -1:librados2-0.94.5-0.el7.centos.* -1:librbd1-0.94.5-0.el7.centos.* -1:mesos-0.27.1 -1:python-cephfs-0.94.5-0.el7.centos.* -1:python-rados-0.94.5-0.el7.centos.* -1:python-rbd-0.94.5-0.el7.centos.* +1:ceph-0.94.5-1.el7.* +1:ceph-common-0.94.5-1.el7.* +1:ceph-debuginfo-0.94.5-0.el7.* +1:ceph-devel-compat-0.94.5-1.el7.* +1:ceph-libs-compat-0.94.5-1.el7.* +1:ceph-radosgw-0.94.5-1.el7.* +1:librados2-0.94.5-1.el7.* +1:libcephfs1-0.94.5-1.el7.* +1:librbd1-0.94.5-1.el7.* +1:mesos-0.27.1* +1:python-cephfs-0.94.5-1.el7.* +1:python-rados-0.94.5-1.el7.* +1:python-rbd-0.94.5-1.el7.*