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
This commit is contained in:
parent
063a46a7de
commit
abce4d5398
@ -120,7 +120,6 @@ Infrastructure components
|
||||
|
||||
Kolla provides images to deploy the following infrastructure components:
|
||||
|
||||
- `Ceph <https://ceph.com/>`__ implementation for Cinder, Glance and Nova
|
||||
- `Certmonger <https://pagure.io/certmonger>`__ a service to simplify interaction
|
||||
with CAs on networks which use PKI.
|
||||
- `Chrony <https://chrony.tuxfamily.org/>`__ a versatile implementation
|
||||
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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 %}
|
@ -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
|
@ -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 %}
|
@ -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 %}
|
@ -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 %}
|
@ -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
|
@ -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()
|
@ -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 %}
|
@ -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 %}
|
@ -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
|
@ -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 %}
|
@ -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 []
|
@ -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,
|
||||
|
@ -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
|
||||
|
6
releasenotes/notes/remove-ceph-afff3cd8775e3a41.yaml
Normal file
6
releasenotes/notes/remove-ceph-afff3cd8775e3a41.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
Kolla Ceph container images have been removed. Please use
|
||||
other source of Ceph container images, such as `ceph-container
|
||||
<https://github.com/ceph/ceph-container>`__
|
Loading…
x
Reference in New Issue
Block a user