From abce4d5398d44b46161de2bf21914e776d16d7e7 Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Thu, 13 Feb 2020 11:10:24 +0100 Subject: [PATCH] Remove kolla Ceph container images This change removes ceph* Dockerfiles and relevant kolla python code bits. Kolla-Ansible part has been removed, and K-A was the only consumer. Change-Id: I9568261fdbbe4b9156d0e07c414ec911ca2e8557 --- README.rst | 1 - doc/source/matrix_aarch64.csv | 1 - doc/source/matrix_x86.csv | 1 - docker/ceph/ceph-base/Dockerfile.j2 | 58 ----- docker/ceph/ceph-base/extend_start.sh | 8 - docker/ceph/ceph-mds/Dockerfile.j2 | 7 - docker/ceph/ceph-mgr/Dockerfile.j2 | 7 - docker/ceph/ceph-mon/Dockerfile.j2 | 12 - docker/ceph/ceph-mon/extend_start.sh | 54 ----- docker/ceph/ceph-mon/fetch_ceph_keys.py | 70 ------ docker/ceph/ceph-nfs/Dockerfile.j2 | 25 --- docker/ceph/ceph-osd/Dockerfile.j2 | 10 - docker/ceph/ceph-osd/extend_start.sh | 210 ------------------ docker/ceph/ceph-rgw/Dockerfile.j2 | 7 - docker/ceph/cephfs-fuse/Dockerfile.j2 | 11 - kolla/common/config.py | 5 - kolla/image/build.py | 1 - .../notes/remove-ceph-afff3cd8775e3a41.yaml | 6 + 18 files changed, 6 insertions(+), 488 deletions(-) delete mode 100644 docker/ceph/ceph-base/Dockerfile.j2 delete mode 100644 docker/ceph/ceph-base/extend_start.sh delete mode 100644 docker/ceph/ceph-mds/Dockerfile.j2 delete mode 100644 docker/ceph/ceph-mgr/Dockerfile.j2 delete mode 100644 docker/ceph/ceph-mon/Dockerfile.j2 delete mode 100644 docker/ceph/ceph-mon/extend_start.sh delete mode 100644 docker/ceph/ceph-mon/fetch_ceph_keys.py delete mode 100644 docker/ceph/ceph-nfs/Dockerfile.j2 delete mode 100644 docker/ceph/ceph-osd/Dockerfile.j2 delete mode 100644 docker/ceph/ceph-osd/extend_start.sh delete mode 100644 docker/ceph/ceph-rgw/Dockerfile.j2 delete mode 100644 docker/ceph/cephfs-fuse/Dockerfile.j2 create mode 100644 releasenotes/notes/remove-ceph-afff3cd8775e3a41.yaml diff --git a/README.rst b/README.rst index df6684aad1..e6f342b383 100644 --- a/README.rst +++ b/README.rst @@ -120,7 +120,6 @@ Infrastructure components Kolla provides images to deploy the following infrastructure components: -- `Ceph `__ implementation for Cinder, Glance and Nova - `Certmonger `__ a service to simplify interaction with CAs on networks which use PKI. - `Chrony `__ a versatile implementation diff --git a/doc/source/matrix_aarch64.csv b/doc/source/matrix_aarch64.csv index 41e3322a42..74a59c013f 100644 --- a/doc/source/matrix_aarch64.csv +++ b/doc/source/matrix_aarch64.csv @@ -5,7 +5,6 @@ barbican,C,C,C,C,N,C bifrost,N,C,N,N,N,N blazar,N,C,N,C,N,C ceilometer,C,C,C,C,N,C -ceph,C,C,C,C,N,C certmonger,C,C,C,C,N,C chrony,C,C,C,C,N,C cinder,C,C,C,C,N,C diff --git a/doc/source/matrix_x86.csv b/doc/source/matrix_x86.csv index 59a1b99013..410119111a 100644 --- a/doc/source/matrix_x86.csv +++ b/doc/source/matrix_x86.csv @@ -5,7 +5,6 @@ barbican,C,T,C,C,N,C bifrost,N,T,N,C,N,N blazar,N,C,N,C,N,C ceilometer,C,C,C,C,N,C -ceph,C,T,C,T,N,C certmonger,C,C,C,C,N,C chrony,T,T,T,T,N,T cinder,C,T,C,T,N,C diff --git a/docker/ceph/ceph-base/Dockerfile.j2 b/docker/ceph/ceph-base/Dockerfile.j2 deleted file mode 100644 index 714a9b2e66..0000000000 --- a/docker/ceph/ceph-base/Dockerfile.j2 +++ /dev/null @@ -1,58 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" - -{% block ceph_base_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{{ macros.configure_user(name='ceph') }} - -{{ macros.enable_extra_repos(['ceph', 'nfs-ganesha']) }} - -{% if base_package_type == 'rpm' %} - - {% set ceph_base_packages = [ - 'btrfs-progs', - 'ceph', - 'ceph-mgr-dashboard', - 'ceph-radosgw', - 'e2fsprogs', - 'gdisk', - 'hdparm', - 'parted', - 'smartmontools', - 'xfsprogs' - ] %} - - {% if base_arch in ['aarch64', 'x86_64'] %} - {% set ceph_base_packages = ceph_base_packages + [ - 'ceph-fuse' - ] %} - {% endif %} - -{% elif base_package_type == 'deb' %} - - {% set ceph_base_packages = [ - 'btrfs-progs', - 'ceph', - 'ceph-mds', - 'e2fsprogs', - 'hdparm', - 'parted', - 'radosgw', - 'xfsprogs' - ] %} - - {% if base_arch in ['x86_64'] %} - {% set ceph_base_packages = ceph_base_packages + [ - 'ceph-fuse' - ] %} - {% endif %} - -{% endif %} -{{ macros.install_packages(ceph_base_packages | customizable("packages")) }} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN chmod 755 /usr/local/bin/kolla_extend_start - -{% block ceph_base_footer %}{% endblock %} diff --git a/docker/ceph/ceph-base/extend_start.sh b/docker/ceph/ceph-base/extend_start.sh deleted file mode 100644 index 968be09809..0000000000 --- a/docker/ceph/ceph-base/extend_start.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -if [[ ! -d "/var/log/kolla/ceph" ]]; then - mkdir -p /var/log/kolla/ceph -fi -if [[ $(stat -c %a /var/log/kolla/ceph) != "755" ]]; then - chmod 755 /var/log/kolla/ceph -fi diff --git a/docker/ceph/ceph-mds/Dockerfile.j2 b/docker/ceph/ceph-mds/Dockerfile.j2 deleted file mode 100644 index bfff5a73a8..0000000000 --- a/docker/ceph/ceph-mds/Dockerfile.j2 +++ /dev/null @@ -1,7 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}ceph-base:{{ tag }} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" - -{% block ceph_mds_header %}{% endblock %} - -{% block ceph_mds_footer %}{% endblock %} -{% block footer %}{% endblock %} diff --git a/docker/ceph/ceph-mgr/Dockerfile.j2 b/docker/ceph/ceph-mgr/Dockerfile.j2 deleted file mode 100644 index 86c0f5ca24..0000000000 --- a/docker/ceph/ceph-mgr/Dockerfile.j2 +++ /dev/null @@ -1,7 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}ceph-base:{{ tag }} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" - -{% block ceph_mgr_header %}{% endblock %} - -{% block ceph_mgr_footer %}{% endblock %} -{% block footer %}{% endblock %} diff --git a/docker/ceph/ceph-mon/Dockerfile.j2 b/docker/ceph/ceph-mon/Dockerfile.j2 deleted file mode 100644 index 1bcfa988b2..0000000000 --- a/docker/ceph/ceph-mon/Dockerfile.j2 +++ /dev/null @@ -1,12 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}ceph-base:{{ tag }} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" - -{% block ceph_mon_header %}{% endblock %} - -COPY fetch_ceph_keys.py /usr/bin/ - -COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN chmod 755 /usr/local/bin/kolla_extend_start /usr/bin/fetch_ceph_keys.py - -{% block ceph_mon_footer %}{% endblock %} -{% block footer %}{% endblock %} diff --git a/docker/ceph/ceph-mon/extend_start.sh b/docker/ceph/ceph-mon/extend_start.sh deleted file mode 100644 index 188349788c..0000000000 --- a/docker/ceph/ceph-mon/extend_start.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash - -# Setup common paths -KEYRING_ADMIN="/etc/ceph/ceph.client.admin.keyring" -KEYRING_MON="/etc/ceph/ceph.client.mon.keyring" -KEYRING_RGW="/etc/ceph/ceph.client.radosgw.keyring" -MONMAP="/etc/ceph/ceph.monmap" -MON_DIR="/var/lib/ceph/mon/ceph-${HOSTNAME}" - -if [[ ! -d "/var/log/kolla/ceph" ]]; then - mkdir -p /var/log/kolla/ceph -fi -if [[ $(stat -c %a /var/log/kolla/ceph) != "755" ]]; then - chmod 755 /var/log/kolla/ceph -fi - -# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases -# of the KOLLA_BOOTSTRAP variable being set, including empty. -if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then - # Lookup our fsid from the ceph.conf - FSID=$(awk '/^fsid/ {print $3; exit}' /etc/ceph/ceph.conf) - - # 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 --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}" - - exit 0 -fi - -# This section runs on every mon that does not have a keyring already. -if [[ ! -e "${MON_DIR}/keyring" ]]; then - KEYRING_TMP="/tmp/ceph.mon.keyring" - - # Generate keyring for current monitor - ceph-authtool --create-keyring "${KEYRING_TMP}" --import-keyring "${KEYRING_ADMIN}" - ceph-authtool "${KEYRING_TMP}" --import-keyring "${KEYRING_MON}" - mkdir -p "${MON_DIR}" - - mon_stat=$(ceph mon stat --connect-timeout 1 || true) - mon_check=$(echo $mon_stat | awk '/mons/{print $0}' | wc -l) - if [[ ${mon_check} -eq 0 ]]; then - ceph-mon --mkfs -i "${HOSTNAME}" --keyring "${KEYRING_TMP}" - else - MONMAP_TMP="/tmp/ceph.${HOSTNAME}.monmap" - ceph mon getmap -o "${MONMAP_TMP}" - ceph-mon --mkfs -i "${HOSTNAME}" --monmap "${MONMAP_TMP}" --keyring "${KEYRING_TMP}" - rm "${MONMAP_TMP}" - fi - rm "${KEYRING_TMP}" -fi diff --git a/docker/ceph/ceph-mon/fetch_ceph_keys.py b/docker/ceph/ceph-mon/fetch_ceph_keys.py deleted file mode 100644 index 31af87eed8..0000000000 --- a/docker/ceph/ceph-mon/fetch_ceph_keys.py +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/python - -# Copyright 2015 Sam Yaple -# -# 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. - -# This is a stripped down version of an ansible module I wrote in Yaodu to -# achieve the same goals we have for Kolla. I have relicensed it for Kolla -# https://github.com/SamYaple/yaodu/blob/master/ansible/library/bslurp - -# Basically this module will fetch the admin and mon keyrings as well as the -# monmap file. It then hashes the content, compresses them, and finally it -# converts them to base64 to be safely transported around with ansible - -import base64 -import hashlib -import json -import os -import sys -import zlib - - -def json_exit(msg=None, failed=False, changed=False): - if type(msg) is not dict: - msg = {'msg': str(msg)} - msg.update({'failed': failed, 'changed': changed}) - print(json.dumps(msg)) - sys.exit() - - -def read_file(filename): - filename_path = os.path.join('/etc/ceph', filename) - - if not os.path.exists(filename_path): - json_exit("file not found: {}".format(filename_path), failed=True) - if not os.access(filename_path, os.R_OK): - json_exit("file not readable: {}".format(filename_path), failed=True) - - with open(filename_path, 'rb') as f: - raw_data = f.read() - - # TODO(mnasiadka): Remove sha1 in U - return {'content': (base64.b64encode(zlib.compress(raw_data))).decode(), - 'sha1': hashlib.sha1(raw_data).hexdigest(), - 'sha256': hashlib.sha256(raw_data).hexdigest(), - 'filename': filename} - - -def main(): - admin_keyring = 'ceph.client.admin.keyring' - mon_keyring = 'ceph.client.mon.keyring' - rgw_keyring = 'ceph.client.radosgw.keyring' - monmap = 'ceph.monmap' - - files = [admin_keyring, mon_keyring, rgw_keyring, monmap] - json_exit({filename: read_file(filename) for filename in files}) - - -if __name__ == '__main__': - main() diff --git a/docker/ceph/ceph-nfs/Dockerfile.j2 b/docker/ceph/ceph-nfs/Dockerfile.j2 deleted file mode 100644 index 79d5e78ca7..0000000000 --- a/docker/ceph/ceph-nfs/Dockerfile.j2 +++ /dev/null @@ -1,25 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}ceph-base:{{ tag }} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" - -{% block ceph_nfs_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if base_package_type == 'rpm' %} - - {% set ceph_nfs_packages = [ - 'nfs-ganesha', - 'nfs-ganesha-ceph' - ] %} -{% elif base_package_type == 'deb' %} - {% set ceph_nfs_packages = [ - 'nfs-ganesha', - 'nfs-ganesha-ceph' - ] %} - -{% endif %} - -{{ macros.install_packages(ceph_nfs_packages | customizable("packages")) }} - -{% block ceph_nfs_footer %}{% endblock %} -{% block footer %}{% endblock %} diff --git a/docker/ceph/ceph-osd/Dockerfile.j2 b/docker/ceph/ceph-osd/Dockerfile.j2 deleted file mode 100644 index 27c4e8ef37..0000000000 --- a/docker/ceph/ceph-osd/Dockerfile.j2 +++ /dev/null @@ -1,10 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}ceph-base:{{ tag }} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" - -{% block ceph_osd_header %}{% endblock %} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN chmod 755 /usr/local/bin/kolla_extend_start - -{% block ceph_osd_footer %}{% endblock %} -{% block footer %}{% endblock %} diff --git a/docker/ceph/ceph-osd/extend_start.sh b/docker/ceph/ceph-osd/extend_start.sh deleted file mode 100644 index f1a7f776f6..0000000000 --- a/docker/ceph/ceph-osd/extend_start.sh +++ /dev/null @@ -1,210 +0,0 @@ -#!/bin/bash - -if [[ ! -d "/var/log/kolla/ceph" ]]; then - mkdir -p /var/log/kolla/ceph -fi -if [[ $(stat -c %a /var/log/kolla/ceph) != "755" ]]; then - chmod 755 /var/log/kolla/ceph -fi - -# Inform the os about partition table changes -function partprobe_device { - local device=$1 - udevadm settle --timeout=600 - flock -s ${device} partprobe ${device} - udevadm settle --timeout=600 -} - -# In some cases, the disk partition will not appear immediately, so check every -# 1s, try up to 10 times. In general, this interval is enough. -function wait_partition_appear { - local dev_part=$1 - local part_name=$(echo ${dev_part} | awk -F '/' '{print $NF}') - for(( i=1; i<11; i++ )); do - flag=$(ls /dev | awk '/'"${part_name}"'/{print $0}' | wc -l) - if [[ "${flag}" -eq 0 ]]; then - echo "sleep 1 waits for the partition ${dev_part} to appear: ${i}" - sleep 1 - else - return 0 - fi - done - echo "The device /dev/${dev_part} does not appear within the limited time 10s." - exit 1 -} - -# Few storage device like loop or NVMe, wiil add "p" between disk & partition -# name if disk layout is end with number. This function will fix to correct format. -function part_name_checker { - if [[ $1 =~ .*[0-9] ]]; then - echo ${1}p${2} - else - echo ${1}${2} - fi -} - -# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases -# of the KOLLA_BOOTSTRAP variable being set, including empty. -if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then - # NOTE(SamYaple): Static gpt partcodes - CEPH_JOURNAL_TYPE_CODE="45B0969E-9B03-4F30-B4C6-B4B80CEFF106" - CEPH_OSD_TYPE_CODE="4FBD7E29-9D25-41B8-AFD0-062C0CEFF05D" - CEPH_OSD_BS_WAL_TYPE_CODE="0FC63DAF-8483-4772-8E79-3D69D8477DE4" - CEPH_OSD_BS_DB_TYPE_CODE="CE8DF73C-B89D-45B0-AD98-D45332906d90" - - # Wait for ceph quorum before proceeding - ceph quorum_status - - if [[ "${USE_EXTERNAL_JOURNAL}" == "False" ]]; then - # Formatting disk for ceph - if [[ "${OSD_STORETYPE}" == "bluestore" ]]; then - sgdisk --zap-all -- "$(part_name_checker $OSD_BS_DEV $OSD_BS_PARTNUM)" - - if [ -n "${OSD_BS_BLK_DEV}" ] && [ "${OSD_BS_DEV}" != "${OSD_BS_BLK_DEV}" ] && [ -n "${OSD_BS_BLK_PARTNUM}" ]; then - sgdisk --zap-all -- "$(part_name_checker ${OSD_BS_BLK_DEV} ${OSD_BS_BLK_PARTNUM})" - else - sgdisk --zap-all -- "${OSD_BS_DEV}" - sgdisk --new=1:0:+100M --mbrtogpt -- "${OSD_BS_DEV}" - sgdisk --largest-new=2 --mbrtogpt -- "${OSD_BS_DEV}" - partprobe_device "${OSD_BS_DEV}" - - wait_partition_appear "$(part_name_checker $OSD_BS_DEV 2)" - sgdisk --zap-all -- "$(part_name_checker $OSD_BS_DEV 2)" - fi - - if [ -n "${OSD_BS_WAL_DEV}" ] && [ "${OSD_BS_BLK_DEV}" != "${OSD_BS_WAL_DEV}" ] && [ -n "${OSD_BS_WAL_PARTNUM}" ]; then - sgdisk --zap-all -- "$(part_name_checker $OSD_BS_WAL_DEV $OSD_BS_WAL_PARTNUM)" - fi - - if [ -n "${OSD_BS_DB_DEV}" ] && [ "${OSD_BS_BLK_DEV}" != "${OSD_BS_DB_DEV}" ] && [ -n "${OSD_BS_DB_PARTNUM}" ]; then - sgdisk --zap-all -- "$(part_name_checker $OSD_BS_DB_DEV $OSD_BS_DB_PARTNUM)" - fi - else - sgdisk --zap-all -- "${OSD_DEV}" - sgdisk --new=2:1M:5G -- "${JOURNAL_DEV}" - sgdisk --largest-new=1 -- "${OSD_DEV}" - fi - # NOTE(SamYaple): This command may throw errors that we can safely ignore - partprobe || true - - fi - - if [[ "${OSD_STORETYPE}" == "bluestore" ]]; then - OSD_UUID=$(uuidgen) - OSD_ID=$(ceph osd new "${OSD_UUID}") - OSD_DIR="/var/lib/ceph/osd/ceph-${OSD_ID}" - mkdir -p "${OSD_DIR}" - - mkfs.xfs -f "$(part_name_checker $OSD_BS_DEV $OSD_BS_PARTNUM)" - mount "$(part_name_checker $OSD_BS_DEV $OSD_BS_PARTNUM)" "${OSD_DIR}" - - # This will through an error about no key existing. That is normal. It then - # creates the key in the next step. - 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 - sgdisk "--change-name=2:KOLLA_CEPH_DATA_BS_${OSD_ID}_B" "--typecode=2:${CEPH_OSD_TYPE_CODE}" -- "${OSD_BS_DEV}" - fi - - if [ -n "${OSD_BS_WAL_DEV}" ] && [ "${OSD_BS_BLK_DEV}" != "${OSD_BS_WAL_DEV}" ] && [ -n "${OSD_BS_WAL_PARTNUM}" ]; then - sgdisk "--change-name="${OSD_BS_WAL_PARTNUM}":KOLLA_CEPH_DATA_BS_${OSD_ID}_W" "--typecode="${OSD_BS_WAL_PARTNUM}":${CEPH_OSD_BS_WAL_TYPE_CODE}" -- "${OSD_BS_WAL_DEV}" - fi - - if [ -n "${OSD_BS_DB_DEV}" ] && [ "${OSD_BS_BLK_DEV}" != "${OSD_BS_DB_DEV}" ] && [ -n "${OSD_BS_DB_PARTNUM}" ]; then - sgdisk "--change-name="${OSD_BS_DB_PARTNUM}":KOLLA_CEPH_DATA_BS_${OSD_ID}_D" "--typecode="${OSD_BS_DB_PARTNUM}":${CEPH_OSD_BS_DB_TYPE_CODE}" -- "${OSD_BS_DB_DEV}" - fi - - partprobe || true - - ln -sf /dev/disk/by-partlabel/KOLLA_CEPH_DATA_BS_"${OSD_ID}"_B "${OSD_DIR}"/block - - if [ -n "${OSD_BS_WAL_DEV}" ] && [ "${OSD_BS_BLK_DEV}" != "${OSD_BS_WAL_DEV}" ] && [ -n "${OSD_BS_WAL_PARTNUM}" ]; then - ln -sf /dev/disk/by-partlabel/KOLLA_CEPH_DATA_BS_"${OSD_ID}"_W "${OSD_DIR}"/block.wal - fi - - if [ -n "${OSD_BS_DB_DEV}" ] && [ "${OSD_BS_BLK_DEV}" != "${OSD_BS_DB_DEV}" ] && [ -n "${OSD_BS_DB_PARTNUM}" ]; then - ln -sf /dev/disk/by-partlabel/KOLLA_CEPH_DATA_BS_"${OSD_ID}"_D "${OSD_DIR}"/block.db - fi - - 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" - - umount "$(part_name_checker $OSD_BS_DEV $OSD_BS_PARTNUM)" - - else - OSD_ID=$(ceph osd create) - OSD_DIR="/var/lib/ceph/osd/ceph-${OSD_ID}" - mkdir -p "${OSD_DIR}" - - if [[ "${OSD_FILESYSTEM}" == "btrfs" ]]; then - mkfs.btrfs -f "${OSD_PARTITION}" - elif [[ "${OSD_FILESYSTEM}" == "ext4" ]]; then - mkfs.ext4 "${OSD_PARTITION}" - else - mkfs.xfs -f "${OSD_PARTITION}" - fi - mount "${OSD_PARTITION}" "${OSD_DIR}" - - # This will through an error about no key existing. That is normal. It then - # creates the key in the next step. - 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 - - if [[ "${!CEPH_CACHE[@]}" ]]; then - CEPH_ROOT_NAME=cache - fi - - if [[ "${OSD_INITIAL_WEIGHT}" == "auto" ]]; then - OSD_INITIAL_WEIGHT=$(parted --script ${OSD_PARTITION} unit TB print | awk 'match($0, /^Disk.* (.*)TB/, a){printf("%.2f", a[1])}') - fi - - # These commands only need to be run once per host but are safe to run - # repeatedly. This can be improved later or if any problems arise. - host_bucket_name="${HOSTNAME}${CEPH_ROOT_NAME:+-${CEPH_ROOT_NAME}}" - host_bucket_check=$(ceph osd tree | awk '/'"${host_bucket_name}"'/{print $0}' | wc -l) - if [[ "${host_bucket_check}" -eq 0 ]]; then - ceph osd crush add-bucket "${host_bucket_name}" host - ceph osd crush move "${host_bucket_name}" root=${CEPH_ROOT_NAME:-default} - fi - - # Adding osd to crush map - ceph osd crush add "${OSD_ID}" "${OSD_INITIAL_WEIGHT}" host="${HOSTNAME}${CEPH_ROOT_NAME:+-${CEPH_ROOT_NAME}}" - - # Setting partition name based on ${OSD_ID} - if [[ "${OSD_STORETYPE}" == "bluestore" ]]; then - sgdisk "--change-name=${OSD_PARTITION_NUM}:KOLLA_CEPH_DATA_BS_${OSD_ID}" "--typecode=${OSD_PARTITION_NUM}:${CEPH_OSD_TYPE_CODE}" -- "${OSD_BS_DEV}" - else - sgdisk "--change-name=${OSD_PARTITION_NUM}:KOLLA_CEPH_DATA_${OSD_ID}" "--typecode=${OSD_PARTITION_NUM}:${CEPH_OSD_TYPE_CODE}" -- "${OSD_DEV}" - sgdisk "--change-name=${JOURNAL_PARTITION_NUM}:KOLLA_CEPH_DATA_${OSD_ID}_J" "--typecode=${JOURNAL_PARTITION_NUM}:${CEPH_JOURNAL_TYPE_CODE}" -- "${JOURNAL_DEV}" - fi - partprobe || true - - exit 0 -fi - -OSD_DIR="/var/lib/ceph/osd/ceph-${OSD_ID}" -if [[ "${OSD_STORETYPE}" == "bluestore" ]]; then - ARGS="-i ${OSD_ID}" -else - ARGS="-i ${OSD_ID} --osd-journal ${JOURNAL_PARTITION} -k ${OSD_DIR}/keyring" -fi diff --git a/docker/ceph/ceph-rgw/Dockerfile.j2 b/docker/ceph/ceph-rgw/Dockerfile.j2 deleted file mode 100644 index f2b1b4b999..0000000000 --- a/docker/ceph/ceph-rgw/Dockerfile.j2 +++ /dev/null @@ -1,7 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}ceph-base:{{ tag }} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" - -{% block ceph_rgw_header %}{% endblock %} - -{% block ceph_rgw_footer %}{% endblock %} -{% block footer %}{% endblock %} diff --git a/docker/ceph/cephfs-fuse/Dockerfile.j2 b/docker/ceph/cephfs-fuse/Dockerfile.j2 deleted file mode 100644 index 7008539e4c..0000000000 --- a/docker/ceph/cephfs-fuse/Dockerfile.j2 +++ /dev/null @@ -1,11 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}ceph-base:{{ tag }} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" - -{% block cephfs_fuse_header %}{% endblock %} - -{% block cephfs_fuse_footer %}{% endblock %} -{% block footer %}{% endblock %} - -# Clear any customisation by Kolla to entrypoint & command -ENTRYPOINT ["/usr/bin/ceph-fuse"] -CMD [] diff --git a/kolla/common/config.py b/kolla/common/config.py index d6fabfc1de..12920586ec 100755 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -56,7 +56,6 @@ TARBALLS_BASE = "https://tarballs.openstack.org" _PROFILE_OPTS = [ cfg.ListOpt('infra', default=[ - 'ceph', 'certmonger', 'cron', 'elasticsearch', @@ -1074,10 +1073,6 @@ USERS = { 'uid': 42454, 'gid': 42454, }, - 'ceph-user': { - 'uid': 64045, - 'gid': 64045, - }, 'memcached-user': { 'uid': 42457, 'gid': 42457, diff --git a/kolla/image/build.py b/kolla/image/build.py index f3fd560389..e7936590e1 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -145,7 +145,6 @@ UNBUILDABLE_IMAGES = { # NOTE(mgoddard): Mark images with missing dependencies as unbuildable for # CentOS 8. 'centos8': { - "ceph-base", # Missing Ceph repo "collectd", # Missing collectd-ping and # collectd-sensubility packages "elasticsearch", # Missing elasticsearch repo diff --git a/releasenotes/notes/remove-ceph-afff3cd8775e3a41.yaml b/releasenotes/notes/remove-ceph-afff3cd8775e3a41.yaml new file mode 100644 index 0000000000..f1ad79a957 --- /dev/null +++ b/releasenotes/notes/remove-ceph-afff3cd8775e3a41.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + Kolla Ceph container images have been removed. Please use + other source of Ceph container images, such as `ceph-container + `__