File tree Expand file tree Collapse file tree 3 files changed +51
-0
lines changed
Expand file tree Collapse file tree 3 files changed +51
-0
lines changed Original file line number Diff line number Diff line change 11# Changes from version 0.10.4 to master
22
3+ - Added SystemD example. See ` examples/systemd/README.md ` .
34- Added ` --log.dir ` option to configure a custom directory to which all log files will be written.
45- It is no longer allowed to use ` log.file ` as a passthrough option.
56- Added ` --starter.host ` option, to bind the HTTP server to a specific network interface instead of the default ` 0.0.0.0 ` .
Original file line number Diff line number Diff line change 1+ # Run ArangoDB Starter with SystemD
2+
3+ This example shows how you can run the ArangoDB starter in a systemd service.
4+
5+ The example will run the starter as user ` arangodb ` in group ` arangodb ` .
6+ It requires an environment variable file called ` /etc/arangodb.env `
7+ with the following variables.
8+
9+ ``` text
10+ STARTERENDPOINTS=<comma seperated list of endpoints of all starters (for --starter.join)>
11+ CLUSTERSECRET=<JWT secret used by the cluster>
12+ CLUSTERSECRETPATH=<full path of file containing the JWT secret used by the cluster>
13+ ```
14+
15+ To use this service, do the following on every machine on which the starter should run:
16+
17+ - Create the ` /etc/arangodb.env ` environment file as specified above.
18+ - Copy the ` arangodb.service ` file to ` /etc/systemd/system/arangodb.service ` .
19+ - Trigger a systemd reload using ` sudo systemctl daemon-reload ` .
20+ - Enable the service using ` sudo systemctl enable arangodb.service ` .
21+ - Start the service using ` sudo systemctl start arangodb.service ` .
22+
23+ Once started, you can view the logs of the starter using:
24+
25+ ``` bash
26+ sudo journalctl -flu arangodb.service
27+ ```
Original file line number Diff line number Diff line change 1+ [Unit]
2+ Description =Run the ArangoDB Starter
3+ After =network.target
4+
5+ [Service]
6+ Restart =on-failure
7+ User =arangodb
8+ Group =arangodb
9+ EnvironmentFile =/etc/arangodb.env
10+ Environment =DATADIR =/var/lib/arangodb/cluster
11+ ExecStartPre =/usr/bin/sh -c "mkdir -p $(dirname $CLUSTERSECRETPATH)"
12+ ExecStartPre =/usr/bin/sh -c "mkdir -p ${DATADIR}"
13+ ExecStartPre =/usr/bin/sh -c "echo ${CLUSTERSECRET} > ${CLUSTERSECRETPATH}"
14+ ExecStart =/usr/bin/arangodb \
15+ --starter.data-dir =${DATADIR} \
16+ --starter.join =${STARTERENDPOINTS} \
17+ --server.storage-engine =rocksdb \
18+ --auth.jwt-secret =${CLUSTERSECRETPATH} \
19+ --all.log.level =info --all.log.output =+
20+ TimeoutStopSec =60
21+
22+ [Install]
23+ WantedBy =multi-user.target
You can’t perform that action at this time.
0 commit comments