Skip to content

Commit d9d0a0b

Browse files
committed
Changes for next Shutter Network release
- The container image name has changed to `ghcr.io/shutter-network/keyper` - The assets image tag format was changed to be consistent between testnet and mainnet - A new assets variable `_ASSETS_NETWORK` was introduced and now gets exported in the metrics push Also the script function to replace the env var placeholders was removed since vmagent does this automatically (see: https://docs.victoriametrics.com/vmagent/#how-to-collect-metrics-in-prometheus-format)
1 parent d7b3713 commit d9d0a0b

File tree

6 files changed

+15
-17
lines changed

6 files changed

+15
-17
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This package includes the following services:
2424

2525
- Uses VictoriaMetrics to send performance metrics to a remote Pushgateway.
2626

27-
- Configuration is handled through templates in `/config/gnosis/`, and the main config file (`vmagent.yml`) is dynamically generated based on environment variables.
27+
- Configuration is handled via the config file `/config/gnosis/vmagent.yml`, placehoders in that file are automatically picked up from the environment by vmagent.
2828

2929
### Configuration
3030

docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ services:
1313
build:
1414
context: shutter
1515
args:
16-
ASSETS_VERSION: shutter-gnosis-1000-set-1v2 # $NETWORK-10*$CHAIN_ID-set-$VERSION
17-
UPSTREAM_VERSION: gnosis-v1.2.4b1
16+
ASSETS_VERSION: shutter-gnosis-1000-set-1.3 # $NETWORK-10*$CHAIN_ID-set-$VERSION
17+
UPSTREAM_VERSION: v1.2.5
1818
KEYPER_CONFIG_DIR: /keyper/config
1919
SHUTTER_CHAIN_DIR: /chain
2020
STAKER_SCRIPTS_VERSION: v0.1.0
@@ -31,7 +31,7 @@ services:
3131
build:
3232
context: metrics
3333
args:
34-
ASSETS_VERSION: shutter-gnosis-1000-set-1v2 # $NETWORK-10*$CHAIN_ID-set-$VERSION
34+
ASSETS_VERSION: shutter-gnosis-1000-set-1.3 # $NETWORK-10*$CHAIN_ID-set-$VERSION
3535
restart: on-failure
3636
environment:
3737
SHUTTER_PUSH_METRICS_ENABLED: false

metrics/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ FROM victoriametrics/vmagent:v1.101.0
99
ARG NETWORK
1010

1111
ENV ASSETS_DIR=/assets \
12-
TEMPLATE_CONFIG_FILE=/config/${NETWORK}/vmagent_template.yml \
1312
CONFIG_FILE=/config/${NETWORK}/vmagent.yml \
1413
USER_SETTINGS_FILE=/config/user/settings.env
1514

metrics/config/gnosis/vmagent_template.yml renamed to metrics/config/gnosis/vmagent.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,24 @@ scrape_configs:
66
static_configs:
77
- targets: ["shutter.shutter-gnosis.dappnode:9100"]
88
labels:
9-
instance: "%{KEYPER_NAME}"
9+
instance: "kpr-%{KEYPER_NAME}"
1010
deployment: "%{_ASSETS_VERSION}"
11+
deployment_type: "dappnode"
12+
network: "%{_ASSETS_NETWORK}"
1113
- job_name: 'shuttermint'
1214
metrics_path: /
1315
static_configs:
1416
- targets: ["shutter.shutter-gnosis.dappnode:26660"]
1517
labels:
16-
instance: "%{KEYPER_NAME}"
18+
instance: "kpr-%{KEYPER_NAME}"
1719
deployment: "%{_ASSETS_VERSION}"
20+
deployment_type: "dappnode"
21+
network: "%{_ASSETS_NETWORK}"
1822
- job_name: 'vmagent'
1923
static_configs:
2024
- targets: ["localhost:8429"]
2125
labels:
22-
instance: "%{KEYPER_NAME}"
23-
deployment: "%{_ASSETS_VERSION}"
26+
instance: "kpr-%{KEYPER_NAME}"
27+
deployment: "%{_ASSETS_VERSION}"
28+
deployment_type: "dappnode"
29+
network: "%{_ASSETS_NETWORK}"

metrics/entrypoint.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,6 @@ source_user_settings() {
6262
fi
6363
}
6464

65-
replace_envs_in_yaml() {
66-
echo "[INFO | metrics] Replacing environment variables in the configuration file"
67-
sed "s|%{KEYPER_NAME}|$KEYPER_NAME|g; s|%{_ASSETS_VERSION}|$_ASSETS_VERSION|g" "$TEMPLATE_CONFIG_FILE" >"$CONFIG_FILE"
68-
}
69-
7065
update_user_settings
7166

7267
if [ "${SHUTTER_PUSH_METRICS_ENABLED}" = "false" ]; then
@@ -78,8 +73,6 @@ source_assets_envs
7873

7974
source_user_settings
8075

81-
replace_envs_in_yaml
82-
8376
exec /vmagent-prod \
8477
-promscrape.config="${CONFIG_FILE}" \
8578
-remoteWrite.url="${PUSHGATEWAY_URL}" \

shutter/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ FROM ghcr.io/shutter-network/assets:${ASSETS_VERSION} as assets
66
RUN rsync -aq --delete /assets-source/ /assets/
77

88
ARG UPSTREAM_VERSION
9-
FROM ghcr.io/shutter-network/rolling-shutter:${UPSTREAM_VERSION}
9+
FROM ghcr.io/shutter-network/keyper:${UPSTREAM_VERSION}
1010

1111
ARG NETWORK
1212
ARG KEYPER_CONFIG_DIR

0 commit comments

Comments
 (0)