-
Notifications
You must be signed in to change notification settings - Fork 39
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
fixed host name for promtail config #2055
Changes from 10 commits
5cc391b
5bc282c
813c65d
66a6da5
a04a287
fd37489
fc22380
12f2157
16c59ef
ffb2232
cf412a3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -148,20 +148,50 @@ jobs: | |
--scripts 'mkdir -p /home/obscuro \ | ||
&& git clone --depth 1 -b ${{ env.BRANCH_NAME }} https://github.com/ten-protocol/go-ten.git /home/obscuro/go-obscuro \ | ||
&& docker network create --driver bridge node_network || true \ | ||
&& docker run -d --name datadog-agent \ | ||
--network node_network \ | ||
-e DD_API_KEY=${{ secrets.DD_API_KEY }} \ | ||
-e DD_LOGS_ENABLED=true \ | ||
-e DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true \ | ||
-e DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION=true \ | ||
-e DD_CONTAINER_EXCLUDE_LOGS="name:datadog-agent" \ | ||
-e DD_SITE="datadoghq.eu" \ | ||
-v /var/run/docker.sock:/var/run/docker.sock:ro \ | ||
-v /proc/:/host/proc/:ro \ | ||
-v /opt/datadog-agent/run:/opt/datadog-agent/run:rw \ | ||
-v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \ | ||
--log-opt max-file=3 --log-opt max-size=10m \ | ||
datadog/agent:latest \ | ||
&& mkdir -p /home/obscuro/promtail \ | ||
&& echo " | ||
server: | ||
http_listen_port: 9080 | ||
grpc_listen_port: 0 | ||
|
||
positions: | ||
filename: /tmp/positions.yaml | ||
|
||
clients: | ||
- url: ${{ vars.METRICS_URI }} | ||
batchwait: 3s | ||
batchsize: 1048576 | ||
tls_config: | ||
insecure_skip_verify: true | ||
basic_auth: | ||
username: ${{ secrets.LOKI_USER }} | ||
password: ${{ secrets.LOKI_PASSWORD }} | ||
|
||
scrape_configs: | ||
- job_name: flog_scrape | ||
docker_sd_configs: | ||
- host: unix:///var/run/docker.sock | ||
refresh_interval: 5s | ||
relabel_configs: | ||
- source_labels: [\"__meta_docker_container_name\"] | ||
regex: \"/(.*)\" | ||
target_label: \"container\" | ||
- source_labels: [\"__meta_docker_container_log_stream\"] | ||
target_label: \"logstream\" | ||
- source_labels: [\"__meta_docker_container_label_logging_jobname\"] | ||
target_label: \"job\" | ||
- replacement: ${{ matrix.host_id }}-${{ github.event.inputs.testnet_type }}-${{ GITHUB.RUN_NUMBER }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly because this validator deploys just a single node rather than the 'matrix' of 3 nodes deployed by the main deploy script so not sure what will happen if we try to run this. But again not a blocker, rarely used. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed: ${{ vars.AZURE_RESOURCE_PREFIX }}-${{ github.event.inputs.node_id }}-${{ GITHUB.RUN_NUMBER }} |
||
target_label: "node_name" | ||
" > /home/obscuro/promtail/promtail-config.yaml \ | ||
&& docker run -d --name promtail \ | ||
--network node_network \ | ||
-e HOSTNAME=${{ matrix.host_id }}-${{ github.event.inputs.testnet_type }}-${{ GITHUB.RUN_NUMBER }} \ | ||
-v /var/log:/var/log \ | ||
-v /home/obscuro/promtail:/etc/promtail \ | ||
-v /var/lib/docker/containers:/var/lib/docker/containers:ro \ | ||
-v /var/run/docker.sock:/var/run/docker.sock \ | ||
grafana/promtail:latest \ | ||
-config.file=/etc/promtail/promtail-config.yaml -config.expand-env=true \ | ||
&& cd /home/obscuro/go-obscuro/ \ | ||
&& sudo go run /home/obscuro/go-obscuro/go/node/cmd \ | ||
-is_genesis=false \ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no 'matrix' in this script like there is in the L2 deploy script so maybe this will behave unpredictably. If it's just for keys to show how it will be rendered in Loki then maybe can be hardcoded to like
L1-${{ github.event.inputs.testnet_type }}
or something?Not a blocker though, very rare we deploy the L1 for testnets and looks like someone already put in a matrix usage and it doesn't seem to be breaking so maybe it'll just do an empty string or something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed : ${{ github.event.inputs.testnet_type }}-eth2network-${{ GITHUB.RUN_NUMBER }} as host ID