-
Notifications
You must be signed in to change notification settings - Fork 0
111 lines (95 loc) · 3.19 KB
/
Copy pathmonitoring-pipeline.yml
File metadata and controls
111 lines (95 loc) · 3.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: Monitoring pipeline (manual, stage)
on:
workflow_dispatch:
inputs:
network_name:
description: 'Existing Docker network on stage (e.g., victorycenter-back_default)'
required: false
default: 'victorycenter-back_default'
devops_ref:
description: 'Git ref (branch/tag/sha) of VictoryCenter-DevOps to deploy'
required: false
default: 'feature/add-signose-stage'
jobs:
deploy-signoz-stage:
name: Deploy SigNoz to stage
runs-on: self-hosted
env:
NETWORK_NAME: ${{ inputs.network_name }}
steps:
- name: Checkout DevOps repo
uses: actions/checkout@v4
with:
repository: ita-social-projects/VictoryCenter-DevOps
ref: ${{ inputs.devops_ref }}
path: devops
- name: Create runtime override (attach to existing network)
working-directory: devops/monitoring/signoz
run: |
cat > _runtime.override.yml <<'YAML'
version: "3.8"
networks:
ext:
external: true
name: ${NETWORK_NAME}
services:
signoz:
networks:
- signoz-net
- ext
otel-collector:
user: "0:0"
networks:
- signoz-net
- ext
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /proc:/hostfs/proc:ro
- /sys:/hostfs/sys:ro
- /:/hostfs:ro
clickhouse:
networks:
- signoz-net
- ext
zookeeper-1:
networks:
- signoz-net
- ext
schema-migrator-sync:
networks:
- signoz-net
- ext
schema-migrator-async:
networks:
- signoz-net
- ext
YAML
echo "Using NETWORK_NAME=${NETWORK_NAME}"
echo "--- _runtime.override.yml ---"
sed -n '1,160p' _runtime.override.yml
- name: Prepare .env for SigNoz (ClickHouse password)
working-directory: devops/monitoring/signoz
env:
SIGNOZ_CLICKHOUSE_PASSWORD: ${{ secrets.SIGNOZ_CLICKHOUSE_PASSWORD }}
run: |
if [ ! -f .env.signoz ]; then
echo "CLICKHOUSE_PASSWORD=${SIGNOZ_CLICKHOUSE_PASSWORD:-signoz@123}" > .env.signoz
fi
chmod 600 .env.signoz
- name: Validate compose config
working-directory: devops
run: |
docker compose \
-f monitoring/signoz/deploy/docker/docker-compose.yaml \
-f monitoring/signoz/_runtime.override.yml \
config >/dev/null
- name: Deploy SigNoz (from repo files)
working-directory: devops
run: |
docker compose \
-f monitoring/signoz/deploy/docker/docker-compose.yaml \
-f monitoring/signoz/_runtime.override.yml \
--env-file monitoring/signoz/.env.signoz \
up -d --remove-orphans
- name: List SigNoz containers
run: docker ps --format "table {{.Names}}\t{{.Networks}}\t{{.Status}}\t{{.Ports}}"