[Notes] [Git][BuildStream/buildstream][adamjones/systemd-cas] Add systemd service file examples to artifacts documentation



Title: GitLab

Adam Jones pushed to branch adamjones/systemd-cas at BuildStream / buildstream

Commits:

1 changed file:

Changes:

  • doc/source/install_artifacts.rst
    ... ... @@ -143,6 +143,50 @@ Instance with push and requiring client authentication:
    143 143
     
    
    144 144
         bst-artifact-server --port 11002 --server-key server.key --server-cert server.crt --client-certs authorized.crt --enable-push /home/artifacts/artifacts
    
    145 145
     
    
    146
    +Managing the cache with systemd
    
    147
    +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    148
    +
    
    149
    +It is better to run the cache as a systemd service, especially if it is running on a dedicated server, as this will allow systemd to manage the cache, incase the server ever encounters any issues.
    
    150
    +
    
    151
    +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.
    
    152
    +
    
    153
    +.. code:: ini
    
    154
    +
    
    155
    +   #
    
    156
    +   # Pull
    
    157
    +   #
    
    158
    +   [Unit]
    
    159
    +   Description=Buildstream Artifact pull server
    
    160
    +   After=remote-fs.target network-online.target
    
    161
    +
    
    162
    +   [Service]
    
    163
    +   Environment="LC_ALL=C.UTF-8"
    
    164
    +   ExecStart=/usr/local/bin/bst-artifact-server --port 11001 --server-key {{certs_path}}/privkey.pem --
    
    165
    +   server-cert {{certs_path}}/fullchain.pem {{artifacts_path}}
    
    166
    +   User=artifacts
    
    167
    +
    
    168
    +   [Install]
    
    169
    +   WantedBy=multi-user.target
    
    170
    +
    
    171
    +
    
    172
    +   #
    
    173
    +   # Pull/Push
    
    174
    +   #
    
    175
    +   [Unit]
    
    176
    +   Description=Buildstream Artifact pull/push server
    
    177
    +   After=remote-fs.target network-online.target
    
    178
    +
    
    179
    +   [Service]
    
    180
    +   Environment="LC_ALL=C.UTF-8"
    
    181
    +   ExecStart=/usr/local/bin/bst-artifact-server --port 11002 --server-key {{certs_path}}/privkey.pem --
    
    182
    +   server-cert {{certs_path}}/fullchain.pem --client-certs /home/artifacts/authorized.crt --enable-push /
    
    183
    +   {{artifacts_path}}
    
    184
    +   User=artifacts
    
    185
    +
    
    186
    +   [Install]
    
    187
    +   WantedBy=multi-user.target
    
    188
    +
    
    189
    +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.
    
    146 190
     
    
    147 191
     User configuration
    
    148 192
     ~~~~~~~~~~~~~~~~~~
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]