Skip to content

Commit

Permalink
Merge pull request #43 from VimukthiPerera/master
Browse files Browse the repository at this point in the history
Merge 4.2.x branch to master branch
  • Loading branch information
msmshariq authored Jul 15, 2018
2 parents 34d67fe + dea287a commit 58153d1
Show file tree
Hide file tree
Showing 18 changed files with 358 additions and 388 deletions.
11 changes: 5 additions & 6 deletions docker-compose/editor-worker-dashboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ 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. <br><br>
* 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). <br><br>
* 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). <br><br>
* 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` <br> to `image: wso2sp-manager:4.1.0`. <br><br>
from the `image` name In the `docker-compose.yml`. For example, change the line `image: docker.wso2.com/wso2sp-manager:4.2.0` <br> to `image: wso2sp-manager:4.2.0`. <br><br>

## How to deploy

Expand All @@ -28,7 +27,7 @@ Runs a pre configured Stream Processor setup with Stream Processor editor, worke
Instead, extract the zip file and directly browse to `docker-sp-<released-version-here>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.
```
Expand All @@ -37,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 - http://localhost:9390/editor
```
54 changes: 54 additions & 0 deletions docker-compose/editor-worker-dashboard/dashboard/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
11 changes: 6 additions & 5 deletions docker-compose/editor-worker-dashboard/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,18 @@ 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"
- "9390:9390"
healthcheck:
test: ["CMD", "nc", "-z","localhost", "9743"]
interval: 10s
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"
Expand All @@ -35,14 +36,14 @@ 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
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"
Expand All @@ -55,4 +56,4 @@ services:
worker:
condition: service_healthy
volumes:
- ./dashboard:/home/wso2carbon/volumes/conf/dashboard
- ./dashboard:/home/wso2carbon/wso2-server-volume/conf/dashboard
51 changes: 51 additions & 0 deletions docker-compose/editor-worker-dashboard/worker/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
34 changes: 16 additions & 18 deletions docker-compose/sp-distributed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

* 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. <br><br>
* In order to run this Docker Compose setup, you will need an active [Free Trial Subscription](https://wso2.com/free-trial-subscription)
* 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). <br><br>
* 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` <br> to `image: wso2sp-manager:4.1.0`. <br><br>
* 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.2.0` <br> to `image: wso2sp-manager:4.2.0`. <br><br>

## How to deploy

Expand All @@ -24,26 +24,24 @@
```
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-<released-version-here>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.
> 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-<released-version-here>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.2.0.1 and continue below steps.
3. Execute the following Docker Compose command to start the deployment.
```
docker-compose up
```
4. Siddhi applications should be deployed to the manager cluster using following method.
Sending a "POST" request to http://<host>:<port>/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.
Sending a "POST" request to http://<host>:<port>/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/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)
43 changes: 22 additions & 21 deletions docker-compose/sp-distributed/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -51,17 +52,17 @@ 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
volumes:
- ./manager:/home/wso2carbon/volumes/conf/manager
- ./manager:/home/wso2carbon/wso2-server-volume/conf/manager
depends_on:
mysql:
condition: service_healthy
Expand All @@ -71,17 +72,17 @@ 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
volumes:
- ./manager:/home/wso2carbon/volumes/conf/manager
- ./manager:/home/wso2carbon/wso2-server-volume/conf/manager
depends_on:
manager1:
condition: service_healthy
Expand All @@ -91,17 +92,17 @@ 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
volumes:
- ./worker:/home/wso2carbon/volumes/conf/worker
- ./worker:/home/wso2carbon/wso2-server-volume/conf/worker
depends_on:
manager1:
condition: service_healthy
Expand All @@ -112,17 +113,17 @@ 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
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
Expand All @@ -133,17 +134,17 @@ 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
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
Expand All @@ -154,17 +155,17 @@ 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
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
Expand Down
Loading

0 comments on commit 58153d1

Please sign in to comment.