tripleo-image-elements/elements/os-svc-install
Ben Nemec 638a863db8 Remove mysql-dev dependency from os-svc-install
Looking through the image build logs, I noticed we were pulling in
the mysql-devel packages for some reason.  It turns out this is a
historical artifact of the old TripleO source installs using
os-svc-install.  It was universally installing mysql-python on
every image where it was used because that package wasn't in the
requirements.txt for the OpenStack projects.

This was wrong in the first place, and now that we aren't supporting
that installation method anymore it doesn't make sense to keep
installing nine development packages that we'll never use on our
images.

Note that the only thing we use from os-svc-install now appears to
be os-svc-enable, so this should have no effect on the current
TripleO flow, except slightly smaller/faster image builds.

Change-Id: Iae3e6ae3f57de57639c4259361e82c8150fe2f0e
2016-03-10 13:29:10 -06:00
..
bin Remove mysql-dev dependency from os-svc-install 2016-03-10 13:29:10 -06:00
install.d On ubuntu break app logs into their own files 2014-09-02 14:03:36 -07:00
rsyslog.d On ubuntu break app logs into their own files 2014-09-02 14:03:36 -07:00
tests tox: fix the test suite 2015-02-02 12:05:21 +00:00
upstart Add a service enable/disable mechanism for upstart 2013-12-10 20:55:31 -08:00
README.md Add -i options to os-svc-install/os-svc-daemon... 2014-03-24 09:55:53 -04:00
__init__.py Add unit tests for os-svc-daemon 2014-03-28 19:55:29 -05:00
element-deps Remove mysql-dev dependency from os-svc-install 2016-03-10 13:29:10 -06: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. NOTE: By default the virtualenv is installed to /opt/stack/venvs/SERVICENAME but this can be customized. NOTE: By default services do not autostart until os-svc-enable is called.

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. This is typically called in an os-refresh-config/post-configure.d script to enable a service once it has been fully configured.

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, and install it and its dependencies to /opt/stack/venvs/nova
os-svc-install -u nova -r git://git.openstack.org/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
os-svc-enable -n nova-api