tripleo-image-elements/elements/os-svc-install
Dan Prince 4e482c192a Enable services with os-svc-enable
Split out the code which enables services to start on boot into
a new os-svc-enable script. This script is currently called by
os-svc-deamon so that services automatically start on first boot
(as is the case with os-svc-install)

The motivation here is to decouple service installation and enabling
so that we can eventually avoid starting services on first boot
until after they are configured. Auto starting services on boot like
we currently do is causing lots of log ERROR messages, etc.

Change-Id: I66d4660c169f5918e924eab1876134891c3a24a1
2013-12-12 10:26:42 -05:00
..
bin Enable services with os-svc-enable 2013-12-12 10:26:42 -05:00
install.d Enable services with os-svc-enable 2013-12-12 10:26:42 -05:00
upstart Add a service enable/disable mechanism for upstart 2013-12-10 20:55:31 -08:00
README.md Enable services with os-svc-enable 2013-12-12 10:26:42 -05:00

README.md

Command line utilities to simplify installation of OpenStack services.

os-svc-install

Given a git repo url, pip-install the repo and all of its python dependencies into a virtualenv under /opt/stack/venvs.

os-svc-daemon

Given a system service command line and run-as user, generate and install system service start script. See output of os-svc-daemon -h for online help.

os-svc-enable

Enable the given service name so it starts on boot.

os-svc-enable-upstart (upstart distros only)

Given an upstart job and an action, acts on the enabled or disabled state of jobs produced by os-svc-daemon. This requires the os-svc-enable upstart job which is installed by this element as well. There is also an action, 'enabled', which allows checking whether or not a service is enabled; the command exits 0 if it is enabled, or 1 if it is not. A disabled service will not be started automatically nor can it be manually started.

example usage

# clone nova.git from github, and install it and its dependencies to /opt/stack/venvs/nova
os-svc-install -u nova -n nova-all -c 'nova-all --someoption' -r https://github.com/openstack/nova.git

# install a system-start script for nova-api
os-svc-daemon -e 'foo=bar bar=baz' -n nova-api -u nova -c /opt/stack/venvs/nova/bin/nova-api -- --config-dir /etc/nova

# enable nova-api so that it starts on boot
# NOTE: for now this is called in os-svc-daemon for legacy element support
os-svc-enable -n nova-api