From ebd57ddf4c442c7677223e7e6800f51bceff26e6 Mon Sep 17 00:00:00 2001 From: Hongbin Lu Date: Sun, 15 Jul 2018 18:28:20 +0000 Subject: [PATCH] Add legacy init script for Ubuntu For users who are using Ubuntu 14.04, systemd is not supported. This patch add the sample init script for Ubuntu 14.04. Change-Id: Icf2a1a85cd0c8eccb291dd05f43c0d6150665df3 --- contrib/legacy-ubuntu-init/README.rst | 41 +++++++++++++++++++ .../legacy-ubuntu-init/etc/init/zun-api.conf | 12 ++++++ .../etc/init/zun-compute.conf | 12 ++++++ .../etc/init/zun-wsproxy.conf | 12 ++++++ 4 files changed, 77 insertions(+) create mode 100644 contrib/legacy-ubuntu-init/README.rst create mode 100644 contrib/legacy-ubuntu-init/etc/init/zun-api.conf create mode 100644 contrib/legacy-ubuntu-init/etc/init/zun-compute.conf create mode 100644 contrib/legacy-ubuntu-init/etc/init/zun-wsproxy.conf diff --git a/contrib/legacy-ubuntu-init/README.rst b/contrib/legacy-ubuntu-init/README.rst new file mode 100644 index 000000000..842422ca1 --- /dev/null +++ b/contrib/legacy-ubuntu-init/README.rst @@ -0,0 +1,41 @@ +=================================== +Legacy Init Script for Ubuntu 14.04 +=================================== + +#. Clone the Zun repository: + + .. code-block:: console + + $ git clone https://git.openstack.org/openstack/zun.git + +#. Enable and start zun-api: + + .. code-block:: console + + # cp zun/contrib/legacy-ubuntu-init/etc/init/zun-api.conf \ + /etc/init/zun-api.conf + # start zun-api + +#. Enable and start zun-wsproxy: + + .. code-block:: console + + # cp zun/contrib/legacy-ubuntu-init/etc/init/zun-wsproxy.conf \ + /etc/init/zun-wsproxy.conf + # start zun-wsproxy + +#. Enable and start zun-compute: + + .. code-block:: console + + # cp zun/contrib/legacy-ubuntu-init/etc/init/zun-compute.conf \ + /etc/init/zun-compute.conf + # start zun-compute + +#. Verify that zun services are running: + + .. code-block:: console + + # status zun-api + # status zun-wsproxy + # status zun-compute diff --git a/contrib/legacy-ubuntu-init/etc/init/zun-api.conf b/contrib/legacy-ubuntu-init/etc/init/zun-api.conf new file mode 100644 index 000000000..e31bdf78e --- /dev/null +++ b/contrib/legacy-ubuntu-init/etc/init/zun-api.conf @@ -0,0 +1,12 @@ +description "OpenStack Container Service API" + +start on runlevel [2345] +stop on runlevel [!2345] + +respawn + +exec start-stop-daemon --start --chuid zun \ +--chdir /var/lib/zun \ +--name zun-api \ +--exec /usr/local/bin/zun-api -- \ +--config-file=/etc/zun/zun.conf diff --git a/contrib/legacy-ubuntu-init/etc/init/zun-compute.conf b/contrib/legacy-ubuntu-init/etc/init/zun-compute.conf new file mode 100644 index 000000000..466f004e3 --- /dev/null +++ b/contrib/legacy-ubuntu-init/etc/init/zun-compute.conf @@ -0,0 +1,12 @@ +description "OpenStack Container Service Compute Agent" + +start on runlevel [2345] +stop on runlevel [!2345] + +respawn + +exec start-stop-daemon --start --chuid zun \ +--chdir /var/lib/zun \ +--name zun-compute \ +--exec /usr/local/bin/zun-compute -- \ +--config-file=/etc/zun/zun.conf diff --git a/contrib/legacy-ubuntu-init/etc/init/zun-wsproxy.conf b/contrib/legacy-ubuntu-init/etc/init/zun-wsproxy.conf new file mode 100644 index 000000000..e404f6fb4 --- /dev/null +++ b/contrib/legacy-ubuntu-init/etc/init/zun-wsproxy.conf @@ -0,0 +1,12 @@ +description "OpenStack Container Service Websocket Proxy" + +start on runlevel [2345] +stop on runlevel [!2345] + +respawn + +exec start-stop-daemon --start --chuid zun \ +--chdir /var/lib/zun \ +--name zun-wsproxy \ +--exec /usr/local/bin/zun-wsproxy -- \ +--config-file=/etc/zun/zun.conf