Merge "Deploy fuxi-server via uwsgi"
This commit is contained in:
commit
75600a63ad
|
@ -15,8 +15,6 @@
|
|||
XTRACE=$(set +o | grep xtrace)
|
||||
set +o xtrace
|
||||
|
||||
FUXI_BIN_DIR=$(get_python_exec_prefix)
|
||||
|
||||
function check_docker {
|
||||
if is_ubuntu; then
|
||||
dpkg -s docker-engine > /dev/null 2>&1
|
||||
|
@ -58,6 +56,8 @@ function configure_fuxi {
|
|||
iniset $FUXI_CONFIG cinder multiattach false
|
||||
iniset $FUXI_CONFIG cinder fstype ext4
|
||||
fi
|
||||
|
||||
write_uwsgi_config "$FUXI_UWSGI_CONF" "$FUXI_UWSGI" "" ":7879"
|
||||
}
|
||||
|
||||
|
||||
|
@ -97,12 +97,13 @@ if is_service_enabled fuxi; then
|
|||
fi
|
||||
|
||||
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
|
||||
run_process fuxi "$FUXI_BIN_DIR/fuxi-server --config-file $FUXI_CONFIG" "" "root"
|
||||
run_process fuxi "$FUXI_BIN_DIR/uwsgi --ini $FUXI_UWSGI_CONF" "" "root"
|
||||
|
||||
fi
|
||||
|
||||
if [[ "$1" == "unstack" ]]; then
|
||||
stop_process fuxi-server
|
||||
stop_process fuxi
|
||||
remove_uwsgi_config "$FUXI_UWSGI_CONF" "$FUXI_UWSGI"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -16,6 +16,10 @@ FUXI_AUTH_CACHE_DIR=${FUXI_AUTH_CACHE_DIR:-/var/cache/fuxi}
|
|||
FUXI_DOCKER_ENGINE_PORT=${FUXI_DOCKER_ENGINE_PORT:-2375}
|
||||
FUXI_VOLUME_PROVIDERS=${FUXI_VOLUME_PROVIDERS:-cinder,manila}
|
||||
|
||||
FUXI_BIN_DIR=$(get_python_exec_prefix)
|
||||
FUXI_UWSGI=$FUXI_BIN_DIR/fuxi-server-wsgi
|
||||
FUXI_UWSGI_CONF=$FUXI_CONFIG_DIR/fuxi-server-uwsgi.ini
|
||||
|
||||
DOCKER_CLUSTER_STORE=${DOCKER_CLUSTER_STORE:-etcd://localhost:$ETCD_PORT}
|
||||
|
||||
GITREPO["kuryr"]=${KURYR_REPO:-${GIT_BASE}/openstack/kuryr.git}
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
# 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.
|
||||
|
||||
import sys
|
||||
|
||||
from fuxi import app
|
||||
from fuxi.common import config
|
||||
from fuxi import controllers
|
||||
|
||||
from oslo_log import log as logging
|
||||
|
||||
|
||||
def init_application():
|
||||
config.init(sys.argv[1:])
|
||||
logging.setup(config.CONF, 'fuxi')
|
||||
|
||||
controllers.init_app_conf()
|
||||
|
||||
return app
|
Loading…
Reference in New Issue