├── modules ├── sp_editor │ ├── files │ │ └── .gitkeep │ ├── manifests │ │ ├── custom.pp │ │ ├── params.pp │ │ └── init.pp │ └── templates │ │ └── carbon-home │ │ ├── bin │ │ └── editor.sh.erb │ │ └── conf │ │ └── editor │ │ └── deployment.yaml.erb ├── sp_manager │ ├── files │ │ └── .gitkeep │ ├── manifests │ │ ├── custom.pp │ │ ├── params.pp │ │ └── init.pp │ └── templates │ │ └── carbon-home │ │ ├── bin │ │ └── manager.sh.erb │ │ └── conf │ │ └── manager │ │ └── deployment.yaml.erb ├── sp_worker │ ├── files │ │ └── .gitkeep │ ├── manifests │ │ ├── custom.pp │ │ ├── params.pp │ │ └── init.pp │ └── templates │ │ └── carbon-home │ │ ├── bin │ │ └── worker.sh.erb │ │ └── conf │ │ └── worker │ │ └── deployment.yaml.erb ├── sp_common │ ├── files │ │ ├── jdk │ │ │ └── .gitkeep │ │ └── packs │ │ │ └── .gitkeep │ ├── templates │ │ └── carbon.service.erb │ └── manifests │ │ ├── service.pp │ │ ├── params.pp │ │ └── init.pp └── sp_dashboard │ ├── files │ └── .gitkeep │ ├── manifests │ ├── custom.pp │ ├── init.pp │ └── params.pp │ └── templates │ └── carbon-home │ ├── bin │ └── dashboard.sh.erb │ └── conf │ └── dashboard │ └── deployment.yaml.erb ├── .gitignore ├── issue_template.md ├── manifests └── site.pp ├── scripts ├── udate_README.md └── update.sh ├── README.md ├── CONTRIBUTING.md ├── pull_request_template.md └── LICENSE /modules/sp_editor/files/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/sp_manager/files/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/sp_worker/files/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/sp_common/files/jdk/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/sp_common/files/packs/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/sp_dashboard/files/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.jar 15 | *.war 16 | *.ear 17 | *.zip 18 | *.tar.gz 19 | *.rar 20 | *.deb 21 | *.rpm 22 | 23 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 24 | hs_err_pid* 25 | 26 | # IntelliJ IDEA 27 | .idea/ 28 | *.iml 29 | -------------------------------------------------------------------------------- /modules/sp_common/templates/carbon.service.erb: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=WSO2 Stream Processor: <% @profile %> 3 | After=network.target 4 | 5 | [Service] 6 | ExecStart=<%= @server_script_path %> start 7 | ExecStop=<%= @server_script_path %> stop 8 | ExecRestart=<%= @server_script_path %> restart 9 | PIDFile=<%= @pid_file_path %> 10 | User=<%= @user %> 11 | Group=<%= @user_group %> 12 | Type=forking 13 | Restart=on-failure 14 | RestartSec=5 15 | StartLimitInterval=60s 16 | StartLimitBurst=3 17 | 18 | [Install] 19 | WantedBy=multi-user.target 20 | -------------------------------------------------------------------------------- /issue_template.md: -------------------------------------------------------------------------------- 1 | **Description:** 2 | 3 | 4 | **Suggested Labels:** 5 | 6 | 7 | **Suggested Assignees:** 8 | 9 | 10 | **Affected Product Version:** 11 | 12 | **OS, DB, other environment details and versions:** 13 | 14 | **Steps to reproduce:** 15 | 16 | 17 | **Related Issues:** 18 | -------------------------------------------------------------------------------- /modules/sp_editor/manifests/custom.pp: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------------------------------------- 2 | # Copyright (c) 2018 WSO2, Inc. http://www.wso2.org 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # ---------------------------------------------------------------------------- 16 | 17 | # Class: sp_editor::custom 18 | # This class is reserved to run custom user code before starting the server. 19 | class sp_editor::custom { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /modules/sp_worker/manifests/custom.pp: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------------------------------------- 2 | # Copyright (c) 2018 WSO2, Inc. http://www.wso2.org 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # ---------------------------------------------------------------------------- 16 | 17 | # Class: sp_worker::custom 18 | # This class is reserved to run custom user code before starting the server. 19 | class sp_worker::custom { 20 | # Resources 21 | } 22 | -------------------------------------------------------------------------------- /modules/sp_common/manifests/service.pp: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------------------- 2 | # Copyright (c) 2019 WSO2, Inc. http://www.wso2.org 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | #---------------------------------------------------------------------------- 16 | 17 | class sp_common::service inherits sp_common::params { 18 | 19 | service { "${wso2_service_name}": 20 | enable => true, 21 | ensure => running, 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /modules/sp_manager/manifests/custom.pp: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------------------------------------- 2 | # Copyright (c) 2018 WSO2, Inc. http://www.wso2.org 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # ---------------------------------------------------------------------------- 16 | 17 | # Class: sp_manager::custom 18 | # This class is reserved to run custom user code before starting the server. 19 | class sp_manager::custom { 20 | # Resources 21 | } 22 | -------------------------------------------------------------------------------- /modules/sp_dashboard/manifests/custom.pp: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------------------------------------- 2 | # Copyright (c) 2018 WSO2, Inc. http://www.wso2.org 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # ---------------------------------------------------------------------------- 16 | 17 | # Class: sp_dashboard::custom 18 | # This class is reserved to run custom user code before starting the server. 19 | class sp_dashboard::custom { 20 | # Resources 21 | } 22 | -------------------------------------------------------------------------------- /manifests/site.pp: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------------------- 2 | # Copyright (c) 2018 WSO2, Inc. http://www.wso2.org 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either excustomss or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | #---------------------------------------------------------------------------- 16 | 17 | # Run stages 18 | stage { 'custom': } 19 | 20 | # Order stages 21 | Stage['main'] -> Stage['custom'] 22 | 23 | node default { 24 | class { "::${::runtime}": } 25 | class { "::${::runtime}::custom": 26 | stage => 'custom' 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /scripts/udate_README.md: -------------------------------------------------------------------------------- 1 | # Continuous Update Delivery for WSO2 Stream Processor 2 | 3 | The update script is to be used by WSO2 subscription users such that products packs can be updated. If you do not have a WSO2 subscription, you can sign up for a [free trial](https://wso2.com/subscription/free-trial). 4 | 5 | ### Prequisites 6 | * A WSO2 Subscription 7 | * [WUM](https://wso2.com/updates/wum) updated packs should be provided in the `/modules/sp_common/files/packs` directory 8 | 9 | ` 10 | NOTE: Provided WUM updated packs should contain the latest updates for wso2sp-4.4.0. 11 | ` 12 | 13 | ### Usage 14 | While executing the update script, provide the profile name. The pack corresponding to the profile will begin updating. 15 | ```bash 16 | ./update.sh -p 17 | ``` 18 | Any of the following profile names can be provided as arguments: 19 | * sp_dashboard 20 | * sp_editor 21 | * sp_manager 22 | * sp_worker 23 | 24 | If any file that is used as a template is updated, a warning will be displayed. Update the relevant template files accordingly before pushing updates to the nodes. 25 | -------------------------------------------------------------------------------- /modules/sp_manager/manifests/params.pp: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------------------------------------- 2 | # Copyright (c) 2018 WSO2, Inc. http://www.wso2.org 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # ---------------------------------------------------------------------------- 16 | 17 | # Claas sp_manager::params 18 | # This class includes all the necessary parameters 19 | class sp_manager::params inherits sp_common::params { 20 | 21 | # Define the template 22 | $start_script_template = "bin/manager.sh" 23 | 24 | # Define the template 25 | $template_list = [ 26 | 'conf/manager/deployment.yaml' 27 | ] 28 | 29 | # Define file list 30 | $file_list = [] 31 | 32 | # Define remove file list 33 | $file_removelist = [] 34 | 35 | # -------- deployment.yaml configs -------- 36 | 37 | # listenerConfigurations 38 | $default_host = '0.0.0.0' 39 | 40 | $msf4j_host = '0.0.0.0' 41 | $msf4j_keystore_file = '${carbon.home}/resources/security/wso2carbon.jks' 42 | $msf4j_keystore_password = 'wso2carbon' 43 | $msf4j_cert_pass = 'wso2carbon' 44 | 45 | # Datasource Configurations 46 | $mgt_db_url = 'jdbc:h2:${sys:carbon.home}/wso2/${sys:wso2.runtime}/database/SP_MGT_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000' 47 | $mgt_db_username = 'wso2carbon' 48 | $mgt_db_password = 'wso2carbon' 49 | $mgt_db_dirver = 'org.h2.Driver' 50 | 51 | # Cluster Configuration 52 | $cluster_enabled = 'false' 53 | } 54 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Puppet Modules for WSO2 Stream Processor 2 | 3 | This repository contains the Puppet modules for WSO2 Stream Processor. 4 | 5 | ## Quick Start Guide 6 | 1. Download a wso2sp-4.4.0.zip pack and copy it to the `/modules/sp_common/files/packs` directory in the **Puppetmaster**. 7 | 8 | 2. Set up the JDK distribution as follows: 9 | 10 | The Puppet modules for WSO2 products use Amazon Coretto as the JDK distribution. However, you can use any [supported JDK distribution](https://docs.wso2.com/display/compatibility/Tested+Operating+Systems+and+JDKs). 11 | 1. Download Amazon Coretto for Linux x64 from [here](https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/downloads-list.html) and copy .tar into the `/modules/sp_common/files/jdk` directory. 12 | 2. Reassign the *$jdk_name* variable in `/modules/sp_common/manifests/params.pp` to the name of the downloaded JDK distribution. 13 | 3. Run the relevant profile on the **Puppet agent**. 14 | 1. Dashboard profile: 15 | ```bash 16 | export FACTER_runtime=sp_dashboard 17 | puppet agent -vt 18 | ``` 19 | 2. Editor profile: 20 | ```bash 21 | export FACTER_runtime=sp_editor 22 | puppet agent -vt 23 | ``` 24 | 3. Manager profile: 25 | ```bash 26 | export FACTER_runtime=sp_manager 27 | puppet agent -vt 28 | ``` 29 | 4. Worker profile: 30 | ```bash 31 | export FACTER_runtime=sp_worker 32 | puppet agent -vt 33 | ``` 34 | 35 | ## Manifests in a module 36 | The run stages for Puppet are described in `/manifests/site.pp`, and they are of the order Main -> Custom. 37 | 38 | Each Puppet module contains the following .pp files. 39 | * Main 40 | * params.pp: Contains all the parameters necessary for the main configuration and template 41 | * init.pp: Contains the main script of the module. 42 | * Custom 43 | * custom.pp: Used to add custom configurations to the Puppet module. 44 | -------------------------------------------------------------------------------- /modules/sp_editor/manifests/params.pp: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------------------------------------- 2 | # Copyright (c) 2018 WSO2, Inc. http://www.wso2.org 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # ---------------------------------------------------------------------------- 16 | 17 | # Claas sp_editor::params 18 | # This class includes all the necessary parameters 19 | class sp_editor::params inherits sp_common::params { 20 | 21 | # Define the template 22 | $start_script_template = "bin/editor.sh" 23 | 24 | # Define the template 25 | $template_list = [ 26 | 'conf/editor/deployment.yaml' 27 | ] 28 | 29 | # Define file list 30 | $file_list = [] 31 | 32 | # Define remove file list 33 | $file_removelist = [] 34 | 35 | # -------- deployment.yaml configs -------- 36 | 37 | # listenerConfigurations 38 | $default_host = '0.0.0.0' 39 | 40 | $msf4j_host = '0.0.0.0' 41 | $msf4j_keystore_file = '${carbon.home}/resources/security/wso2carbon.jks' 42 | $msf4j_keystore_password = 'wso2carbon' 43 | $msf4j_cert_pass = 'wso2carbon' 44 | 45 | $siddhi_default_host = '0.0.0.0' 46 | 47 | # Datasource Configurations 48 | $carbon_db_url = 'jdbc:h2:${sys:carbon.home}/wso2/${sys:wso2.runtime}/database/WSO2_CARBON_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000' 49 | $carbon_db_username = 'wso2carbon' 50 | $carbon_db_password = 'wso2carbon' 51 | $carbon_db_driver = 'org.h2.Driver' 52 | 53 | # Cluster Configuration 54 | $cluster_enabled = 'false' 55 | 56 | #Authentication Configurations 57 | $rest_api_auth_enable = 'false' 58 | } 59 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to puppet-sp 2 | 3 | Puppet resources for WSO2 Stream Processor are open source, and we encourage contributions from our community. 4 | 5 | ## How you can Contribute 6 | 7 | ### Mailing Lists 8 | The recommended way to discuss anything related to WSO2 products is via our mailing lists. First, go to https://wso2.com/mail/ and subscribe to any mailing lists. Here are the two most popular lists: 9 | * dev@wso2.org: To discuss all WSO2 products. 10 | * architecture@wso2.org: To discuss the architecture of WSO2 products. 11 | 12 | ### Posting Issues 13 | We encourage you to report any problems in the WSO2 Puppet resources or their documentation by creating GitHub issues in the respective repositories. The [issues page](https://github.com/wso2/puppet-sp/issues) on GitHub is for tracking bugs and feature requests. When posing a new issue, follow the guidelines below. 14 | * Check whether the issue has already been reported. 15 | * Create a separate issue for each bug you are reporting or feature you are requesting. 16 | 17 | ### Code Contributions 18 | If you like to contribute with a bug fix or a new feature, start by posting an issue and discussing the best way to implement it. 19 | 20 | Unlike most projects, development for this repository is carried out on the **4.4.x branch**. This is because the master branch contains the latest stable release of the project. The code in 4.4.x is merged to the master branch after a final review and a round of testing. 21 | 22 | Please follow these guidelines when contributing to the code: 23 | 1. Fork the current repository. 24 | 2. Create a topic branch from the 4.4.x branch. 25 | 3. Make commits in logical units. 26 | 4. Before you send out the pull request, sync your forked repository with a remote repository. This makes your pull request simple and clear. 27 | 28 | ```bash 29 | git clone https://github.com//puppet-sp.git 30 | git remote add upstream https://github.com/wso2/puppet-sp.git 31 | git fetch upstream 32 | git checkout -b upstream/4.4.x 33 | 34 | # add some work 35 | 36 | git push origin 37 | # submit pull request 38 | 39 | ``` 40 | 41 | Thanks for contributing! 42 | -------------------------------------------------------------------------------- /modules/sp_worker/manifests/params.pp: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------------------------------------- 2 | # Copyright (c) 2018 WSO2, Inc. http://www.wso2.org 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # ---------------------------------------------------------------------------- 16 | 17 | # Claas sp_worker::params 18 | # This class includes all the necessary parameters 19 | class sp_worker::params inherits sp_common::params { 20 | 21 | # Define the template 22 | $start_script_template = "bin/worker.sh" 23 | 24 | # Define the template 25 | $template_list = [ 26 | 'conf/worker/deployment.yaml' 27 | ] 28 | 29 | # Define file list 30 | $file_list = [] 31 | 32 | # Define remove file list 33 | $file_removelist = [] 34 | 35 | # -------- deployment.yaml configs -------- 36 | 37 | # listenerConfigurations 38 | $default_host = '0.0.0.0' 39 | $msf4j_host = '0.0.0.0' 40 | $msf4j_keystore_file = '${carbon.home}/resources/security/wso2carbon.jks' 41 | $msf4j_keystore_password = 'wso2carbon' 42 | $msf4j_cert_pass = 'wso2carbon' 43 | 44 | $siddhi_default_host = '0.0.0.0' 45 | $siddhi_msf4j_host = '0.0.0.0' 46 | $siddhi_msf4j_keystore = '${carbon.home}/resources/security/wso2carbon.jks' 47 | $siddhi_msf4j_keystore_password = 'wso2carbon' 48 | $siddhi_msf4j_cert_pass = 'wso2carbon' 49 | 50 | # Datasource Configurations 51 | $carbon_db_url = 'jdbc:h2:${sys:carbon.home}/wso2/${sys:wso2.runtime}/database/WSO2_CLUSTER_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000;AUTO_SERVER=TRUE' 52 | $carbon_db_username = 'wso2carbon' 53 | $carbon_db_password = 'wso2carbon' 54 | $carbon_db_dirver = 'org.h2.Driver' 55 | 56 | # Cluster Configuration 57 | $cluster_enabled = 'false' 58 | } 59 | -------------------------------------------------------------------------------- /modules/sp_editor/templates/carbon-home/bin/editor.sh.erb: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # --------------------------------------------------------------------------- 3 | # Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | export JAVA_HOME="<%= @java_symlink %>" 18 | cygwin=false; 19 | darwin=false; 20 | os400=false; 21 | mingw=false; 22 | case "`uname`" in 23 | CYGWIN*) cygwin=true;; 24 | MINGW*) mingw=true;; 25 | OS400*) os400=true;; 26 | Darwin*) darwin=true 27 | if [ -z "$JAVA_VERSION" ] ; then 28 | JAVA_VERSION="CurrentJDK" 29 | else 30 | echo "Using Java version: $JAVA_VERSION" 31 | fi 32 | if [ -z "$JAVA_HOME" ] ; then 33 | JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home 34 | fi 35 | ;; 36 | esac 37 | 38 | # resolve links - $0 may be a softlink 39 | PRG="$0" 40 | 41 | while [ -h "$PRG" ]; do 42 | ls=`ls -ld "$PRG"` 43 | link=`expr "$ls" : '.*-> \(.*\)$'` 44 | if expr "$link" : '.*/.*' > /dev/null; then 45 | PRG="$link" 46 | else 47 | PRG=`dirname "$PRG"`/"$link" 48 | fi 49 | done 50 | 51 | # Get standard environment variables 52 | PRGDIR=`dirname "$PRG"` 53 | 54 | # Only set CARBON_HOME if not already set 55 | [ -z "$CARBON_HOME" ] && CARBON_HOME=`cd "$PRGDIR/.." ; pwd` 56 | 57 | [ -z "$RUNTIME_HOME" ] && RUNTIME_HOME=`cd "$PRGDIR/../wso2/editor" ; pwd` 58 | 59 | ########################################################################### 60 | NAME=start-editor 61 | # Daemon name, where is the actual executable 62 | EDITOR_INIT_SCRIPT="$CARBON_HOME/wso2/editor/bin/carbon.sh" 63 | 64 | # If the daemon is not there, then exit. 65 | 66 | $EDITOR_INIT_SCRIPT $* 67 | exit; 68 | -------------------------------------------------------------------------------- /modules/sp_worker/templates/carbon-home/bin/worker.sh.erb: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # --------------------------------------------------------------------------- 3 | # Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | export JAVA_HOME="<%= @java_symlink %>" 18 | cygwin=false; 19 | darwin=false; 20 | os400=false; 21 | mingw=false; 22 | case "`uname`" in 23 | CYGWIN*) cygwin=true;; 24 | MINGW*) mingw=true;; 25 | OS400*) os400=true;; 26 | Darwin*) darwin=true 27 | if [ -z "$JAVA_VERSION" ] ; then 28 | JAVA_VERSION="CurrentJDK" 29 | else 30 | echo "Using Java version: $JAVA_VERSION" 31 | fi 32 | if [ -z "$JAVA_HOME" ] ; then 33 | JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home 34 | fi 35 | ;; 36 | esac 37 | 38 | # resolve links - $0 may be a softlink 39 | PRG="$0" 40 | 41 | while [ -h "$PRG" ]; do 42 | ls=`ls -ld "$PRG"` 43 | link=`expr "$ls" : '.*-> \(.*\)$'` 44 | if expr "$link" : '.*/.*' > /dev/null; then 45 | PRG="$link" 46 | else 47 | PRG=`dirname "$PRG"`/"$link" 48 | fi 49 | done 50 | 51 | # Get standard environment variables 52 | PRGDIR=`dirname "$PRG"` 53 | 54 | # Only set CARBON_HOME if not already set 55 | [ -z "$CARBON_HOME" ] && CARBON_HOME=`cd "$PRGDIR/.." ; pwd` 56 | 57 | [ -z "$RUNTIME_HOME" ] && RUNTIME_HOME=`cd "$PRGDIR/../wso2/worker" ; pwd` 58 | 59 | ########################################################################### 60 | NAME=start-worker 61 | # Daemon name, where is the actual executable 62 | 63 | WORKER_INIT_SCRIPT="$CARBON_HOME/wso2/worker/bin/carbon.sh" 64 | 65 | # If the daemon is not there, then exit. 66 | $WORKER_INIT_SCRIPT $* 67 | exit; 68 | -------------------------------------------------------------------------------- /modules/sp_manager/templates/carbon-home/bin/manager.sh.erb: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # --------------------------------------------------------------------------- 3 | # Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | export JAVA_HOME="<%= @java_symlink %>" 18 | cygwin=false; 19 | darwin=false; 20 | os400=false; 21 | mingw=false; 22 | case "`uname`" in 23 | CYGWIN*) cygwin=true;; 24 | MINGW*) mingw=true;; 25 | OS400*) os400=true;; 26 | Darwin*) darwin=true 27 | if [ -z "$JAVA_VERSION" ] ; then 28 | JAVA_VERSION="CurrentJDK" 29 | else 30 | echo "Using Java version: $JAVA_VERSION" 31 | fi 32 | if [ -z "$JAVA_HOME" ] ; then 33 | JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home 34 | fi 35 | ;; 36 | esac 37 | 38 | # resolve links - $0 may be a softlink 39 | PRG="$0" 40 | 41 | while [ -h "$PRG" ]; do 42 | ls=`ls -ld "$PRG"` 43 | link=`expr "$ls" : '.*-> \(.*\)$'` 44 | if expr "$link" : '.*/.*' > /dev/null; then 45 | PRG="$link" 46 | else 47 | PRG=`dirname "$PRG"`/"$link" 48 | fi 49 | done 50 | 51 | # Get standard environment variables 52 | PRGDIR=`dirname "$PRG"` 53 | 54 | # Only set CARBON_HOME if not already set 55 | [ -z "$CARBON_HOME" ] && CARBON_HOME=`cd "$PRGDIR/.." ; pwd` 56 | 57 | [ -z "$RUNTIME_HOME" ] && RUNTIME_HOME=`cd "$PRGDIR/../wso2/manager" ; pwd` 58 | 59 | ########################################################################### 60 | NAME=start-manager 61 | # Daemon name, where is the actual executable 62 | 63 | MANAGER_INIT_SCRIPT="$CARBON_HOME/wso2/manager/bin/carbon.sh" 64 | 65 | # If the daemon is not there, then exit. 66 | 67 | $MANAGER_INIT_SCRIPT $* 68 | exit; 69 | -------------------------------------------------------------------------------- /modules/sp_dashboard/templates/carbon-home/bin/dashboard.sh.erb: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # --------------------------------------------------------------------------- 3 | # Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | export JAVA_HOME="<%= @java_symlink %>" 18 | cygwin=false; 19 | darwin=false; 20 | os400=false; 21 | mingw=false; 22 | case "`uname`" in 23 | CYGWIN*) cygwin=true;; 24 | MINGW*) mingw=true;; 25 | OS400*) os400=true;; 26 | Darwin*) darwin=true 27 | if [ -z "$JAVA_VERSION" ] ; then 28 | JAVA_VERSION="CurrentJDK" 29 | else 30 | echo "Using Java version: $JAVA_VERSION" 31 | fi 32 | if [ -z "$JAVA_HOME" ] ; then 33 | JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home 34 | fi 35 | ;; 36 | esac 37 | 38 | # resolve links - $0 may be a softlink 39 | PRG="$0" 40 | 41 | while [ -h "$PRG" ]; do 42 | ls=`ls -ld "$PRG"` 43 | link=`expr "$ls" : '.*-> \(.*\)$'` 44 | if expr "$link" : '.*/.*' > /dev/null; then 45 | PRG="$link" 46 | else 47 | PRG=`dirname "$PRG"`/"$link" 48 | fi 49 | done 50 | 51 | # Get standard environment variables 52 | PRGDIR=`dirname "$PRG"` 53 | 54 | # Only set CARBON_HOME if not already set 55 | [ -z "$CARBON_HOME" ] && CARBON_HOME=`cd "$PRGDIR/.." ; pwd` 56 | 57 | [ -z "$RUNTIME_HOME" ] && RUNTIME_HOME=`cd "$PRGDIR/../wso2/dashboard" ; pwd` 58 | 59 | ########################################################################### 60 | NAME=start-dashboard 61 | # Daemon name, where is the actual executable 62 | 63 | DASHBOARD_INIT_SCRIPT="$CARBON_HOME/wso2/dashboard/bin/carbon.sh" 64 | 65 | # If the daemon is not there, then exit. 66 | 67 | $DASHBOARD_INIT_SCRIPT $* 68 | exit; 69 | -------------------------------------------------------------------------------- /pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Purpose 2 | > Describe the problems, issues, or needs driving this feature/fix and include links to related issues in the following format: Resolves issue1, issue2, etc. 3 | 4 | ## Goals 5 | > Describe the solutions that this feature/fix will introduce to resolve the problems described above 6 | 7 | ## Approach 8 | > Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email documentation@wso2.com to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here. 9 | 10 | ## User stories 11 | > Summary of user stories addressed by this change> 12 | 13 | ## Release note 14 | > Brief description of the new feature or bug fix as it will appear in the release notes 15 | 16 | ## Documentation 17 | > Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter “N/A” plus brief explanation of why there’s no doc impact 18 | 19 | ## Training 20 | > Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable 21 | 22 | ## Certification 23 | > Type “Sent” when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to certification@wso2.com and NOT pasted in this PR. If there is no impact on certification exams, type “N/A” and explain why. 24 | 25 | ## Marketing 26 | > Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable 27 | 28 | ## Automation tests 29 | - Unit tests 30 | > Code coverage information 31 | - Integration tests 32 | > Details about the test cases and coverage 33 | 34 | ## Security checks 35 | - Followed secure coding standards in http://wso2.com/technical-reports/wso2-secure-engineering-guidelines? yes/no 36 | - Ran FindSecurityBugs plugin and verified report? yes/no 37 | - Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? yes/no 38 | 39 | ## Samples 40 | > Provide high-level details about the samples related to this feature 41 | 42 | ## Related PRs 43 | > List any other related PRs 44 | 45 | ## Migrations (if applicable) 46 | > Describe migration steps and platforms on which migration has been tested 47 | 48 | ## Test environment 49 | > List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested 50 | 51 | ## Learning 52 | > Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem. -------------------------------------------------------------------------------- /modules/sp_worker/manifests/init.pp: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------------------------------------- 2 | # Copyright (c) 2018 WSO2, Inc. http://www.wso2.org 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # ---------------------------------------------------------------------------- 16 | 17 | # Class: sp_worker 18 | # Init class of stream processor - Worker profile 19 | class sp_worker inherits sp_worker::params { 20 | 21 | include sp_common 22 | 23 | # Copy configuration changes to the installed directory 24 | $template_list.each |String $template| { 25 | file { "${carbon_home}/${template}": 26 | ensure => file, 27 | mode => '0644', 28 | content => template("${module_name}/carbon-home/${template}.erb"), 29 | notify => Service["${wso2_service_name}"], 30 | require => Class["sp_common"] 31 | } 32 | } 33 | 34 | # Copy files to carbon home directory 35 | $file_list.each | String $file | { 36 | file { "${carbon_home}/${file}": 37 | ensure => present, 38 | owner => $user, 39 | recurse => remote, 40 | group => $user_group, 41 | mode => '0755', 42 | source => "puppet:///modules/${module_name}/${file}", 43 | notify => Service["${wso2_service_name}"], 44 | require => Class["sp_common"] 45 | } 46 | } 47 | 48 | # Delete files to carbon home directory 49 | $file_removelist.each | String $removefile | { 50 | file { "${carbon_home}/${removefile}": 51 | ensure => absent, 52 | owner => $user, 53 | group => $user_group, 54 | notify => Service["${wso2_service_name}"], 55 | require => Class["sp_common"] 56 | } 57 | } 58 | 59 | # Copy wso2server.sh to installed directory 60 | file { "${carbon_home}/${start_script_template}": 61 | ensure => file, 62 | owner => $user, 63 | group => $user_group, 64 | mode => '0754', 65 | content => template("${module_name}/carbon-home/${start_script_template}.erb"), 66 | notify => Service["${wso2_service_name}"], 67 | require => Class["sp_common"] 68 | } 69 | 70 | /* 71 | Following script can be used to copy file to a given location. 72 | This will copy some_file to install_path -> repository. 73 | Note: Ensure 74 | that file is available in modules -> sp_worker -> files 75 | */ 76 | # file { "${install_path}/repository/some_file": 77 | # owner => $user, 78 | # group => $user_group, 79 | # mode => '0644', 80 | # source => "puppet:///modules/${module_name}/some_file", 81 | # } 82 | } 83 | -------------------------------------------------------------------------------- /modules/sp_editor/manifests/init.pp: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------------------------------------- 2 | # Copyright (c) 2018 WSO2, Inc. http://www.wso2.org 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # ---------------------------------------------------------------------------- 16 | 17 | # Class: sp_editor 18 | # Init class of stream processor - Editor profile 19 | class sp_editor inherits sp_editor::params { 20 | 21 | include sp_common 22 | 23 | # Copy configuration changes to the installed directory 24 | $template_list.each |String $template| { 25 | file { "${carbon_home}/${template}": 26 | ensure => file, 27 | mode => '0644', 28 | content => template("${module_name}/carbon-home/${template}.erb"), 29 | notify => Service["${wso2_service_name}"], 30 | require => Class["sp_common"] 31 | } 32 | } 33 | 34 | # Copy files to carbon home directory 35 | $file_list.each | String $file | { 36 | file { "${carbon_home}/${file}": 37 | ensure => present, 38 | owner => $user, 39 | recurse => remote, 40 | group => $user_group, 41 | mode => '0755', 42 | source => "puppet:///modules/${module_name}/${file}", 43 | notify => Service["${wso2_service_name}"], 44 | require => Class["sp_common"] 45 | } 46 | } 47 | 48 | # Delete files to carbon home directory 49 | $file_removelist.each | String $removefile | { 50 | file { "${carbon_home}/${removefile}": 51 | ensure => absent, 52 | owner => $user, 53 | group => $user_group, 54 | notify => Service["${wso2_service_name}"], 55 | require => Class["sp_common"] 56 | } 57 | } 58 | 59 | # Copy wso2server.sh to installed directory 60 | file { "${carbon_home}/${start_script_template}": 61 | ensure => file, 62 | owner => $user, 63 | group => $user_group, 64 | mode => '0754', 65 | content => template("${module_name}/carbon-home/${start_script_template}.erb"), 66 | notify => Service["${wso2_service_name}"], 67 | require => Class["sp_common"] 68 | } 69 | 70 | /* 71 | Following script can be used to copy file to a given location. 72 | This will copy some_file to install_path -> repository. 73 | Note: Ensure 74 | that file is available in modules -> sp_dashboard -> files 75 | */ 76 | # file { "${install_path}/repository/some_file": 77 | # owner => $user, 78 | # group => $user_group, 79 | # mode => '0644', 80 | # source => "puppet:///modules/${module_name}/some_file", 81 | # } 82 | } 83 | -------------------------------------------------------------------------------- /modules/sp_manager/manifests/init.pp: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------------------------------------- 2 | # Copyright (c) 2018 WSO2, Inc. http://www.wso2.org 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # ---------------------------------------------------------------------------- 16 | 17 | # Class: sp_manager 18 | # Init class of stream processor - Manager profile 19 | class sp_manager inherits sp_manager::params { 20 | 21 | include sp_common 22 | 23 | # Copy configuration changes to the installed directory 24 | $template_list.each |String $template| { 25 | file { "${carbon_home}/${template}": 26 | ensure => file, 27 | mode => '0644', 28 | content => template("${module_name}/carbon-home/${template}.erb"), 29 | notify => Service["${wso2_service_name}"], 30 | require => Class["sp_common"] 31 | } 32 | } 33 | 34 | # Copy files to carbon home directory 35 | $file_list.each | String $file | { 36 | file { "${carbon_home}/${file}": 37 | ensure => present, 38 | owner => $user, 39 | recurse => remote, 40 | group => $user_group, 41 | mode => '0755', 42 | source => "puppet:///modules/${module_name}/${file}", 43 | notify => Service["${wso2_service_name}"], 44 | require => Class["sp_common"] 45 | } 46 | } 47 | 48 | # Delete files to carbon home directory 49 | $file_removelist.each | String $removefile | { 50 | file { "${carbon_home}/${removefile}": 51 | ensure => absent, 52 | owner => $user, 53 | group => $user_group, 54 | notify => Service["${wso2_service_name}"], 55 | require => Class["sp_common"] 56 | } 57 | } 58 | 59 | # Copy wso2server.sh to installed directory 60 | file { "${carbon_home}/${start_script_template}": 61 | ensure => file, 62 | owner => $user, 63 | group => $user_group, 64 | mode => '0754', 65 | content => template("${module_name}/carbon-home/${start_script_template}.erb"), 66 | notify => Service["${wso2_service_name}"], 67 | require => Class["sp_common"] 68 | } 69 | 70 | /* 71 | Following script can be used to copy file to a given location. 72 | This will copy some_file to install_path -> repository. 73 | Note: Ensure 74 | that file is available in modules -> sp_manager -> files 75 | */ 76 | # file { "${install_path}/repository/some_file": 77 | # owner => $user, 78 | # group => $user_group, 79 | # mode => '0644', 80 | # source => "puppet:///modules/${module_name}/some_file", 81 | # } 82 | } 83 | -------------------------------------------------------------------------------- /modules/sp_dashboard/manifests/init.pp: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------------------------------------- 2 | # Copyright (c) 2018 WSO2, Inc. http://www.wso2.org 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # ---------------------------------------------------------------------------- 16 | 17 | # Class: sp_dashboard 18 | # Init class of stream processor dashboard profile 19 | class sp_dashboard inherits sp_dashboard::params { 20 | 21 | include sp_common 22 | 23 | # Copy configuration changes to the installed directory 24 | $template_list.each |String $template| { 25 | file { "${carbon_home}/${template}": 26 | ensure => file, 27 | mode => '0644', 28 | content => template("${module_name}/carbon-home/${template}.erb"), 29 | notify => Service["${wso2_service_name}"], 30 | require => Class["sp_common"] 31 | } 32 | } 33 | 34 | # Copy files to carbon home directory 35 | $file_list.each | String $file | { 36 | file { "${carbon_home}/${file}": 37 | ensure => present, 38 | owner => $user, 39 | recurse => remote, 40 | group => $user_group, 41 | mode => '0755', 42 | source => "puppet:///modules/${module_name}/${file}", 43 | notify => Service["${wso2_service_name}"], 44 | require => Class["sp_common"] 45 | } 46 | } 47 | 48 | # Delete files to carbon home directory 49 | $file_removelist.each | String $removefile | { 50 | file { "${carbon_home}/${removefile}": 51 | ensure => absent, 52 | owner => $user, 53 | group => $user_group, 54 | notify => Service["${wso2_service_name}"], 55 | require => Class["sp_common"] 56 | } 57 | } 58 | 59 | # Copy wso2server.sh to installed directory 60 | file { "${carbon_home}/${start_script_template}": 61 | ensure => file, 62 | owner => $user, 63 | group => $user_group, 64 | mode => '0754', 65 | content => template("${module_name}/carbon-home/${start_script_template}.erb"), 66 | notify => Service["${wso2_service_name}"], 67 | require => Class["sp_common"] 68 | } 69 | 70 | /* 71 | Following script can be used to copy file to a given location. 72 | This will copy some_file to install_path -> repository. 73 | Note: Ensure 74 | that file is available in modules -> sp_dashboard -> files 75 | */ 76 | # file { "${install_path}/repository/some_file": 77 | # owner => $user, 78 | # group => $user_group, 79 | # mode => '0644', 80 | # source => "puppet:///modules/${module_name}/some_file", 81 | # } 82 | } 83 | -------------------------------------------------------------------------------- /modules/sp_dashboard/manifests/params.pp: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------------------------------------- 2 | # Copyright (c) 2018 WSO2, Inc. http://www.wso2.org 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # ---------------------------------------------------------------------------- 16 | 17 | # Claas sp_dashboard::params 18 | # This class includes all the necessary parameters 19 | class sp_dashboard::params inherits sp_common::params { 20 | 21 | # Define the start script template 22 | $start_script_template = "bin/dashboard.sh" 23 | 24 | # Define the template 25 | $template_list = [ 26 | 'conf/dashboard/deployment.yaml' 27 | ] 28 | 29 | # Define file list 30 | $file_list = [] 31 | 32 | # Define remove file list 33 | $file_removelist = [] 34 | 35 | # -------- deployment.yaml configs -------- 36 | 37 | # wso2.datasources 38 | $dashboard_db_url = 'jdbc:h2:${sys:carbon.home}/wso2/${sys:wso2.runtime}/database/DASHBOARD_DB;IFEXISTS=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000;MVCC=TRUE' 39 | $dashboard_db_username = 'wso2carbon' 40 | $dashboard_db_password = 'wso2carbon' 41 | $dashboard_db_driver = 'org.h2.Driver' 42 | 43 | $business_rules_db_url = 'jdbc:h2:${sys:carbon.home}/wso2/${sys:wso2.runtime}/database/BUSINESS_RULES_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000;MVCC=TRUE' 44 | $business_rules_db_username = 'wso2carbon' 45 | $business_rules_db_password = 'wso2carbon' 46 | $business_rules_db_driver = 'org.h2.Driver' 47 | 48 | $status_dashboard_db_url = 'jdbc:h2:${sys:carbon.home}/wso2/${sys:wso2.runtime}/database/wso2_status_dashboard;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000;MVCC=TRUE' 49 | $status_dashboard_db_username = 'wso2carbon' 50 | $status_dashboard_db_password = 'wso2carbon' 51 | $status_dashboard_db_driver = 'org.h2.Driver' 52 | 53 | $metrics_db_url = 'jdbc:h2:${sys:carbon.home}/wso2/dashboard/database/metrics;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000' 54 | $metrics_db_username = 'wso2carbon' 55 | $metrics_db_password = 'wso2carbon' 56 | $metrics_db_driver = 'org.h2.Driver' 57 | 58 | # wso2.business.rules.manager 59 | $business_rules_manager_username = 'admin' 60 | $businnes_rules_manager_password = 'admin' 61 | 62 | # wso2.status.dashboard 63 | $worker_access_username = 'admin' 64 | $worker_access_password = 'admin' 65 | 66 | # listenerConfigurations 67 | $listener_host = '0.0.0.0' 68 | $listener_keystore_file = '${carbon.home}/resources/security/wso2carbon.jks' 69 | $listener_keystore_password = 'wso2carbon' 70 | $listener_cert_pass = 'wso2carbon' 71 | } 72 | -------------------------------------------------------------------------------- /modules/sp_common/manifests/params.pp: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------------------- 2 | # Copyright (c) 2019 WSO2, Inc. http://www.wso2.org 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | #---------------------------------------------------------------------------- 16 | 17 | class sp_common::params { 18 | 19 | $packages = ["unzip"] 20 | $version = "4.4.0" 21 | $pack = "wso2sp-${version}" 22 | 23 | $user = 'wso2carbon' 24 | $user_group = 'wso2' 25 | $user_id = 802 26 | $user_group_id = 802 27 | 28 | # JDK Distributions 29 | $java_dir = "/opt" 30 | $java_symlink = "${java_dir}/java" 31 | $jdk_name = 'amazon-corretto-8.202.08.2-linux-x64' 32 | $java_home = "${java_dir}/${jdk_name}" 33 | 34 | $profile = $runtime 35 | $target = "/mnt" 36 | $product_dir = "${target}/${profile}" 37 | $pack_dir = "${target}/${profile}/packs" 38 | $wso2_service_name = "wso2${profile}" 39 | 40 | # Pack Directories 41 | $carbon_home = "${product_dir}/${pack}" 42 | $product_binary = "${pack}.zip" 43 | 44 | # ----- Profile configs ----- 45 | case $profile { 46 | 'sp_dashboard': { 47 | $server_script_path = "${carbon_home}/bin/dashboard.sh" 48 | $pid_file_path = "${carbon_home}/wso2/dashboard/runtime.pid" 49 | } 50 | 'sp_editor': { 51 | $server_script_path = "${carbon_home}/bin/editor.sh" 52 | $pid_file_path = "${carbon_home}/wso2/editor/runtime.pid" 53 | } 54 | 'sp_manager': { 55 | $server_script_path = "${carbon_home}/bin/manager.sh" 56 | $pid_file_path = "${carbon_home}/wso2/manager/runtime.pid" 57 | } 58 | 'sp_worker': { 59 | $server_script_path = "${carbon_home}/bin/worker.sh" 60 | $pid_file_path = "${carbon_home}/wso2/worker/runtime.pid" 61 | } 62 | } 63 | 64 | # -------- deployment.yaml configs -------- 65 | 66 | # databridge.config 67 | $databridge_keystore_location = '${sys:carbon.home}/resources/security/wso2carbon.jks' 68 | $databridge_keystore_password = 'wso2carbon' 69 | $binary_data_receiver_hostname = '0.0.0.0' 70 | 71 | # Configuration of the Data Agents - to publish events through databridge 72 | $thrift_agent_trust_store = '${sys:carbon.home}/resources/security/client-truststore.jks' 73 | $thrift_agent_trust_store_password = 'wso2carbon' 74 | $binary_agent_trust_store = '${sys:carbon.home}/resources/security/client-truststore.jks' 75 | $binary_agent_trust_store_password = 'wso2carbon' 76 | 77 | # Secure Vault Configuration 78 | $securevault_private_key_alias = 'wso2carbon' 79 | $securevault_keystore = '${sys:carbon.home}/resources/security/securevault.jks' 80 | $securevault_secret_properties_file = '${sys:carbon.home}/conf/${sys:wso2.runtime}/secrets.properties' 81 | $securevault_master_key_reader_file = '${sys:carbon.home}/conf/${sys:wso2.runtime}/master-keys.yaml' 82 | } 83 | -------------------------------------------------------------------------------- /modules/sp_common/manifests/init.pp: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------------------- 2 | # Copyright (c) 2019 WSO2, Inc. http://www.wso2.org 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | #---------------------------------------------------------------------------- 16 | 17 | class sp_common inherits sp_common::params { 18 | 19 | include '::sp_common::service' 20 | 21 | # Install system packages 22 | package { $packages: 23 | ensure => installed 24 | } 25 | 26 | # Create wso2 group 27 | group { $user_group: 28 | ensure => present, 29 | gid => $user_group_id, 30 | system => true, 31 | } 32 | 33 | # Create wso2 user 34 | user { $user: 35 | ensure => present, 36 | uid => $user_id, 37 | gid => $user_group_id, 38 | home => "/home/${user}", 39 | system => true, 40 | require => Group["${user_group}"] 41 | } 42 | 43 | /* 44 | * Java Distribution 45 | */ 46 | 47 | # Copy JDK to Java distribution path 48 | file { "jdk-distribution": 49 | path => "${java_home}.tar.gz", 50 | source => "puppet:///modules/${module_name}/jdk/${jdk_name}.tar.gz", 51 | } 52 | 53 | # Unzip distribution 54 | exec { "unpack-jdk": 55 | command => "tar -zxvf ${java_home}.tar.gz", 56 | path => "/bin/", 57 | cwd => "${java_dir}", 58 | onlyif => "/usr/bin/test ! -d ${java_home}", 59 | subscribe => File["jdk-distribution"], 60 | refreshonly => true 61 | } 62 | 63 | # Create symlink to Java binary 64 | file { "${java_symlink}": 65 | ensure => "link", 66 | target => "${java_home}", 67 | require => Exec["unpack-jdk"] 68 | } 69 | 70 | /* 71 | * WSO2 Distribution 72 | */ 73 | 74 | file { ["${product_dir}", "${pack_dir}"]: 75 | ensure => directory, 76 | owner => $user, 77 | group => $user_group, 78 | require => [ User["${user}"], Group["${user_group}"] ] 79 | } 80 | 81 | # Copy binary to distribution path 82 | file { "wso2-binary": 83 | path => "${pack_dir}/${product_binary}", 84 | owner => $user, 85 | group => $user_group, 86 | mode => '0644', 87 | source => "puppet:///modules/${module_name}/packs/${product_binary}", 88 | require => File["${product_dir}", "${pack_dir}"] 89 | } 90 | 91 | # Stop the existing setup 92 | exec { "stop-server": 93 | command => "systemctl stop ${wso2_service_name}", 94 | path => [ '/bin/', '/sbin/', '/usr/bin/', '/usr/sbin/' ], 95 | tries => $try_count, 96 | try_sleep => $try_sleep, 97 | onlyif => "/usr/bin/test -f /etc/systemd/system/${wso2_service_name}.service", 98 | subscribe => File["wso2-binary"], 99 | refreshonly => true, 100 | } 101 | 102 | # Delete existing setup 103 | exec { "detele-pack": 104 | command => "rm -rf ${carbon_home}", 105 | path => "/bin/", 106 | onlyif => "/usr/bin/test -d ${carbon_home}", 107 | subscribe => File["wso2-binary"], 108 | refreshonly => true, 109 | } 110 | 111 | # Unzip the binary and create setup 112 | exec { "unzip-update": 113 | command => "unzip ${product_binary} -d ${product_dir}", 114 | path => "/usr/bin/", 115 | user => $user, 116 | group => $user_group, 117 | cwd => "${pack_dir}", 118 | subscribe => File["wso2-binary"], 119 | refreshonly => true, 120 | } 121 | 122 | # Copy the unit file required to deploy the server as a service 123 | file { "/etc/systemd/system/${wso2_service_name}.service": 124 | ensure => present, 125 | owner => root, 126 | group => root, 127 | mode => '0754', 128 | content => template("${module_name}/carbon.service.erb"), 129 | } 130 | 131 | exec { 'systemctl daemon-reload': 132 | path => '/bin/:/sbin/:/usr/bin/:/usr/sbin/', 133 | subscribe => File["/etc/systemd/system/${wso2_service_name}.service"], 134 | refreshonly => true, 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /scripts/update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ---------------------------------------------------------------------------- 3 | # 4 | # Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 5 | # 6 | # WSO2 Inc. licenses this file to you under the Apache License, 7 | # Version 2.0 (the "License"); you may not use this file except 8 | # in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # 20 | # ---------------------------------------------------------------------------- 21 | 22 | set -e 23 | 24 | # Build artifacts and versions 25 | : ${version:="4.4.0"} 26 | : ${pack:="wso2sp-"${version}} 27 | : ${packs_dir:=$(pwd)/../modules/sp_common/files/packs/} 28 | : ${carbon_home=${packs_dir}/${pack}} 29 | 30 | usage() { echo "Usage: $0 -p " 1>&2; exit 1; } 31 | 32 | unzip_pack() { 33 | if [[ -d ${packs_dir}/${1} ]] 34 | then 35 | echo "The current directory contains a directory ${1}. Please move the directory to another location." 36 | fi 37 | echo "Unzipping ${1}.zip..." 38 | unzip -q ${packs_dir}/${1}.zip 39 | } 40 | 41 | update_pack() { 42 | if ! [ -x "$(command -v zip)" ]; then 43 | echo 'Error: zip is not installed.' >&2 44 | rm -rf ${packs_dir}/${1} 45 | exit 1 46 | fi 47 | rm ${packs_dir}/${1}.zip 48 | cd ${packs_dir} 49 | echo "Repackaging ${1}..." 50 | zip -qr ${1}.zip ${1} 51 | rm -rf ${1} 52 | } 53 | 54 | while getopts ":p:" o; do 55 | case "${o}" in 56 | p) 57 | profile=${OPTARG} 58 | ;; 59 | *) 60 | usage 61 | ;; 62 | esac 63 | done 64 | shift $((OPTIND-1)) 65 | 66 | if [[ -z "${profile}" ]]; then 67 | usage 68 | fi 69 | 70 | modules=("sp_dashboard" "sp_editor" "sp_manager" "sp_worker") 71 | if [[ ! " ${modules[@]} " =~ " ${profile} " ]]; then 72 | echo "Invalid profile. Please provide one of the following profiles: 73 | sp_dashboard 74 | sp_editor 75 | sp_manager 76 | sp_worker" 77 | exit 1 78 | fi 79 | 80 | # Create updates directory if it doesn't exist 81 | updates_dir=$(pwd)/update_logs/${pack} 82 | if [[ ! -d ${updates_dir} ]] 83 | then 84 | mkdir -p ${updates_dir} 85 | fi 86 | 87 | # Getting update status 88 | # 0 - first/last update successful 89 | # 1 - Error occurred in last update 90 | # 2 - In-place has been updated 91 | # 3 - conflicts encountered in last update 92 | status=0 93 | if [[ -f ${updates_dir}/status ]] 94 | then 95 | status=$(cat ${updates_dir}/status) 96 | fi 97 | 98 | cd ${packs_dir} 99 | # Check if user has a WSO2 subscription 100 | while : 101 | do 102 | read -p "Do you have a WSO2 subscription? (Y/n) " 103 | echo 104 | if [[ $REPLY =~ ^[Yy]$ ]] || [[ -z "$REPLY" ]] 105 | then 106 | # The pack should not be unzipped if a conflict is being resolved 107 | if [[ ${status} -ne 3 ]] 108 | then 109 | unzip_pack ${pack} 110 | fi 111 | 112 | if [[ ! -f ${carbon_home}/bin/update_linux ]] 113 | then 114 | echo "Update executable not found. Please download package for subscription users from website." 115 | echo "Don't have a subscription yet? Sign up for a free-trial subscription at https://wso2.com/subscription/free-trial" 116 | rm -rf ${packs_dir}/${pack} 117 | exit 1 118 | else 119 | break 120 | fi 121 | elif [[ $REPLY =~ ^[Nn]$ ]] 122 | then 123 | echo "Don't have a subscription yet? Sign up for a free-trial subscription at https://wso2.com/subscription/free-trial" 124 | exit 0 125 | else 126 | echo "Invalid input provided." 127 | sleep .5 128 | fi 129 | done 130 | 131 | # Move into binaries directory 132 | cd ${carbon_home}/bin 133 | 134 | # Run in-place update 135 | if [[ ${status} -eq 0 ]] || [[ ${status} -eq 1 ]] || [[ ${status} -eq 2 ]] 136 | then 137 | ./update_linux --verbose 2>&1 | tee ${updates_dir}/output.txt 138 | update_status=${PIPESTATUS[0]} 139 | elif [[ ${status} -eq 3 ]] 140 | then 141 | ./update_linux --verbose --continue 2>&1 | tee ${updates_dir}/output.txt 142 | update_status=${PIPESTATUS[0]} 143 | 144 | # Handle user running update script without resolving conflicts 145 | if [[ ${update_status} -eq 1 ]] 146 | then 147 | echo "Error occurred while attempting to resolve conflicts." 148 | rm -rf ${packs_dir}/${pack} 149 | exit 1 150 | fi 151 | else 152 | echo "status file is invalid. Please delete or clear file content." 153 | rm -rf ${packs_dir}/${pack} 154 | exit 1 155 | fi 156 | 157 | # Handle the In-place tool being updated 158 | if [[ ${update_status} -eq 2 ]] 159 | then 160 | echo "In-place tool has been updated. Running update again." 161 | ./update_linux --verbose 2>&1 | tee ${updates_dir}/output.txt 162 | update_status=${PIPESTATUS[0]} 163 | fi 164 | 165 | # Update status 166 | echo ${update_status} > ${updates_dir}/status 167 | if [[ ${update_status} -eq 0 ]] 168 | then 169 | echo 170 | echo "Update completed successfully." 171 | update_pack ${pack} 172 | elif [[ ${update_status} -eq 3 ]] 173 | then 174 | echo "Conflicts encountered. Please resolve conflicts in ${packs_dir}/${pack} and run the update script again." 175 | else 176 | echo "Update error occurred. Stopped with exit code ${update_status}" 177 | rm -rf ${packs_dir}/${pack} 178 | exit ${update_status} 179 | fi 180 | 181 | # Get list of merged files 182 | if [[ ${update_status} -eq 0 ]] # If update is successful 183 | then 184 | sed -n '/Merge successful for the following files./,/Successfully completed merging files/p' ${updates_dir}/output.txt > ${updates_dir}/merged_files.txt 185 | elif [[ ${update_status} -eq 3 ]] # If conflicts were encountered during update 186 | then 187 | sed -n '/Merge successful for the following files./,/Merging/p' ${updates_dir}/output.txt > ${updates_dir}/merged_files.txt 188 | fi 189 | 190 | if [[ -s ${updates_dir}/merged_files.txt ]] 191 | then 192 | sed -i '1d' ${updates_dir}/merged_files.txt # Remove first line from file 193 | sed -i '$ d' ${updates_dir}/merged_files.txt # Remove last line from file 194 | 195 | while read -r line; do 196 | filepath=${line##*${pack}/} 197 | 198 | for module in "${modules[@]}" 199 | do 200 | template_file=${packs_dir}/../../../${module}/templates/carbon-home/${filepath}.erb 201 | if [[ -f ${template_file} ]] 202 | then 203 | updated_templates+=("modules/"${template_file##*${packs_dir}/../../../}) 204 | fi 205 | done 206 | done < ${updates_dir}/merged_files.txt 207 | 208 | # Display template files to be changed 209 | if [[ -n ${updated_templates} ]] 210 | then 211 | DATE=`date +%Y-%m-%d` 212 | update_file_name="update_${DATE}.log" 213 | echo 214 | echo "Update has made changes to the following files. Please update the templates accordingly before running the next update." | tee -a ${updates_dir}/${update_file_name} 215 | printf '%s\n' "${updated_templates[@]}" | tee -a ${updates_dir}/${update_file_name} 216 | fi 217 | fi 218 | -------------------------------------------------------------------------------- /modules/sp_editor/templates/carbon-home/conf/editor/deployment.yaml.erb: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the \"License\"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an \"AS IS\" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | ################################################################################ 16 | 17 | # Carbon Configuration Parameters 18 | wso2.carbon: 19 | # value to uniquely identify a server 20 | id: wso2-sp 21 | # server name 22 | name: WSO2 Stream Processor 23 | # ports used by this server 24 | ports: 25 | # port offset 26 | offset: 3 27 | 28 | wso2.transport.http: 29 | transportProperties: 30 | - 31 | name: "server.bootstrap.socket.timeout" 32 | value: 60 33 | - 34 | name: "client.bootstrap.socket.timeout" 35 | value: 60 36 | - 37 | name: "latency.metrics.enabled" 38 | value: true 39 | 40 | listenerConfigurations: 41 | - 42 | id: "default" 43 | host: "<%= @default_host %>" 44 | port: 9390 45 | - 46 | id: "msf4j-https" 47 | host: "<%= @msf4j_host %>" 48 | port: 9743 49 | scheme: https 50 | keyStoreFile: "<%= @msf4j_keystore_file %>" 51 | keyStorePassword: <%= @msf4j_keystore_password %> 52 | certPass: <%= @msf4j_cert_pass %> 53 | 54 | senderConfigurations: 55 | - 56 | id: "http-sender" 57 | 58 | siddhi.stores.query.api: 59 | transportProperties: 60 | - 61 | name: "server.bootstrap.socket.timeout" 62 | value: 60 63 | - 64 | name: "client.bootstrap.socket.timeout" 65 | value: 60 66 | - 67 | name: "latency.metrics.enabled" 68 | value: true 69 | 70 | listenerConfigurations: 71 | - 72 | id: "default" 73 | host: "<%= @siddhi_default_host %>" 74 | port: 7370 75 | 76 | # Configuration used for the databridge communication 77 | databridge.config: 78 | # No of worker threads to consume events 79 | # THIS IS A MANDATORY FIELD 80 | workerThreads: 10 81 | # Maximum amount of messages that can be queued internally in MB 82 | # THIS IS A MANDATORY FIELD 83 | maxEventBufferCapacity: 10000000 84 | # Queue size; the maximum number of events that can be stored in the queue 85 | # THIS IS A MANDATORY FIELD 86 | eventBufferSize: 2000 87 | # Keystore file path 88 | # THIS IS A MANDATORY FIELD 89 | keyStoreLocation : <%= @databridge_keystore_location %> 90 | # Keystore password 91 | # THIS IS A MANDATORY FIELD 92 | keyStorePassword : <%= @databridge_keystore_password %> 93 | # Session Timeout value in mins 94 | # THIS IS A MANDATORY FIELD 95 | clientTimeoutMin: 30 96 | # Data receiver configurations 97 | # THIS IS A MANDATORY FIELD 98 | dataReceivers: 99 | - 100 | # Data receiver configuration 101 | dataReceiver: 102 | # Data receiver type 103 | # THIS IS A MANDATORY FIELD 104 | type: Thrift 105 | # Data receiver properties 106 | properties: 107 | tcpPort: '7611' 108 | sslPort: '7711' 109 | 110 | - 111 | # Data receiver configuration 112 | dataReceiver: 113 | # Data receiver type 114 | # THIS IS A MANDATORY FIELD 115 | type: Binary 116 | # Data receiver properties 117 | properties: 118 | tcpPort: '9611' 119 | sslPort: '9711' 120 | tcpReceiverThreadPoolSize: '100' 121 | sslReceiverThreadPoolSize: '100' 122 | hostName: <%= @binary_data_receiver_hostname %> 123 | 124 | # Configuration of the Data Agents - to publish events through databridge 125 | data.agent.config: 126 | # Data agent configurations 127 | # THIS IS A MANDATORY FIELD 128 | agents: 129 | - 130 | # Data agent configuration 131 | agentConfiguration: 132 | # Data agent name 133 | # THIS IS A MANDATORY FIELD 134 | name: Thrift 135 | # Data endpoint class 136 | # THIS IS A MANDATORY FIELD 137 | dataEndpointClass: org.wso2.carbon.databridge.agent.endpoint.thrift.ThriftDataEndpoint 138 | # Data publisher strategy 139 | publishingStrategy: async 140 | # Trust store path 141 | trustStorePath: '<%= @thrift_agent_trust_store %>' 142 | # Trust store password 143 | trustStorePassword: '<%= @thrift_agent_trust_store_password %>' 144 | # Queue Size 145 | queueSize: 32768 146 | # Batch Size 147 | batchSize: 200 148 | # Core pool size 149 | corePoolSize: 1 150 | # Socket timeout in milliseconds 151 | socketTimeoutMS: 30000 152 | # Maximum pool size 153 | maxPoolSize: 1 154 | # Keep alive time in pool 155 | keepAliveTimeInPool: 20 156 | # Reconnection interval 157 | reconnectionInterval: 30 158 | # Max transport pool size 159 | maxTransportPoolSize: 250 160 | # Max idle connections 161 | maxIdleConnections: 250 162 | # Eviction time interval 163 | evictionTimePeriod: 5500 164 | # Min idle time in pool 165 | minIdleTimeInPool: 5000 166 | # Secure max transport pool size 167 | secureMaxTransportPoolSize: 250 168 | # Secure max idle connections 169 | secureMaxIdleConnections: 250 170 | # secure eviction time period 171 | secureEvictionTimePeriod: 5500 172 | # Secure min idle time in pool 173 | secureMinIdleTimeInPool: 5000 174 | # SSL enabled protocols 175 | sslEnabledProtocols: TLSv1.1,TLSv1.2 176 | # Ciphers 177 | 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 178 | - 179 | # Data agent configuration 180 | agentConfiguration: 181 | # Data agent name 182 | # THIS IS A MANDATORY FIELD 183 | name: Binary 184 | # Data endpoint class 185 | # THIS IS A MANDATORY FIELD 186 | dataEndpointClass: org.wso2.carbon.databridge.agent.endpoint.binary.BinaryDataEndpoint 187 | # Data publisher strategy 188 | publishingStrategy: async 189 | # Trust store path 190 | trustStorePath: '<%= @binary_agent_trust_store %>' 191 | # Trust store password 192 | trustStorePassword: '<%= @binary_agent_trust_store_password %>' 193 | # Queue Size 194 | queueSize: 32768 195 | # Batch Size 196 | batchSize: 200 197 | # Core pool size 198 | corePoolSize: 1 199 | # Socket timeout in milliseconds 200 | socketTimeoutMS: 30000 201 | # Maximum pool size 202 | maxPoolSize: 1 203 | # Keep alive time in pool 204 | keepAliveTimeInPool: 20 205 | # Reconnection interval 206 | reconnectionInterval: 30 207 | # Max transport pool size 208 | maxTransportPoolSize: 250 209 | # Max idle connections 210 | maxIdleConnections: 250 211 | # Eviction time interval 212 | evictionTimePeriod: 5500 213 | # Min idle time in pool 214 | minIdleTimeInPool: 5000 215 | # Secure max transport pool size 216 | secureMaxTransportPoolSize: 250 217 | # Secure max idle connections 218 | secureMaxIdleConnections: 250 219 | # secure eviction time period 220 | secureEvictionTimePeriod: 5500 221 | # Secure min idle time in pool 222 | secureMinIdleTimeInPool: 5000 223 | # SSL enabled protocols 224 | sslEnabledProtocols: TLSv1.1,TLSv1.2 225 | # Ciphers 226 | 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 227 | 228 | # Deployment configuration parameters 229 | wso2.artifact.deployment: 230 | # Scheduler update interval 231 | updateInterval: 2 232 | 233 | # Periodic Persistence Configuration 234 | state.persistence: 235 | enabled: false 236 | intervalInMin: 1 237 | revisionsToKeep: 2 238 | persistenceStore: org.wso2.carbon.stream.processor.core.persistence.FileSystemPersistenceStore 239 | config: 240 | location: siddhi-app-persistence 241 | 242 | # Secure Vault Configuration 243 | wso2.securevault: 244 | secretRepository: 245 | type: org.wso2.carbon.secvault.repository.DefaultSecretRepository 246 | parameters: 247 | privateKeyAlias: <%= @securevault_private_key_alias %> 248 | keystoreLocation: <%= @securevault_keystore %> 249 | secretPropertiesFile: <%= @securevault_secret_properties_file %> 250 | masterKeyReader: 251 | type: org.wso2.carbon.secvault.reader.DefaultMasterKeyReader 252 | parameters: 253 | masterKeyReaderFile: <%= @securevault_master_key_reader_file %> 254 | 255 | # Datasource Configurations 256 | wso2.datasources: 257 | dataSources: 258 | - name: WSO2_CARBON_DB 259 | description: The datasource used for registry and user manager 260 | definition: 261 | type: RDBMS 262 | configuration: 263 | jdbcUrl: '<%= @carbon_db_url %>' 264 | username: <%= @carbon_db_username %> 265 | password: <%= @carbon_db_password %> 266 | driverClassName: <%= @carbon_db_driver %> 267 | maxPoolSize: 10 268 | idleTimeout: 60000 269 | connectionTestQuery: SELECT 1 270 | validationTimeout: 30000 271 | isAutoCommit: false 272 | 273 | - name: Message_Tracing_DB 274 | description: "The datasource used for message tracer to store span information." 275 | jndiConfig: 276 | name: jdbc/Message_Tracing_DB 277 | definition: 278 | type: RDBMS 279 | configuration: 280 | jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/dashboard/database/MESSAGE_TRACING_DB;AUTO_SERVER=TRUE' 281 | username: wso2carbon 282 | password: wso2carbon 283 | driverClassName: org.h2.Driver 284 | maxPoolSize: 20 285 | idleTimeout: 60000 286 | connectionTestQuery: SELECT 1 287 | validationTimeout: 30000 288 | isAutoCommit: false 289 | 290 | # Cluster Configuration 291 | cluster.config: 292 | enabled: <%= @cluster_enabled %> 293 | groupId: sp 294 | coordinationStrategyClass: org.wso2.carbon.cluster.coordinator.rdbms.RDBMSCoordinationStrategy 295 | strategyConfig: 296 | datasource: WSO2_CARBON_DB 297 | heartbeatInterval: 1000 298 | heartbeatMaxRetry: 2 299 | eventPollingInterval: 1000 300 | 301 | #Authentication Configurations: Authentication is disabled in editor profile 302 | auth.configs: 303 | restAPIAuthConfigs: 304 | authEnable: <%= @rest_api_auth_enable %> 305 | -------------------------------------------------------------------------------- /modules/sp_manager/templates/carbon-home/conf/manager/deployment.yaml.erb: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the \"License\"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an \"AS IS\" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | ################################################################################ 16 | 17 | # Carbon Configuration Parameters 18 | wso2.carbon: 19 | # value to uniquely identify a server 20 | id: wso2-sp 21 | # server name 22 | name: WSO2 Stream Processor 23 | # ports used by this server 24 | ports: 25 | # port offset 26 | offset: 1 27 | 28 | wso2.transport.http: 29 | transportProperties: 30 | - 31 | name: "server.bootstrap.socket.timeout" 32 | value: 60 33 | - 34 | name: "client.bootstrap.socket.timeout" 35 | value: 60 36 | - 37 | name: "latency.metrics.enabled" 38 | value: true 39 | 40 | listenerConfigurations: 41 | - 42 | id: "default" 43 | host: "<%= @default_host %>" 44 | port: 9190 45 | - 46 | id: "msf4j-https" 47 | host: "<%= @msf4j_host %>" 48 | port: 9543 49 | scheme: https 50 | keyStoreFile: "<%= @msf4j_keystore_file %>" 51 | keyStorePassword: <%= @msf4j_keystore_password %> 52 | certPass: <%= @msf4j_cert_pass %> 53 | 54 | senderConfigurations: 55 | - 56 | id: "http-sender" 57 | 58 | # Configuration used for the databridge communication 59 | databridge.config: 60 | # No of worker threads to consume events 61 | # THIS IS A MANDATORY FIELD 62 | workerThreads: 10 63 | # Maximum amount of messages that can be queued internally in MB 64 | # THIS IS A MANDATORY FIELD 65 | maxEventBufferCapacity: 10000000 66 | # Queue size; the maximum number of events that can be stored in the queue 67 | # THIS IS A MANDATORY FIELD 68 | eventBufferSize: 2000 69 | # Keystore file path 70 | # THIS IS A MANDATORY FIELD 71 | keyStoreLocation : <%= @databridge_keystore_location %> 72 | # Keystore password 73 | # THIS IS A MANDATORY FIELD 74 | keyStorePassword : <%= @databridge_keystore_password %> 75 | # Session Timeout value in mins 76 | # THIS IS A MANDATORY FIELD 77 | clientTimeoutMin: 30 78 | # Data receiver configurations 79 | # THIS IS A MANDATORY FIELD 80 | dataReceivers: 81 | - 82 | # Data receiver configuration 83 | dataReceiver: 84 | # Data receiver type 85 | # THIS IS A MANDATORY FIELD 86 | type: Thrift 87 | # Data receiver properties 88 | properties: 89 | tcpPort: '7611' 90 | sslPort: '7711' 91 | 92 | - 93 | # Data receiver configuration 94 | dataReceiver: 95 | # Data receiver type 96 | # THIS IS A MANDATORY FIELD 97 | type: Binary 98 | # Data receiver properties 99 | properties: 100 | tcpPort: '9611' 101 | sslPort: '9711' 102 | tcpReceiverThreadPoolSize: '100' 103 | sslReceiverThreadPoolSize: '100' 104 | hostName: <%= @binary_data_receiver_hostname %> 105 | 106 | # Configuration of the Data Agents - to publish events through databridge 107 | data.agent.config: 108 | # Data agent configurations 109 | # THIS IS A MANDATORY FIELD 110 | agents: 111 | - 112 | # Data agent configuration 113 | agentConfiguration: 114 | # Data agent name 115 | # THIS IS A MANDATORY FIELD 116 | name: Thrift 117 | # Data endpoint class 118 | # THIS IS A MANDATORY FIELD 119 | dataEndpointClass: org.wso2.carbon.databridge.agent.endpoint.thrift.ThriftDataEndpoint 120 | # Data publisher strategy 121 | publishingStrategy: async 122 | # Trust store path 123 | trustStorePath: '<%= @thrift_agent_trust_store %>' 124 | # Trust store password 125 | trustStorePassword: '<%= @thrift_agent_trust_store_password %>' 126 | # Queue Size 127 | queueSize: 32768 128 | # Batch Size 129 | batchSize: 200 130 | # Core pool size 131 | corePoolSize: 1 132 | # Socket timeout in milliseconds 133 | socketTimeoutMS: 30000 134 | # Maximum pool size 135 | maxPoolSize: 1 136 | # Keep alive time in pool 137 | keepAliveTimeInPool: 20 138 | # Reconnection interval 139 | reconnectionInterval: 30 140 | # Max transport pool size 141 | maxTransportPoolSize: 250 142 | # Max idle connections 143 | maxIdleConnections: 250 144 | # Eviction time interval 145 | evictionTimePeriod: 5500 146 | # Min idle time in pool 147 | minIdleTimeInPool: 5000 148 | # Secure max transport pool size 149 | secureMaxTransportPoolSize: 250 150 | # Secure max idle connections 151 | secureMaxIdleConnections: 250 152 | # secure eviction time period 153 | secureEvictionTimePeriod: 5500 154 | # Secure min idle time in pool 155 | secureMinIdleTimeInPool: 5000 156 | # SSL enabled protocols 157 | sslEnabledProtocols: TLSv1.1,TLSv1.2 158 | # Ciphers 159 | 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 160 | - 161 | # Data agent configuration 162 | agentConfiguration: 163 | # Data agent name 164 | # THIS IS A MANDATORY FIELD 165 | name: Binary 166 | # Data endpoint class 167 | # THIS IS A MANDATORY FIELD 168 | dataEndpointClass: org.wso2.carbon.databridge.agent.endpoint.binary.BinaryDataEndpoint 169 | # Data publisher strategy 170 | publishingStrategy: async 171 | # Trust store path 172 | trustStorePath: '<%= @binary_agent_trust_store %>' 173 | # Trust store password 174 | trustStorePassword: '<%= @binary_agent_trust_store_password %>' 175 | # Queue Size 176 | queueSize: 32768 177 | # Batch Size 178 | batchSize: 200 179 | # Core pool size 180 | corePoolSize: 1 181 | # Socket timeout in milliseconds 182 | socketTimeoutMS: 30000 183 | # Maximum pool size 184 | maxPoolSize: 1 185 | # Keep alive time in pool 186 | keepAliveTimeInPool: 20 187 | # Reconnection interval 188 | reconnectionInterval: 30 189 | # Max transport pool size 190 | maxTransportPoolSize: 250 191 | # Max idle connections 192 | maxIdleConnections: 250 193 | # Eviction time interval 194 | evictionTimePeriod: 5500 195 | # Min idle time in pool 196 | minIdleTimeInPool: 5000 197 | # Secure max transport pool size 198 | secureMaxTransportPoolSize: 250 199 | # Secure max idle connections 200 | secureMaxIdleConnections: 250 201 | # secure eviction time period 202 | secureEvictionTimePeriod: 5500 203 | # Secure min idle time in pool 204 | secureMinIdleTimeInPool: 5000 205 | # SSL enabled protocols 206 | sslEnabledProtocols: TLSv1.1,TLSv1.2 207 | # Ciphers 208 | 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 209 | 210 | # Deployment configuration parameters 211 | wso2.artifact.deployment: 212 | # Scheduler update interval 213 | updateInterval: 5 214 | 215 | # Periodic Persistence Configuration 216 | state.persistence: 217 | enabled: false 218 | intervalInMin: 1 219 | revisionsToKeep: 2 220 | persistenceStore: org.wso2.carbon.stream.processor.core.persistence.FileSystemPersistenceStore 221 | config: 222 | location: siddhi-app-persistence 223 | 224 | # Secure Vault Configuration 225 | wso2.securevault: 226 | secretRepository: 227 | type: org.wso2.carbon.secvault.repository.DefaultSecretRepository 228 | parameters: 229 | privateKeyAlias: <%= @securevault_private_key_alias %> 230 | keystoreLocation: <%= @securevault_keystore %> 231 | secretPropertiesFile: <%= @securevault_secret_properties_file %> 232 | masterKeyReader: 233 | type: org.wso2.carbon.secvault.reader.DefaultMasterKeyReader 234 | parameters: 235 | masterKeyReaderFile: <%= @securevault_master_key_reader_file %> 236 | wso2.datasources: 237 | dataSources: 238 | - name: SP_MGT_DB 239 | description: The datasource used by cluster coordinators in distributed deployment 240 | definition: 241 | type: RDBMS 242 | configuration: 243 | jdbcUrl: '<%= @mgt_db_url %>' 244 | username: <%= @mgt_db_username %> 245 | password: <%= @mgt_db_password %> 246 | driverClassName: <%= @mgt_db_dirver %> 247 | maxPoolSize: 10 248 | idleTimeout: 60000 249 | connectionTestQuery: SELECT 1 250 | validationTimeout: 30000 251 | isAutoCommit: false 252 | 253 | - name: WSO2_PERMISSIONS_DB 254 | description: The datasource used for permission feature 255 | jndiConfig: 256 | name: jdbc/PERMISSION_DB 257 | useJndiReference: true 258 | definition: 259 | type: RDBMS 260 | configuration: 261 | 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' 262 | username: wso2carbon 263 | password: wso2carbon 264 | driverClassName: org.h2.Driver 265 | maxPoolSize: 10 266 | idleTimeout: 60000 267 | connectionTestQuery: SELECT 1 268 | validationTimeout: 30000 269 | isAutoCommit: false 270 | 271 | # Cluster Configuration 272 | cluster.config: 273 | enabled: <%= @cluster_enabled %> 274 | groupId: sp 275 | coordinationStrategyClass: org.wso2.carbon.cluster.coordinator.rdbms.RDBMSCoordinationStrategy 276 | strategyConfig: 277 | datasource: SP_MGT_DB # define a mysql datasource configured to the shared database 278 | heartbeatInterval: 1000 279 | heartbeatMaxRetry: 2 280 | eventPollingInterval: 1000 281 | 282 | # Deployment Configuration for Distributed Deployment 283 | deployment.config: 284 | type: distributed 285 | httpsInterface: 286 | host: localhost 287 | port: 9543 288 | heartbeatInterval: 2000 289 | heartbeatMaxRetry: 2 290 | datasource: SP_MGT_DB # define a mysql datasource in datasources and refer it from here. 291 | minResourceCount: 1 292 | bootstrapURLs: localhost:9092 # kafka urls 293 | zooKeeperConfig: 294 | zooKeeperURLs: localhost:2181 # zookeeper urls 295 | connectionTimeout: 10000 296 | sessionTimeout: 10000 297 | 298 | # Authentication configuration 299 | auth.configs: 300 | type: 'local' # Type of the IdP client used 301 | userManager: 302 | adminRole: admin # Admin role which is granted all permissions 303 | userStore: # User store 304 | users: 305 | - 306 | user: 307 | username: admin 308 | password: YWRtaW4= 309 | roles: 1 310 | roles: 311 | - 312 | role: 313 | id: 1 314 | displayName: admin 315 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /modules/sp_dashboard/templates/carbon-home/conf/dashboard/deployment.yaml.erb: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the \"License\"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an \"AS IS\" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | ################################################################################ 16 | 17 | # Carbon Configuration Parameters 18 | wso2.carbon: 19 | # value to uniquely identify a server 20 | id: wso2-sp 21 | # server name 22 | name: WSO2 Stream Processor 23 | # server type 24 | type: wso2-sp 25 | # ports used by this server 26 | ports: 27 | # port offset 28 | offset: 2 29 | 30 | # Configuration used for the databridge communication 31 | databridge.config: 32 | # No of worker threads to consume events 33 | # THIS IS A MANDATORY FIELD 34 | workerThreads: 10 35 | # Maximum amount of messages that can be queued internally in MB 36 | # THIS IS A MANDATORY FIELD 37 | maxEventBufferCapacity: 10000000 38 | # Queue size; the maximum number of events that can be stored in the queue 39 | # THIS IS A MANDATORY FIELD 40 | eventBufferSize: 2000 41 | # Keystore file path 42 | # THIS IS A MANDATORY FIELD 43 | keyStoreLocation : <%= @databridge_keystore_location %> 44 | # Keystore password 45 | # THIS IS A MANDATORY FIELD 46 | keyStorePassword : <%= @databridge_keystore_password %> 47 | # Session Timeout value in mins 48 | # THIS IS A MANDATORY FIELD 49 | clientTimeoutMin: 30 50 | # Data receiver configurations 51 | # THIS IS A MANDATORY FIELD 52 | dataReceivers: 53 | - 54 | # Data receiver configuration 55 | dataReceiver: 56 | # Data receiver type 57 | # THIS IS A MANDATORY FIELD 58 | type: Thrift 59 | # Data receiver properties 60 | properties: 61 | tcpPort: '7611' 62 | sslPort: '7711' 63 | 64 | - 65 | # Data receiver configuration 66 | dataReceiver: 67 | # Data receiver type 68 | # THIS IS A MANDATORY FIELD 69 | type: Binary 70 | # Data receiver properties 71 | properties: 72 | tcpPort: '9611' 73 | sslPort: '9711' 74 | tcpReceiverThreadPoolSize: '100' 75 | sslReceiverThreadPoolSize: '100' 76 | hostName: <%= @binary_data_receiver_hostname %> 77 | 78 | # Configuration of the Data Agents - to publish events through databridge 79 | data.agent.config: 80 | # Data agent configurations 81 | # THIS IS A MANDATORY FIELD 82 | agents: 83 | - 84 | # Data agent configuration 85 | agentConfiguration: 86 | # Data agent name 87 | # THIS IS A MANDATORY FIELD 88 | name: Thrift 89 | # Data endpoint class 90 | # THIS IS A MANDATORY FIELD 91 | dataEndpointClass: org.wso2.carbon.databridge.agent.endpoint.thrift.ThriftDataEndpoint 92 | # Data publisher strategy 93 | publishingStrategy: async 94 | # Trust store path 95 | trustStorePath: '<%= @thrift_agent_trust_store %>' 96 | # Trust store password 97 | trustStorePassword: '<%= @thrift_agent_trust_store_password %>' 98 | # Queue Size 99 | queueSize: 32768 100 | # Batch Size 101 | batchSize: 200 102 | # Core pool size 103 | corePoolSize: 1 104 | # Socket timeout in milliseconds 105 | socketTimeoutMS: 30000 106 | # Maximum pool size 107 | maxPoolSize: 1 108 | # Keep alive time in pool 109 | keepAliveTimeInPool: 20 110 | # Reconnection interval 111 | reconnectionInterval: 30 112 | # Max transport pool size 113 | maxTransportPoolSize: 250 114 | # Max idle connections 115 | maxIdleConnections: 250 116 | # Eviction time interval 117 | evictionTimePeriod: 5500 118 | # Min idle time in pool 119 | minIdleTimeInPool: 5000 120 | # Secure max transport pool size 121 | secureMaxTransportPoolSize: 250 122 | # Secure max idle connections 123 | secureMaxIdleConnections: 250 124 | # secure eviction time period 125 | secureEvictionTimePeriod: 5500 126 | # Secure min idle time in pool 127 | secureMinIdleTimeInPool: 5000 128 | # SSL enabled protocols 129 | sslEnabledProtocols: TLSv1.1,TLSv1.2 130 | # Ciphers 131 | 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 132 | - 133 | # Data agent configuration 134 | agentConfiguration: 135 | # Data agent name 136 | # THIS IS A MANDATORY FIELD 137 | name: Binary 138 | # Data endpoint class 139 | # THIS IS A MANDATORY FIELD 140 | dataEndpointClass: org.wso2.carbon.databridge.agent.endpoint.binary.BinaryDataEndpoint 141 | # Data publisher strategy 142 | publishingStrategy: async 143 | # Trust store path 144 | trustStorePath: '<%= @binary_agent_trust_store %>' 145 | # Trust store password 146 | trustStorePassword: '<%= @binary_agent_trust_store_password %>' 147 | # Queue Size 148 | queueSize: 32768 149 | # Batch Size 150 | batchSize: 200 151 | # Core pool size 152 | corePoolSize: 1 153 | # Socket timeout in milliseconds 154 | socketTimeoutMS: 30000 155 | # Maximum pool size 156 | maxPoolSize: 1 157 | # Keep alive time in pool 158 | keepAliveTimeInPool: 20 159 | # Reconnection interval 160 | reconnectionInterval: 30 161 | # Max transport pool size 162 | maxTransportPoolSize: 250 163 | # Max idle connections 164 | maxIdleConnections: 250 165 | # Eviction time interval 166 | evictionTimePeriod: 5500 167 | # Min idle time in pool 168 | minIdleTimeInPool: 5000 169 | # Secure max transport pool size 170 | secureMaxTransportPoolSize: 250 171 | # Secure max idle connections 172 | secureMaxIdleConnections: 250 173 | # secure eviction time period 174 | secureEvictionTimePeriod: 5500 175 | # Secure min idle time in pool 176 | secureMinIdleTimeInPool: 5000 177 | # SSL enabled protocols 178 | sslEnabledProtocols: TLSv1.1,TLSv1.2 179 | # Ciphers 180 | 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 181 | 182 | # Deployment configuration parameters 183 | wso2.artifact.deployment: 184 | # Scheduler update interval 185 | updateInterval: 5 186 | 187 | # HA Configuration 188 | state.persistence: 189 | enabled: false 190 | intervalInMin: 1 191 | revisionsToKeep: 2 192 | persistenceStore: org.wso2.carbon.stream.processor.core.persistence.FileSystemPersistenceStore 193 | config: 194 | location: siddhi-app-persistence 195 | 196 | # Secure Vault Configuration 197 | wso2.securevault: 198 | secretRepository: 199 | type: org.wso2.carbon.secvault.repository.DefaultSecretRepository 200 | parameters: 201 | privateKeyAlias: <%= @securevault_private_key_alias %> 202 | keystoreLocation: <%= @securevault_keystore %> 203 | secretPropertiesFile: <%= @securevault_secret_properties_file %> 204 | masterKeyReader: 205 | type: org.wso2.carbon.secvault.reader.DefaultMasterKeyReader 206 | parameters: 207 | masterKeyReaderFile: <%= @securevault_master_key_reader_file %> 208 | 209 | 210 | # Data Sources Configuration 211 | wso2.datasources: 212 | dataSources: 213 | # Dashboard data source 214 | - name: WSO2_DASHBOARD_DB 215 | description: The datasource used for dashboard feature 216 | jndiConfig: 217 | name: jdbc/DASHBOARD_DB 218 | useJndiReference: true 219 | definition: 220 | type: RDBMS 221 | configuration: 222 | jdbcUrl: '<%= @dashboard_db_url %>' 223 | username: <%= @dashboard_db_username %> 224 | password: <%= @dashboard_db_password %> 225 | driverClassName: <%= @dashboard_db_driver %> 226 | maxPoolSize: 20 227 | idleTimeout: 60000 228 | connectionTestQuery: SELECT 1 229 | validationTimeout: 30000 230 | isAutoCommit: false 231 | - name: BUSINESS_RULES_DB 232 | description: The datasource used for dashboard feature 233 | jndiConfig: 234 | name: jdbc/BUSINESS_RULES_DB 235 | useJndiReference: true 236 | definition: 237 | type: RDBMS 238 | configuration: 239 | jdbcUrl: '<%= @business_rules_db_url %>' 240 | username: <%= @business_rules_db_username %> 241 | password: <%= @business_rules_db_password %> 242 | driverClassName: <%= @business_rules_db_driver %> 243 | maxPoolSize: 20 244 | idleTimeout: 60000 245 | connectionTestQuery: SELECT 1 246 | validationTimeout: 30000 247 | isAutoCommit: false 248 | - name: SAMPLE_DB 249 | description: Sample datasource used for gadgets generation wizard 250 | jndiConfig: 251 | name: jdbc/SAMPLE_DB 252 | useJndiReference: true 253 | definition: 254 | type: RDBMS 255 | configuration: 256 | jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/${sys:wso2.runtime}/database/SAMPLE_DB;IFEXISTS=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000;MVCC=TRUE' 257 | username: wso2carbon 258 | password: wso2carbon 259 | driverClassName: org.h2.Driver 260 | maxPoolSize: 10 261 | idleTimeout: 60000 262 | connectionTestQuery: SELECT 1 263 | validationTimeout: 30000 264 | isAutoCommit: false 265 | 266 | # Dashboard data source 267 | - name: WSO2_STATUS_DASHBOARD_DB 268 | description: The datasource used for dashboard feature 269 | jndiConfig: 270 | name: jdbc/wso2_status_dashboard 271 | useJndiReference: true 272 | definition: 273 | type: RDBMS 274 | configuration: 275 | jdbcUrl: '<%= @status_dashboard_db_url %>' 276 | username: <%= @status_dashboard_db_username %> 277 | password: <%= @status_dashboard_db_password %> 278 | driverClassName: <%= @status_dashboard_db_driver %> 279 | maxPoolSize: 20 280 | idleTimeout: 60000 281 | connectionTestQuery: SELECT 1 282 | validationTimeout: 30000 283 | isAutoCommit: false 284 | 285 | # carbon metrics data source 286 | - name: WSO2_METRICS_DB 287 | description: The datasource used for dashboard feature 288 | jndiConfig: 289 | name: jdbc/WSO2MetricsDB 290 | definition: 291 | type: RDBMS 292 | configuration: 293 | jdbcUrl: '<%= @metrics_db_url %>' 294 | username: <%= @metrics_db_username %> 295 | password: <%= @metrics_db_password %> 296 | driverClassName: <%= @metrics_db_driver %> 297 | maxPoolSize: 20 298 | idleTimeout: 60000 299 | connectionTestQuery: SELECT 1 300 | validationTimeout: 30000 301 | isAutoCommit: false 302 | 303 | - name: WSO2_PERMISSIONS_DB 304 | description: The datasource used for dashboard feature 305 | jndiConfig: 306 | name: jdbc/PERMISSION_DB 307 | useJndiReference: true 308 | definition: 309 | type: RDBMS 310 | configuration: 311 | 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' 312 | username: wso2carbon 313 | password: wso2carbon 314 | driverClassName: org.h2.Driver 315 | maxPoolSize: 10 316 | idleTimeout: 60000 317 | connectionTestQuery: SELECT 1 318 | validationTimeout: 30000 319 | isAutoCommit: false 320 | - name: HTTP_ANALYTICS_DB 321 | description: The datasource used for HTTP Analytics dashboard 322 | jndiConfig: 323 | name: jdbc/HTTP_ANALYTICS_DB 324 | useJndiReference: false 325 | definition: 326 | type: RDBMS 327 | configuration: 328 | 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' 329 | username: wso2carbon 330 | password: wso2carbon 331 | driverClassName: org.h2.Driver 332 | maxPoolSize: 30 333 | idleTimeout: 60000 334 | connectionTestQuery: SELECT 1 335 | validationTimeout: 30000 336 | isAutoCommit: false 337 | - name: Twitter_Analytics 338 | description: The datasource used for Twitter Analytics dashboard 339 | jndiConfig: 340 | name: jdbc/Twitter_Analytics 341 | useJndiReference: false 342 | definition: 343 | type: RDBMS 344 | configuration: 345 | jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/worker/database/Twitter_Analytics;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000;MVCC=TRUE;AUTO_SERVER=TRUE' 346 | username: wso2carbon 347 | password: wso2carbon 348 | driverClassName: org.h2.Driver 349 | maxPoolSize: 30 350 | idleTimeout: 60000 351 | connectionTestQuery: SELECT 1 352 | validationTimeout: 30000 353 | isAutoCommit: false 354 | - name: Message_Tracing_DB 355 | description: "The datasource used for message tracer to store span information." 356 | jndiConfig: 357 | name: jdbc/Message_Tracing_DB 358 | definition: 359 | type: RDBMS 360 | configuration: 361 | jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/dashboard/database/MESSAGE_TRACING_DB;AUTO_SERVER=TRUE' 362 | username: wso2carbon 363 | password: wso2carbon 364 | driverClassName: org.h2.Driver 365 | maxPoolSize: 30 366 | idleTimeout: 60000 367 | connectionTestQuery: SELECT 1 368 | validationTimeout: 30000 369 | isAutoCommit: false 370 | 371 | - name: IS_ANALYTICS_DB 372 | description: "The data source used for WSO2 IS Analytics statistics" 373 | jndiConfig: 374 | name: jdbc/IS_ANALYTICS_DB 375 | definition: 376 | type: RDBMS 377 | configuration: 378 | jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/worker/database/IS_ANALYTICS_DB;AUTO_SERVER=TRUE' 379 | username: wso2carbon 380 | password: wso2carbon 381 | driverClassName: org.h2.Driver 382 | maxPoolSize: 50 383 | idleTimeout: 60000 384 | validationTimeout: 30000 385 | isAutoCommit: false 386 | 387 | 388 | - name: EI_ANALYTICS 389 | description: "The datasource used for EI Analytics dashboard feature" 390 | jndiConfig: 391 | name: jdbc/EI_ANALYTICS 392 | definition: 393 | type: RDBMS 394 | configuration: 395 | jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/worker/database/EI_ANALYTICS;AUTO_SERVER=TRUE' 396 | username: wso2carbon 397 | password: wso2carbon 398 | driverClassName: org.h2.Driver 399 | maxPoolSize: 50 400 | idleTimeout: 60000 401 | connectionTestQuery: SELECT 1 402 | validationTimeout: 30000 403 | isAutoCommit: false 404 | 405 | #Data source for APIM Analytics 406 | - name: APIM_ANALYTICS_DB 407 | description: Datasource used for APIM Analytics 408 | jndiConfig: 409 | name: jdbc/APIM_ANALYTICS_DB 410 | definition: 411 | type: RDBMS 412 | configuration: 413 | jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/worker/database/WSO2AM_STATS_DB;AUTO_SERVER=TRUE' 414 | username: wso2carbon 415 | password: wso2carbon 416 | driverClassName: org.h2.Driver 417 | maxPoolSize: 50 418 | idleTimeout: 60000 419 | connectionTestQuery: SELECT 1 420 | validationTimeout: 30000 421 | isAutoCommit: false 422 | 423 | 424 | wso2.business.rules.manager: 425 | datasource: BUSINESS_RULES_DB 426 | # rule template wise configuration for deploying business rules 427 | deployment_configs: 428 | - 429 | # : of the Worker node 430 | localhost:9443: 431 | # UUIDs of rule templates that are needed to be deployed on the node 432 | - stock-data-analysis 433 | - stock-exchange-input 434 | - stock-exchange-output 435 | - identifying-continuous-production-decrease 436 | - popular-tweets-analysis 437 | - http-analytics-processing 438 | - message-tracing-source-template 439 | - message-tracing-app-template 440 | # credentials for worker nodes 441 | username: <%= @business_rules_manager_username %> 442 | password: <%= @businnes_rules_manager_password %> 443 | 444 | wso2.status.dashboard: 445 | pollingInterval: 5 446 | metricsDatasourceName: 'WSO2_METRICS_DB' 447 | dashboardDatasourceName: 'WSO2_STATUS_DASHBOARD_DB' 448 | workerAccessCredentials: 449 | username: '<%= @worker_access_username %>' 450 | password: '<%= @worker_access_password %>' 451 | 452 | wso2.dashboard.datasearch: 453 | workerList: 454 | - localhost:9443 455 | workerAccessCredentials: 456 | username: admin 457 | password: admin 458 | 459 | wso2.transport.http: 460 | transportProperties: 461 | - name: "server.bootstrap.socket.timeout" 462 | value: 60 463 | - name: "client.bootstrap.socket.timeout" 464 | value: 60 465 | - name: "latency.metrics.enabled" 466 | value: true 467 | 468 | listenerConfigurations: 469 | - id: "default-https" 470 | host: "<%= @listener_host %>" 471 | port: 9643 472 | scheme: https 473 | keyStoreFile: "<%= @listener_keystore_file %>" 474 | keyStorePassword: <%= @listener_keystore_password %> 475 | certPass: <%= @listener_cert_pass %> 476 | 477 | # Authentication configuration 478 | auth.configs: 479 | type: 'local' # Type of the IdP client used 480 | userManager: 481 | adminRole: admin # Admin role which is granted all permissions 482 | userStore: # User store 483 | users: 484 | - 485 | user: 486 | username: admin 487 | password: YWRtaW4= 488 | roles: 1 489 | roles: 490 | - 491 | role: 492 | id: 1 493 | displayName: admin 494 | 495 | # Configuration for enabling analytics solutions when server type in Carbon Configuration is set as 'wso2-sp'. 496 | #analytics.solutions: 497 | # IS-analytics.enabled: true 498 | # APIM-analytics.enabled: true 499 | # APIM-alerts.enabled: true 500 | # EI-analytics.enabled: true 501 | -------------------------------------------------------------------------------- /modules/sp_worker/templates/carbon-home/conf/worker/deployment.yaml.erb: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the \"License\"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an \"AS IS\" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | ################################################################################ 16 | 17 | # Carbon Configuration Parameters 18 | wso2.carbon: 19 | # value to uniquely identify a server 20 | id: wso2-sp 21 | # server name 22 | name: WSO2 Stream Processor 23 | # server type 24 | type: wso2-sp 25 | # ports used by this server 26 | ports: 27 | # port offset 28 | offset: 0 29 | 30 | wso2.transport.http: 31 | transportProperties: 32 | - 33 | name: "server.bootstrap.socket.timeout" 34 | value: 60 35 | - 36 | name: "client.bootstrap.socket.timeout" 37 | value: 60 38 | - 39 | name: "latency.metrics.enabled" 40 | value: true 41 | 42 | listenerConfigurations: 43 | - 44 | id: "default" 45 | host: "<%= @default_host %>" 46 | port: 9090 47 | - 48 | id: "msf4j-https" 49 | host: "<%= @msf4j_host %>" 50 | port: 9443 51 | scheme: https 52 | keyStoreFile: "<%= @msf4j_keystore_file %>" 53 | keyStorePassword: <%= @msf4j_keystore_password %> 54 | certPass: <%= @msf4j_cert_pass %> 55 | 56 | senderConfigurations: 57 | - 58 | id: "http-sender" 59 | 60 | siddhi.stores.query.api: 61 | transportProperties: 62 | - 63 | name: "server.bootstrap.socket.timeout" 64 | value: 60 65 | - 66 | name: "client.bootstrap.socket.timeout" 67 | value: 60 68 | - 69 | name: "latency.metrics.enabled" 70 | value: true 71 | 72 | listenerConfigurations: 73 | - 74 | id: "default" 75 | host: "<%= @siddhi_default_host %>" 76 | port: 7070 77 | - 78 | id: "msf4j-https" 79 | host: "<%= @siddhi_msf4j_host %>" 80 | port: 7443 81 | scheme: https 82 | keyStoreFile: "<%= @siddhi_msf4j_keystore %>" 83 | keyStorePassword: <%= @siddhi_msf4j_keystore_password %> 84 | certPass: <%= @siddhi_msf4j_cert_pass %> 85 | 86 | # Configuration used for the databridge communication 87 | databridge.config: 88 | # No of worker threads to consume events 89 | # THIS IS A MANDATORY FIELD 90 | workerThreads: 10 91 | # Maximum amount of messages that can be queued internally in MB 92 | # THIS IS A MANDATORY FIELD 93 | maxEventBufferCapacity: 10000000 94 | # Queue size; the maximum number of events that can be stored in the queue 95 | # THIS IS A MANDATORY FIELD 96 | eventBufferSize: 2000 97 | # Keystore file path 98 | # THIS IS A MANDATORY FIELD 99 | keyStoreLocation : <%= @databridge_keystore_location %> 100 | # Keystore password 101 | # THIS IS A MANDATORY FIELD 102 | keyStorePassword : <%= @databridge_keystore_password %> 103 | # Session Timeout value in mins 104 | # THIS IS A MANDATORY FIELD 105 | clientTimeoutMin: 30 106 | # Data receiver configurations 107 | # THIS IS A MANDATORY FIELD 108 | dataReceivers: 109 | - 110 | # Data receiver configuration 111 | dataReceiver: 112 | # Data receiver type 113 | # THIS IS A MANDATORY FIELD 114 | type: Thrift 115 | # Data receiver properties 116 | properties: 117 | tcpPort: '7611' 118 | sslPort: '7711' 119 | 120 | - 121 | # Data receiver configuration 122 | dataReceiver: 123 | # Data receiver type 124 | # THIS IS A MANDATORY FIELD 125 | type: Binary 126 | # Data receiver properties 127 | properties: 128 | tcpPort: '9611' 129 | sslPort: '9711' 130 | tcpReceiverThreadPoolSize: '100' 131 | sslReceiverThreadPoolSize: '100' 132 | hostName: <%= @binary_data_receiver_hostname %> 133 | 134 | # Configuration of the Data Agents - to publish events through databridge 135 | data.agent.config: 136 | # Data agent configurations 137 | # THIS IS A MANDATORY FIELD 138 | agents: 139 | - 140 | # Data agent configuration 141 | agentConfiguration: 142 | # Data agent name 143 | # THIS IS A MANDATORY FIELD 144 | name: Thrift 145 | # Data endpoint class 146 | # THIS IS A MANDATORY FIELD 147 | dataEndpointClass: org.wso2.carbon.databridge.agent.endpoint.thrift.ThriftDataEndpoint 148 | # Data publisher strategy 149 | publishingStrategy: async 150 | # Trust store path 151 | trustStorePath: '<%= @thrift_agent_trust_store %>' 152 | # Trust store password 153 | trustStorePassword: '<%= @thrift_agent_trust_store_password %>' 154 | # Queue Size 155 | queueSize: 32768 156 | # Batch Size 157 | batchSize: 200 158 | # Core pool size 159 | corePoolSize: 1 160 | # Socket timeout in milliseconds 161 | socketTimeoutMS: 30000 162 | # Maximum pool size 163 | maxPoolSize: 1 164 | # Keep alive time in pool 165 | keepAliveTimeInPool: 20 166 | # Reconnection interval 167 | reconnectionInterval: 30 168 | # Max transport pool size 169 | maxTransportPoolSize: 250 170 | # Max idle connections 171 | maxIdleConnections: 250 172 | # Eviction time interval 173 | evictionTimePeriod: 5500 174 | # Min idle time in pool 175 | minIdleTimeInPool: 5000 176 | # Secure max transport pool size 177 | secureMaxTransportPoolSize: 250 178 | # Secure max idle connections 179 | secureMaxIdleConnections: 250 180 | # secure eviction time period 181 | secureEvictionTimePeriod: 5500 182 | # Secure min idle time in pool 183 | secureMinIdleTimeInPool: 5000 184 | # SSL enabled protocols 185 | sslEnabledProtocols: TLSv1.1,TLSv1.2 186 | # Ciphers 187 | 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 188 | - 189 | # Data agent configuration 190 | agentConfiguration: 191 | # Data agent name 192 | # THIS IS A MANDATORY FIELD 193 | name: Binary 194 | # Data endpoint class 195 | # THIS IS A MANDATORY FIELD 196 | dataEndpointClass: org.wso2.carbon.databridge.agent.endpoint.binary.BinaryDataEndpoint 197 | # Data publisher strategy 198 | publishingStrategy: async 199 | # Trust store path 200 | trustStorePath: '<%= @binary_agent_trust_store %>' 201 | # Trust store password 202 | trustStorePassword: '<%= @binary_agent_trust_store_password %>' 203 | # Queue Size 204 | queueSize: 32768 205 | # Batch Size 206 | batchSize: 200 207 | # Core pool size 208 | corePoolSize: 1 209 | # Socket timeout in milliseconds 210 | socketTimeoutMS: 30000 211 | # Maximum pool size 212 | maxPoolSize: 1 213 | # Keep alive time in pool 214 | keepAliveTimeInPool: 20 215 | # Reconnection interval 216 | reconnectionInterval: 30 217 | # Max transport pool size 218 | maxTransportPoolSize: 250 219 | # Max idle connections 220 | maxIdleConnections: 250 221 | # Eviction time interval 222 | evictionTimePeriod: 5500 223 | # Min idle time in pool 224 | minIdleTimeInPool: 5000 225 | # Secure max transport pool size 226 | secureMaxTransportPoolSize: 250 227 | # Secure max idle connections 228 | secureMaxIdleConnections: 250 229 | # secure eviction time period 230 | secureEvictionTimePeriod: 5500 231 | # Secure min idle time in pool 232 | secureMinIdleTimeInPool: 5000 233 | # SSL enabled protocols 234 | sslEnabledProtocols: TLSv1.1,TLSv1.2 235 | # Ciphers 236 | 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 237 | 238 | # This is the main configuration for metrics 239 | wso2.metrics: 240 | # Enable Metrics 241 | enabled: false 242 | reporting: 243 | console: 244 | - # The name for the Console Reporter 245 | name: Console 246 | 247 | # Enable Console Reporter 248 | enabled: false 249 | 250 | # Polling Period in seconds. 251 | # This is the period for polling metrics from the metric registry and printing in the console 252 | pollingPeriod: 5 253 | 254 | wso2.metrics.jdbc: 255 | # Data Source Configurations for JDBC Reporters 256 | dataSource: 257 | # Default Data Source Configuration 258 | - &JDBC01 259 | # JNDI name of the data source to be used by the JDBC Reporter. 260 | # This data source should be defined in a *-datasources.xml file in conf/datasources directory. 261 | dataSourceName: java:comp/env/jdbc/WSO2MetricsDB 262 | # Schedule regular deletion of metrics data older than a set number of days. 263 | # It is recommended that you enable this job to ensure your metrics tables do not get extremely large. 264 | # Deleting data older than seven days should be sufficient. 265 | scheduledCleanup: 266 | # Enable scheduled cleanup to delete Metrics data in the database. 267 | enabled: true 268 | 269 | # The scheduled job will cleanup all data older than the specified days 270 | daysToKeep: 3 271 | 272 | # This is the period for each cleanup operation in seconds. 273 | scheduledCleanupPeriod: 86400 274 | 275 | # The JDBC Reporter is in the Metrics JDBC Core feature 276 | reporting: 277 | # The JDBC Reporter configurations will be ignored if the Metrics JDBC Core feature is not available in runtime 278 | jdbc: 279 | - # The name for the JDBC Reporter 280 | name: JDBC 281 | 282 | # Enable JDBC Reporter 283 | enabled: true 284 | 285 | # Source of Metrics, which will be used to identify each metric in database --> 286 | # Commented to use the hostname by default 287 | # source: Carbon 288 | 289 | # Alias referring to the Data Source configuration 290 | dataSource: *JDBC01 291 | 292 | # Polling Period in seconds. 293 | # This is the period for polling metrics from the metric registry and updating the database with the values 294 | pollingPeriod: 60 295 | 296 | # Deployment configuration parameters 297 | wso2.artifact.deployment: 298 | # Scheduler update interval 299 | updateInterval: 5 300 | 301 | # Periodic Persistence Configuration 302 | state.persistence: 303 | enabled: false 304 | intervalInMin: 1 305 | revisionsToKeep: 2 306 | persistenceStore: org.wso2.carbon.stream.processor.core.persistence.FileSystemPersistenceStore 307 | config: 308 | location: siddhi-app-persistence 309 | 310 | # Secure Vault Configuration 311 | wso2.securevault: 312 | secretRepository: 313 | type: org.wso2.carbon.secvault.repository.DefaultSecretRepository 314 | parameters: 315 | privateKeyAlias: <%= @securevault_private_key_alias %> 316 | keystoreLocation: <%= @securevault_keystore %> 317 | secretPropertiesFile: <%= @securevault_secret_properties_file %> 318 | masterKeyReader: 319 | type: org.wso2.carbon.secvault.reader.DefaultMasterKeyReader 320 | parameters: 321 | masterKeyReaderFile: <%= @securevault_master_key_reader_file %> 322 | 323 | # Datasource Configurations 324 | wso2.datasources: 325 | dataSources: 326 | - 327 | name: WSO2_CLUSTER_DB 328 | description: "The datasource used by cluster coordinators in HA deployment" 329 | definition: 330 | type: RDBMS 331 | configuration: 332 | connectionTestQuery: "SELECT 1" 333 | driverClassName: <%= @carbon_db_dirver %> 334 | idleTimeout: 60000 335 | isAutoCommit: false 336 | jdbcUrl: "<%= @carbon_db_url %>" 337 | maxPoolSize: 10 338 | password: <%= @carbon_db_password %> 339 | username: <%= @carbon_db_username %> 340 | validationTimeout: 30000 341 | 342 | # carbon metrics data source 343 | - name: WSO2_METRICS_DB 344 | description: The datasource used for dashboard feature 345 | jndiConfig: 346 | name: jdbc/WSO2MetricsDB 347 | definition: 348 | type: RDBMS 349 | configuration: 350 | jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/dashboard/database/metrics;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000;' 351 | username: wso2carbon 352 | password: wso2carbon 353 | driverClassName: org.h2.Driver 354 | maxPoolSize: 30 355 | idleTimeout: 60000 356 | connectionTestQuery: SELECT 1 357 | validationTimeout: 30000 358 | isAutoCommit: false 359 | 360 | - name: WSO2_PERMISSIONS_DB 361 | description: The datasource used for permission feature 362 | jndiConfig: 363 | name: jdbc/PERMISSION_DB 364 | useJndiReference: true 365 | definition: 366 | type: RDBMS 367 | configuration: 368 | 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' 369 | username: wso2carbon 370 | password: wso2carbon 371 | driverClassName: org.h2.Driver 372 | maxPoolSize: 10 373 | idleTimeout: 60000 374 | connectionTestQuery: SELECT 1 375 | validationTimeout: 30000 376 | isAutoCommit: false 377 | 378 | - name: HTTP_ANALYTICS_DB 379 | description: The datasource used for HTTP Analytics dashboard 380 | jndiConfig: 381 | name: jdbc/HTTP_ANALYTICS_DB 382 | useJndiReference: false 383 | definition: 384 | type: RDBMS 385 | configuration: 386 | 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' 387 | username: wso2carbon 388 | password: wso2carbon 389 | driverClassName: org.h2.Driver 390 | maxPoolSize: 30 391 | idleTimeout: 60000 392 | connectionTestQuery: SELECT 1 393 | validationTimeout: 30000 394 | isAutoCommit: false 395 | - name: Twitter_Analytics 396 | description: The datasource used for Twitter Analytics dashboard 397 | jndiConfig: 398 | name: jdbc/Twitter_Analytics 399 | useJndiReference: false 400 | definition: 401 | type: RDBMS 402 | configuration: 403 | jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/worker/database/Twitter_Analytics;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000;MVCC=TRUE;AUTO_SERVER=TRUE' 404 | username: wso2carbon 405 | password: wso2carbon 406 | driverClassName: org.h2.Driver 407 | maxPoolSize: 30 408 | idleTimeout: 60000 409 | connectionTestQuery: SELECT 1 410 | validationTimeout: 30000 411 | isAutoCommit: false 412 | 413 | - name: Message_Tracing_DB 414 | description: "The datasource used for message tracer to store span information." 415 | jndiConfig: 416 | name: jdbc/Message_Tracing_DB 417 | definition: 418 | type: RDBMS 419 | configuration: 420 | jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/dashboard/database/MESSAGE_TRACING_DB;AUTO_SERVER=TRUE' 421 | username: wso2carbon 422 | password: wso2carbon 423 | driverClassName: org.h2.Driver 424 | maxPoolSize: 30 425 | idleTimeout: 60000 426 | connectionTestQuery: SELECT 1 427 | validationTimeout: 30000 428 | isAutoCommit: false 429 | 430 | - name: EI_ANALYTICS 431 | description: "The datasource used for EI Analytics dashboard feature" 432 | jndiConfig: 433 | name: jdbc/EI_ANALYTICS 434 | definition: 435 | type: RDBMS 436 | configuration: 437 | jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/worker/database/EI_ANALYTICS;AUTO_SERVER=TRUE' 438 | username: wso2carbon 439 | password: wso2carbon 440 | driverClassName: org.h2.Driver 441 | maxPoolSize: 50 442 | idleTimeout: 60000 443 | validationTimeout: 30000 444 | isAutoCommit: false 445 | 446 | 447 | - name: IS_ANALYTICS_DB 448 | description: "The data source used for WSO2 IS Analytics statistics" 449 | jndiConfig: 450 | name: jdbc/IS_ANALYTICS_DB 451 | definition: 452 | type: RDBMS 453 | configuration: 454 | jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/worker/database/IS_ANALYTICS_DB;AUTO_SERVER=TRUE' 455 | username: wso2carbon 456 | password: wso2carbon 457 | driverClassName: org.h2.Driver 458 | maxPoolSize: 50 459 | idleTimeout: 60000 460 | validationTimeout: 30000 461 | isAutoCommit: false 462 | 463 | - name: GEO_LOCATION_DATA 464 | description: "The data source used for geo location database" 465 | jndiConfig: 466 | name: jdbc/GEO_LOCATION_DATA 467 | definition: 468 | type: RDBMS 469 | configuration: 470 | jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/worker/database/GEO_LOCATION_DATA;AUTO_SERVER=TRUE' 471 | username: wso2carbon 472 | password: wso2carbon 473 | driverClassName: org.h2.Driver 474 | maxPoolSize: 50 475 | idleTimeout: 60000 476 | validationTimeout: 30000 477 | isAutoCommit: false 478 | 479 | - name: APIM_ANALYTICS_DB 480 | description: "The datasource used for APIM statistics aggregated data." 481 | jndiConfig: 482 | name: jdbc/APIM_ANALYTICS_DB 483 | definition: 484 | type: RDBMS 485 | configuration: 486 | jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/worker/database/WSO2AM_STATS_DB;AUTO_SERVER=TRUE' 487 | username: wso2carbon 488 | password: wso2carbon 489 | driverClassName: org.h2.Driver 490 | maxPoolSize: 50 491 | idleTimeout: 60000 492 | connectionTestQuery: SELECT 1 493 | validationTimeout: 30000 494 | isAutoCommit: false 495 | 496 | - name: WSO2AM_MGW_ANALYTICS_DB 497 | description: "The datasource used for APIM MGW analytics data." 498 | jndiConfig: 499 | name: jdbc/WSO2AM_MGW_ANALYTICS_DB 500 | definition: 501 | type: RDBMS 502 | configuration: 503 | jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/worker/database/WSO2AM_MGW_ANALYTICS_DB;AUTO_SERVER=TRUE' 504 | username: wso2carbon 505 | password: wso2carbon 506 | driverClassName: org.h2.Driver 507 | maxPoolSize: 50 508 | idleTimeout: 60000 509 | connectionTestQuery: SELECT 1 510 | validationTimeout: 30000 511 | isAutoCommit: false 512 | 513 | siddhi: 514 | extensions: 515 | - 516 | extension: 517 | name: 'findCountryFromIP' 518 | namespace: 'geo' 519 | properties: 520 | geoLocationResolverClass: org.wso2.extension.siddhi.execution.geo.internal.impl.DefaultDBBasedGeoLocationResolver 521 | isCacheEnabled: true 522 | cacheSize: 10000 523 | isPersistInDatabase: true 524 | datasource: GEO_LOCATION_DATA 525 | - 526 | extension: 527 | name: 'findCityFromIP' 528 | namespace: 'geo' 529 | properties: 530 | geoLocationResolverClass: org.wso2.extension.siddhi.execution.geo.internal.impl.DefaultDBBasedGeoLocationResolver 531 | isCacheEnabled: true 532 | cacheSize: 10000 533 | isPersistInDatabase: true 534 | datasource: GEO_LOCATION_DATA 535 | 536 | # Cluster Configuration 537 | cluster.config: 538 | enabled: <%= @cluster_enabled %> 539 | groupId: sp 540 | coordinationStrategyClass: org.wso2.carbon.cluster.coordinator.rdbms.RDBMSCoordinationStrategy 541 | strategyConfig: 542 | datasource: WSO2_CLUSTER_DB 543 | heartbeatInterval: 3000 544 | heartbeatMaxRetry: 3 545 | eventPollingInterval: 3000 546 | 547 | # Authentication configuration 548 | auth.configs: 549 | type: 'local' # Type of the IdP client used 550 | userManager: 551 | adminRole: admin # Admin role which is granted all permissions 552 | userStore: # User store 553 | users: 554 | - 555 | user: 556 | username: admin 557 | password: YWRtaW4= 558 | roles: 1 559 | roles: 560 | - 561 | role: 562 | id: 1 563 | displayName: admin 564 | 565 | # Sample of deployment.config for Two node HA 566 | #deployment.config: 567 | # type: ha 568 | # passiveNodeDetailsWaitTimeOutMillis: 300000 569 | # passiveNodeDetailsRetrySleepTimeMillis: 500 570 | # eventSyncServer: 571 | # host: localhost 572 | # port: 9893 573 | # advertisedHost: localhost 574 | # advertisedPort: 9893 575 | # bossThreads: 10 576 | # workerThreads: 10 577 | # eventSyncClientPool: 578 | # maxActive: 10 579 | # maxTotal: 10 580 | # maxIdle: 10 581 | # maxWait: 60000 582 | # minEvictableIdleTimeMillis: 120000 583 | 584 | # Sample of deployment.config for Distributed deployment 585 | #deployment.config: 586 | # type: distributed 587 | # isReceiverNode: false 588 | # httpsInterface: 589 | # host: 192.168.1.3 590 | # port: 9443 591 | # username: admin 592 | # password: admin 593 | # leaderRetryInterval: 10000 594 | # resourceManagers: 595 | # - host: 192.168.1.1 596 | # port: 9543 597 | # username: admin 598 | # password: admin 599 | # - host: 192.168.1.2 600 | # port: 9543 601 | # username: admin 602 | # password: admin 603 | 604 | # Configuration for enabling analytics solutions when server type in Carbon Configuration is set as 'wso2-sp'. 605 | #analytics.solutions: 606 | # IS-analytics.enabled: true 607 | # APIM-analytics.enabled: true 608 | # APIM-alerts.enabled: true 609 | # EI-analytics.enabled: true 610 | --------------------------------------------------------------------------------