aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/application/src/main/dc/docker-compose-cluster.yaml
blob: 020038c26f0f957a92b3b67ffb3ddd3a38dda1ef (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
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 store-nats-0 --cluster_node_id nats-0"
    networks:
      - cds-network
    ports:
      - "8222:8222"
      - "4222:4222"
    restart: always
  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"
      - "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-0
      CLUSTER_MEMBERS: cds-controller-0,resource-resolution-0
      CLUSTER_STORAGE_PATH: /opt/app/onap/config/cluster
      #CLUSTER_CONFIG_FILE: /opt/app/onap/config/atomix/atomix-multicast.conf
      NATS_HOSTS: nats://nats:4222
      APPLICATIONNAME: cds-controller
      BUNDLEVERSION: 1.0.0
      APP_CONFIG_HOME: /opt/app/onap/config
      STICKYSELECTORKEY:
      ENVCONTEXT: dev
  resource-resolution-0:
    depends_on:
      - db
      - nats
    image: onap/ccsdk-blueprintsprocessor:latest
    container_name: resource-resolution-0
    hostname: resource-resolution-0
    networks:
      - cds-network
    ports:
      - "8001: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: resource-resolution-config
    environment:
      CLUSTER_ENABLED: "true"
      CLUSTER_ID: cds-cluster
      CLUSTER_NODE_ID: resource-resolution-0
      CLUSTER_MEMBERS: cds-controller-0,resource-resolution-0
      CLUSTER_STORAGE_PATH: /opt/app/onap/config/cluster
      #CLUSTER_CONFIG_FILE: /opt/app/onap/config/atomix/atomix-multicast.conf
      NATS_HOSTS: nats://nats:4222
      APPLICATIONNAME: resource-resolution
      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_MEMBERS: cds-controller-0,resource-resolution-0,py-executor-0
      NATS_HOSTS: nats://nats:4222
      APPLICATIONNAME: 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
  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
  resource-resolution-config:
    driver: local
    driver_opts:
      type: none
      device: /opt/app/cds/resource-resolution/config
      o: bind

networks:
  cds-network:
    driver: bridge