Skip to content

Commit

Permalink
Remove graylog and related containers
Browse files Browse the repository at this point in the history
  • Loading branch information
bacv committed Oct 3, 2024
1 parent 93de3af commit 3a8a960
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 66 deletions.
65 changes: 0 additions & 65 deletions compose.static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ services:
- ./tests/kzgrs/kzgrs_test_params:/kzgrs_test_params:z
depends_on:
- cfgsync
- graylog
entrypoint: /etc/nomos/scripts/run_nomos_node.sh

nomos-node-1:
Expand All @@ -40,7 +39,6 @@ services:
- ./tests/kzgrs/kzgrs_test_params:/kzgrs_test_params:z
depends_on:
- cfgsync
- graylog
ports:
- "3001:3000/udp"
- "18081:18080/tcp"
Expand All @@ -57,7 +55,6 @@ services:
- ./tests/kzgrs/kzgrs_test_params:/kzgrs_test_params:z
depends_on:
- cfgsync
- graylog
ports:
- "3002:3000/udp"
- "18082:18080/tcp"
Expand All @@ -74,7 +71,6 @@ services:
- ./tests/kzgrs/kzgrs_test_params:/kzgrs_test_params:z
depends_on:
- cfgsync
- graylog
ports:
- "3003:3000/udp"
- "18083:18080/tcp"
Expand Down Expand Up @@ -105,64 +101,3 @@ services:
restart: on-failure
depends_on:
- prometheus

# Graylog related configuration
# More information at https://github.com/Graylog2/docker-compose/blob/main/open-core/docker-compose.yml
mongodb:
image: "mongo:5.0"
volumes:
- "mongodb_data:/data/db"
restart: "on-failure"

datanode:
image: "${DATANODE_IMAGE:-graylog/graylog-datanode:5.2}"
hostname: "datanode"
environment:
GRAYLOG_DATANODE_NODE_ID_FILE: "/var/lib/graylog-datanode/node-id"
GRAYLOG_DATANODE_PASSWORD_SECRET: "${GRAYLOG_PASSWORD_SECRET:?Please configure GRAYLOG_PASSWORD_SECRET in the .env file}"
GRAYLOG_DATANODE_ROOT_PASSWORD_SHA2: "${GRAYLOG_ROOT_PASSWORD_SHA2:?Please configure GRAYLOG_ROOT_PASSWORD_SHA2 in the .env file}"
GRAYLOG_DATANODE_MONGODB_URI: "mongodb://mongodb:27017/graylog"
ulimits:
memlock:
hard: -1
soft: -1
nofile:
soft: 65536
hard: 65536
ports:
- "8999:8999/tcp" # DataNode API
- "9200:9200/tcp"
- "9300:9300/tcp"
volumes:
- "graylog-datanode:/var/lib/graylog-datanode"
restart: "on-failure"

graylog:
image: "${GRAYLOG_IMAGE:-graylog/graylog:5.2}"
depends_on:
mongodb:
condition: "service_started"
entrypoint: "/usr/bin/tini -- /docker-entrypoint.sh"
environment:
GRAYLOG_NODE_ID_FILE: "/usr/share/graylog/data/data/node-id"
GRAYLOG_PASSWORD_SECRET: "${GRAYLOG_PASSWORD_SECRET:?Please configure GRAYLOG_PASSWORD_SECRET in the .env file}"
GRAYLOG_ROOT_PASSWORD_SHA2: "${GRAYLOG_ROOT_PASSWORD_SHA2:?Please configure GRAYLOG_ROOT_PASSWORD_SHA2 in the .env file}"
GRAYLOG_HTTP_BIND_ADDRESS: "0.0.0.0:9000"
GRAYLOG_HTTP_EXTERNAL_URI: "http://localhost:9000/"
GRAYLOG_MONGODB_URI: "mongodb://mongodb:27017/graylog"
ports:
- "9000:9000/tcp" # Server API
- "12201:12201/tcp" # GELF TCP
- "12201:12201/udp" # GELF UDP
volumes:
- "graylog_data:/usr/share/graylog/data/data"
- "graylog_journal:/usr/share/graylog/data/journal"
- ./testnet/monitoring/graylog.conf:/usr/share/graylog/data/config/graylog.conf
restart: "on-failure"


volumes:
mongodb_data:
graylog-datanode:
graylog_data:
graylog_journal:
3 changes: 3 additions & 0 deletions nodes/nomos-node/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ pub fn update_log(log: &mut <Logger as ServiceData>::Settings, log_args: LogArgs
if let Some(level_str) = level {
log.level = match level_str.as_str() {
"DEBUG" => Level::DEBUG,
"INFO" => Level::INFO,
"ERROR" => Level::ERROR,
"WARN" => Level::WARN,
_ => return Err(eyre!("Invalid log level provided.")),
};
}
Expand Down
3 changes: 2 additions & 1 deletion testnet/scripts/run_nomos_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ set -e
export CFG_FILE_PATH="/config.yaml" \
CFG_SERVER_ADDR="http://cfgsync:4400" \
CFG_HOST_IP=$(hostname -i) \
LOG_LEVEL="INFO" \
RISC0_DEV_MODE=true

/usr/bin/cfgsync-client && \
exec /usr/bin/nomos-node /config.yaml --with-metrics --log-backend gelf --log-addr graylog:12201
exec /usr/bin/nomos-node /config.yaml --with-metrics

0 comments on commit 3a8a960

Please sign in to comment.