Skip to content

Commit

Permalink
TES-304: Updated GraphDB to read its environment from a file
Browse files Browse the repository at this point in the history
- Moved existing env vars to /etc/graphdb/graphdb.env
  • Loading branch information
mihailradkov committed Nov 12, 2023
1 parent 70fbfb4 commit 962601a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions build.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ build {

provisioner "file" {
sources = [
"./files/graphdb.env",
"./files/graphdb.service",
"./files/graphdb-cluster-proxy.service",
"./files/install_graphdb.sh"
Expand Down
2 changes: 1 addition & 1 deletion files/graphdb-cluster-proxy.service
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ TimeoutSec=120
SuccessExitStatus=143

[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target
1 change: 1 addition & 0 deletions files/graphdb.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GDB_JAVA_OPTS="-Dgraphdb.home=/var/opt/graphdb/node -Dgraphdb.home.conf=/etc/graphdb -Dhttp.socket.keepalive=true -XX:MaxRAMPercentage=85.0 -XX:-UseCompressedOops"
4 changes: 2 additions & 2 deletions files/graphdb.service
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Restart=on-failure
RestartSec=5s
User=graphdb
Group=graphdb
Environment="GDB_JAVA_OPTS=-Dgraphdb.home=/var/opt/graphdb/node -Dgraphdb.home.conf=/etc/graphdb -Dhttp.socket.keepalive=true -XX:MaxRAMPercentage=85.0 -XX:-UseCompressedOops"
EnvironmentFile="/etc/graphdb/graphdb.env"
ExecStart="/opt/graphdb/bin/graphdb"
TimeoutSec=120
SuccessExitStatus=143

[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target
2 changes: 2 additions & 0 deletions files/install_graphdb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ rm graphdb-"${GRAPHDB_VERSION}"-dist.zip
mv graphdb-"${GRAPHDB_VERSION}" /opt/graphdb-"${GRAPHDB_VERSION}"
ln -s /opt/graphdb-"${GRAPHDB_VERSION}" /opt/graphdb

mv /tmp/graphdb.env /etc/graphdb/graphdb.env

chown -R graphdb:graphdb /etc/graphdb \
/etc/graphdb-cluster-proxy \
/opt/graphdb \
Expand Down

0 comments on commit 962601a

Please sign in to comment.