From e485716185376c64355357f7e81f7e2de80cf30b Mon Sep 17 00:00:00 2001 From: "ashbournerox@gmail.com" Date: Thu, 14 Jun 2018 02:24:50 +0530 Subject: [PATCH 01/13] Add config resources for SP 4.2.0 --- .../editor-worker-dashboard/README.md | 4 +- .../dashboard/deployment.yaml | 54 +++++++++++++++++++ .../docker-compose.yml | 6 +-- .../worker/deployment.yaml | 51 ++++++++++++++++++ dockerfiles/README.md | 26 ++++----- dockerfiles/base/Dockerfile | 2 +- dockerfiles/dashboard/Dockerfile | 2 +- dockerfiles/editor/Dockerfile | 2 +- dockerfiles/manager/Dockerfile | 2 +- dockerfiles/worker/Dockerfile | 2 +- 10 files changed, 128 insertions(+), 23 deletions(-) diff --git a/docker-compose/editor-worker-dashboard/README.md b/docker-compose/editor-worker-dashboard/README.md index 5f79c2c..45f06f2 100644 --- a/docker-compose/editor-worker-dashboard/README.md +++ b/docker-compose/editor-worker-dashboard/README.md @@ -10,7 +10,7 @@ Runs a pre configured Stream Processor setup with Stream Processor editor, worke from WSO2 since the referring Docker images hosted at docker.wso2.com contains the latest updates and fixes for WSO2 Stream Processor. You can sign up for a Free Trial Subscription [here](https://wso2.com/free-trial-subscription).

* If you wish to run the Docker Compose configuration using Docker images built locally, build the Stream Processor editor, worker and dashboard images using [SP Dockerfiles](../../dockerfiles/README.md) and remove the `docker.wso2.com/` prefix - from the `image` name In the `docker-compose.yml`. For example, change the line `image: docker.wso2.com/wso2sp-manager:4.1.0`
to `image: wso2sp-manager:4.1.0`.

+ from the `image` name In the `docker-compose.yml`. For example, change the line `image: docker.wso2.com/wso2sp-manager:4.2.0`
to `image: wso2sp-manager:4.2.0`.

## How to deploy @@ -28,7 +28,7 @@ Runs a pre configured Stream Processor setup with Stream Processor editor, worke Instead, extract the zip file and directly browse to `docker-sp-docker-compose/editor-worker-dashboard` folder. > If you want to try out an already released tag, after executing 2nd step, checkout the relevant tag, - i.e. for example: git checkout tags/v4.1.0.1 and continue below steps. + i.e. for example: git checkout tags/v4.2.0.1 and continue below steps. 3. Execute the following Docker Compose command to start the deployment. ``` diff --git a/docker-compose/editor-worker-dashboard/dashboard/deployment.yaml b/docker-compose/editor-worker-dashboard/dashboard/deployment.yaml index 9189af9..4aa1d14 100644 --- a/docker-compose/editor-worker-dashboard/dashboard/deployment.yaml +++ b/docker-compose/editor-worker-dashboard/dashboard/deployment.yaml @@ -315,6 +315,56 @@ wso2.datasources: connectionTestQuery: SELECT 1 validationTimeout: 30000 isAutoCommit: false + - name: HTTP_ANALYTICS_DB + description: The datasource used for HTTP Analytics dashboard + jndiConfig: + name: jdbc/HTTP_ANALYTICS_DB + useJndiReference: false + definition: + type: RDBMS + configuration: + jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/worker/database/HTTP_ANALYTICS_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000;MVCC=TRUE;AUTO_SERVER=TRUE' + username: wso2carbon + password: wso2carbon + driverClassName: org.h2.Driver + maxPoolSize: 50 + idleTimeout: 60000 + connectionTestQuery: SELECT 1 + validationTimeout: 30000 + isAutoCommit: false + - name: Twitter_Analytics + description: The datasource used for Twitter Analytics dashboard + jndiConfig: + name: jdbc/Twitter_Analytics + useJndiReference: false + definition: + type: RDBMS + configuration: + jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/worker/database/Twitter_Analytics;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000;MVCC=TRUE;AUTO_SERVER=TRUE' + username: wso2carbon + password: wso2carbon + driverClassName: org.h2.Driver + maxPoolSize: 50 + idleTimeout: 60000 + connectionTestQuery: SELECT 1 + validationTimeout: 30000 + isAutoCommit: false + - name: Activity_Explorer_DB + description: "The datasource used for activity explorer to store span information." + jndiConfig: + name: jdbc/Activity_Explorer_DB + definition: + type: RDBMS + configuration: + jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/dashboard/database/ACTIVITY_EXPLORER_DB;AUTO_SERVER=TRUE' + username: wso2carbon + password: wso2carbon + driverClassName: org.h2.Driver + maxPoolSize: 50 + idleTimeout: 60000 + connectionTestQuery: SELECT 1 + validationTimeout: 30000 + isAutoCommit: false wso2.business.rules.manager: datasource: BUSINESS_RULES_DB @@ -328,6 +378,10 @@ wso2.business.rules.manager: - stock-exchange-input - stock-exchange-output - identifying-continuous-production-decrease + - popular-tweets-analysis + - http-analytics-processing + - activity-explorer-app-template + - activity-explorer-source-template # credentials for worker nodes username: admin password: admin diff --git a/docker-compose/editor-worker-dashboard/docker-compose.yml b/docker-compose/editor-worker-dashboard/docker-compose.yml index 3161b12..27c0c1c 100644 --- a/docker-compose/editor-worker-dashboard/docker-compose.yml +++ b/docker-compose/editor-worker-dashboard/docker-compose.yml @@ -15,7 +15,7 @@ services: timeout: 60s retries: 5 editor: - image: docker.wso2.com/wso2sp-editor:4.1.0 + image: docker.wso2.com/wso2sp-editor:4.2.0 container_name: wso2sp-editor ports: - "9743:9743" @@ -25,7 +25,7 @@ services: timeout: 120s retries: 5 worker: - image: docker.wso2.com/wso2sp-worker:4.1.0 + image: docker.wso2.com/wso2sp-worker:4.2.0 container_name: wso2sp-worker ports: - "9090:9090" @@ -42,7 +42,7 @@ services: links: - mysql dashboard: - image: docker.wso2.com/wso2sp-dashboard:4.1.0 + image: docker.wso2.com/wso2sp-dashboard:4.2.0 container_name: wso2sp-dashboard ports: - "9643:9643" diff --git a/docker-compose/editor-worker-dashboard/worker/deployment.yaml b/docker-compose/editor-worker-dashboard/worker/deployment.yaml index e08e7ff..aa02c6b 100644 --- a/docker-compose/editor-worker-dashboard/worker/deployment.yaml +++ b/docker-compose/editor-worker-dashboard/worker/deployment.yaml @@ -347,6 +347,57 @@ wso2.datasources: validationTimeout: 30000 isAutoCommit: false + - name: HTTP_ANALYTICS_DB + description: The datasource used for HTTP Analytics dashboard + jndiConfig: + name: jdbc/HTTP_ANALYTICS_DB + useJndiReference: false + definition: + type: RDBMS + configuration: + jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/worker/database/HTTP_ANALYTICS_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000;MVCC=TRUE;AUTO_SERVER=TRUE' + username: wso2carbon + password: wso2carbon + driverClassName: org.h2.Driver + maxPoolSize: 50 + idleTimeout: 60000 + connectionTestQuery: SELECT 1 + validationTimeout: 30000 + isAutoCommit: false + - name: Twitter_Analytics + description: The datasource used for Twitter Analytics dashboard + jndiConfig: + name: jdbc/Twitter_Analytics + useJndiReference: false + definition: + type: RDBMS + configuration: + jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/worker/database/Twitter_Analytics;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000;MVCC=TRUE;AUTO_SERVER=TRUE' + username: wso2carbon + password: wso2carbon + driverClassName: org.h2.Driver + maxPoolSize: 50 + idleTimeout: 60000 + connectionTestQuery: SELECT 1 + validationTimeout: 30000 + isAutoCommit: false + + - name: Activity_Explorer_DB + description: "The datasource used for activity explorer to store span information." + jndiConfig: + name: jdbc/Activity_Explorer_DB + definition: + type: RDBMS + configuration: + jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/dashboard/database/ACTIVITY_EXPLORER_DB;AUTO_SERVER=TRUE' + username: wso2carbon + password: wso2carbon + driverClassName: org.h2.Driver + maxPoolSize: 50 + idleTimeout: 60000 + connectionTestQuery: SELECT 1 + validationTimeout: 30000 + isAutoCommit: false # Cluster Configuration cluster.config: diff --git a/dockerfiles/README.md b/dockerfiles/README.md index 2c39bc3..f63a5b1 100644 --- a/dockerfiles/README.md +++ b/dockerfiles/README.md @@ -1,7 +1,7 @@ # Dockerfiles for WSO2 Stream Processor # This section defines Dockerfiles and step-by-step instructions to build Docker images for product profiles provided by -WSO2 Stream Processor 4.1.0, namely :
+WSO2 Stream Processor 4.2.0, namely :
1. Dashboard 2. Editor 3. Manager @@ -20,7 +20,7 @@ git clone https://github.com/wso2/docker-sp.git ##### 2. Copy the extract JDK and WSO2 Stream Processor distributions to `/base/files` - Download [JDK 1.8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) and extract it to `/base/files`. -- Download [WSO2 Stream Processor 4.1.0 distribution](https://github.com/wso2/product-sp/releases) +- Download [WSO2 Stream Processor 4.2.0 distribution](https://github.com/wso2/product-sp/releases) and extract it to `/base/files`.
##### 3. Download [MySQL Connector/J](https://dev.mysql.com/downloads/connector/j/) v5.1.45 and copy the jar to `/base/files` @@ -40,41 +40,41 @@ The list of required client jars are; - zkclient-0.10.jar - zookeeper-3.4.9.jar -> Use the `jartobundle.sh` script found it `wso2sp-4.1.0/bin` as shown below; note that you will have to run this command for each jar mentioned above +> Use the `jartobundle.sh` script found it `wso2sp-4.2.0/bin` as shown below; note that you will have to run this command for each jar mentioned above ``` - ./wso2sp-4.1.0/bin/jartobundle.sh path/to/kafka/client/jar /base/files + ./wso2sp-4.2.0/bin/jartobundle.sh path/to/kafka/client/jar /base/files ``` ##### 4. Build the base Docker image. - For base, navigate to `/base` directory.
Execute `docker build` command as shown below. - + `docker build -t wso2sp-base:4.1.0 .` + + `docker build -t wso2sp-base:4.2.0 .` ##### 5. Build Docker images specific to each profile. - For Dashboard, navigate to `/dashboard` directory.
Execute `docker build` command as shown below. - + `docker build -t wso2sp-dashboard:4.1.0 .` + + `docker build -t wso2sp-dashboard:4.2.0 .` - For Editor, navigate to `/editor` directory.
Execute `docker build` command as shown below. - + `docker build -t wso2sp-editor:4.1.0 .` + + `docker build -t wso2sp-editor:4.2.0 .` - For Manager, navigate to `/manager` directory.
Execute `docker build` command as shown below. - + `docker build -t wso2sp-manager:4.1.0 .` + + `docker build -t wso2sp-manager:4.2.0 .` - For Worker, navigate to `/worker` directory.
Execute `docker build` command as shown below. - + `docker build -t wso2sp-worker:4.1.0 .` + + `docker build -t wso2sp-worker:4.2.0 .` ##### 6. Running Docker images specific to each profile. - For Dashboard, - + `docker run -it -p 9643:9643 wso2sp-dashboard:4.1.0` + + `docker run -it -p 9643:9643 wso2sp-dashboard:4.2.0` - For Editor, - + `docker run -it -p 9390:9390 -p 9743:9743 wso2sp-editor:4.1.0` + + `docker run -it -p 9390:9390 -p 9743:9743 wso2sp-editor:4.2.0` - For Manager, - + `docker run -it wso2sp-manager:4.1.0` + + `docker run -it wso2sp-manager:4.2.0` - For Worker, - + `docker run -it wso2sp-worker:4.1.0` + + `docker run -it wso2sp-worker:4.2.0` ##### 7. Accessing management console per each profile. - For Dashboard, diff --git a/dockerfiles/base/Dockerfile b/dockerfiles/base/Dockerfile index dec0e6f..9adeb02 100644 --- a/dockerfiles/base/Dockerfile +++ b/dockerfiles/base/Dockerfile @@ -33,7 +33,7 @@ ARG JDK=jdk1.8.0* ARG JAVA_HOME=${USER_HOME}/java # set wso2 product configurations ARG WSO2_SERVER=wso2sp -ARG WSO2_SERVER_VERSION=4.1.0 +ARG WSO2_SERVER_VERSION=4.2.0 ARG WSO2_SERVER_PACK=${WSO2_SERVER}-${WSO2_SERVER_VERSION} ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER}-${WSO2_SERVER_VERSION} diff --git a/dockerfiles/dashboard/Dockerfile b/dockerfiles/dashboard/Dockerfile index 99e62cc..6a96012 100644 --- a/dockerfiles/dashboard/Dockerfile +++ b/dockerfiles/dashboard/Dockerfile @@ -17,7 +17,7 @@ # ------------------------------------------------------------------------ # set to latest Ubuntu LTS -FROM wso2sp-base:4.1.0 +FROM wso2sp-base:4.2.0 MAINTAINER WSO2 Docker Maintainers "dev@wso2.org" # copy entrypoint bash script to user home diff --git a/dockerfiles/editor/Dockerfile b/dockerfiles/editor/Dockerfile index 5a4148a..2199595 100644 --- a/dockerfiles/editor/Dockerfile +++ b/dockerfiles/editor/Dockerfile @@ -17,7 +17,7 @@ # ------------------------------------------------------------------------ # set to latest Ubuntu LTS -FROM wso2sp-base:4.1.0 +FROM wso2sp-base:4.2.0 MAINTAINER WSO2 Docker Maintainers "dev@wso2.org" # copy entrypoint bash script to user home diff --git a/dockerfiles/manager/Dockerfile b/dockerfiles/manager/Dockerfile index 61c3956..71cd993 100644 --- a/dockerfiles/manager/Dockerfile +++ b/dockerfiles/manager/Dockerfile @@ -17,7 +17,7 @@ # ------------------------------------------------------------------------ # set to latest Ubuntu LTS -FROM wso2sp-base:4.1.0 +FROM wso2sp-base:4.2.0 MAINTAINER WSO2 Docker Maintainers "dev@wso2.org" # copy entrypoint bash script to user home diff --git a/dockerfiles/worker/Dockerfile b/dockerfiles/worker/Dockerfile index 8e9b279..1090035 100644 --- a/dockerfiles/worker/Dockerfile +++ b/dockerfiles/worker/Dockerfile @@ -17,7 +17,7 @@ # ------------------------------------------------------------------------ # set to latest Ubuntu LTS -FROM wso2sp-base:4.1.0 +FROM wso2sp-base:4.2.0 MAINTAINER WSO2 Docker Maintainers "dev@wso2.org" # copy entrypoint bash script to user home From 2e914c7462d2b006940f8ca32b592e2186fb1911 Mon Sep 17 00:00:00 2001 From: Vimukthi Perera Date: Mon, 25 Jun 2018 11:53:19 +0530 Subject: [PATCH 02/13] Update README.md --- docker-compose/editor-worker-dashboard/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker-compose/editor-worker-dashboard/README.md b/docker-compose/editor-worker-dashboard/README.md index 45f06f2..af8c2ba 100644 --- a/docker-compose/editor-worker-dashboard/README.md +++ b/docker-compose/editor-worker-dashboard/README.md @@ -6,8 +6,7 @@ Runs a pre configured Stream Processor setup with Stream Processor editor, worke * Install [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git), [Docker](https://www.docker.com/get-docker) and [Docker Compose](https://docs.docker.com/compose/install/#install-compose) in order to run the steps provided in following Quick start guide.

- * In order to run this Docker Compose setup, you will need an active [Free Trial Subscription](https://wso2.com/free-trial-subscription) - from WSO2 since the referring Docker images hosted at docker.wso2.com contains the latest updates and fixes for WSO2 Stream Processor. You can sign up for a Free Trial Subscription [here](https://wso2.com/free-trial-subscription).

+ * In order to run this Docker Compose setup, you will need an active subscription from WSO2 since the referring Docker images hosted at docker.wso2.com contains the latest updates and fixes for WSO2 Stream Processor. You can sign up for a Free Trial Subscription [here](https://wso2.com/free-trial-subscription).

* If you wish to run the Docker Compose configuration using Docker images built locally, build the Stream Processor editor, worker and dashboard images using [SP Dockerfiles](../../dockerfiles/README.md) and remove the `docker.wso2.com/` prefix from the `image` name In the `docker-compose.yml`. For example, change the line `image: docker.wso2.com/wso2sp-manager:4.2.0`
to `image: wso2sp-manager:4.2.0`.

From 2b856f6d61b7d66fa5523bfc5c4956fb4b56c249 Mon Sep 17 00:00:00 2001 From: Chiran Fernando Date: Thu, 14 Jun 2018 12:59:49 +0530 Subject: [PATCH 03/13] Add sp-distributed docker compose --- docker-compose/sp-distributed/README.md | 37 ++ .../sp-distributed/docker-compose.yml | 176 ++++++++ .../sp-distributed/manager/deployment.yaml | 311 +++++++++++++ .../sp-distributed/mysql/scripts/mysql.sql | 26 ++ .../sp-distributed/sp-distributed.png | Bin 0 -> 12061 bytes .../sp-distributed/worker/deployment.yaml | 407 ++++++++++++++++++ 6 files changed, 957 insertions(+) create mode 100644 docker-compose/sp-distributed/README.md create mode 100644 docker-compose/sp-distributed/docker-compose.yml create mode 100644 docker-compose/sp-distributed/manager/deployment.yaml create mode 100644 docker-compose/sp-distributed/mysql/scripts/mysql.sql create mode 100644 docker-compose/sp-distributed/sp-distributed.png create mode 100644 docker-compose/sp-distributed/worker/deployment.yaml diff --git a/docker-compose/sp-distributed/README.md b/docker-compose/sp-distributed/README.md new file mode 100644 index 0000000..dae6b4e --- /dev/null +++ b/docker-compose/sp-distributed/README.md @@ -0,0 +1,37 @@ +# WSO2 Stream Processor Distributed setup + +![](sp-distributed.png) + +## Prerequisites + + * Install [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git), [Docker](https://www.docker.com/get-docker) and [Docker Compose](https://docs.docker.com/compose/install/#install-compose) + in order to run the steps provided in following Quick start guide.

+ * In order to run this Docker Compose setup, you will need an active [Free Trial Subscription](https://wso2.com/free-trial-subscription) + from WSO2 since the referring Docker images hosted at docker.wso2.com contains the latest updates and fixes for WSO2 Stream Processor. You can sign up for a Free Trial Subscription [here](https://wso2.com/free-trial-subscription).

+ * If you wish to run the Docker Compose configuration using Docker images built locally, build the Stream Processor manager and worker + images using [SP Dockerfiles](../../dockerfiles/README.md) and remove the `docker.wso2.com/` prefix + from the `image` name In the `docker-compose.yml`. For example, change the line `image: docker.wso2.com/wso2sp-manager:4.1.0`
to `image: wso2sp-manager:4.1.0`.

+ +## How to deploy + + 1. Clone WSO2 Stream Processor Docker git repository. + ``` + git clone https://github.com/wso2/docker-sp + ``` + > If you are to try out an already released zip of this repo, please ignore this 1st step. + + 2. Switch to the `docker-compose/sp-distributed` folder. + ``` + cd [docker-sp]/docker-compose/sp-distributed + ``` + > If you are to try out an already released zip of this repo, please ignore this 2nd step also. + Instead, extract the zip file and directly browse to `docker-sp-docker-compose/sp-distributed` folder. + + > If you want to try out an already released tag, after executing 2nd step, checkout the relevant tag, + i.e. for example: git checkout tags/v4.1.0.1 and continue below steps. + + 3. Execute the following Docker Compose command to start the deployment. + ``` + docker-compose up + ``` + diff --git a/docker-compose/sp-distributed/docker-compose.yml b/docker-compose/sp-distributed/docker-compose.yml new file mode 100644 index 0000000..117a192 --- /dev/null +++ b/docker-compose/sp-distributed/docker-compose.yml @@ -0,0 +1,176 @@ +version: '2.3' +services: + zookeeper: + image: wurstmeister/zookeeper + container_name: zookeeper + ports: + - "2181:2181" + - "2888:2888" + - "3888:3888" + healthcheck: + test: ["CMD", "nc", "-z","localhost", "2181"] + interval: 10s + timeout: 120s + retries: 5 + environment: + ZOO_PORT: 2181 + ZOOKEEPER_AUTOPURGE_SNAP_RETAIN_COUNT: 10 + ZOOKEEPER_AUTOPURGE_PURGE_INTERVAL: 2 + kafka: + image: wurstmeister/kafka + container_name: kafka + ports: + - "9092:9092" + healthcheck: + test: ["CMD", "nc", "-z","localhost", "9092"] + interval: 10s + timeout: 120s + retries: 5 + depends_on: + zookeeper: + condition: service_healthy + environment: + KAFKA_ADVERTISED_PORT: 9092 + KAFKA_ADVERTISED_HOST_NAME: kafka + KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 + mysql: + image: mysql:5.7.19 + container_name: sp-rdbms + ports: + - 3306 + environment: + MYSQL_ROOT_PASSWORD: root + volumes: + - ./mysql/scripts:/docker-entrypoint-initdb.d + healthcheck: + test: ["CMD", "mysqladmin" ,"ping", "-uroot", "-proot"] + interval: 30s + timeout: 60s + retries: 5 + depends_on: + kafka: + condition: service_healthy + manager1: + image: docker.wso2.com/wso2sp-manager:4.1.0 + container_name: wso2sp-manager-1 + ports: + - "9190:9190" + healthcheck: + test: ["CMD", "nc", "-z","localhost", "9190"] + interval: 10s + timeout: 120s + retries: 5 + volumes: + - ./manager:/home/wso2carbon/volumes/conf/manager + depends_on: + mysql: + condition: service_healthy + environment: + NODE_ID: wso2sp-manager-1 + NODE_IP: 0.0.0.0 + links: + - mysql + manager2: + image: docker.wso2.com/wso2sp-manager:4.1.0 + container_name: wso2sp-manager-2 + ports: + - "9191:9190" + healthcheck: + test: ["CMD", "nc", "-z","localhost", "9191"] + interval: 10s + timeout: 120s + retries: 5 + volumes: + - ./manager:/home/wso2carbon/volumes/conf/manager + depends_on: + manager1: + condition: service_healthy + environment: + NODE_ID: wso2sp-manager-2 + NODE_IP: 0.0.0.0 + links: + - manager1 + worker1: + image: docker.wso2.com/wso2sp-worker:4.1.0 + container_name: wso2sp-worker-1 + ports: + - "9001:9090" + healthcheck: + test: ["CMD", "nc", "-z","localhost", "9090"] + interval: 10s + timeout: 120s + retries: 5 + volumes: + - ./worker:/home/wso2carbon/volumes/conf/worker + depends_on: + manager1: + condition: service_healthy + environment: + NODE_ID: wso2sp-worker-1 + NODE_IP: 0.0.0.0 + NODE_PORT: 9001 + links: + - manager1 + worker2: + image: docker.wso2.com/wso2sp-worker:4.1.0 + container_name: wso2sp-worker-2 + ports: + - "9002:9090" + healthcheck: + test: ["CMD", "nc", "-z","localhost", "9002"] + interval: 10s + timeout: 120s + retries: 5 + volumes: + - ./worker:/home/wso2carbon/volumes/conf/worker + depends_on: + manager1: + condition: service_healthy + environment: + NODE_ID: wso2sp-worker-2 + NODE_IP: 0.0.0.0 + NODE_PORT: 9002 + links: + - manager1 + worker3: + image: docker.wso2.com/wso2sp-worker:4.1.0 + container_name: wso2sp-worker-3 + ports: + - "9003:9090" + healthcheck: + test: ["CMD", "nc", "-z","localhost", "9003"] + interval: 10s + timeout: 120s + retries: 5 + volumes: + - ./worker:/home/wso2carbon/volumes/conf/worker + depends_on: + manager1: + condition: service_healthy + environment: + NODE_ID: wso2sp-worker-3 + NODE_IP: 0.0.0.0 + NODE_PORT: 9003 + links: + - manager1 + worker4: + image: docker.wso2.com/wso2sp-worker:4.1.0 + container_name: wso2sp-worker-4 + ports: + - "9004:9090" + healthcheck: + test: ["CMD", "nc", "-z","localhost", "9004"] + interval: 10s + timeout: 120s + retries: 5 + volumes: + - ./worker:/home/wso2carbon/volumes/conf/worker + depends_on: + manager1: + condition: service_healthy + environment: + NODE_ID: wso2sp-worker-4 + NODE_IP: 0.0.0.0 + NODE_PORT: 9004 + links: + - manager1 \ No newline at end of file diff --git a/docker-compose/sp-distributed/manager/deployment.yaml b/docker-compose/sp-distributed/manager/deployment.yaml new file mode 100644 index 0000000..29eba51 --- /dev/null +++ b/docker-compose/sp-distributed/manager/deployment.yaml @@ -0,0 +1,311 @@ +################################################################################ +# Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved +# +# Licensed under the Apache License, Version 2.0 (the \"License\"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an \"AS IS\" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +################################################################################ + + # Carbon Configuration Parameters +wso2.carbon: + # value to uniquely identify a server + id: ${NODE_ID} + # server name + name: WSO2 Stream Processor + # ports used by this server + ports: + # port offset + offset: 0 + +wso2.transport.http: + transportProperties: + - + name: "server.bootstrap.socket.timeout" + value: 60 + - + name: "client.bootstrap.socket.timeout" + value: 60 + - + name: "latency.metrics.enabled" + value: true + + listenerConfigurations: + - + id: "default" + host: "${NODE_IP}" + port: 9190 + - + id: "msf4j-https" + host: "${NODE_IP}" + port: 9543 + scheme: https + keyStoreFile: "${carbon.home}/resources/security/wso2carbon.jks" + keyStorePassword: wso2carbon + certPass: wso2carbon + + senderConfigurations: + - + id: "http-sender" + + # Configuration used for the databridge communication +databridge.config: + # No of worker threads to consume events + # THIS IS A MANDATORY FIELD + workerThreads: 10 + # Maximum amount of messages that can be queued internally in MB + # THIS IS A MANDATORY FIELD + maxEventBufferCapacity: 10000000 + # Queue size; the maximum number of events that can be stored in the queue + # THIS IS A MANDATORY FIELD + eventBufferSize: 2000 + # Keystore file path + # THIS IS A MANDATORY FIELD + keyStoreLocation : ${sys:carbon.home}/resources/security/wso2carbon.jks + # Keystore password + # THIS IS A MANDATORY FIELD + keyStorePassword : wso2carbon + # Session Timeout value in mins + # THIS IS A MANDATORY FIELD + clientTimeoutMin: 30 + # Data receiver configurations + # THIS IS A MANDATORY FIELD + dataReceivers: + - + # Data receiver configuration + dataReceiver: + # Data receiver type + # THIS IS A MANDATORY FIELD + type: Thrift + # Data receiver properties + properties: + tcpPort: '7611' + sslPort: '7711' + + - + # Data receiver configuration + dataReceiver: + # Data receiver type + # THIS IS A MANDATORY FIELD + type: Binary + # Data receiver properties + properties: + tcpPort: '9611' + sslPort: '9711' + tcpReceiverThreadPoolSize: '100' + sslReceiverThreadPoolSize: '100' + hostName: ${NODE_IP} + + # Configuration of the Data Agents - to publish events through databridge +data.agent.config: + # Data agent configurations + # THIS IS A MANDATORY FIELD + agents: + - + # Data agent configuration + agentConfiguration: + # Data agent name + # THIS IS A MANDATORY FIELD + name: Thrift + # Data endpoint class + # THIS IS A MANDATORY FIELD + dataEndpointClass: org.wso2.carbon.databridge.agent.endpoint.thrift.ThriftDataEndpoint + # Data publisher strategy + publishingStrategy: async + # Trust store path + trustStorePath: '${sys:carbon.home}/resources/security/client-truststore.jks' + # Trust store password + trustStorePassword: 'wso2carbon' + # Queue Size + queueSize: 32768 + # Batch Size + batchSize: 200 + # Core pool size + corePoolSize: 1 + # Socket timeout in milliseconds + socketTimeoutMS: 30000 + # Maximum pool size + maxPoolSize: 1 + # Keep alive time in pool + keepAliveTimeInPool: 20 + # Reconnection interval + reconnectionInterval: 30 + # Max transport pool size + maxTransportPoolSize: 250 + # Max idle connections + maxIdleConnections: 250 + # Eviction time interval + evictionTimePeriod: 5500 + # Min idle time in pool + minIdleTimeInPool: 5000 + # Secure max transport pool size + secureMaxTransportPoolSize: 250 + # Secure max idle connections + secureMaxIdleConnections: 250 + # secure eviction time period + secureEvictionTimePeriod: 5500 + # Secure min idle time in pool + secureMinIdleTimeInPool: 5000 + # SSL enabled protocols + sslEnabledProtocols: TLSv1.1,TLSv1.2 + # Ciphers + ciphers: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 + - + # Data agent configuration + agentConfiguration: + # Data agent name + # THIS IS A MANDATORY FIELD + name: Binary + # Data endpoint class + # THIS IS A MANDATORY FIELD + dataEndpointClass: org.wso2.carbon.databridge.agent.endpoint.binary.BinaryDataEndpoint + # Data publisher strategy + publishingStrategy: async + # Trust store path + trustStorePath: '${sys:carbon.home}/resources/security/client-truststore.jks' + # Trust store password + trustStorePassword: 'wso2carbon' + # Queue Size + queueSize: 32768 + # Batch Size + batchSize: 200 + # Core pool size + corePoolSize: 1 + # Socket timeout in milliseconds + socketTimeoutMS: 30000 + # Maximum pool size + maxPoolSize: 1 + # Keep alive time in pool + keepAliveTimeInPool: 20 + # Reconnection interval + reconnectionInterval: 30 + # Max transport pool size + maxTransportPoolSize: 250 + # Max idle connections + maxIdleConnections: 250 + # Eviction time interval + evictionTimePeriod: 5500 + # Min idle time in pool + minIdleTimeInPool: 5000 + # Secure max transport pool size + secureMaxTransportPoolSize: 250 + # Secure max idle connections + secureMaxIdleConnections: 250 + # secure eviction time period + secureEvictionTimePeriod: 5500 + # Secure min idle time in pool + secureMinIdleTimeInPool: 5000 + # SSL enabled protocols + sslEnabledProtocols: TLSv1.1,TLSv1.2 + # Ciphers + ciphers: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 + + # Deployment configuration parameters +wso2.artifact.deployment: + # Scheduler update interval + updateInterval: 5 + + # Periodic Persistence Configuration +state.persistence: + enabled: false + intervalInMin: 1 + revisionsToKeep: 2 + persistenceStore: org.wso2.carbon.stream.processor.core.persistence.FileSystemPersistenceStore + config: + location: siddhi-app-persistence + + # Secure Vault Configuration +wso2.securevault: + secretRepository: + type: org.wso2.carbon.secvault.repository.DefaultSecretRepository + parameters: + privateKeyAlias: wso2carbon + keystoreLocation: ${sys:carbon.home}/resources/security/securevault.jks + secretPropertiesFile: ${sys:carbon.home}/conf/${sys:wso2.runtime}/secrets.properties + masterKeyReader: + type: org.wso2.carbon.secvault.reader.DefaultMasterKeyReader + parameters: + masterKeyReaderFile: ${sys:carbon.home}/conf/${sys:wso2.runtime}/master-keys.yaml +wso2.datasources: + dataSources: + - name: SP_MGT_DB + description: The datasource used for registry and user manager + jndiConfig: + name: jdbc/WSO2ClusterDB + definition: + type: RDBMS + configuration: + jdbcUrl: 'jdbc:mysql://sp-rdbms:3306/SP_MGT_DB?useSSL=false' + username: root + password: root + driverClassName: com.mysql.jdbc.Driver + maxPoolSize: 50 + idleTimeout: 60000 + connectionTestQuery: SELECT 1 + validationTimeout: 30000 + isAutoCommit: false + - name: WSO2_PERMISSIONS_DB + description: The datasource used for permission feature + jndiConfig: + name: jdbc/PERMISSION_DB + useJndiReference: true + definition: + type: RDBMS + configuration: + jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/${sys:wso2.runtime}/database/PERMISSION_DB;IFEXISTS=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000;MVCC=TRUE' + username: wso2carbon + password: wso2carbon + driverClassName: org.h2.Driver + maxPoolSize: 50 + idleTimeout: 60000 + connectionTestQuery: SELECT 1 + validationTimeout: 30000 + isAutoCommit: false + - name: WSO2_STATUS_DASHBOARD_DISTRIBUTED_DB + description: The datasource used for distributed status dashboard feature + jndiConfig: + name: jdbc/WSO2_STATUS_DASHBOARD_DISTRIBUTED_DB + useJndiReference: true + definition: + type: RDBMS + configuration: + jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/${sys:wso2.runtime}/database/WSO2_STATUS_DASHBOARD_DISTRIBUTED_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000;MVCC=TRUE' + username: wso2carbon + password: wso2carbon + driverClassName: org.h2.Driver + maxPoolSize: 50 + idleTimeout: 60000 + connectionTestQuery: SELECT 1 + validationTimeout: 30000 + isAutoCommit: false + + # Cluster Configuration +cluster.config: + enabled: true + groupId: sp-mgt + coordinationStrategyClass: org.wso2.carbon.cluster.coordinator.rdbms.RDBMSCoordinationStrategy + strategyConfig: + datasource: SP_MGT_DB # define a mysql datasource configured to the shared database + heartbeatInterval: 1000 + heartbeatMaxRetry: 2 + eventPollingInterval: 1000 + + # Deployment Configuration for Distributed Deployment +deployment.config: + type: distributed + httpInterface: + host: ${NODE_ID} + port: 9190 + heartbeatInterval: 2000 + heartbeatMaxRetry: 2 + datasource: SP_MGT_DB # define a mysql datasource in datasources and refer it from here. + minResourceCount: 1 + bootstrapURLs: kafka:9092 # kafka urls + zooKeeperURLs: zookeeper:2181 # zookeeper urls diff --git a/docker-compose/sp-distributed/mysql/scripts/mysql.sql b/docker-compose/sp-distributed/mysql/scripts/mysql.sql new file mode 100644 index 0000000..e81247d --- /dev/null +++ b/docker-compose/sp-distributed/mysql/scripts/mysql.sql @@ -0,0 +1,26 @@ +-- +-- Copyright 2018 WSO2 Inc. (http://wso2.org) +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +DROP DATABASE IF EXISTS SP_MGT_DB; +DROP DATABASE IF EXISTS SP_WORKER_STATE_DB; + +CREATE DATABASE SP_MGT_DB; +CREATE DATABASE SP_WORKER_STATE_DB; + +CREATE USER IF NOT EXISTS 'wso2carbon'@'%' IDENTIFIED BY 'wso2carbon'; +GRANT ALL ON SP_MGT_DB.* TO 'wso2carbon'@'%' IDENTIFIED BY 'wso2carbon'; +GRANT ALL ON SP_WORKER_STATE_DB.* TO 'wso2carbon'@'%' IDENTIFIED BY 'wso2carbon'; + diff --git a/docker-compose/sp-distributed/sp-distributed.png b/docker-compose/sp-distributed/sp-distributed.png new file mode 100644 index 0000000000000000000000000000000000000000..82b5ad2453b427b158e4a9ce2f2aac340741cdb8 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4OQo-h86knw*2Huo)NML8N(9$k21>`v!c! zUIQC75AzH+&krE~c7qUG1ug!y^kq~Yq$()roW-#6QcKgEU3MKVtm)Jxn6B*{8?@0! z6*h7ymxA<_yq%=Am4W5ky9!9}lp2|gm=@d#2~_1u&h;u4d{3y!L%L`Q*ZQ=r>sY9z zRTWWf7lC!D*5_0H0aP**l6nK10cy^Exnqyl^mOA@Zn+Umuyl}Ew9|5+6Ba`Qp@Ujx z)PjJ!`nv-sZR93AX)y2L47RX?sY)rL&MTsM`5ZbqLbU(yp(FMvYel|1_yQ9*8u>mn zi?5=wuf2`0gM^*819AWe@(YOZ2ng~B3Fr$5NeBx|@C$MA^Gopan-$KS{yze49`?>} Y0{?db&VCmSqyRuwQA?o)WF7T?0CX*BOaK4? literal 0 HcmV?d00001 diff --git a/docker-compose/sp-distributed/worker/deployment.yaml b/docker-compose/sp-distributed/worker/deployment.yaml new file mode 100644 index 0000000..92ae26d --- /dev/null +++ b/docker-compose/sp-distributed/worker/deployment.yaml @@ -0,0 +1,407 @@ +################################################################################ +# Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved +# +# Licensed under the Apache License, Version 2.0 (the \"License\"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an \"AS IS\" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +################################################################################ + + # Carbon Configuration Parameters +wso2.carbon: + # value to uniquely identify a server + id: ${NODE_ID} + # server name + name: WSO2 Stream Processor + # ports used by this server + ports: + # port offset + offset: 0 + +wso2.transport.http: + transportProperties: + - + name: "server.bootstrap.socket.timeout" + value: 60 + - + name: "client.bootstrap.socket.timeout" + value: 60 + - + name: "latency.metrics.enabled" + value: true + + listenerConfigurations: + - + id: "default" + host: "${NODE_IP}" + port: 9090 + - + id: "msf4j-https" + host: "${NODE_IP}" + port: 9443 + scheme: https + keyStoreFile: "${carbon.home}/resources/security/wso2carbon.jks" + keyStorePassword: wso2carbon + certPass: wso2carbon + + senderConfigurations: + - + id: "http-sender" + + # Configuration used for the databridge communication +databridge.config: + # No of worker threads to consume events + # THIS IS A MANDATORY FIELD + workerThreads: 10 + # Maximum amount of messages that can be queued internally in MB + # THIS IS A MANDATORY FIELD + maxEventBufferCapacity: 10000000 + # Queue size; the maximum number of events that can be stored in the queue + # THIS IS A MANDATORY FIELD + eventBufferSize: 2000 + # Keystore file path + # THIS IS A MANDATORY FIELD + keyStoreLocation : ${sys:carbon.home}/resources/security/wso2carbon.jks + # Keystore password + # THIS IS A MANDATORY FIELD + keyStorePassword : wso2carbon + # Session Timeout value in mins + # THIS IS A MANDATORY FIELD + clientTimeoutMin: 30 + # Data receiver configurations + # THIS IS A MANDATORY FIELD + dataReceivers: + - + # Data receiver configuration + dataReceiver: + # Data receiver type + # THIS IS A MANDATORY FIELD + type: Thrift + # Data receiver properties + properties: + tcpPort: '7611' + sslPort: '7711' + + - + # Data receiver configuration + dataReceiver: + # Data receiver type + # THIS IS A MANDATORY FIELD + type: Binary + # Data receiver properties + properties: + tcpPort: '9611' + sslPort: '9711' + tcpReceiverThreadPoolSize: '100' + sslReceiverThreadPoolSize: '100' + hostName: ${NODE_IP} + + # Configuration of the Data Agents - to publish events through databridge +data.agent.config: + # Data agent configurations + # THIS IS A MANDATORY FIELD + agents: + - + # Data agent configuration + agentConfiguration: + # Data agent name + # THIS IS A MANDATORY FIELD + name: Thrift + # Data endpoint class + # THIS IS A MANDATORY FIELD + dataEndpointClass: org.wso2.carbon.databridge.agent.endpoint.thrift.ThriftDataEndpoint + # Data publisher strategy + publishingStrategy: async + # Trust store path + trustStorePath: '${sys:carbon.home}/resources/security/client-truststore.jks' + # Trust store password + trustStorePassword: 'wso2carbon' + # Queue Size + queueSize: 32768 + # Batch Size + batchSize: 200 + # Core pool size + corePoolSize: 1 + # Socket timeout in milliseconds + socketTimeoutMS: 30000 + # Maximum pool size + maxPoolSize: 1 + # Keep alive time in pool + keepAliveTimeInPool: 20 + # Reconnection interval + reconnectionInterval: 30 + # Max transport pool size + maxTransportPoolSize: 250 + # Max idle connections + maxIdleConnections: 250 + # Eviction time interval + evictionTimePeriod: 5500 + # Min idle time in pool + minIdleTimeInPool: 5000 + # Secure max transport pool size + secureMaxTransportPoolSize: 250 + # Secure max idle connections + secureMaxIdleConnections: 250 + # secure eviction time period + secureEvictionTimePeriod: 5500 + # Secure min idle time in pool + secureMinIdleTimeInPool: 5000 + # SSL enabled protocols + sslEnabledProtocols: TLSv1.1,TLSv1.2 + # Ciphers + ciphers: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 + - + # Data agent configuration + agentConfiguration: + # Data agent name + # THIS IS A MANDATORY FIELD + name: Binary + # Data endpoint class + # THIS IS A MANDATORY FIELD + dataEndpointClass: org.wso2.carbon.databridge.agent.endpoint.binary.BinaryDataEndpoint + # Data publisher strategy + publishingStrategy: async + # Trust store path + trustStorePath: '${sys:carbon.home}/resources/security/client-truststore.jks' + # Trust store password + trustStorePassword: 'wso2carbon' + # Queue Size + queueSize: 32768 + # Batch Size + batchSize: 200 + # Core pool size + corePoolSize: 1 + # Socket timeout in milliseconds + socketTimeoutMS: 30000 + # Maximum pool size + maxPoolSize: 1 + # Keep alive time in pool + keepAliveTimeInPool: 20 + # Reconnection interval + reconnectionInterval: 30 + # Max transport pool size + maxTransportPoolSize: 250 + # Max idle connections + maxIdleConnections: 250 + # Eviction time interval + evictionTimePeriod: 5500 + # Min idle time in pool + minIdleTimeInPool: 5000 + # Secure max transport pool size + secureMaxTransportPoolSize: 250 + # Secure max idle connections + secureMaxIdleConnections: 250 + # secure eviction time period + secureEvictionTimePeriod: 5500 + # Secure min idle time in pool + secureMinIdleTimeInPool: 5000 + # SSL enabled protocols + sslEnabledProtocols: TLSv1.1,TLSv1.2 + # Ciphers + ciphers: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 + +# This is the main configuration for metrics +wso2.metrics: + # Enable Metrics + enabled: false + reporting: + console: + - # The name for the Console Reporter + name: Console + + # Enable Console Reporter + enabled: false + + # Polling Period in seconds. + # This is the period for polling metrics from the metric registry and printing in the console + pollingPeriod: 5 + +wso2.metrics.jdbc: + # Data Source Configurations for JDBC Reporters + dataSource: + # Default Data Source Configuration + - &JDBC01 + # JNDI name of the data source to be used by the JDBC Reporter. + # This data source should be defined in a *-datasources.xml file in conf/datasources directory. + dataSourceName: java:comp/env/jdbc/WSO2MetricsDB + # Schedule regular deletion of metrics data older than a set number of days. + # It is recommended that you enable this job to ensure your metrics tables do not get extremely large. + # Deleting data older than seven days should be sufficient. + scheduledCleanup: + # Enable scheduled cleanup to delete Metrics data in the database. + enabled: false + + # The scheduled job will cleanup all data older than the specified days + daysToKeep: 7 + + # This is the period for each cleanup operation in seconds. + scheduledCleanupPeriod: 86400 + + # The JDBC Reporter is in the Metrics JDBC Core feature + reporting: + # The JDBC Reporter configurations will be ignored if the Metrics JDBC Core feature is not available in runtime + jdbc: + - # The name for the JDBC Reporter + name: JDBC + + # Enable JDBC Reporter + enabled: false + + # Source of Metrics, which will be used to identify each metric in database --> + # Commented to use the hostname by default + # source: Carbon + + # Alias referring to the Data Source configuration + dataSource: *JDBC01 + + # Polling Period in seconds. + # This is the period for polling metrics from the metric registry and updating the database with the values + pollingPeriod: 60 + + # Deployment configuration parameters +wso2.artifact.deployment: + # Scheduler update interval + updateInterval: 5 + + # Periodic Persistence Configuration +state.persistence: + enabled: true + intervalInMin: 1 + revisionsToKeep: 2 + persistenceStore: org.wso2.carbon.stream.processor.core.persistence.DBPersistenceStore + config: + datasource: SP_WORKER_STATE_DB # A datasource with this name should be defined in wso2.datasources namespace + table: PERSISTENCE_TABLE + + # Secure Vault Configuration +wso2.securevault: + secretRepository: + type: org.wso2.carbon.secvault.repository.DefaultSecretRepository + parameters: + privateKeyAlias: wso2carbon + keystoreLocation: ${sys:carbon.home}/resources/security/securevault.jks + secretPropertiesFile: ${sys:carbon.home}/conf/${sys:wso2.runtime}/secrets.properties + masterKeyReader: + type: org.wso2.carbon.secvault.reader.DefaultMasterKeyReader + parameters: + masterKeyReaderFile: ${sys:carbon.home}/conf/${sys:wso2.runtime}/master-keys.yaml + + # Datasource Configurations +wso2.datasources: + dataSources: + - name: SP_WORKER_STATE_DB + description: The datasource used for registry and user manager + definition: + type: RDBMS + configuration: + jdbcUrl: 'jdbc:mysql://sp-rdbms:3306/SP_WORKER_STATE_DB?useSSL=false' + username: root + password: 'root' + driverClassName: com.mysql.jdbc.Driver + maxPoolSize: 50 + idleTimeout: 60000 + connectionTestQuery: SELECT 1 + validationTimeout: 30000 + isAutoCommit: false + - definition: + configuration: + connectionTestQuery: "SELECT 1" + driverClassName: org.h2.Driver + idleTimeout: 60000 + isAutoCommit: false + jdbcUrl: "jdbc:h2:${sys:carbon.home}/wso2/${sys:wso2.runtime}/database/WSO2_CARBON_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000" + maxPoolSize: 50 + password: wso2carbon + username: wso2carbon + validationTimeout: 30000 + type: RDBMS + description: "The datasource used for registry and user manager" + name: WSO2_CARBON_DB + + # carbon metrics data source + - name: WSO2_METRICS_DB + description: The datasource used for dashboard feature + jndiConfig: + name: jdbc/WSO2MetricsDB + definition: + type: RDBMS + configuration: + jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/dashboard/database/metrics;AUTO_SERVER=TRUE' + username: wso2carbon + password: wso2carbon + driverClassName: org.h2.Driver + maxPoolSize: 50 + idleTimeout: 60000 + connectionTestQuery: SELECT 1 + validationTimeout: 30000 + isAutoCommit: false + + - name: WSO2_PERMISSIONS_DB + description: The datasource used for permission feature + jndiConfig: + name: jdbc/PERMISSION_DB + useJndiReference: true + definition: + type: RDBMS + configuration: + jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/${sys:wso2.runtime}/database/PERMISSION_DB;IFEXISTS=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000;MVCC=TRUE' + username: wso2carbon + password: wso2carbon + driverClassName: org.h2.Driver + maxPoolSize: 50 + idleTimeout: 60000 + connectionTestQuery: SELECT 1 + validationTimeout: 30000 + isAutoCommit: false + + # Cluster Configuration +cluster.config: + enabled: false + groupId: sp + coordinationStrategyClass: org.wso2.carbon.cluster.coordinator.rdbms.RDBMSCoordinationStrategy + strategyConfig: + datasource: WSO2_CARBON_DB + heartbeatInterval: 1000 + heartbeatMaxRetry: 2 + eventPollingInterval: 1000 + + # Sample of deployment.config for Two node HA +#deployment.config: +# type: ha +# liveSync: +# enabled: true +# advertisedHost: localhost +# advertisedPort: 9090 +# username: admin +# password: admin +# outputSyncInterval: 10000 +# stateSyncGracePeriod: 60000 +# sinkQueueCapacity: 20000 +# sourceQueueCapacity: 20000 +# retryAppSyncPeriod: 60000 + + # Sample of deployment.config for Distributed deployment +deployment.config: + type: distributed + httpInterface: + host: ${NODE_ID} + port: 9090 + username: admin + password: admin + leaderRetryInterval: 10000 + resourceManagers: + - host: wso2sp-manager-1 + port: 9190 + username: admin + password: admin + - host: wso2sp-manager-2 + port: 9191 + username: admin + password: admin From ca3d3acc1e46b8c98455f5ab89a9055d6890a13e Mon Sep 17 00:00:00 2001 From: Chiran Fernando Date: Thu, 14 Jun 2018 13:00:59 +0530 Subject: [PATCH 04/13] Avoid updating deployment.yaml configs from init-script --- dockerfiles/base/Dockerfile | 4 ++++ dockerfiles/manager/init.sh | 12 ------------ dockerfiles/worker/init.sh | 12 ------------ 3 files changed, 4 insertions(+), 24 deletions(-) diff --git a/dockerfiles/base/Dockerfile b/dockerfiles/base/Dockerfile index 9adeb02..05b474e 100644 --- a/dockerfiles/base/Dockerfile +++ b/dockerfiles/base/Dockerfile @@ -40,6 +40,10 @@ ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER}-${WSO2_SERVER_VERSION} # install required packages RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \ + zip \ + unzip \ + telnet \ + vim \ netcat && \ rm -rf /var/lib/apt/lists/* && \ echo '[ ! -z "$TERM" -a -r /etc/motd ] && cat /etc/motd' \ diff --git a/dockerfiles/manager/init.sh b/dockerfiles/manager/init.sh index 53d705a..b1eb53d 100755 --- a/dockerfiles/manager/init.sh +++ b/dockerfiles/manager/init.sh @@ -44,17 +44,5 @@ if test -d ${k8s_volumes}/${WSO2_SERVER_PROFILE}/conf; then cp -rL ${k8s_volumes}/${WSO2_SERVER_PROFILE}/conf/* ${WSO2_SERVER_HOME}/conf/${WSO2_SERVER_PROFILE} fi -server_conf=${WSO2_SERVER_HOME}/conf/${WSO2_SERVER_PROFILE} - -# update node ip -local_docker_ip=$(ip route get 1 | awk '{print $NF;exit}') -deployment_yaml_location=${server_conf}/deployment.yaml -if [[ ! -z ${local_docker_ip} ]]; then - sed -i "s#wso2-sp#wso2-sp${local_docker_ip}#" "${deployment_yaml_location}" - sed -i "s#NODE_IP#${local_docker_ip}#" "${deployment_yaml_location}" - - echo "Successfully updated node with ${local_docker_ip}" -fi - # start the WSO2 Carbon server profile sh ${WSO2_SERVER_HOME}/bin/manager.sh diff --git a/dockerfiles/worker/init.sh b/dockerfiles/worker/init.sh index 361cc2f..25b84c3 100755 --- a/dockerfiles/worker/init.sh +++ b/dockerfiles/worker/init.sh @@ -44,17 +44,5 @@ if test -d ${k8s_volumes}/${WSO2_SERVER_PROFILE}/conf; then cp -rL ${k8s_volumes}/${WSO2_SERVER_PROFILE}/conf/* ${WSO2_SERVER_HOME}/conf/${WSO2_SERVER_PROFILE} fi -server_conf=${WSO2_SERVER_HOME}/conf/${WSO2_SERVER_PROFILE} - -# update node ip -local_docker_ip=$(ip route get 1 | awk '{print $NF;exit}') -deployment_yaml_location=${server_conf}/deployment.yaml -if [[ ! -z ${local_docker_ip} ]]; then - sed -i "s#wso2-sp#wso2-sp${local_docker_ip}#" "${deployment_yaml_location}" - sed -i "s#NODE_IP#${local_docker_ip}#" "${deployment_yaml_location}" - - echo "Successfully updated node with ${local_docker_ip}" -fi - # start the WSO2 Carbon server profile sh ${WSO2_SERVER_HOME}/bin/worker.sh From ec1f6449a587e22674f2f168102ae46fdc205521 Mon Sep 17 00:00:00 2001 From: Chiran Fernando Date: Thu, 14 Jun 2018 15:08:13 +0530 Subject: [PATCH 05/13] Update distributed docker-compose Add new line add the end --- docker-compose/sp-distributed/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose/sp-distributed/docker-compose.yml b/docker-compose/sp-distributed/docker-compose.yml index 117a192..260466b 100644 --- a/docker-compose/sp-distributed/docker-compose.yml +++ b/docker-compose/sp-distributed/docker-compose.yml @@ -173,4 +173,4 @@ services: NODE_IP: 0.0.0.0 NODE_PORT: 9004 links: - - manager1 \ No newline at end of file + - manager1 From 4af6a058481ce9da92372ec3c9e1154966c69699 Mon Sep 17 00:00:00 2001 From: Chiran Fernando Date: Thu, 14 Jun 2018 15:29:35 +0530 Subject: [PATCH 06/13] Update Distributed compose Readme.md --- docker-compose/sp-distributed/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docker-compose/sp-distributed/README.md b/docker-compose/sp-distributed/README.md index dae6b4e..5f8ccb0 100644 --- a/docker-compose/sp-distributed/README.md +++ b/docker-compose/sp-distributed/README.md @@ -34,4 +34,16 @@ ``` docker-compose up ``` + 4. Siddhi applications should be deployed to the manager cluster using following method. + + Sending a "POST" request to http://:/siddhi-apps, with the Siddhi App attached as a file in the request as shown in the example below. + Refer [Stream Processor REST API Guide](https://docs.wso2.com/display/SP410/Stream+Processor+REST+API+Guide) for more information on using WSO2 Strean Processor APIs. + + Manager nodes are deployed under, + ``` + Manager 1 - https://localhost:9190/ + Manager 2 - https://localhost:9191/ + ``` + > Refer [Stream Processor Fully Distributed Deployment](https://docs.wso2.com/display/SP410/Fully+Distributed+Deployment) + From 2732a73c6a88c790cbb09516f21b5ca069c6b1f9 Mon Sep 17 00:00:00 2001 From: Chiran Fernando Date: Mon, 2 Jul 2018 18:29:50 +0530 Subject: [PATCH 07/13] Update init scripts for all profiles Pass parameters to startup scripts Copy overriden dashboard configs --- dockerfiles/dashboard/init.sh | 6 +++++- dockerfiles/editor/init.sh | 2 +- dockerfiles/manager/init.sh | 2 +- dockerfiles/worker/init.sh | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dockerfiles/dashboard/init.sh b/dockerfiles/dashboard/init.sh index d912195..c9b2456 100755 --- a/dockerfiles/dashboard/init.sh +++ b/dockerfiles/dashboard/init.sh @@ -35,6 +35,10 @@ test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" # if any file changes have been mounted, copy the WSO2 configuration files recursively test -d ${volumes} && cp -r ${volumes}/* ${WSO2_SERVER_HOME}/ +# check if a ConfigMap volume containing WSO2 dashboard configuration files has been mounted +if test -d ${k8s_volumes}/${WSO2_SERVER_PROFILE}/conf; then + cp -rL ${k8s_volumes}/${WSO2_SERVER_PROFILE}/conf/* ${WSO2_SERVER_HOME}/conf/${WSO2_SERVER_PROFILE} +fi # start the WSO2 Carbon server profile -sh ${WSO2_SERVER_HOME}/bin/dashboard.sh +sh ${WSO2_SERVER_HOME}/bin/dashboard.sh $* diff --git a/dockerfiles/editor/init.sh b/dockerfiles/editor/init.sh index ec0767f..2f39d92 100755 --- a/dockerfiles/editor/init.sh +++ b/dockerfiles/editor/init.sh @@ -37,4 +37,4 @@ test -d ${volumes} && cp -r ${volumes}/* ${WSO2_SERVER_HOME}/ # start the WSO2 Carbon server profile -sh ${WSO2_SERVER_HOME}/bin/editor.sh +sh ${WSO2_SERVER_HOME}/bin/editor.sh $* diff --git a/dockerfiles/manager/init.sh b/dockerfiles/manager/init.sh index b1eb53d..b8df32f 100755 --- a/dockerfiles/manager/init.sh +++ b/dockerfiles/manager/init.sh @@ -45,4 +45,4 @@ if test -d ${k8s_volumes}/${WSO2_SERVER_PROFILE}/conf; then fi # start the WSO2 Carbon server profile -sh ${WSO2_SERVER_HOME}/bin/manager.sh +sh ${WSO2_SERVER_HOME}/bin/manager.sh $* diff --git a/dockerfiles/worker/init.sh b/dockerfiles/worker/init.sh index 25b84c3..5e5de67 100755 --- a/dockerfiles/worker/init.sh +++ b/dockerfiles/worker/init.sh @@ -45,4 +45,4 @@ if test -d ${k8s_volumes}/${WSO2_SERVER_PROFILE}/conf; then fi # start the WSO2 Carbon server profile -sh ${WSO2_SERVER_HOME}/bin/worker.sh +sh ${WSO2_SERVER_HOME}/bin/worker.sh $* From fdbccd429b62e33090d2ee132d6d6ec99ee8c5ea Mon Sep 17 00:00:00 2001 From: Chiran Fernando Date: Mon, 2 Jul 2018 18:49:52 +0530 Subject: [PATCH 08/13] Make deployment.yaml changes for v4.2.0 --- docker-compose/sp-distributed/README.md | 12 ++++---- .../sp-distributed/docker-compose.yml | 30 +++++++++---------- .../sp-distributed/manager/deployment.yaml | 24 +++------------ .../sp-distributed/worker/deployment.yaml | 10 +++---- 4 files changed, 30 insertions(+), 46 deletions(-) diff --git a/docker-compose/sp-distributed/README.md b/docker-compose/sp-distributed/README.md index 5f8ccb0..017119f 100644 --- a/docker-compose/sp-distributed/README.md +++ b/docker-compose/sp-distributed/README.md @@ -10,7 +10,7 @@ from WSO2 since the referring Docker images hosted at docker.wso2.com contains the latest updates and fixes for WSO2 Stream Processor. You can sign up for a Free Trial Subscription [here](https://wso2.com/free-trial-subscription).

* If you wish to run the Docker Compose configuration using Docker images built locally, build the Stream Processor manager and worker images using [SP Dockerfiles](../../dockerfiles/README.md) and remove the `docker.wso2.com/` prefix - from the `image` name In the `docker-compose.yml`. For example, change the line `image: docker.wso2.com/wso2sp-manager:4.1.0`
to `image: wso2sp-manager:4.1.0`.

+ from the `image` name In the `docker-compose.yml`. For example, change the line `image: docker.wso2.com/wso2sp-manager:4.2.0`
to `image: wso2sp-manager:4.2.0`.

## How to deploy @@ -28,7 +28,7 @@ Instead, extract the zip file and directly browse to `docker-sp-docker-compose/sp-distributed` folder. > If you want to try out an already released tag, after executing 2nd step, checkout the relevant tag, - i.e. for example: git checkout tags/v4.1.0.1 and continue below steps. + i.e. for example: git checkout tags/v4.2.0.1 and continue below steps. 3. Execute the following Docker Compose command to start the deployment. ``` @@ -37,13 +37,13 @@ 4. Siddhi applications should be deployed to the manager cluster using following method. Sending a "POST" request to http://:/siddhi-apps, with the Siddhi App attached as a file in the request as shown in the example below. - Refer [Stream Processor REST API Guide](https://docs.wso2.com/display/SP410/Stream+Processor+REST+API+Guide) for more information on using WSO2 Strean Processor APIs. + Refer [Stream Processor REST API Guide](https://docs.wso2.com/display/SP420/Stream+Processor+REST+API+Guide) for more information on using WSO2 Strean Processor APIs. Manager nodes are deployed under, ``` - Manager 1 - https://localhost:9190/ - Manager 2 - https://localhost:9191/ + Manager 1 - https://localhost:9543/ + Manager 2 - https://localhost:9544/ ``` - > Refer [Stream Processor Fully Distributed Deployment](https://docs.wso2.com/display/SP410/Fully+Distributed+Deployment) + > Refer [Stream Processor Fully Distributed Deployment](https://docs.wso2.com/display/SP420/Fully+Distributed+Deployment) diff --git a/docker-compose/sp-distributed/docker-compose.yml b/docker-compose/sp-distributed/docker-compose.yml index 260466b..0faf43a 100644 --- a/docker-compose/sp-distributed/docker-compose.yml +++ b/docker-compose/sp-distributed/docker-compose.yml @@ -51,12 +51,12 @@ services: kafka: condition: service_healthy manager1: - image: docker.wso2.com/wso2sp-manager:4.1.0 + image: docker.wso2.com/wso2sp-manager:4.2.0 container_name: wso2sp-manager-1 ports: - - "9190:9190" + - "9543:9543" healthcheck: - test: ["CMD", "nc", "-z","localhost", "9190"] + test: ["CMD", "nc", "-z","localhost", "9543"] interval: 10s timeout: 120s retries: 5 @@ -71,12 +71,12 @@ services: links: - mysql manager2: - image: docker.wso2.com/wso2sp-manager:4.1.0 + image: docker.wso2.com/wso2sp-manager:4.2.0 container_name: wso2sp-manager-2 ports: - - "9191:9190" + - "9544:9543" healthcheck: - test: ["CMD", "nc", "-z","localhost", "9191"] + test: ["CMD", "nc", "-z","localhost", "9543"] interval: 10s timeout: 120s retries: 5 @@ -91,12 +91,12 @@ services: links: - manager1 worker1: - image: docker.wso2.com/wso2sp-worker:4.1.0 + image: docker.wso2.com/wso2sp-worker:4.2.0 container_name: wso2sp-worker-1 ports: - - "9001:9090" + - "9001:9443" healthcheck: - test: ["CMD", "nc", "-z","localhost", "9090"] + test: ["CMD", "nc", "-z","localhost", "9001"] interval: 10s timeout: 120s retries: 5 @@ -112,10 +112,10 @@ services: links: - manager1 worker2: - image: docker.wso2.com/wso2sp-worker:4.1.0 + image: docker.wso2.com/wso2sp-worker:4.2.0 container_name: wso2sp-worker-2 ports: - - "9002:9090" + - "9002:9443" healthcheck: test: ["CMD", "nc", "-z","localhost", "9002"] interval: 10s @@ -133,10 +133,10 @@ services: links: - manager1 worker3: - image: docker.wso2.com/wso2sp-worker:4.1.0 + image: docker.wso2.com/wso2sp-worker:4.2.0 container_name: wso2sp-worker-3 ports: - - "9003:9090" + - "9003:9443" healthcheck: test: ["CMD", "nc", "-z","localhost", "9003"] interval: 10s @@ -154,10 +154,10 @@ services: links: - manager1 worker4: - image: docker.wso2.com/wso2sp-worker:4.1.0 + image: docker.wso2.com/wso2sp-worker:4.2.0 container_name: wso2sp-worker-4 ports: - - "9004:9090" + - "9004:9443" healthcheck: test: ["CMD", "nc", "-z","localhost", "9004"] interval: 10s diff --git a/docker-compose/sp-distributed/manager/deployment.yaml b/docker-compose/sp-distributed/manager/deployment.yaml index 29eba51..104be22 100644 --- a/docker-compose/sp-distributed/manager/deployment.yaml +++ b/docker-compose/sp-distributed/manager/deployment.yaml @@ -1,5 +1,5 @@ ################################################################################ -# Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved +# Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the \"License\"); # you may not use this file except in compliance with the License. @@ -268,23 +268,6 @@ wso2.datasources: connectionTestQuery: SELECT 1 validationTimeout: 30000 isAutoCommit: false - - name: WSO2_STATUS_DASHBOARD_DISTRIBUTED_DB - description: The datasource used for distributed status dashboard feature - jndiConfig: - name: jdbc/WSO2_STATUS_DASHBOARD_DISTRIBUTED_DB - useJndiReference: true - definition: - type: RDBMS - configuration: - jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/${sys:wso2.runtime}/database/WSO2_STATUS_DASHBOARD_DISTRIBUTED_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000;MVCC=TRUE' - username: wso2carbon - password: wso2carbon - driverClassName: org.h2.Driver - maxPoolSize: 50 - idleTimeout: 60000 - connectionTestQuery: SELECT 1 - validationTimeout: 30000 - isAutoCommit: false # Cluster Configuration cluster.config: @@ -300,9 +283,10 @@ cluster.config: # Deployment Configuration for Distributed Deployment deployment.config: type: distributed - httpInterface: + isReceiverNode: false + httpsInterface: host: ${NODE_ID} - port: 9190 + port: 9543 heartbeatInterval: 2000 heartbeatMaxRetry: 2 datasource: SP_MGT_DB # define a mysql datasource in datasources and refer it from here. diff --git a/docker-compose/sp-distributed/worker/deployment.yaml b/docker-compose/sp-distributed/worker/deployment.yaml index 92ae26d..9ab5bb2 100644 --- a/docker-compose/sp-distributed/worker/deployment.yaml +++ b/docker-compose/sp-distributed/worker/deployment.yaml @@ -1,5 +1,5 @@ ################################################################################ -# Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved +# Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the \"License\"); # you may not use this file except in compliance with the License. @@ -390,18 +390,18 @@ cluster.config: # Sample of deployment.config for Distributed deployment deployment.config: type: distributed - httpInterface: + httpsInterface: host: ${NODE_ID} - port: 9090 + port: 9443 username: admin password: admin leaderRetryInterval: 10000 resourceManagers: - host: wso2sp-manager-1 - port: 9190 + port: 9543 username: admin password: admin - host: wso2sp-manager-2 - port: 9191 + port: 9544 username: admin password: admin From 704b67d81644d1a6980ed7b7b3969d13519842a6 Mon Sep 17 00:00:00 2001 From: chirangaalwis Date: Sun, 8 Jul 2018 01:48:25 +0530 Subject: [PATCH 09/13] Rename configuration mount folder in product containers --- .../editor-worker-dashboard/docker-compose.yml | 4 ++-- docker-compose/sp-distributed/docker-compose.yml | 12 ++++++------ dockerfiles/dashboard/init.sh | 2 +- dockerfiles/editor/init.sh | 2 +- dockerfiles/manager/init.sh | 2 +- dockerfiles/worker/init.sh | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docker-compose/editor-worker-dashboard/docker-compose.yml b/docker-compose/editor-worker-dashboard/docker-compose.yml index 27c0c1c..baa0afa 100644 --- a/docker-compose/editor-worker-dashboard/docker-compose.yml +++ b/docker-compose/editor-worker-dashboard/docker-compose.yml @@ -35,7 +35,7 @@ services: timeout: 120s retries: 5 volumes: - - ./worker:/home/wso2carbon/volumes/conf/worker + - ./worker:/home/wso2carbon/wso2-server-volume/conf/worker depends_on: mysql: condition: service_healthy @@ -55,4 +55,4 @@ services: worker: condition: service_healthy volumes: - - ./dashboard:/home/wso2carbon/volumes/conf/dashboard + - ./dashboard:/home/wso2carbon/wso2-server-volume/conf/dashboard diff --git a/docker-compose/sp-distributed/docker-compose.yml b/docker-compose/sp-distributed/docker-compose.yml index 0faf43a..a68f7dc 100644 --- a/docker-compose/sp-distributed/docker-compose.yml +++ b/docker-compose/sp-distributed/docker-compose.yml @@ -61,7 +61,7 @@ services: timeout: 120s retries: 5 volumes: - - ./manager:/home/wso2carbon/volumes/conf/manager + - ./manager:/home/wso2carbon/wso2-server-volume/conf/manager depends_on: mysql: condition: service_healthy @@ -81,7 +81,7 @@ services: timeout: 120s retries: 5 volumes: - - ./manager:/home/wso2carbon/volumes/conf/manager + - ./manager:/home/wso2carbon/wso2-server-volume/conf/manager depends_on: manager1: condition: service_healthy @@ -101,7 +101,7 @@ services: timeout: 120s retries: 5 volumes: - - ./worker:/home/wso2carbon/volumes/conf/worker + - ./worker:/home/wso2carbon/wso2-server-volume/conf/worker depends_on: manager1: condition: service_healthy @@ -122,7 +122,7 @@ services: timeout: 120s retries: 5 volumes: - - ./worker:/home/wso2carbon/volumes/conf/worker + - ./worker:/home/wso2carbon/wso2-server-volume/conf/worker depends_on: manager1: condition: service_healthy @@ -143,7 +143,7 @@ services: timeout: 120s retries: 5 volumes: - - ./worker:/home/wso2carbon/volumes/conf/worker + - ./worker:/home/wso2carbon/wso2-server-volume/conf/worker depends_on: manager1: condition: service_healthy @@ -164,7 +164,7 @@ services: timeout: 120s retries: 5 volumes: - - ./worker:/home/wso2carbon/volumes/conf/worker + - ./worker:/home/wso2carbon/wso2-server-volume/conf/worker depends_on: manager1: condition: service_healthy diff --git a/dockerfiles/dashboard/init.sh b/dockerfiles/dashboard/init.sh index c9b2456..8140a9e 100755 --- a/dockerfiles/dashboard/init.sh +++ b/dockerfiles/dashboard/init.sh @@ -21,7 +21,7 @@ user=wso2carbon group=wso2 # file path variables -volumes=${WORKING_DIRECTORY}/volumes +volumes=${WORKING_DIRECTORY}/wso2-server-volume # check if the WSO2 non-root user home exists test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 diff --git a/dockerfiles/editor/init.sh b/dockerfiles/editor/init.sh index 2f39d92..d88bb1e 100755 --- a/dockerfiles/editor/init.sh +++ b/dockerfiles/editor/init.sh @@ -21,7 +21,7 @@ user=wso2carbon group=wso2 # file path variables -volumes=${WORKING_DIRECTORY}/volumes +volumes=${WORKING_DIRECTORY}/wso2-server-volume # check if the WSO2 non-root user home exists test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 diff --git a/dockerfiles/manager/init.sh b/dockerfiles/manager/init.sh index b8df32f..d4c4cab 100755 --- a/dockerfiles/manager/init.sh +++ b/dockerfiles/manager/init.sh @@ -24,7 +24,7 @@ user=wso2carbon group=wso2 # file path variables -volumes=${WORKING_DIRECTORY}/volumes +volumes=${WORKING_DIRECTORY}/wso2-server-volume k8s_volumes=${WORKING_DIRECTORY}/kubernetes-volumes # check if the WSO2 non-root user home exists diff --git a/dockerfiles/worker/init.sh b/dockerfiles/worker/init.sh index 5e5de67..b20b426 100755 --- a/dockerfiles/worker/init.sh +++ b/dockerfiles/worker/init.sh @@ -24,7 +24,7 @@ user=wso2carbon group=wso2 # file path variables -volumes=${WORKING_DIRECTORY}/volumes +volumes=${WORKING_DIRECTORY}/wso2-server-volume k8s_volumes=${WORKING_DIRECTORY}/kubernetes-volumes # check if the WSO2 non-root user home exists From 890499de25217f1774f7c5d98d79b689b120fb39 Mon Sep 17 00:00:00 2001 From: Chiran Fernando Date: Tue, 10 Jul 2018 12:21:48 +0530 Subject: [PATCH 10/13] Update manager?deployment.yaml Remove isReceiverNode property --- docker-compose/sp-distributed/docker-compose.yml | 1 + docker-compose/sp-distributed/manager/deployment.yaml | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose/sp-distributed/docker-compose.yml b/docker-compose/sp-distributed/docker-compose.yml index 0faf43a..0be99bd 100644 --- a/docker-compose/sp-distributed/docker-compose.yml +++ b/docker-compose/sp-distributed/docker-compose.yml @@ -42,6 +42,7 @@ services: MYSQL_ROOT_PASSWORD: root volumes: - ./mysql/scripts:/docker-entrypoint-initdb.d + command: --max-connections=10000 healthcheck: test: ["CMD", "mysqladmin" ,"ping", "-uroot", "-proot"] interval: 30s diff --git a/docker-compose/sp-distributed/manager/deployment.yaml b/docker-compose/sp-distributed/manager/deployment.yaml index 104be22..af3459d 100644 --- a/docker-compose/sp-distributed/manager/deployment.yaml +++ b/docker-compose/sp-distributed/manager/deployment.yaml @@ -283,7 +283,6 @@ cluster.config: # Deployment Configuration for Distributed Deployment deployment.config: type: distributed - isReceiverNode: false httpsInterface: host: ${NODE_ID} port: 9543 From ecc5a99b272c0d3bf32a6a3be455dfb752e6039f Mon Sep 17 00:00:00 2001 From: Chiran Fernando Date: Tue, 10 Jul 2018 16:09:08 +0530 Subject: [PATCH 11/13] Update editor-worker-dashboard compose Change editor listener port to http --- docker-compose/editor-worker-dashboard/README.md | 4 ++-- docker-compose/editor-worker-dashboard/docker-compose.yml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docker-compose/editor-worker-dashboard/README.md b/docker-compose/editor-worker-dashboard/README.md index af8c2ba..d095506 100644 --- a/docker-compose/editor-worker-dashboard/README.md +++ b/docker-compose/editor-worker-dashboard/README.md @@ -36,7 +36,7 @@ Runs a pre configured Stream Processor setup with Stream Processor editor, worke 4. Access management console via a web browser. ``` - For Status dashboard - https://localhost:9390/monitoring - For Editor - https://localhost:9743/editor + For Status dashboard - https://localhost:9643/monitoring + For Editor - https://localhost:9390/editor ``` diff --git a/docker-compose/editor-worker-dashboard/docker-compose.yml b/docker-compose/editor-worker-dashboard/docker-compose.yml index baa0afa..77eb945 100644 --- a/docker-compose/editor-worker-dashboard/docker-compose.yml +++ b/docker-compose/editor-worker-dashboard/docker-compose.yml @@ -19,6 +19,7 @@ services: container_name: wso2sp-editor ports: - "9743:9743" + - "9390:9390" healthcheck: test: ["CMD", "nc", "-z","localhost", "9743"] interval: 10s From 2b9c87973502809522b5b93b5ab9f6becd02f2e8 Mon Sep 17 00:00:00 2001 From: Chiran Fernando Date: Tue, 10 Jul 2018 16:13:35 +0530 Subject: [PATCH 12/13] Update URLs in Readme --- docker-compose/editor-worker-dashboard/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose/editor-worker-dashboard/README.md b/docker-compose/editor-worker-dashboard/README.md index d095506..36ced87 100644 --- a/docker-compose/editor-worker-dashboard/README.md +++ b/docker-compose/editor-worker-dashboard/README.md @@ -36,7 +36,7 @@ Runs a pre configured Stream Processor setup with Stream Processor editor, worke 4. Access management console via a web browser. ``` - For Status dashboard - https://localhost:9643/monitoring - For Editor - https://localhost:9390/editor + For Status dashboard - http://localhost:9643/monitoring + For Editor - http://localhost:9390/editor ``` From b59b3dcf807b0d3aac5badf1db83d1f5c197cbf3 Mon Sep 17 00:00:00 2001 From: Chiran Fernando Date: Tue, 10 Jul 2018 16:14:42 +0530 Subject: [PATCH 13/13] Update URLs in Readme --- docker-compose/editor-worker-dashboard/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose/editor-worker-dashboard/README.md b/docker-compose/editor-worker-dashboard/README.md index 36ced87..c271d7c 100644 --- a/docker-compose/editor-worker-dashboard/README.md +++ b/docker-compose/editor-worker-dashboard/README.md @@ -36,7 +36,7 @@ Runs a pre configured Stream Processor setup with Stream Processor editor, worke 4. Access management console via a web browser. ``` - For Status dashboard - http://localhost:9643/monitoring + For Status dashboard - https://localhost:9643/monitoring For Editor - http://localhost:9390/editor ```