Cherry-pick the following commits from release-0.4:
* Update requirements to stable/havana. * made code preparations for build (modified) * Made changes for nonroot daemons run * Update requirements.txt for v0.4 Change-Id: I8cc4ee585ae35276b2fe0c81be5e45cb1997b4a2
This commit is contained in:
parent
e15524f402
commit
5da8ef0796
@ -13,4 +13,5 @@ include openstack-common.conf
|
||||
include muranoapi/db/migrate_repo/README
|
||||
include muranoapi/db/migrate_repo/migrate.cfg
|
||||
include muranoapi/db/migrate_repo/versions/*.sql
|
||||
recursive-include etc *
|
||||
global-exclude *.pyc
|
||||
|
102
etc/init.d/murano-api-el6
Executable file
102
etc/init.d/murano-api-el6
Executable file
@ -0,0 +1,102 @@
|
||||
#!/bin/sh
|
||||
# Copyright (c) 2013 Mirantis, Inc.
|
||||
#
|
||||
# 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.
|
||||
# Author: Igor Yozhikov <iyozhikov@mirantis.com>
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: murano-api
|
||||
# Required-Start: $network $local_fs $remote_fs $syslog
|
||||
# Required-Stop: $remote_fs
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: OpenStack Murano API Server
|
||||
# Description: This startup script launches murano-api service daemon.
|
||||
### END INIT INFO
|
||||
# chkconfig: 3 90 10
|
||||
# description: This startup script launches murano-api service daemon.
|
||||
# config: /etc/murano/murano-api.conf, /etc/murano/murano-api-paste.ini
|
||||
#
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
|
||||
DESC="murano-api"
|
||||
NAME=murano-api
|
||||
DAEMON=$(which murano-api)
|
||||
PIDFILE=/var/run/murano/$NAME.pid
|
||||
SCRIPTNAME=/etc/init.d/openstack-$NAME
|
||||
SYSTEM_USER=murano
|
||||
CONFIG_FILE=/etc/murano/murano-api.conf
|
||||
LOCKFILE=/var/lock/subsys/$NAME
|
||||
# Exit if the package is not installed
|
||||
[ -x $DAEMON ] || exit 5
|
||||
|
||||
# source function library
|
||||
. /etc/init.d/functions
|
||||
|
||||
RETVAL=0
|
||||
|
||||
|
||||
start() {
|
||||
if [ ! -d "/var/run/murano" ]; then
|
||||
mkdir -p /var/run/murano
|
||||
chown -R $SYSTEM_USER /var/run/murano
|
||||
fi
|
||||
echo -n "Starting $NAME: "
|
||||
daemon --user $SYSTEM_USER "$DAEMON --config-file=$CONFIG_FILE &>/dev/null & echo \$! > $PIDFILE"
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && touch $LOCKFILE
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n "Stopping $NAME: "
|
||||
#killproc $DAEMON -TERM
|
||||
killproc -p $PIDFILE $DAEMON
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && rm -f $LOCKFILE
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
rh_status() {
|
||||
# run checks to determine if the service is running or use generic status
|
||||
status $DAEMON
|
||||
}
|
||||
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
|
||||
restart)
|
||||
restart
|
||||
;;
|
||||
|
||||
status)
|
||||
rh_status
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart}"
|
||||
exit 2
|
||||
esac
|
||||
exit $?
|
@ -1,9 +1,9 @@
|
||||
[DEFAULT]
|
||||
# Show more verbose log output (sets INFO log level output)
|
||||
verbose = True
|
||||
verbose = False
|
||||
|
||||
# Show debugging output in logs (sets DEBUG log level output)
|
||||
debug = True
|
||||
debug = False
|
||||
|
||||
# Address to bind the server to
|
||||
bind_host = 0.0.0.0
|
||||
@ -11,8 +11,10 @@ bind_host = 0.0.0.0
|
||||
# Port the bind the server to
|
||||
bind_port = 8082
|
||||
|
||||
# Log to this file. Make sure the user has permissions to write to this file!
|
||||
# Set up logging. Make sure the user has permissions to write to this file! To use syslog just set use_syslog parameter value to 'True'.
|
||||
log_file = /tmp/murano-api.log
|
||||
use_syslog=False
|
||||
syslog-log-facility=LOG_LOCAL0
|
||||
|
||||
[database]
|
||||
#A valid SQLAlchemy connection string for the metadata database
|
@ -15,7 +15,7 @@ kombu>=2.4.8
|
||||
pycrypto>=2.6
|
||||
iso8601>=0.1.8
|
||||
six>=1.4.1
|
||||
netaddr>=0.7.6
|
||||
netaddr
|
||||
|
||||
# Note you will need gcc buildtools installed and must
|
||||
# have installed libxml headers for lxml to be successfully
|
||||
@ -28,7 +28,6 @@ Paste
|
||||
|
||||
passlib
|
||||
jsonschema>=1.3.0,!=1.4.0
|
||||
python-keystoneclient>=0.4.1
|
||||
python-keystoneclient>=0.3.2
|
||||
oslo.config>=1.2.0
|
||||
# Please, revert to murano-common>=x.x.x before release
|
||||
http://tarballs.openstack.org/murano-common/murano-common-master.tar.gz#egg=muranocommon-0.4
|
||||
murano-common==0.4
|
||||
|
@ -25,6 +25,7 @@ GIT_CLONE_DIR=`echo $SERVICE_CONTENT_DIRECTORY | sed -e "s/$SERVICE_SRV_NAME//"`
|
||||
#ETC_CFG_DIR="/etc/$SERVICE_SRV_NAME"
|
||||
ETC_CFG_DIR="/etc/murano"
|
||||
LOG_DIR="/var/log/murano/"
|
||||
DB_DIR="/var/db/murano/"
|
||||
SERVICE_CONFIG_FILE_PATH="$ETC_CFG_DIR/murano-api.conf"
|
||||
|
||||
# Functions
|
||||
@ -164,10 +165,18 @@ CLONE_FROM_GIT=$1
|
||||
fi
|
||||
# making smaple configs
|
||||
log "Making sample configuration files at \"$ETC_CFG_DIR\""
|
||||
for file in `ls $SERVICE_CONTENT_DIRECTORY/etc`
|
||||
for file in `ls $SERVICE_CONTENT_DIRECTORY/etc/murano`
|
||||
do
|
||||
cp -f "$SERVICE_CONTENT_DIRECTORY/etc/$file" "$ETC_CFG_DIR/$file.sample"
|
||||
cp -f "$SERVICE_CONTENT_DIRECTORY/etc/murano/$file" "$ETC_CFG_DIR/$file.sample"
|
||||
done
|
||||
log "Creating $DB_DIR"
|
||||
if [ ! -d "$DB_DIR" ]; then
|
||||
mkdir -p $DB_DIR
|
||||
if [ $? -ne 0 ];then
|
||||
log "Can't create \"$DB_DIR\", exiting!!!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# searching for service executable in path
|
||||
|
@ -15,14 +15,14 @@
|
||||
|
||||
[metadata]
|
||||
name = murano-api
|
||||
version = 0.3
|
||||
version = 0.4
|
||||
summary = Murano API
|
||||
description-file =
|
||||
README.rst
|
||||
license = Apache License, Version 2.0
|
||||
author = Mirantis, Inc.
|
||||
author-email = murano-all@lists.openstack.org
|
||||
home-page = htts://launchpad.net/murano
|
||||
home-page = https://launchpad.net/murano
|
||||
classifier =
|
||||
Development Status :: 5 - Production/Stable
|
||||
Environment :: OpenStack
|
||||
|
13
setup.sh
13
setup.sh
@ -23,6 +23,7 @@ GIT_CLONE_DIR=`echo $SERVICE_CONTENT_DIRECTORY | sed -e "s/$SERVICE_SRV_NAME//"`
|
||||
#ETC_CFG_DIR="/etc/$SERVICE_SRV_NAME"
|
||||
ETC_CFG_DIR="/etc/murano"
|
||||
LOG_DIR="/var/log/murano/"
|
||||
DB_DIR="/var/db/murano/"
|
||||
SERVICE_CONFIG_FILE_PATH="$ETC_CFG_DIR/murano-api.conf"
|
||||
|
||||
# Functions
|
||||
@ -142,10 +143,18 @@ CLONE_FROM_GIT=$1
|
||||
fi
|
||||
# making sample configs
|
||||
log "Making sample configuration files at \"$ETC_CFG_DIR\""
|
||||
for file in $(ls $SERVICE_CONTENT_DIRECTORY/etc)
|
||||
for file in $(ls $SERVICE_CONTENT_DIRECTORY/etc/murano)
|
||||
do
|
||||
cp -f "$SERVICE_CONTENT_DIRECTORY/etc/$file" "$ETC_CFG_DIR/$file.sample"
|
||||
cp -f "$SERVICE_CONTENT_DIRECTORY/etc/murano/$file" "$ETC_CFG_DIR/$file.sample"
|
||||
done
|
||||
log "Creating $DB_DIR"
|
||||
if [ ! -d "$DB_DIR" ]; then
|
||||
mkdir -p $DB_DIR
|
||||
if [ $? -ne 0 ];then
|
||||
log "Can't create \"$DB_DIR\", exiting!!!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# searching for service executable in path
|
||||
|
@ -10,7 +10,7 @@ nose-exclude
|
||||
openstack.nose_plugin>=0.7
|
||||
nosehtmloutput>=0.0.3
|
||||
pep8==1.3.3
|
||||
sphinx>=1.1.2
|
||||
sphinx>=1.1.2,<1.2
|
||||
requests>=1.1
|
||||
testtools>=0.9.32
|
||||
mock>=1.0
|
||||
|
Loading…
Reference in New Issue
Block a user