Remove etcd devstack config

The etcd backend is duplicated for removal. This commit removes
the etcd devstack related code.

Change-Id: Ib5b58d03064f6aab12f674e71d3ffff8eb318857
This commit is contained in:
Hongbin Lu 2019-04-27 17:59:01 +00:00
parent 39f5dacc7d
commit 271ca60ce2
3 changed files with 0 additions and 55 deletions

4
.gitignore vendored
View File

@ -64,7 +64,3 @@ etc/zun/zun.conf.sample
# generated policy file
etc/zun/policy.yaml.sample
# etcd config file
devstack/etcd.override

View File

@ -181,11 +181,6 @@ function create_zun_conf {
if [[ ${ZUN_DRIVER} == "docker" ]]; then
iniset $ZUN_CONF DEFAULT container_driver docker.driver.DockerDriver
fi
if [[ ${ZUN_DB_TYPE} == "etcd" ]]; then
iniset $ZUN_CONF DEFAULT db_type etcd
elif [[ ${ZUN_DB_TYPE} == "sql" ]]; then
iniset $ZUN_CONF DEFAULT db_type sql
fi
iniset $ZUN_CONF DEFAULT debug "$ENABLE_DEBUG_LOG_LEVEL"
iniset $ZUN_CONF DEFAULT my_ip "$HOST_IP"
iniset $ZUN_CONF DEFAULT default_cpu 0
@ -193,8 +188,6 @@ function create_zun_conf {
iniset $ZUN_CONF DEFAULT default_disk 0
iniset_rpc_backend zun $ZUN_CONF
iniset $ZUN_CONF database connection `database_connection_url zun`
iniset $ZUN_CONF etcd etcd_host "$SERVICE_HOST"
iniset $ZUN_CONF etcd etcd_port "$ZUN_ETCD_PORT"
iniset $ZUN_CONF websocket_proxy wsproxy_port "$ZUN_WEBSOCKET_PROXY_PORT"
iniset $ZUN_CONF websocket_proxy wsproxy_host "$ZUN_WEBSOCKET_PROXY_IP"
iniset $ZUN_CONF websocket_proxy base_url "ws://${SERVICE_HOST}:${ZUN_WEBSOCKET_PROXY_PORT}/"
@ -275,9 +268,6 @@ function init_zun {
$ZUN_BIN_DIR/zun-db-manage upgrade
fi
if is_service_enabled zun-etcd; then
install_etcd_server
fi
create_zun_cache_dir
fi
}
@ -300,25 +290,6 @@ function install_zun {
setup_develop $ZUN_TEMPEST_PLUGIN_DIR
}
function install_etcd_server {
echo "Installing etcd"
# If there's a container named 'etcd' already exists, remove it.
if [ $(sudo docker ps -a | awk '{print $NF}' | grep -w etcd) ]; then
sudo docker rm -f etcd || true
fi
[[ $(pgrep -x "etcd") ]] || sudo docker run -d --net=host --name etcd quay.io/coreos/etcd:${ZUN_ETCD_VERSION} \
/usr/local/bin/etcd \
--data-dir=data.etcd \
--name node0 \
--initial-advertise-peer-urls http://${HOST_IP}:2380 \
--listen-peer-urls http://${HOST_IP}:2380 \
--advertise-client-urls http://${HOST_IP}:${ZUN_ETCD_PORT} \
--listen-client-urls http://${HOST_IP}:${ZUN_ETCD_PORT} \
--initial-cluster node0=http://${HOST_IP}:2380 \
--initial-cluster-state new \
--initial-cluster-token etcd-token
}
# start_zun_api() - Start the API process ahead of other things
function start_zun_api {
# Get right service port for testing
@ -360,34 +331,16 @@ function start_zun_compute {
run_process zun-compute "$ZUN_BIN_DIR/zun-compute"
}
function start_zun_etcd {
echo "Start zun etcd..."
sudo docker start etcd || true
}
function stop_zun_etcd {
echo "Stop zun etcd..."
sudo docker stop etcd
sudo docker rm -f etcd || true
}
# start_zun() - Start running processes, including screen
function start_zun {
# ``run_process`` checks ``is_service_enabled``, it is not needed here
start_zun_api
start_zun_compute
if is_service_enabled zun-etcd; then
start_zun_etcd
fi
}
# stop_zun() - Stop running processes (non-screen)
function stop_zun {
if is_service_enabled zun-etcd; then
stop_zun_etcd
fi
if [ "$ZUN_USE_UWSGI" == "True" ]; then
disable_apache_site zun
restart_apache_server

View File

@ -25,7 +25,3 @@ if [[ ${HOST_IP} == ${SERVICE_HOST} ]]; then
else
enable_service zun-compute
fi
if [[ ${ZUN_DB_TYPE} == "etcd" ]]; then
enable_service zun-etcd
fi