Merge "Ceph: Update to Nautilus on CentOS and OracleLinux"
This commit is contained in:
commit
00475feb7f
@ -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 \
|
||||
|
21
docker/base/ceph.repo
Normal file
21
docker/base/ceph.repo
Normal file
@ -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
|
@ -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'
|
||||
] %}
|
||||
|
||||
|
@ -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}"
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user