-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
136 lines (130 loc) · 3.07 KB
/
compose.yaml
File metadata and controls
136 lines (130 loc) · 3.07 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
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
volumes:
nsoshare:
packages:
networks:
Example-net:
ipam:
config:
- subnet: ${SUBNET}
services:
NODE-NSO:
container_name: ${NSO_NAME}
hostname: ${NSO_NAME}
networks:
Example-net:
ipv4_address: ${NSO_IP}
image: nso-distkey
environment:
- NSOAPP_NAME=${NSOAPP_NAME}
- NSO_NAME=${NSO_NAME}
- EX0_IP=${EX0_IP}
- EX1_IP=${EX1_IP}
- EX2_IP=${EX2_IP}
- NSO_HOST_NAME=${NSO_HOST_NAME}
- NCS_IPC_PATH=${NCS_IPC_PATH}
restart: "unless-stopped"
build:
context: .
args:
NSO_IMG_NAME: ${NSO_IMG_NAME}
dockerfile: Dockerfile
entrypoint: sh
command: -c 'runuser -m -u nso -g nso -- /run-nso.sh'
healthcheck:
test: ncs_cmd -c "wait-start 2"
interval: 10s
retries: 10
start_period: 10s
timeout: 10s
profiles:
- nso
volumes:
- type: volume
source: nsoshare
target: /opt/ncs/ncs-${NSO_VERSION}
- type: volume
source: packages
target: /nso/run/packages/
BUILD-NSO-PKGS:
image: ${NSO_BUILDIMG_NAME}
container_name: build-nso-pkgs
network_mode: none
profiles:
- build
entrypoint: sh
command: -c 'cp -r /${NSOAPP_NAME}/package-store/* /nso/run/packages/
&& make -C /nso/run/packages/distkey/src all
&& make -C /nso/run/packages/ne/src all'
volumes:
- type: volume
source: packages
target: /nso/run/packages/
- type: bind
source: ${NSOAPP_DIR}
target: /${NSOAPP_NAME}
NODE-EX0:
container_name: ${EX0_NAME}
hostname: ${EX0_NAME}
networks:
Example-net:
ipv4_address: ${EX0_IP}
image: ${EX_IMG_NAME}
environment:
- NSO_VERSION=${NSO_VERSION}
- APP_NAME=${APP_NAME}
restart: "unless-stopped"
build:
context: .
args:
APP_NAME: ${APP_NAME}
dockerfile: ${EX_DOCKERFILE}
profiles:
- example
volumes:
- type: volume
source: nsoshare
target: /opt/ncs/ncs-${NSO_VERSION}
NODE-EX1:
container_name: ${EX1_NAME}
hostname: ${EX1_NAME}
networks:
Example-net:
ipv4_address: ${EX1_IP}
image: ${EX_IMG_NAME}
environment:
- NSO_VERSION=${NSO_VERSION}
- APP_NAME=${APP_NAME}
restart: "unless-stopped"
build:
context: .
args:
APP_NAME: ${APP_NAME}
dockerfile: ${EX_DOCKERFILE}
profiles:
- example
volumes:
- type: volume
source: nsoshare
target: /opt/ncs/ncs-${NSO_VERSION}
NODE-EX2:
container_name: ${EX2_NAME}
hostname: ${EX2_NAME}
networks:
Example-net:
ipv4_address: ${EX2_IP}
image: ${EX_IMG_NAME}
environment:
- NSO_VERSION=${NSO_VERSION}
- APP_NAME=${APP_NAME}
restart: "unless-stopped"
build:
context: .
args:
APP_NAME: ${APP_NAME}
dockerfile: ${EX_DOCKERFILE}
profiles:
- example
volumes:
- type: volume
source: nsoshare
target: /opt/ncs/ncs-${NSO_VERSION}