summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/application/src/main/dc/docker-compose-cluster.yaml
blob: 451f35c3aad60fc6fa525b5e5f166cd6828d80be (plain)
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
version: '3.7'

services:
  db:
    image: mariadb:latest
    container_name: ccsdk-mariadb
    networks:
      - cds-network
    ports:
      - "3306:3306"
    volumes:
      - target: /var/lib/mysql
        type: volume
        source: mysql-data
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: sdnctl
      MYSQL_DATABASE: sdnctl
      MYSQL_USER: sdnctl
      MYSQL_PASSWORD: sdnctl
  nats:
    image: nats-streaming:latest
    container_name: nats
    hostname: nats
    command: "-cid cds-cluster --auth tokenAuth -store file -dir /opt/app/onap/nats/store --cluster_node_id nats-0"
    networks:
      - cds-network
    ports:
      - "8222:8222"
      - "4222:4222"
    restart: always
    volumes:
      - target: /opt/app/onap/nats/store
        type: volume
        source: nats-store
  cds-controller-0:
    depends_on:
      - db
      - nats
    image: onap/ccsdk-blueprintsprocessor:latest
    container_name: cds-controller-0
    hostname: cds-controller-0
    networks:
      - cds-network
    ports:
      - "8000:8080"
      - "9110:9111"
    restart: always
    volumes:
      - target: /opt/app/onap/blueprints/deploy
        type: volume
        source: blueprints-deploy
      - target: /opt/app/onap/config
        type: volume
        source: controller-config
    environment:
      # Same as hostname and container name
      CLUSTER_ENABLED: "true"
      CLUSTER_ID: cds-cluster
      CLUSTER_NODE_ID: cds-controller-0
      CLUSTER_JOIN_AS_CLIENT: "false"
      CLUSTER_CONFIG_FILE: /opt/app/onap/config/hazelcast/hazelcast.yaml
      NATS_CLUSTER_ID: cds-cluster
      APP_NAME: cds-controller
      BUNDLEVERSION: 1.0.0
      APP_CONFIG_HOME: /opt/app/onap/config
      STICKYSELECTORKEY:
      ENVCONTEXT: dev
  cds-controller-1:
    depends_on:
      - db
      - nats
    image: onap/ccsdk-blueprintsprocessor:latest
    container_name: cds-controller-1
    hostname: cds-controller-1
    networks:
      - cds-network
    ports:
      - "8001:8080"
      - "9111:9111"
    restart: always
    volumes:
      - target: /opt/app/onap/blueprints/deploy
        type: volume
        source: blueprints-deploy
      - target: /opt/app/onap/config
        type: volume
        source: controller-config
    environment:
      # Same as hostname and container name
      CLUSTER_ENABLED: "true"
      CLUSTER_ID: cds-cluster
      CLUSTER_NODE_ID: cds-controller-1
      CLUSTER_JOIN_AS_CLIENT: "false"
      CLUSTER_CONFIG_FILE: /opt/app/onap/config/hazelcast/hazelcast.yaml
      NATS_CLUSTER_ID: cds-cluster
      APP_NAME: cds-controller
      BUNDLEVERSION: 1.0.0
      APP_CONFIG_HOME: /opt/app/onap/config
      STICKYSELECTORKEY:
      ENVCONTEXT: dev
  cds-controller-2:
    depends_on:
      - db
      - nats
    image: onap/ccsdk-blueprintsprocessor:latest
    container_name: cds-controller-2
    hostname: cds-controller-2
    networks:
      - cds-network
    ports:
      - "8002:8080"
      - "9112:9111"
    restart: always
    volumes:
      - target: /opt/app/onap/blueprints/deploy
        type: volume
        source: blueprints-deploy
      - target: /opt/app/onap/config
        type: volume
        source: controller-config
    environment:
      # Same as hostname and container name
      CLUSTER_ENABLED: "true"
      CLUSTER_ID: cds-cluster
      CLUSTER_NODE_ID: cds-controller-2
      CLUSTER_JOIN_AS_CLIENT: "false"
      CLUSTER_CONFIG_FILE: /opt/app/onap/config/hazelcast/hazelcast.yaml
      NATS_CLUSTER_ID: cds-cluster
      APP_NAME: cds-controller
      BUNDLEVERSION: 1.0.0
      APP_CONFIG_HOME: /opt/app/onap/config
      STICKYSELECTORKEY:
      ENVCONTEXT: dev
  py-executor-0:
    depends_on:
      - db
      - nats
    image: onap/ccsdk-py-executor
    container_name: py-executor-0
    hostname: py-executor-0
    networks:
      - cds-network
    ports:
      - "50052:50052"
    restart: always
    volumes:
      - target: /opt/app/onap/blueprints/deploy
        type: volume
        source: blueprints-deploy
    environment:
      CLUSTER_ID: cds-cluster
      CLUSTER_NODE_ID: py-executor-0
      CLUSTER_JOIN_AS_CLIENT: "false"
      CLUSTER_CONFIG_FILE: /opt/app/onap/config/hazelcast/hazelcast.yaml
      NATS_CLUSTER_ID: cds-cluster
      APP_NAME: py-executor
      BUNDLEVERSION: 1.0.0
      APP_CONFIG_HOME: /opt/app/onap/config
      STICKYSELECTORKEY:
      ENVCONTEXT: dev
      APP_PORT: 50052
      AUTH_TYPE: tls-auth
      LOG_FILE: /opt/app/onap/logs/application.log
volumes:
  mysql-data:
    driver: local
    driver_opts:
      type: none
      device: /opt/app/cds/mysql/data
      o: bind
  nats-store:
    driver: local
    driver_opts:
      type: none
      device: /opt/app/cds/nats/store
      o: bind
  blueprints-deploy:
    driver: local
    driver_opts:
      type: none
      device: /opt/app/cds/blueprints/deploy
      o: bind
  controller-config:
    driver: local
    driver_opts:
      type: none
      device: /opt/app/cds/cds-controller/config
      o: bind

networks:
  cds-network:
    driver: bridge