99281bd30f
The __future__ module [1] was used in this context to ensure compatibility between python 2 and python 3. We previously dropped the support of python 2.7 [2] and now we only support python 3 so we don't need to continue to use this module and the imports listed below. Imports commonly used and their related PEPs: - `division` is related to PEP 238 [3] - `print_function` is related to PEP 3105 [4] - `unicode_literals` is related to PEP 3112 [5] - `with_statement` is related to PEP 343 [6] - `absolute_import` is related to PEP 328 [7] [1] https://docs.python.org/3/library/__future__.html [2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html [3] https://www.python.org/dev/peps/pep-0238 [4] https://www.python.org/dev/peps/pep-3105 [5] https://www.python.org/dev/peps/pep-3112 [6] https://www.python.org/dev/peps/pep-0343 [7] https://www.python.org/dev/peps/pep-0328 Change-Id: I6d02b20797cf1a0208a24e740d1f9dc921434b82 |
||
---|---|---|
.. | ||
bin | ||
install.d | ||
rsyslog.d | ||
tests | ||
upstart | ||
__init__.py | ||
element-deps | ||
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 https://opendev.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