2024-05-09 17:46:14 -07:00
|
|
|
# cephadm.sh - DevStack extras script to install Ceph
|
2015-11-25 15:49:50 +01:00
|
|
|
if [[ "$1" == "source" ]]; then
|
|
|
|
|
# Initial source
|
2024-05-09 17:46:14 -07:00
|
|
|
source $TOP_DIR/lib/cephadm
|
2015-11-25 15:49:50 +01:00
|
|
|
elif [[ "$1" == "stack" && "$2" == "pre-install" ]]; then
|
2016-01-12 13:22:29 +00:00
|
|
|
if [[ "$ENABLE_CEPH_RGW" = "True" ]] && (is_service_enabled swift); then
|
|
|
|
|
die $LINENO \
|
|
|
|
|
"You cannot activate both Swift and Ceph Rados Gateway, \
|
|
|
|
|
please disable Swift or set ENABLE_CEPH_RGW=False"
|
|
|
|
|
fi
|
2024-05-09 17:46:14 -07:00
|
|
|
echo_summary "[cephadm] Configuring system services ceph"
|
|
|
|
|
pre_install_ceph
|
2017-10-09 19:07:54 +00:00
|
|
|
elif [[ "$1" == "stack" && "$2" == "install" ]]; then
|
2024-05-09 17:46:14 -07:00
|
|
|
if [[ "$REMOTE_CEPH" = "False" ]]; then
|
2022-01-26 15:13:11 +00:00
|
|
|
# Perform installation of service source
|
|
|
|
|
echo_summary "[cephadm] Installing ceph"
|
|
|
|
|
install_ceph
|
2025-01-13 11:58:04 -05:00
|
|
|
set_memory_config
|
2023-03-07 14:54:34 +00:00
|
|
|
set_min_client_version
|
2024-05-09 17:46:14 -07:00
|
|
|
else
|
2023-03-07 14:54:34 +00:00
|
|
|
echo "[CEPHADM] Remote Ceph: Skipping install"
|
|
|
|
|
get_cephadm
|
2018-04-24 09:25:29 +00:00
|
|
|
fi
|
2015-11-25 15:49:50 +01:00
|
|
|
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
|
2024-05-09 17:46:14 -07:00
|
|
|
echo_summary "[cephadm] Configuring additional Ceph services"
|
|
|
|
|
configure_ceph
|
2024-06-05 11:00:10 -04:00
|
|
|
if [[ "$MDS_LOGS" == "True" ]]; then
|
|
|
|
|
enable_verbose_mds_logging
|
|
|
|
|
fi
|
2017-02-10 10:09:26 -05:00
|
|
|
elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then
|
|
|
|
|
if is_service_enabled tempest; then
|
|
|
|
|
iniset $TEMPEST_CONFIG compute-feature-enabled swap_volume False
|
2024-05-09 17:46:14 -07:00
|
|
|
iniset $TEMPEST_CONFIG compute-feature-enabled shelve True
|
|
|
|
|
iniset $TEMPEST_CONFIG volume-feature-enabled extend_attached_volume True
|
|
|
|
|
iniset $TEMPEST_CONFIG volume-feature-enabled volume_revert True
|
2024-05-02 12:43:28 -04:00
|
|
|
iniset $TEMPEST_CONFIG volume-feature-enabled manage_volume True
|
|
|
|
|
iniset $TEMPEST_CONFIG volume-feature-enabled manage_snapshot True
|
|
|
|
|
iniset $TEMPEST_CONFIG volume manage_snapshot_ref "source-name, snapshot-%s"
|
2015-11-25 15:49:50 +01:00
|
|
|
fi
|
2024-05-09 17:46:14 -07:00
|
|
|
elif [[ "$1" == "unstack" || "$1" == "clean" ]]; then
|
|
|
|
|
cleanup_ceph
|
2015-11-25 15:49:50 +01:00
|
|
|
fi
|