summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Ennis <james.ennis@codethink.com>2018-10-26 12:27:26 +0100
committerJames Ennis <james.ennis@codethink.com>2018-10-26 12:37:42 +0100
commit320dae02aedb39c3e072e9dac6a3032f46028898 (patch)
tree4d4fd50a404c172cf6a47716df138e0cbdf3923f
parent20e5c58ac19b2e971634d3803bfc5ff271c760ce (diff)
downloadbuildstream-320dae02aedb39c3e072e9dac6a3032f46028898.tar.gz
docs: Add more information to "managing the cache with systemmd" section
-rw-r--r--doc/source/using_configuring_artifact_server.rst39
1 files changed, 36 insertions, 3 deletions
diff --git a/doc/source/using_configuring_artifact_server.rst b/doc/source/using_configuring_artifact_server.rst
index 117d8e544..dd727ceb8 100644
--- a/doc/source/using_configuring_artifact_server.rst
+++ b/doc/source/using_configuring_artifact_server.rst
@@ -155,12 +155,15 @@ Instance with push and requiring client authentication:
Managing the cache with systemd
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-It is better to run the cache as a systemd service, especially if it is running
+We recommend running the cache as a systemd service, especially if it is running
on a dedicated server, as this will allow systemd to manage the cache, in case
the server encounters any issues.
-Below are two examples of how to run the cache server as a systemd service, one
-is for pull only and the other is configured for push & pull.
+Below are two examples of how to run the cache server as a systemd service. The
+first, is for pull only and the other is configured for push & pull. Notice that
+the two configurations use different ports.
+
+``bst-artifact-serve.service``:
.. code:: ini
@@ -179,6 +182,9 @@ is for pull only and the other is configured for push & pull.
[Install]
WantedBy=multi-user.target
+
+``bst-artifact-serve-receive.service``:
+
.. code:: ini
#
@@ -196,11 +202,38 @@ is for pull only and the other is configured for push & pull.
[Install]
WantedBy=multi-user.target
+
Here we define when systemd should start the service, which is after the networking
stack has been started, we then define how to run the cache with the desired
configuration, under the artifacts user. The {{ }} are there to denote where you
should change these files to point to your desired locations.
+.. note::
+
+ You may need to run some of the following commands as the superuser.
+
+These files should be copied to ``/etc/systemd/system/``. We can then start these services
+with:
+
+.. code:: bash
+
+ systemctl enable bst-artifact-serve.service
+ systemctl enable bst-artifact-serve-receive.service
+
+Then, to start these services:
+
+.. code:: bash
+
+ systemctl start bst-artifact-serve.service
+ systemctl start bst-artifact-serve-receive.service
+
+We can then check if the services are successfully running with:
+
+.. code:: bash
+
+ journalctl -u bst-artifact-serve.service
+ journalctl -u bst-artifact-serve-receive.service
+
For more information on systemd services see:
`Creating Systemd Service Files <https://www.devdungeon.com/content/creating-systemd-service-files>`_.