Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add second proxy in nginx. Fix Java lib dependency. #7

Merged
merged 1 commit into from
Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/collectd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ LoadPlugin write_graphite
</MBean>

<Connection>
ServiceURL "service:jmx:rmi:///jndi/rmi://localhost:6969/jmxrmi"
ServiceURL "service:jmx:rmi:///jndi/rmi://127.0.0.1:6969/jmxrmi"
Collect "memory_pool"
Collect "memory"
</Connection>
Expand Down
34 changes: 33 additions & 1 deletion scripts/install_collectd_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ BISQ_MONITOR_REPO_TAG=main
ROOT_USER=root
ROOT_GROUP=root
ROOT_HOME=~root
ROOT_PKG=(nginx collectd openssl)
ROOT_PKG=(curl patch nginx collectd openssl)

SYSTEMD_ENV_HOME=/etc/default

Expand Down Expand Up @@ -56,6 +56,38 @@ sudo -H -i -u "${ROOT_USER}" systemctl daemon-reload
sudo -H -i -u "${ROOT_USER}" systemctl enable nginx.service
sudo -H -i -u "${ROOT_USER}" systemctl enable collectd.service

echo "[*] Symlink libjvm.so for collectd to work"
ln -s /usr/lib/jvm/openjdk-11.0.2/lib/server/libjvm.so /lib/x86_64-linux-gnu/libjvm.so || true

echo "[*] Add monitor parameter to bisq seednode service"
( patch -u /etc/default/bisq.env || true ) <<EOF
--- bisq.env.old 2022-12-07 12:07:14.481493232 +0000
+++ /etc/default/bisq.env 2022-12-07 12:13:58.370281467 +0000
@@ -40,3 +40,6 @@

# set to true for BSQ markets
BISQ_DUMP_STATISTICS=false
+
+# Reporting Server
+BISQ_REPORTINGSERVERURL=http://localhost:13003
EOF

( patch -u /etc/systemd/system/bisq.service || true ) <<EOF
--- bisq.service.old 2022-12-07 12:07:00.653481418 +0000
+++ /etc/systemd/system/bisq.service 2022-12-07 12:07:56.417573388 +0000
@@ -27,6 +27,7 @@
--rpcPassword=\${BITCOIN_RPC_PASS} \\
--dumpBlockchainData=\${BISQ_DUMP_BLOCKCHAIN} \\
--dumpStatistics=\${BISQ_DUMP_STATISTICS} \\
+ --seedNodeReportingServerUrl=\${BISQ_REPORTINGSERVERURL} \\
--torControlPort=9051

ExecStop=/bin/kill \${MAINPID}
EOF

sudo -H -i -u "${ROOT_USER}" systemctl daemon-reload


echo "[*] Restarting services"
set +e
service bisq status >/dev/null 2>&1
Expand Down
10 changes: 10 additions & 0 deletions scripts/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,14 @@ stream {

proxy_ssl_session_reuse on;
}
server {
listen 127.0.0.1:13003;
proxy_pass monitor.bisq.network:13002;
proxy_ssl on;

proxy_ssl_certificate /etc/nginx/cert.crt;
proxy_ssl_certificate_key /etc/nginx/cert.key;

proxy_ssl_session_reuse on;
}
}