Skip to content

Commit

Permalink
Merge pull request #14 from Ontotext-AD/GDB-9774_added_graphdb_env_file
Browse files Browse the repository at this point in the history
Added graphdb.env file to the AMI
  • Loading branch information
viktor-ribchev authored Mar 21, 2024
2 parents 185077c + e5b1d45 commit 1e915bb
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
3 changes: 2 additions & 1 deletion build.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ build {
"./files/graphdb-cluster-proxy.service",
"./files/install_graphdb.sh",
"./files/cloudwatch-agent-config.json",
"./files/prometheus.yaml"
"./files/prometheus.yaml",
"./files/graphdb.env"
]
destination = "/tmp/"
}
Expand Down
4 changes: 2 additions & 2 deletions files/graphdb-cluster-proxy.service
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ RestartSec=5s
User=graphdb
Group=graphdb
Environment="GDB_JAVA_OPTS=-Dgraphdb.home=/var/opt/graphdb/cluster-proxy -Dgraphdb.home.conf=/etc/graphdb-cluster-proxy -Dhttp.socket.keepalive=true -Xmx1g"
ExecStart="/opt/graphdb/bin/cluster-proxy"
ExecStart=/opt/graphdb/bin/cluster-proxy
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"
6 changes: 3 additions & 3 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"
ExecStart="/opt/graphdb/bin/graphdb"
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 @@ -53,6 +53,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 1e915bb

Please sign in to comment.