aboutsummaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2019-06-05 11:00:14 +0000
committerGerrit Code Review <review@openstack.org>2019-06-05 11:00:14 +0000
commit00475feb7f62c192b6ff5f12bff1b77efd85da6f (patch)
tree3cc7721b0a2d4b2947e2f7bc66f29e2c09b78e23 /docker
parent4e083196d14877de458ae16129331c37fe1f6f21 (diff)
parente0cae62c4aab001fa7b5cc324f178793f4e88f3c (diff)
downloadkolla-00475feb7f62c192b6ff5f12bff1b77efd85da6f.tar.gz
kolla-00475feb7f62c192b6ff5f12bff1b77efd85da6f.zip
Merge "Ceph: Update to Nautilus on CentOS and OracleLinux"
Diffstat (limited to 'docker')
-rw-r--r--docker/base/Dockerfile.j29
-rw-r--r--docker/base/ceph.repo21
-rw-r--r--docker/ceph/ceph-base/Dockerfile.j23
-rw-r--r--docker/ceph/ceph-mon/extend_start.sh4
-rw-r--r--docker/ceph/ceph-osd/extend_start.sh23
5 files changed, 51 insertions, 9 deletions
diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2
index afa53fbd5..38372f72d 100644
--- a/docker/base/Dockerfile.j2
+++ b/docker/base/Dockerfile.j2
@@ -79,11 +79,11 @@ COPY gpg-keys/PERCONA-PACKAGING-KEY /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY
{% if base_arch == 'x86_64' %}
{% set base_yum_repo_files = [
+ 'ceph.repo',
'crane.repo',
'elasticsearch.repo',
'grafana.repo',
'influxdb.repo',
- 'nfs_ganesha.repo',
'opendaylight.repo',
'percona-release.repo',
'rabbitmq_rabbitmq-server.repo',
@@ -99,6 +99,10 @@ COPY gpg-keys/PERCONA-PACKAGING-KEY /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY
'/etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY',
'https://packages.treasuredata.com/GPG-KEY-td-agent'
] %}
+{% elif base_arch == 'aarch64' %}
+ {% set base_yum_repo_files = [
+ 'ceph.repo',
+ ] %}
{% endif %}
{%- for repo_file in base_yum_repo_files | customizable('yum_repo_files') %}
@@ -140,12 +144,10 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
{% set base_centos_yum_repo_keys = [
'/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-OpsTools',
- '/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Storage',
'/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Virtualization'
] %}
{% set base_centos_yum_repo_packages = [
- 'centos-release-ceph-luminous',
'centos-release-opstools',
'centos-release-qemu-ev',
'epel-release',
@@ -189,7 +191,6 @@ RUN yum-config-manager --enable rhel-7-server-optional-rpms \
COPY oraclelinux-extras.repo /etc/yum.repos.d/oraclelinux-extras.repo
RUN {{ macros.install_packages( ['tar', 'yum-utils', 'https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm' ], chain=True, clean=False) }} \
&& rpm -Uvh --nodeps \
- http://mirror.centos.org/centos-7/7/extras/x86_64/Packages/centos-release-ceph-luminous-1.1-2.el7.centos.noarch.rpm \
http://mirror.centos.org/centos-7/7/extras/x86_64/Packages/centos-release-opstools-1-8.el7.noarch.rpm \
http://mirror.centos.org/centos-7/7/extras/x86_64/Packages/centos-release-qemu-ev-1.0-3.el7.centos.noarch.rpm \
http://mirror.centos.org/centos-7/7/extras/x86_64/Packages/centos-release-virt-common-1-1.el7.centos.noarch.rpm \
diff --git a/docker/base/ceph.repo b/docker/base/ceph.repo
new file mode 100644
index 000000000..ebe8486e3
--- /dev/null
+++ b/docker/base/ceph.repo
@@ -0,0 +1,21 @@
+[ceph]
+name=ceph
+baseurl=https://download.ceph.com/rpm-nautilus/el7/$basearch
+enabled=1
+gpgcheck=1
+gpgkey=https://download.ceph.com/keys/release.asc
+
+[ceph-noarch]
+name=Ceph noarch packages
+baseurl=https://download.ceph.com/rpm-nautilus/el7/noarch
+enabled=1
+priority=2
+gpgcheck=1
+gpgkey=https://download.ceph.com/keys/release.asc
+
+[nfs_ganesha]
+baseurl = http://download.ceph.com/nfs-ganesha/rpm-V2.7-stable/nautilus/$basearch
+gpgcheck = 1
+gpgkey = https://download.ceph.com/keys/release.asc
+name = nfs-ganesha stable repo
+skip_if_unavailable = 1
diff --git a/docker/ceph/ceph-base/Dockerfile.j2 b/docker/ceph/ceph-base/Dockerfile.j2
index 4aeaca4e4..c3027a031 100644
--- a/docker/ceph/ceph-base/Dockerfile.j2
+++ b/docker/ceph/ceph-base/Dockerfile.j2
@@ -12,10 +12,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% set ceph_base_packages = [
'btrfs-progs',
'ceph',
+ 'ceph-mgr-dashboard',
'ceph-radosgw',
'e2fsprogs',
+ 'gdisk',
'hdparm',
'parted',
+ 'smartmontools',
'xfsprogs'
] %}
diff --git a/docker/ceph/ceph-mon/extend_start.sh b/docker/ceph/ceph-mon/extend_start.sh
index 4c3e91b31..af60faa17 100644
--- a/docker/ceph/ceph-mon/extend_start.sh
+++ b/docker/ceph/ceph-mon/extend_start.sh
@@ -22,8 +22,8 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
# Generating initial keyrings and monmap
ceph-authtool --create-keyring "${KEYRING_MON}" --gen-key -n mon. --cap mon 'allow *'
- ceph-authtool --create-keyring "${KEYRING_ADMIN}" --gen-key -n client.admin --set-uid=0 --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow' --cap mgr 'allow *'
- ceph-authtool --create-keyring "${KEYRING_RGW}" --gen-key -n client.radosgw.gateway --set-uid=0 --cap osd 'allow rwx' --cap mon 'allow rwx'
+ ceph-authtool --create-keyring "${KEYRING_ADMIN}" --gen-key -n client.admin --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow' --cap mgr 'allow *'
+ ceph-authtool --create-keyring "${KEYRING_RGW}" --gen-key -n client.radosgw.gateway --cap osd 'allow rwx' --cap mon 'allow rwx'
ceph-authtool "${KEYRING_MON}" --import-keyring "${KEYRING_ADMIN}"
ceph-authtool "${KEYRING_MON}" --import-keyring "${KEYRING_RGW}"
monmaptool --create --add "${HOSTNAME}" "${MON_IP}" --fsid "${FSID}" "${MONMAP}"
diff --git a/docker/ceph/ceph-osd/extend_start.sh b/docker/ceph/ceph-osd/extend_start.sh
index 68c0a28d6..c6cd4535c 100644
--- a/docker/ceph/ceph-osd/extend_start.sh
+++ b/docker/ceph/ceph-osd/extend_start.sh
@@ -83,8 +83,14 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
# This will through an error about no key existing. That is normal. It then
# creates the key in the next step.
- ceph-osd -i "${OSD_ID}" --mkkey
echo "bluestore" > "${OSD_DIR}"/type
+
+ if [[ "$(ceph --version)" =~ (luminous|mimic) ]]; then
+ ceph-osd -i "${OSD_ID}" --mkkey
+ else
+ ceph-osd -i "${OSD_ID}" --mkkey --no-mon-config
+ fi
+
if [ -n "${OSD_BS_BLK_DEV}" ] && [ "${OSD_BS_BLK_DEV}" != "${OSD_BS_DEV}" ] && [ -n "${OSD_BS_BLK_PARTNUM}" ]; then
sgdisk "--change-name="${OSD_BS_BLK_PARTNUM}":KOLLA_CEPH_DATA_BS_${OSD_ID}_B" "--typecode="${OSD_BS_BLK_PARTNUM}":${CEPH_OSD_TYPE_CODE}" -- "${OSD_BS_BLK_DEV}"
else
@@ -111,8 +117,14 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
ln -sf /dev/disk/by-partlabel/KOLLA_CEPH_DATA_BS_"${OSD_ID}"_D "${OSD_DIR}"/block.db
fi
- ceph-osd -i "${OSD_ID}" --mkfs -k "${OSD_DIR}"/keyring --osd-uuid "${OSD_UUID}"
+ if [[ "$(ceph --version)" =~ (luminous|mimic) ]]; then
+ ceph-osd -i "${OSD_ID}" --mkfs -k "${OSD_DIR}"/keyring --osd-uuid "${OSD_UUID}"
+ else
+ ceph-osd -i "${OSD_ID}" --mkfs -k "${OSD_DIR}"/keyring --osd-uuid "${OSD_UUID}" --no-mon-config
+ fi
+
ceph auth add "osd.${OSD_ID}" osd 'allow *' mon 'allow profile osd' -i "${OSD_DIR}/keyring"
+
if [[ "${OSD_BS_DEV}" =~ "/dev/loop" ]]; then
umount "${OSD_BS_DEV}""p${OSD_BS_PARTNUM}"
else
@@ -134,7 +146,12 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
# This will through an error about no key existing. That is normal. It then
# creates the key in the next step.
- ceph-osd -i "${OSD_ID}" --mkfs --osd-journal="${JOURNAL_PARTITION}" --mkkey
+ if [[ "$(ceph --version)" =~ (luminous|mimic) ]]; then
+ ceph-osd -i "${OSD_ID}" --mkfs --osd-journal="${JOURNAL_PARTITION}" --mkkey
+ else
+ ceph-osd -i "${OSD_ID}" --mkfs --osd-journal="${JOURNAL_PARTITION}" --mkkey --no-mon-config
+ fi
+
ceph auth add "osd.${OSD_ID}" osd 'allow *' mon 'allow profile osd' -i "${OSD_DIR}/keyring"
umount "${OSD_PARTITION}"
fi