diff --git a/.github/workflows/manual-deploy-testnet-l1.yml b/.github/workflows/manual-deploy-testnet-l1.yml index 2ccace0ff1..7f23f0689c 100644 --- a/.github/workflows/manual-deploy-testnet-l1.yml +++ b/.github/workflows/manual-deploy-testnet-l1.yml @@ -113,20 +113,50 @@ jobs: && sudo snap refresh \ && curl -fsSL https://get.docker.com -o get-docker.sh && sh ./get-docker.sh \ && docker network create --driver bridge l1_network || true \ - && docker run -d --name datadog-agent \ - --network l1_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: ${{ github.event.inputs.testnet_type }}-eth2network-${{ GITHUB.RUN_NUMBER }} + target_label: "node_name" + " > /home/obscuro/promtail/promtail-config.yaml \ + && docker run -d --name promtail \ + --network l1_network \ + -e HOSTNAME=${{ github.event.inputs.testnet_type }}-eth2network-${{ 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 \ && docker run -d \ -p 8025:8025 -p 8026:8026 -p 9000:9000 -p 9001:9001 \ --entrypoint /home/obscuro/go-obscuro/integration/eth2network/main/main ${{ vars.DOCKER_BUILD_TAG_ETH2NETWORK }} \ diff --git a/.github/workflows/manual-deploy-testnet-l2.yml b/.github/workflows/manual-deploy-testnet-l2.yml index e4c9d33197..f325087108 100644 --- a/.github/workflows/manual-deploy-testnet-l2.yml +++ b/.github/workflows/manual-deploy-testnet-l2.yml @@ -215,7 +215,7 @@ jobs: - name: 'Allow time for VM initialization' shell: bash run: sleep 60 - + - name: 'Start Obscuro node-${{ matrix.host_id }} on Azure' uses: azure/CLI@v1 with: @@ -247,31 +247,31 @@ jobs: 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: ${HOSTNAME} - target_label: node_name - " > /home/obscuro/promtail/promtail-config.yaml \ + 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 }} + target_label: "node_name" + " > /home/obscuro/promtail/promtail-config.yaml \ && docker run -d --name promtail \ - --network ten_node \ - -e HOSTNAME=${HOSTNAME} \ + --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' \ + -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=${{ matrix.is_genesis }} \ diff --git a/.github/workflows/manual-deploy-testnet-validator.yml b/.github/workflows/manual-deploy-testnet-validator.yml index 11d8f5d847..ece09cb703 100644 --- a/.github/workflows/manual-deploy-testnet-validator.yml +++ b/.github/workflows/manual-deploy-testnet-validator.yml @@ -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: ${{ 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=${{ vars.AZURE_RESOURCE_PREFIX }}-${{ github.event.inputs.node_id }}-${{ 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 \