diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 53696e9..e8cfc75 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -15,22 +15,8 @@ XTRACE=$(set +o | grep xtrace) set +o xtrace -ETCD_VERSION=v2.2.2 FUXI_BIN_DIR=$(get_python_exec_prefix) -function install_etcd_data_store { - - if [ ! -f "$DEST/etcd/etcd-$ETCD_VERSION-linux-amd64/etcd" ]; then - echo "Installing etcd server" - mkdir $DEST/etcd - wget https://github.com/coreos/etcd/releases/download/$ETCD_VERSION/etcd-$ETCD_VERSION-linux-amd64.tar.gz -O $DEST/etcd/etcd-$ETCD_VERSION-linux-amd64.tar.gz - tar xzvf $DEST/etcd/etcd-$ETCD_VERSION-linux-amd64.tar.gz -C $DEST/etcd - fi - - # Clean previous DB data - rm -rf $DEST/etcd/db.etcd -} - function check_docker { if is_ubuntu; then dpkg -s docker-engine > /dev/null 2>&1 @@ -83,7 +69,6 @@ if is_service_enabled fuxi; then git_clone_by_name "kuryr" setup_dev_lib "kuryr" fi - install_etcd_data_store setup_develop $FUXI_HOME elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then @@ -103,9 +88,6 @@ if is_service_enabled fuxi; then create_fuxi_account configure_fuxi - # Run etcd first - pgrep -x "etcd" >/dev/null || run_process etcd-server "$DEST/etcd/etcd-$ETCD_VERSION-linux-amd64/etcd --data-dir $DEST/etcd/db.etcd --advertise-client-urls http://0.0.0.0:$FUXI_ETCD_PORT --listen-client-urls http://0.0.0.0:$FUXI_ETCD_PORT" - # FIXME(mestery): By default, Ubuntu ships with /bin/sh pointing to # the dash shell. # .. @@ -133,7 +115,7 @@ if is_service_enabled fuxi; then # After an ./unstack it will be stopped. So it is ok if it returns exit-code == 1 sudo service docker stop || true - run_process docker-engine "/usr/bin/docker daemon -H unix://$FUXI_DOCKER_ENGINE_SOCKET_FILE -H tcp://0.0.0.0:$FUXI_DOCKER_ENGINE_PORT --cluster-store etcd://localhost:$FUXI_ETCD_PORT" "" "root" + run_process docker-engine "/usr/bin/docker daemon -H unix://$FUXI_DOCKER_ENGINE_SOCKET_FILE -H tcp://0.0.0.0:$FUXI_DOCKER_ENGINE_PORT --cluster-store etcd://localhost:2379" "" "root" # We put the stack user as owner of the socket so we do not need to # run the Docker commands with sudo when developing. @@ -160,8 +142,6 @@ if is_service_enabled fuxi; then if [[ "$1" == "unstack" ]]; then stop_process fuxi-server - stop_process etcd-server - rm -rf $DEST/etcd/ stop_process docker-engine # Stop process does not handle well Docker 1.12+ new multi process # split and doesn't kill them all. Let's leverage Docker's own pidfile diff --git a/devstack/settings b/devstack/settings index e4f9af6..83d7449 100644 --- a/devstack/settings +++ b/devstack/settings @@ -15,11 +15,10 @@ FUXI_AUTH_CACHE_DIR=${FUXI_AUTH_CACHE_DIR:-/var/cache/fuxi} FUXI_DOCKER_ENGINE_PORT=${FUXI_DOCKER_ENGINE_PORT:-2375} FUXI_DOCKER_ENGINE_SOCKET_FILE=${FUXI_DOCKER_ENGINE_SOCKET_FILE:-/var/run/docker.sock} -FUXI_ETCD_PORT=${FUXI_ETCD_PORT:-4001} FUXI_VOLUME_PROVIDERS=${FUXI_VOLUME_PROVIDERS:-cinder,manila} GITREPO["kuryr"]=${KURYR_REPO:-${GIT_BASE}/openstack/kuryr.git} GITBRANCH["kuryr"]=${KURYR_BRANCH:-master} GITDIR["kuryr"]=$DEST/kuryr -enable_service fuxi etcd-server docker-engine +enable_service fuxi etcd3 docker-engine