/
lab23.clab.yaml
154 lines (138 loc) · 4.5 KB
/
lab23.clab.yaml
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# © 2022 Nokia.
#
# This code is a Contribution to the gNMIc project (“Work”) made under the Google Software Grant and Corporate Contributor License Agreement (“CLA”) and governed by the Apache License 2.0.
# No other rights or licenses in or to any of Nokia’s intellectual property are granted for any other purpose.
# This code is provided on an “as is” basis without any warranties of any kind.
#
# SPDX-License-Identifier: Apache-2.0
name: lab23
topology:
defaults:
kind: srl
kinds:
srl:
image: ghcr.io/nokia/srlinux
nodes:
super-spine1:
super-spine2:
spine1:
spine2:
spine3:
spine4:
leaf1:
leaf2:
leaf3:
leaf4:
leaf5:
leaf6:
leaf7:
leaf8:
gnmic1:
kind: linux
image: ghcr.io/openconfig/gnmic:latest
binds:
- ./gnmic.yaml:/app/gnmic-config.yaml:ro
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 7890:7890
- 9804:9804
env:
GNMIC_API: :7890
GNMIC_CLUSTERING_INSTANCE_NAME: clab-lab23-gnmic1
GNMIC_CLUSTERING_SERVICE_ADDRESS: clab-lab23-gnmic1
GNMIC_OUTPUTS_OUTPUT1_LISTEN: clab-glab23-gnmic1:9804
cmd: '--config /app/gnmic-config.yaml subscribe'
gnmic2:
kind: linux
image: ghcr.io/openconfig/gnmic:latest
binds:
- ./gnmic.yaml:/app/gnmic-config.yaml:ro
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 7891:7891
- 9805:9805
env:
GNMIC_API: :7891
GNMIC_CLUSTERING_INSTANCE_NAME: clab-lab23-gnmic2
GNMIC_CLUSTERING_SERVICE_ADDRESS: clab-lab23-gnmic2
GNMIC_OUTPUTS_OUTPUT1_LISTEN: clab-lab23-gnmic2:9805
cmd: '--config /app/gnmic-config.yaml subscribe'
gnmic3:
kind: linux
image: ghcr.io/openconfig/gnmic:latest
binds:
- ./gnmic.yaml:/app/gnmic-config.yaml:ro
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 7892:7892
- 9806:9806
env:
GNMIC_API: :7892
GNMIC_CLUSTERING_INSTANCE_NAME: clab-lab23-gnmic3
GNMIC_CLUSTERING_SERVICE_ADDRESS: clab-lab23-gnmic3
GNMIC_OUTPUTS_OUTPUT1_LISTEN: clab-lab23-gnmic3:9806
cmd: '--config /app/gnmic-config.yaml subscribe'
consul-agent:
kind: linux
image: consul:latest
ports:
- 8500:8500
- 8600:8600/udp
cmd: 'agent -server -ui -bind=127.0.0.1 -node=server-1 -bootstrap-expect=1 -client=0.0.0.0'
prometheus:
kind: linux
image: prom/prometheus:latest
user: 65534:65534
ports:
- 9090:9090
binds:
- ./prometheus/:/etc/prometheus/
cmd: |
--config.file=/etc/prometheus/prometheus.yaml
--web.console.libraries=/usr/share/prometheus/console_libraries
--web.console.templates=/usr/share/prometheus/consoles
--log.level=debug
nats:
kind: linux
image: nats:latest
ports:
- 4222:4222
grafana:
kind: linux
image: grafana/grafana:latest
binds:
- grafana/datasources/datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml:ro
#- grafana/dashboards/:/var/lib/grafana/dashboards
ports:
- 3000:3000
links:
# super-spine1 links
- endpoints: ["super-spine1:e1-1", "spine1:e1-1"]
- endpoints: ["super-spine1:e1-2", "spine2:e1-1"]
- endpoints: ["super-spine1:e1-3", "spine3:e1-1"]
- endpoints: ["super-spine1:e1-4", "spine4:e1-1"]
# super-spine2 links
- endpoints: ["super-spine2:e1-1", "spine1:e1-2"]
- endpoints: ["super-spine2:e1-2", "spine2:e1-2"]
- endpoints: ["super-spine2:e1-3", "spine3:e1-2"]
- endpoints: ["super-spine2:e1-4", "spine4:e1-2"]
# spine1 links
- endpoints: ["spine1:e1-3", "leaf1:e1-1"]
- endpoints: ["spine1:e1-4", "leaf2:e1-1"]
- endpoints: ["spine1:e1-5", "leaf3:e1-1"]
- endpoints: ["spine1:e1-6", "leaf4:e1-1"]
# spine2 links
- endpoints: ["spine2:e1-3", "leaf1:e1-2"]
- endpoints: ["spine2:e1-4", "leaf2:e1-2"]
- endpoints: ["spine2:e1-5", "leaf3:e1-2"]
- endpoints: ["spine2:e1-6", "leaf4:e1-2"]
# spine3 links
- endpoints: ["spine3:e1-3", "leaf5:e1-1"]
- endpoints: ["spine3:e1-4", "leaf6:e1-1"]
- endpoints: ["spine3:e1-5", "leaf7:e1-1"]
- endpoints: ["spine3:e1-6", "leaf8:e1-1"]
# spine4 links
- endpoints: ["spine4:e1-3", "leaf5:e1-2"]
- endpoints: ["spine4:e1-4", "leaf6:e1-2"]
- endpoints: ["spine4:e1-5", "leaf7:e1-2"]
- endpoints: ["spine4:e1-6", "leaf8:e1-2"]