-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
executable file
·132 lines (124 loc) · 3.81 KB
/
compose.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
services:
NSO-1:
image: mod-nso-prod:$VER
container_name: nso1
profiles:
- prod
environment:
- EXTRA_ARGS=--with-package-reload
- ADMIN_USERNAME=admin
- ADMIN_PASSWORD=admin
networks:
NSO-net:
ipv4_address: 10.0.0.1
ports:
- "2023:2024"
- "8889:8888"
volumes:
- type: bind
source: './NSO-vol/NSO1'
target: '/nso'
- type: bind
source: './NSO-log-vol/NSO1'
target: '/log'
healthcheck:
test: ncs_cmd -c "wait-start 2"
interval: 5s
retries: 5
start_period: 10s
timeout: 10s
NSO-2:
image: mod-nso-prod:$VER
container_name: nso2
profiles:
- prod
environment:
- EXTRA_ARGS=--with-package-reload
- ADMIN_USERNAME=admin
- ADMIN_PASSWORD=admin
networks:
NSO-net:
ipv4_address: 10.0.0.2
ports:
- "2025:2024"
- "8887:8888"
volumes:
- type: bind
source: './NSO-vol/NSO2'
target: '/nso'
- type: bind
source: './NSO-log-vol/NSO2'
target: '/log'
healthcheck:
test: ncs_cmd -c "wait-start 2"
interval: 5s
retries: 5
start_period: 10s
timeout: 10s
NSO-3:
image: mod-nso-prod:$VER
container_name: nso3
profiles:
- prod
environment:
- EXTRA_ARGS=--with-package-reload
- ADMIN_USERNAME=admin
- ADMIN_PASSWORD=admin
networks:
NSO-net:
ipv4_address: 10.0.0.3
ports:
- "2026:2024"
- "8886:8888"
volumes:
- type: bind
source: './NSO-vol/NSO3'
target: '/nso'
- type: bind
source: './NSO-log-vol/NSO3'
target: '/log'
healthcheck:
test: ncs_cmd -c "wait-start 2"
interval: 5s
retries: 5
start_period: 10s
timeout: 10s
BUILD-NSO-PKGS:
image: mod-nso-dev:$VER
container_name: nso-dev
network_mode: none
profiles:
- dev
entrypoint: bash
command: -c 'NODE_ID=1 /nso1/helpers/update-conf.sh /nso1/etc/ncs.conf $(ls /nso1/tpl/ncs-conf/*.xml /nso1/tpl/ncs-conf/*.val | sort) &&
NODE_ID=2 /nso2/helpers/update-conf.sh /nso2/etc/ncs.conf $(ls /nso2/tpl/ncs-conf/*.xml /nso2/tpl/ncs-conf/*.val | sort) &&
NODE_ID=3 /nso3/helpers/update-conf.sh /nso3/etc/ncs.conf $(ls /nso3/tpl/ncs-conf/*.xml /nso3/tpl/ncs-conf/*.val | sort) &&
chmod 600 /nso1/certs/*.key &&
chmod 600 /nso2/certs/*.key &&
chmod 600 /nso3/certs/*.key'
volumes:
- type: bind
source: './NSO-vol/NSO1'
target: '/nso1'
- type: bind
source: './NSO-log-vol/NSO1'
target: '/log_nso1'
- type: bind
source: './NSO-vol/NSO2'
target: '/nso2'
- type: bind
source: './NSO-log-vol/NSO2'
target: '/log_nso2'
- type: bind
source: './NSO-vol/NSO3'
target: '/nso3'
- type: bind
source: './NSO-log-vol/NSO3'
target: '/log_nso3'
networks:
NSO-net:
driver: bridge
ipam:
config:
- subnet: 10.0.0.0/16
gateway: 10.0.0.254