From 383235b495c32a1762511f1837bc9e98af6226eb Mon Sep 17 00:00:00 2001 From: Brinda Santh Date: Mon, 16 Dec 2019 20:59:41 -0500 Subject: Cluster distributed data store Add experimental cluster co-ordination service using Atomic framework. Included distributed data store creation utilities. Sample docker compose data cluster between cds controller and resource-resolution instances. Issue-ID: CCSDK-2000 Signed-off-by: Brinda Santh Change-Id: I4de00e773a996e08fd1d260fc27ed18832433883 --- .../src/main/dc/docker-compose-cluster.yaml | 85 ++++++++++++++++++++++ .../application/src/main/dc/docker-compose.yaml | 14 +++- 2 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 ms/blueprintsprocessor/application/src/main/dc/docker-compose-cluster.yaml (limited to 'ms/blueprintsprocessor/application/src/main/dc') diff --git a/ms/blueprintsprocessor/application/src/main/dc/docker-compose-cluster.yaml b/ms/blueprintsprocessor/application/src/main/dc/docker-compose-cluster.yaml new file mode 100644 index 000000000..f4b4b7995 --- /dev/null +++ b/ms/blueprintsprocessor/application/src/main/dc/docker-compose-cluster.yaml @@ -0,0 +1,85 @@ +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 + cds-controller-1: + depends_on: + - db + image: onap/ccsdk-blueprintsprocessor:latest + container_name: cds-controller-1 + hostname: cds-controller-1 + 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_ID: cds-cluster + CLUSTER_NODE_ID: cds-controller-1 + CLUSTER_MEMBERS: cds-controller-1,resource-resolution-1 + CLUSTER_STORAGE_PATH: /opt/app/onap/config/cluster + #CLUSTER_CONFIG_FILE: /opt/app/onap/config/atomix/atomix-multicast.conf + APPLICATIONNAME: cds-controller + BUNDLEVERSION: 1.0.0 + APP_CONFIG_HOME: /opt/app/onap/config + STICKYSELECTORKEY: + ENVCONTEXT: dev + resource-resolution-1: + depends_on: + - db + image: onap/ccsdk-blueprintsprocessor:latest + container_name: resource-resolution-1 + hostname: resource-resolution-1 + 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_ID: cds-cluster + CLUSTER_NODE_ID: resource-resolution-1 + CLUSTER_MEMBERS: cds-controller-1,resource-resolution-1 + CLUSTER_STORAGE_PATH: /opt/app/onap/config/cluster + #CLUSTER_CONFIG_FILE: /opt/app/onap/config/atomix/atomix-multicast.conf + 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 diff --git a/ms/blueprintsprocessor/application/src/main/dc/docker-compose.yaml b/ms/blueprintsprocessor/application/src/main/dc/docker-compose.yaml index 0ff04bf3a..d87770286 100755 --- a/ms/blueprintsprocessor/application/src/main/dc/docker-compose.yaml +++ b/ms/blueprintsprocessor/application/src/main/dc/docker-compose.yaml @@ -1,9 +1,11 @@ -version: '3.3' +version: '3.7' services: db: image: mariadb:latest container_name: ccsdk-mariadb + networks: + - cds-network ports: - "3306:3306" volumes: @@ -20,6 +22,8 @@ services: image: onap/ccsdk-blueprintsprocessor:latest container_name: cds-controller-default hostname: cds-controller-default + networks: + - cds-network ports: - "8000:8080" - "9111:9111" @@ -37,6 +41,8 @@ services: - db image: onap/ccsdk-commandexecutor:latest container_name: bp-command-executor + networks: + - cds-network ports: - "50051:50051" restart: always @@ -48,6 +54,8 @@ services: image: onap/ccsdk-py-executor container_name: py-executor-default hostname: py-executor-default + networks: + - cds-network ports: - "50052:50052" restart: always @@ -65,3 +73,7 @@ services: volumes: blueprints-deploy: + +networks: + cds-network: + driver: bridge -- cgit 1.2.3-korg