Skip to content

Commit

Permalink
Merge pull request #196 from dedis/updates-deb-package
Browse files Browse the repository at this point in the history
Removes the node exporter and adds noTLS config
  • Loading branch information
pierluca authored Oct 25, 2022
2 parents c540c0a + 138f392 commit c1917b5
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 43 deletions.
9 changes: 0 additions & 9 deletions deb-package/build-deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,6 @@ VERSION=${GITVERSION:1}

cp ../memcoin $INSTALL_DIR/

# Prometheus Node Exporter
NE_DIR="deb/opt/exporter"
NE_VERSION="1.3.1"
mkdir -p ${NE_DIR}
wget https://github.com/prometheus/node_exporter/releases/download/v${NE_VERSION}/node_exporter-${NE_VERSION}.linux-amd64.tar.gz
tar xfz node_exporter-${NE_VERSION}.linux-amd64.tar.gz
mv node_exporter-${NE_VERSION}.linux-amd64/* ${NE_DIR}/
rm -rf node_exporter-${NE_VERSION}.linux-amd64*

# add config files
cp -a pkg/etc deb
cp -a pkg/lib deb
Expand Down
6 changes: 1 addition & 5 deletions deb-package/pkg/after-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ chown root:root /opt/dedis

# allow ls in sub dirs
chmod 755 /opt/dedis
chmod 755 /opt/exporter

chown root:root /lib/systemd/system

Expand All @@ -29,7 +28,4 @@ DVOTING_SERVICE=dvoting.service
enable_service ${DVOTING_SERVICE}
systemctl start ${DVOTING_SERVICE}

ln -s /opt/dedis/dvoting/bin/memcoin /usr/bin/memcoin

enable_service exporter.service
systemctl start exporter.service
ln -s /opt/dedis/dvoting/bin/memcoin /usr/bin/memcoin
1 change: 0 additions & 1 deletion deb-package/pkg/before-remove.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@

# stop service
systemctl stop dvoting.service
systemctl stop exporter.service

rm -f /usr/bin/memcoin
14 changes: 8 additions & 6 deletions deb-package/pkg/etc/dedis/dvoting/config.env
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ export proxy_addr="0.0.0.0:9080"
#
# Prometheus endpoint for dvoting metrics, available at the "/metrics" URL:
#
export prometheus_addr="0.0.0.0:9100"
#
# Prometheus node exporter endpoint (provide system metrics):
#
export node_exporter_addr="0.0.0.0:9101"
export prometheus_addr="0.0.0.0:9110"
#
# Blockchain node listen address. Can be local as blockchain nodes use their
# "dela_public" URLs to exchange message. It MUST contain a port:
Expand All @@ -30,7 +26,13 @@ export LLVL=info
#
# Routing mechanism
#
export dela_routing=tree
export dela_routing=flat
#
# Disables TLS on gRPC connections. It is safe to do that if the blockchain node
# is behind a reverse proxy that uses TLS, AND with firewall rules to only
# accept connections from trusted nodes:
#
export dela_noTLS=false
#
# =====================
# Likely to be updated:
Expand Down
15 changes: 0 additions & 15 deletions deb-package/pkg/lib/systemd/system/exporter.service

This file was deleted.

3 changes: 2 additions & 1 deletion deb-package/pkg/opt/dedis/dvoting/bin/start-dvoting
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ ${dela_bin} \
--proxykey ${dela_proxy_pk} \
--certKey ${dela_cert_key} \
--certChain ${dela_cert_chain} \
--routing ${dela_routing}
--routing ${dela_routing} \
--noTLS=${dela_noTLS}
5 changes: 0 additions & 5 deletions deb-package/pkg/opt/dedis/dvoting/bin/start-exporter

This file was deleted.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/rs/zerolog v1.19.0
github.com/stretchr/testify v1.7.0
github.com/uber/jaeger-client-go v2.25.0+incompatible
go.dedis.ch/dela v0.0.0-20220909115533-ad4f281a552f
go.dedis.ch/dela v0.0.0-20221010131641-9c479e68be18
go.dedis.ch/dela-apps v0.0.0-20211019120455-a0db752a0ba0
go.dedis.ch/kyber/v3 v3.1.0-alpha
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1
go.dedis.ch/dela v0.0.0-20211018150429-1fdbe35cd189/go.mod h1:GVQ2MumgCcAkor2MmfRCoqTBsFjaaqt7HfJpQLhMGok=
go.dedis.ch/dela v0.0.0-20220909115533-ad4f281a552f h1:xOO4YMx06/ERkiTtoJ9pneDJ033Ym9i8zI6NIbsOmPg=
go.dedis.ch/dela v0.0.0-20220909115533-ad4f281a552f/go.mod h1:IIIV0aR0f1c9z4jRB2HVYYeLK7XbQ6pfqv6RufaXmUg=
go.dedis.ch/dela v0.0.0-20221010131641-9c479e68be18 h1:sS/tKsWNFKTClWpyoTaibyORLbTxOP0aQcL2TTnWM2s=
go.dedis.ch/dela v0.0.0-20221010131641-9c479e68be18/go.mod h1:lXxF9I5fE8ffjIL3HJZWJbpA4jFa3KE80TqjSVzCYbA=
go.dedis.ch/dela-apps v0.0.0-20211019120455-a0db752a0ba0 h1:gPrJd+7QUuADpfToMKr80maGnjGPeB7ft7iNrkAtwGY=
go.dedis.ch/dela-apps v0.0.0-20211019120455-a0db752a0ba0/go.mod h1:MoJSdm3LXkNtiKEK3eiBKgqFhory4v8sBr7ldFP/vFc=
go.dedis.ch/fixbuf v1.0.3 h1:hGcV9Cd/znUxlusJ64eAlExS+5cJDIyTyEG+otu5wQs=
Expand Down

0 comments on commit c1917b5

Please sign in to comment.