aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/application/src/main/dc/docker-compose-cluster.yaml
blob: a37089f1016b5da57b12d79acbc924a663d9e313 (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
version: '3.7'

services:
  db:
    image: mariadb:latest
    container_name: ccsdk-mariadb
    networks:
      - cds-network
    ports:
      - "3306:3306"
    volumes:
      - ~/vm_mysql:/var/lib/mysql
    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: bind
        source: ./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: bind
        source: ./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
volumes:
  blueprints-deploy:

networks:
  cds-network:
    driver: bridge