├── files ├── system │ └── .gitkeep ├── patches │ └── 4.4.0 │ │ └── .gitkeep └── configs │ └── repository │ └── components │ ├── lib │ └── .gitkeep │ └── dropins │ └── .gitkeep ├── templates ├── password-tmp.erb ├── repository │ └── conf │ │ ├── security │ │ ├── cipher-text.properties.erb │ │ ├── cipher-tool.properties.erb │ │ └── authenticators.xml.erb │ │ ├── datasources │ │ └── master-datasources.xml.erb │ │ ├── tomcat │ │ └── catalina-server.xml.erb │ │ ├── registry.xml.erb │ │ ├── user-mgt.xml.erb │ │ ├── carbon.xml.erb │ │ └── axis2 │ │ └── axis2.xml.erb └── bin │ ├── ciphertool.sh.erb │ └── wso2server.sh.erb ├── .pmtignore ├── .gitignore ├── metadata.json ├── issue_template.md ├── vagrant-samples ├── wso2esb-default.config.yaml └── wso2esb-distributed.config.yaml ├── hieradata └── dev │ └── wso2 │ └── wso2esb │ ├── pattern-2 │ ├── worker.yaml │ ├── manager.yaml │ └── common.yaml │ └── pattern-1 │ └── default.yaml ├── package.xml ├── pull_request_template.md ├── README.md ├── manifests ├── init.pp └── params.pp ├── pom.xml └── LICENSE /files/system/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /files/patches/4.4.0/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /files/configs/repository/components/lib/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /files/configs/repository/components/dropins/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/password-tmp.erb: -------------------------------------------------------------------------------- 1 | <%= @key_store_password %> -------------------------------------------------------------------------------- /.pmtignore: -------------------------------------------------------------------------------- 1 | pkg/ 2 | hieradata/ 3 | .vagrant 4 | *.iml 5 | pom.xml 6 | package.xml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Eclipse Project Files 2 | .project 3 | .classpath 4 | .settings/ 5 | .metadata 6 | 7 | # IntelliJ IDEA Project Files 8 | .idea/ 9 | *.iml 10 | *.ipr 11 | *.iws 12 | *.swp 13 | 14 | #Backup files 15 | *~ 16 | 17 | # puppet-modules 18 | *.zip 19 | *.gz 20 | *.tar 21 | *.jar 22 | 23 | target/ 24 | 25 | # puppet packages 26 | pkg/ -------------------------------------------------------------------------------- /metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wso2-wso2esb", 3 | "version": "5.0.0", 4 | "author": "WSO2", 5 | "license": "Apache-2.0", 6 | "summary": "WSO2 Enterprise Service Bus Puppet module", 7 | "source": "https://github.com/wso2/puppet-esb.git", 8 | "project_page": "http://wso2.com/products/enterprise-service-bus/", 9 | "operatingsystem_support": [ 10 | { 11 | "operatingsystem": "Ubuntu", 12 | "operatingsystemrelease": [ "12.04", "14.04" ] 13 | } 14 | ], 15 | "tags" : ["wso2esb", "5.0.0"], 16 | "dependencies": [ 17 | { "name": "wso2/wso2base", "version_requirement": "1.0.0" } 18 | ] 19 | } 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 | -------------------------------------------------------------------------------- /vagrant-samples/wso2esb-default.config.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | --- 16 | servers: 17 | - 18 | enabled: true 19 | hostname: esb.dev.wso2.org 20 | facters: 21 | product_name: wso2esb 22 | product_version: 5.0.0 23 | product_profile: default 24 | environment: dev 25 | platform: default 26 | use_hieradata: true 27 | pattern: pattern-1 28 | box: ubuntu/trusty64 29 | ip: 192.168.100.92 30 | ram: 2048 31 | cpu: 1 32 | -------------------------------------------------------------------------------- /templates/repository/conf/security/cipher-text.properties.erb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016 WSO2, Inc. (http://wso2.com) 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 | # Important: This properties file contains all the aliases to be used in carbon components. If any property need to 18 | #be secured, you need to add alias name, file name and the xpath as follows:. 19 | # The value goes as, the //, 20 | # where - is the file (along with the file path) to be secured, 21 | # - is the xpath to the property value to be secured 22 | # - This is true if the last parameter in the xpath is parameter (starts with [ and ends with ]) 23 | # and you want its value to be replaced with "password" 24 | 25 | <%- @secure_vault_configs.each do |secure_vault_config_name, secure_vault_config| -%> 26 | <%= secure_vault_config['secret_alias'] %>=[<%= secure_vault_config['password'] %>] 27 | <%- end -%> 28 | -------------------------------------------------------------------------------- /vagrant-samples/wso2esb-distributed.config.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | --- 16 | servers: 17 | - 18 | enabled: true 19 | hostname: mgt.esb.dev.wso2.org 20 | facters: 21 | product_name: wso2esb 22 | product_version: 5.0.0 23 | product_profile: manager 24 | environment: dev 25 | platform: default 26 | use_hieradata: true 27 | pattern: pattern-2 28 | box: ubuntu/trusty64 29 | ip: 192.168.100.91 30 | ram: 2048 31 | cpu: 1 32 | 33 | - 34 | enabled: true 35 | hostname: esb.dev.wso2.org 36 | facters: 37 | product_name: wso2esb 38 | product_version: 5.0.0 39 | product_profile: worker 40 | environment: dev 41 | platform: default 42 | use_hieradata: true 43 | pattern: pattern-2 44 | box: ubuntu/trusty64 45 | ip: 192.168.100.92 46 | ram: 2048 47 | cpu: 1 48 | -------------------------------------------------------------------------------- /templates/repository/conf/security/cipher-tool.properties.erb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016 WSO2, Inc. (http://wso2.com) 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 | # Important: This properties file contains all the aliases to be used in carbon components. If any property need to 18 | #be secured, you need to add alias name, file name and the xpath as follows:. 19 | # The value goes as, the //, 20 | # where - is the file (along with the file path) to be secured, 21 | # - is the xpath to the property value to be secured 22 | # - This is true if the last parameter in the xpath is parameter (starts with [ and ends with ]) 23 | # and you want its value to be replaced with "password" 24 | 25 | <%- @secure_vault_configs.each do |secure_vault_config_name, secure_vault_config| -%> 26 | <%= secure_vault_config['secret_alias'] %>=<%= secure_vault_config['secret_alias_value'] %> 27 | <%- end -%> 28 | -------------------------------------------------------------------------------- /hieradata/dev/wso2/wso2esb/pattern-2/worker.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | wso2::clustering: 16 | enabled: true 17 | local_member_host: "%{::ipaddress}" 18 | local_member_port: 4000 19 | domain: esb.wso2.domain 20 | sub_domain: worker 21 | # WKA membership scheme 22 | membership_scheme: wka 23 | wka: 24 | members: 25 | - 26 | hostname: 192.168.100.91 27 | port: 4000 28 | - 29 | hostname: 192.168.100.92 30 | port: 4000 31 | # AWS membership scheme 32 | # membership_scheme: aws 33 | # aws: 34 | # access_key: access-key 35 | # secret_key: secret-key 36 | # security_group: security-group 37 | # host_header: host-header 38 | # region: region 39 | # tag_key: tag-key 40 | # tag_value: tag-value 41 | 42 | wso2::registry_mounts: 43 | wso2_config_db: 44 | path: /_system/config/esb 45 | target_path: /_system/config/esb 46 | read_only: true 47 | registry_root: / 48 | enable_cache: true 49 | 50 | wso2_gov_db: 51 | path: /_system/governance 52 | target_path: /_system/governance 53 | read_only: true 54 | registry_root: / 55 | enable_cache: true 56 | 57 | wso2::dep_sync: 58 | enabled: false 59 | auto_checkout: true 60 | auto_commit: false 61 | repository_type: svn 62 | svn: 63 | url: http://svnrepo.example.com/repos/ 64 | user: username 65 | password: password 66 | append_tenant_id: true 67 | -------------------------------------------------------------------------------- /package.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 21 | 22 | package 23 | 24 | zip 25 | 26 | false 27 | 28 | 29 | 30 | ${project.basedir}/hieradata 31 | ${project.artifactId}-${puppet.hieradata}-${project.version}/hieradata 32 | 33 | **/* 34 | 35 | 36 | 37 | 38 | 39 | 40 | LICENSE 41 | ${project.artifactId}-${puppet.hieradata}-${project.version}/ 42 | true 43 | 644 44 | 45 | 46 | README.md 47 | ${project.artifactId}-${puppet.hieradata}-${project.version}/ 48 | true 49 | 644 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /templates/repository/conf/datasources/master-datasources.xml.erb: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | 21 | 22 | org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader 23 | 24 | 25 | 26 | <%- @master_datasources.each do |datasource_name, datasource| -%> 27 | 28 | <%= datasource['name'] %> 29 | <%= datasource['description'] %> 30 | 31 | <%= datasource['jndi_config'] %> 32 | 33 | 34 | 35 | <%= datasource['url'] %> 36 | <%= datasource['username'] %> 37 | <%= datasource['password'] %> 38 | <%= datasource['driver_class_name'] %> 39 | <%= datasource['max_active'] %> 40 | <%= datasource['max_wait'] %> 41 | <%= datasource['test_on_borrow'] %> 42 | <%= datasource['validation_query'] %> 43 | <%= datasource['validation_interval'] %> 44 | 45 | 46 | 47 | <%- end -%> 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /hieradata/dev/wso2/wso2esb/pattern-2/manager.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | --- 16 | wso2::mgt_hostname: mgt.esb.dev.wso2.org 17 | 18 | # Defines WSDL EPR Prefix 19 | wso2::esb_wsdl_epr_prefix: 20 | http: 21 | bind_address: esb.dev.wso2.org 22 | prefix: http://esb.dev.wso2.org:8280 23 | https: 24 | bind_address: esb.dev.wso2.org 25 | prefix: https://esb.dev.wso2.org:8243 26 | 27 | wso2::clustering: 28 | enabled: true 29 | local_member_host: "%{::ipaddress}" 30 | domain: esb.wso2.domain 31 | sub_domain: mgt 32 | local_member_port: 4000 33 | # WKA membership scheme 34 | membership_scheme: wka 35 | wka: 36 | members: 37 | - 38 | hostname: 192.168.100.91 39 | port: 4000 40 | - 41 | hostname: 192.168.100.92 42 | port: 4000 43 | # AWS membership scheme 44 | # membership_scheme: aws 45 | # aws: 46 | # access_key: access-key 47 | # secret_key: secret-key 48 | # security_group: security-group 49 | # host_header: host-header 50 | # region: region 51 | # tag_key: tag-key 52 | # tag_value: tag-value 53 | 54 | wso2::registry_mounts: 55 | wso2_config_db: 56 | path: /_system/config/esb 57 | target_path: /_system/config/esb 58 | read_only: false 59 | registry_root: / 60 | enable_cache: true 61 | 62 | wso2_gov_db: 63 | path: /_system/governance 64 | target_path: /_system/governance 65 | read_only: false 66 | registry_root: / 67 | enable_cache: true 68 | 69 | wso2::dep_sync: 70 | enabled: false 71 | auto_checkout: true 72 | auto_commit: true 73 | repository_type: svn 74 | svn: 75 | url: http://svnrepo.example.com/repos/ 76 | user: username 77 | password: password 78 | append_tenant_id: true 79 | 80 | # SSO Configuration 81 | wso2::sso_authentication: 82 | enabled: false 83 | login_page: /carbon/admin/login.jsp 84 | service_provider_id: wso2esb 85 | sso_service_url: https://is.dev.wso2.org:9443/samlsso 86 | consumer_service_url: https://esb.dev.wso2.org:9443/acs 87 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /templates/repository/conf/security/authenticators.xml.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 21 | 25 | 26 | 27 | 28 | 29 | 5 30 | 31 | 32 | 33 | 34 | 10 35 | 36 | <%= @sso_authentication['login_page'] %> 37 | <%= @sso_authentication['service_provider_id'] %> 38 | <%= @sso_authentication['sso_service_url'] %> 39 | urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified 40 | <%= @sso_authentication['consumer_service_url'] %> 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 58 | 59 | 63 | 64 | 65 | 66 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /templates/bin/ciphertool.sh.erb: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ------------------------------------------------------------------------------ 3 | # 4 | # Copyright (c) 2016, 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 | # ciphertool script for generating stub, skeleton and other required classes 22 | # 23 | # Environment Variable Prequisites 24 | # 25 | # CARBON_HOME Home of CARBON installation. If not set I will try 26 | # to figure it out. 27 | # 28 | # JAVA_HOME Must point at your Java Development Kit installation. 29 | # 30 | # NOTE: Borrowed generously from Apache Tomcat startup scripts. 31 | 32 | # if JAVA_HOME is not set we're not happy 33 | 34 | JAVA_HOME=<%= @java_home %> 35 | 36 | if [ -z "$JAVA_HOME" ]; then 37 | echo "You must set the JAVA_HOME variable before running CARBON." 38 | exit 1 39 | fi 40 | 41 | # OS specific support. $var _must_ be set to either true or false. 42 | cygwin=false; 43 | darwin=false; 44 | os400=false; 45 | mingw=false; 46 | case "`uname`" in 47 | CYGWIN*) cygwin=true;; 48 | MINGW*) mingw=true;; 49 | OS400*) os400=true;; 50 | Darwin*) darwin=true 51 | if [ -z "$JAVA_VERSION" ] ; then 52 | JAVA_VERSION="CurrentJDK" 53 | else 54 | echo "Using Java version: $JAVA_VERSION" 55 | fi 56 | if [ -z "$JAVA_HOME" ] ; then 57 | JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home 58 | fi 59 | ;; 60 | esac 61 | 62 | # resolve links - $0 may be a softlink 63 | PRG="$0" 64 | 65 | while [ -h "$PRG" ]; do 66 | ls=`ls -ld "$PRG"` 67 | link=`expr "$ls" : '.*-> \(.*\)$'` 68 | if expr "$link" : '.*/.*' > /dev/null; then 69 | PRG="$link" 70 | else 71 | PRG=`dirname "$PRG"`/"$link" 72 | fi 73 | done 74 | 75 | # Get standard environment variables 76 | PRGDIR=`dirname "$PRG"` 77 | 78 | # Only set CARBON_HOME if not already set 79 | [ -z "$CARBON_HOME" ] && CARBON_HOME=`cd "$PRGDIR/.." ; pwd` 80 | 81 | # For Cygwin, ensure paths are in UNIX format before anything is touched 82 | if $cygwin; then 83 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 84 | [ -n "$CARBON_HOME" ] && CARBON_HOME=`cygpath --unix "$CARBON_HOME"` 85 | [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"` 86 | fi 87 | 88 | # For OS400 89 | if $os400; then 90 | # Set job priority to standard for interactive (interactive - 6) by using 91 | # the interactive priority - 6, the helper threads that respond to requests 92 | # will be running at the same priority as interactive jobs. 93 | COMMAND='chgjob job('$JOBNAME') runpty(6)' 94 | system $COMMAND 95 | 96 | # Enable multi threading 97 | QIBM_MULTI_THREADED=Y 98 | export QIBM_MULTI_THREADED 99 | fi 100 | 101 | # For Migwn, ensure paths are in UNIX format before anything is touched 102 | if $mingw ; then 103 | [ -n "$CARBON_HOME" ] && 104 | CARBON_HOME="`(cd "$CARBON_HOME"; pwd)`" 105 | [ -n "$JAVA_HOME" ] && 106 | JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" 107 | [ -n "$AXIS2_HOME" ] && 108 | CARBON_HOME="`(cd "$CARBON_HOME"; pwd)`" 109 | # TODO classpath? 110 | fi 111 | 112 | # update classpath 113 | CARBON_CLASSPATH="" 114 | for f in "$CARBON_HOME"/lib/org.wso2.ciphertool*.jar 115 | do 116 | CARBON_CLASSPATH=$CARBON_CLASSPATH:$f 117 | done 118 | for h in "$CARBON_HOME"/repository/components/plugins/*.jar 119 | do 120 | CARBON_CLASSPATH=$CARBON_CLASSPATH:$h 121 | done 122 | CARBON_CLASSPATH=$CARBON_CLASSPATH:$CLASSPATH 123 | 124 | # For Cygwin, switch paths to Windows format before running java 125 | if $cygwin; then 126 | JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"` 127 | CARBON_HOME=`cygpath --absolute --windows "$CARBON_HOME"` 128 | CLASSPATH=`cygpath --path --windows "$CLASSPATH"` 129 | JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"` 130 | fi 131 | 132 | # ----- Execute The Requested Command ----------------------------------------- 133 | 134 | $JAVA_HOME/bin/java -Dcarbon.home="$CARBON_HOME" -classpath "$CARBON_CLASSPATH" org.wso2.ciphertool.CipherTool $* -------------------------------------------------------------------------------- /templates/repository/conf/tomcat/catalina-server.xml.erb: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | 23 | 24 | 29 | 32 | proxyPort="<%= @ports['proxyPort']['http'] %>" 33 | <%- end -%> 34 | redirectPort="9443" 35 | bindOnInit="false" 36 | maxHttpHeaderSize="8192" 37 | acceptorThreadCount="2" 38 | maxThreads="250" 39 | minSpareThreads="50" 40 | disableUploadTimeout="false" 41 | connectionUploadTimeout="120000" 42 | maxKeepAliveRequests="200" 43 | acceptCount="200" 44 | server="WSO2 Carbon Server" 45 | compression="on" 46 | compressionMinSize="2048" 47 | noCompressionUserAgents="gozilla, traviata" 48 | compressableMimeType="text/html,text/javascript,application/x-javascript,application/javascript,application/xml,text/css,application/xslt+xml,text/xsl,image/gif,image/jpg,image/jpeg" 49 | URIEncoding="UTF-8"/> 50 | 51 | 56 | 59 | proxyPort="<%= @ports['proxyPort']['https'] %>" 60 | <%- end -%> 61 | bindOnInit="false" 62 | sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2" 63 | maxHttpHeaderSize="8192" 64 | acceptorThreadCount="2" 65 | maxThreads="250" 66 | minSpareThreads="50" 67 | disableUploadTimeout="false" 68 | enableLookups="false" 69 | connectionUploadTimeout="120000" 70 | maxKeepAliveRequests="200" 71 | acceptCount="200" 72 | server="WSO2 Carbon Server" 73 | clientAuth="false" 74 | compression="on" 75 | scheme="https" 76 | secure="true" 77 | SSLEnabled="true" 78 | keystoreFile="${carbon.home}/<%= @key_stores['connector_key_store']['location'] %>" 79 | keystorePass="<%= @key_stores['connector_key_store']['password'] %>" 80 | compressionMinSize="2048" 81 | noCompressionUserAgents="gozilla, traviata" 82 | compressableMimeType="text/html,text/javascript,application/x-javascript,application/javascript,application/xml,text/css,application/xslt+xml,text/xsl,image/gif,image/jpg,image/jpeg" 83 | URIEncoding="UTF-8"/> 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WSO2 Enterprise Service Bus Puppet Module 2 | 3 | This repository contains the Puppet Module for installing and configuring WSO2 Enterprise Service Bus on various environments. It supports multiple versions of WSO2 Enterprise Service Bus. Configuration data is managed using [Hiera](http://docs.puppetlabs.com/hiera/1/). Hiera provides a mechanism for separating configuration data from Puppet scripts and managing them in a separate set of YAML files in a hierarchical manner. 4 | 5 | ## Supported Operating Systems 6 | 7 | - Debian 6 or higher 8 | - Ubuntu 12.04 or higher 9 | 10 | ## Supported Puppet Versions 11 | 12 | - Puppet 2.7, 3 or newer 13 | 14 | ## How to Contribute 15 | Follow the steps mentioned in the [wiki](https://github.com/wso2/puppet-base/wiki) to setup a development environment and update/create new puppet modules. 16 | 17 | ## Add WSO2 Base Puppet Module 18 | 19 | Run the following commands to get wso2base submodule. 20 | 21 | ```` 22 | git submodule init 23 | git submodule update 24 | ```` 25 | 26 | ## Packs to be Copied 27 | 28 | Copy the following files to their corresponding locations. 29 | 30 | 1. WSO2 Enterprise Service Bus distribution (4.9.0) to `/modules/wso2esb/files` 31 | 2. JDK 1.7_80 distribution to `/modules/wso2base/files` 32 | 33 | ## Running WSO2 Enterprise Service Bus in the `default` profile 34 | No changes to Hiera data are required to run the `default` profile. Copy the above mentioned files to their corresponding locations and apply the Puppet Modules. 35 | 36 | ## Running WSO2 Enterprise Service Bus with clustering in specific profiles 37 | Hiera data sets matching the distributed profiles of WSO2 Enterprise Service Bus (`worker`, `manager`) are shipped with clustering related configuration already enabled. Therefore, only a few changes are needed to setup a distributed deployment. For more details refer the [WSO2 ESB clustering guide](https://docs.wso2.com/display/CLUSTER44x/Clustering+ESB+4.9.0). 38 | 39 | 1. If the Clustering Membership Scheme is `WKA`, add the Well Known Address list. 40 | 41 | Ex: 42 | ```yaml 43 | wso2::clustering: 44 | enabled: true 45 | domain: esb.wso2.domain 46 | local_member_host: "%{::ipaddress}" 47 | local_member_port: 4000 48 | membership_scheme: wka 49 | sub_domain: mgt 50 | wka: 51 | members: 52 | - 53 | hostname: 192.168.100.91 54 | port: 4000 55 | - 56 | hostname: 192.168.100.92 57 | port: 4000 58 | ``` 59 | 60 | 2. Add external databases to master datasources 61 | 62 | Ex: 63 | ```yaml 64 | wso2::master_datasources: 65 | wso2_config_db: 66 | name: WSO2_CONFIG_DB 67 | description: The datasource used for config registry 68 | driver_class_name: "%{hiera('wso2::datasources::mysql::driver_class_name')}" 69 | url: jdbc:mysql://192.168.100.1:3306/WSO2REG_DB?autoReconnect=true 70 | username: "%{hiera('wso2::datasources::mysql::username')}" 71 | password: "%{hiera('wso2::datasources::mysql::password')}" 72 | jndi_config: jdbc/WSO2_CONFIG_DB 73 | max_active: "%{hiera('wso2::datasources::common::max_active')}" 74 | max_wait: "%{hiera('wso2::datasources::common::max_wait')}" 75 | test_on_borrow: "%{hiera('wso2::datasources::common::test_on_borrow')}" 76 | default_auto_commit: "%{hiera('wso2::datasources::common::default_auto_commit')}" 77 | validation_query: "%{hiera('wso2::datasources::mysql::validation_query')}" 78 | validation_interval: "%{hiera('wso2::datasources::common::validation_interval')}" 79 | 80 | ``` 81 | 82 | 3. Configure registry mounting 83 | 84 | Ex: 85 | ```yaml 86 | wso2_config_db: 87 | path: /_system/config 88 | target_path: /_system/config/esb 89 | read_only: false 90 | registry_root: / 91 | enable_cache: true 92 | 93 | wso2_gov_db: 94 | path: /_system/governance 95 | target_path: /_system/governance 96 | read_only: false 97 | registry_root: / 98 | enable_cache: true 99 | ``` 100 | 101 | 4. Configure deployment synchronization 102 | 103 | Ex: 104 | ```yaml 105 | wso2::dep_sync: 106 | enabled: true 107 | auto_checkout: true 108 | auto_commit: true 109 | repository_type: svn 110 | svn: 111 | url: http://svnrepo.example.com/repos/ 112 | user: username 113 | password: password 114 | append_tenant_id: true 115 | ``` 116 | 117 | ## Running WSO2 Enterprise Service Bus with Secure Vault 118 | WSO2 Carbon products may contain sensitive information such as passwords in configuration files. [WSO2 Secure Vault](https://docs.wso2.com/display/Carbon444/Securing+Passwords+in+Configuration+Files) provides a solution for securing such information. 119 | 120 | Uncomment and modify the below changes in Hiera file to apply Secure Vault. 121 | 122 | 1. Enable Secure Vault 123 | 124 | ```yaml 125 | wso2::enable_secure_vault: true 126 | ``` 127 | 128 | 2. Add Secure Vault configurations as below 129 | 130 | ```yaml 131 | wso2::secure_vault_configs: 132 | : 133 | secret_alias: 134 | secret_alias_value: 135 | password: 136 | ``` 137 | 138 | Ex: 139 | ```yaml 140 | wso2::secure_vault_configs: 141 | key_store_password: 142 | secret_alias: Carbon.Security.KeyStore.Password 143 | secret_alias_value: repository/conf/carbon.xml//Server/Security/KeyStore/Password,false 144 | password: wso2carbon 145 | ``` 146 | 147 | 3. Add Cipher Tool configuration file templates to `template_list` 148 | 149 | ```yaml 150 | wso2::template_list: 151 | - repository/conf/security/cipher-text.properties 152 | - repository/conf/security/cipher-tool.properties 153 | - bin/ciphertool.sh 154 | ``` 155 | 156 | Please add the `password-tmp` template also to `template_list` if the `vm_type` is not `docker` when you are running the server in `default` platform. 157 | 158 | 159 | ## Running WSO2 Enterprise Service Bus on Kubernetes 160 | WSO2 ESB Puppet module ships Hiera data required to deploy WSO2 Enterprise Service Bus on Kubernetes. For more information refer to the documentation on [deploying WSO2 products on Kubernetes using WSO2 Puppet Modules](https://docs.wso2.com/display/PM210/Deploying+WSO2+Products+on+Kubernetes+Using+WSO2+Puppet+Modules). 161 | -------------------------------------------------------------------------------- /manifests/init.pp: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2016, 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 | # Manages WSO2 Application Server deployment 18 | class wso2esb ( 19 | # wso2esb specific configuration data 20 | $esb_wsdl_epr_prefix = $wso2esb::params::esb_wsdl_epr_prefix, 21 | 22 | $packages = $wso2esb::params::packages, 23 | $template_list = $wso2esb::params::template_list, 24 | $file_list = $wso2esb::params::file_list, 25 | $patch_list = $wso2esb::params::patch_list, 26 | $cert_list = $wso2esb::params::cert_list, 27 | $system_file_list = $wso2esb::params::system_file_list, 28 | $directory_list = $wso2esb::params::directory_list, 29 | $hosts_mapping = $wso2esb::params::hosts_mapping, 30 | $java_home = $wso2esb::params::java_home, 31 | $java_prefs_system_root = $wso2esb::params::java_prefs_system_root, 32 | $java_prefs_user_root = $wso2esb::params::java_prefs_user_root, 33 | $vm_type = $wso2esb::params::vm_type, 34 | $wso2_user = $wso2esb::params::wso2_user, 35 | $wso2_group = $wso2esb::params::wso2_group, 36 | $product_name = $wso2esb::params::product_name, 37 | $product_version = $wso2esb::params::product_version, 38 | $platform_version = $wso2esb::params::platform_version, 39 | $carbon_home_symlink = $wso2esb::params::carbon_home_symlink, 40 | $remote_file_url = $wso2esb::params::remote_file_url, 41 | $maintenance_mode = $wso2esb::params::maintenance_mode, 42 | $install_mode = $wso2esb::params::install_mode, 43 | $install_dir = $wso2esb::params::install_dir, 44 | $pack_dir = $wso2esb::params::pack_dir, 45 | $pack_filename = $wso2esb::params::pack_filename, 46 | $pack_extracted_dir = $wso2esb::params::pack_extracted_dir, 47 | $patches_dir = $wso2esb::params::patches_dir, 48 | $service_name = $wso2esb::params::service_name, 49 | $service_template = $wso2esb::params::service_template, 50 | $ipaddress = $wso2esb::params::ipaddress, 51 | $enable_secure_vault = $wso2esb::params::enable_secure_vault, 52 | $secure_vault_configs = $wso2esb::params::secure_vault_configs, 53 | $key_stores = $wso2esb::params::key_stores, 54 | $carbon_home = $wso2esb::params::carbon_home, 55 | $pack_file_abs_path = $wso2esb::params::pack_file_abs_path, 56 | 57 | # Templated configuration parameters 58 | $master_datasources = $wso2esb::params::master_datasources, 59 | $registry_mounts = $wso2esb::params::registry_mounts, 60 | $hostname = $wso2esb::params::hostname, 61 | $mgt_hostname = $wso2esb::params::mgt_hostname, 62 | $worker_node = $wso2esb::params::worker_node, 63 | $usermgt_datasource = $wso2esb::params::usermgt_datasource, 64 | $local_reg_datasource = $wso2esb::params::local_reg_datasource, 65 | $clustering = $wso2esb::params::clustering, 66 | $dep_sync = $wso2esb::params::dep_sync, 67 | $ports = $wso2esb::params::ports, 68 | $jvm = $wso2esb::params::jvm, 69 | $fqdn = $wso2esb::params::fqdn, 70 | $sso_authentication = $wso2esb::params::sso_authentication, 71 | $user_management = $wso2esb::params::user_management 72 | ) inherits wso2esb::params { 73 | 74 | validate_hash($esb_wsdl_epr_prefix) 75 | 76 | validate_hash($master_datasources) 77 | if $registry_mounts != undef { 78 | validate_hash($registry_mounts) 79 | } 80 | validate_string($hostname) 81 | validate_string($mgt_hostname) 82 | validate_bool($worker_node) 83 | validate_string($usermgt_datasource) 84 | validate_string($local_reg_datasource) 85 | validate_hash($clustering) 86 | validate_hash($dep_sync) 87 | validate_hash($ports) 88 | validate_hash($jvm) 89 | validate_string($fqdn) 90 | validate_hash($sso_authentication) 91 | validate_hash($user_management) 92 | 93 | class { '::wso2base': 94 | packages => $packages, 95 | template_list => $template_list, 96 | file_list => $file_list, 97 | patch_list => $patch_list, 98 | cert_list => $cert_list, 99 | system_file_list => $system_file_list, 100 | directory_list => $directory_list, 101 | hosts_mapping => $hosts_mapping, 102 | java_home => $java_home, 103 | java_prefs_system_root => $java_prefs_system_root, 104 | java_prefs_user_root => $java_prefs_user_root, 105 | vm_type => $vm_type, 106 | wso2_user => $wso2_user, 107 | wso2_group => $wso2_group, 108 | product_name => $product_name, 109 | product_version => $product_version, 110 | platform_version => $platform_version, 111 | carbon_home_symlink => $carbon_home_symlink, 112 | remote_file_url => $remote_file_url, 113 | maintenance_mode => $maintenance_mode, 114 | install_mode => $install_mode, 115 | install_dir => $install_dir, 116 | pack_dir => $pack_dir, 117 | pack_filename => $pack_filename, 118 | pack_extracted_dir => $pack_extracted_dir, 119 | patches_dir => $patches_dir, 120 | service_name => $service_name, 121 | service_template => $service_template, 122 | ipaddress => $ipaddress, 123 | enable_secure_vault => $enable_secure_vault, 124 | secure_vault_configs => $secure_vault_configs, 125 | key_stores => $key_stores, 126 | carbon_home => $carbon_home, 127 | pack_file_abs_path => $pack_file_abs_path 128 | } 129 | 130 | contain wso2base 131 | contain wso2base::system 132 | contain wso2base::clean 133 | contain wso2base::install 134 | contain wso2base::configure 135 | contain wso2base::service 136 | 137 | Class['::wso2base'] -> Class['::wso2base::system'] 138 | -> Class['::wso2base::clean'] -> Class['::wso2base::install'] 139 | -> Class['::wso2base::configure'] ~> Class['::wso2base::service'] 140 | } -------------------------------------------------------------------------------- /templates/repository/conf/registry.xml.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 18 | 19 | 20 | 24 | 25 | wso2registry 26 | false 27 | true 28 | / 29 | 30 | 31 | <%= @master_datasources[@local_reg_datasource]['jndi_config'] %> 32 | 33 | 34 | <% if @registry_mounts and !@registry_mounts.empty? -%> 35 | <%- @registry_mounts.each do |datasource_name, registry_mount| -%> 36 | 37 | <%= @master_datasources[datasource_name]['jndi_config'] %> 38 | 39 | 40 | <%= @master_datasources[datasource_name]['name'] %> 41 | <%= @master_datasources[datasource_name]['name'] %> 42 | <%= registry_mount['read_only'] %> 43 | <%= registry_mount['registry_root'] %> 44 | <%= registry_mount['enable_cache'] %> 45 | <%= @master_datasources[datasource_name]['username'] %>@<%= @master_datasources[datasource_name]['url'] %> 46 | 47 | 48 | <%= @master_datasources[datasource_name]['name'] %> 49 | <%= registry_mount['target_path'] %> 50 | 51 | <%- end -%> 52 | <%- end -%> 53 | 54 | 55 | true 56 | 35 57 | 3 58 | 59 | 50 60 | 61 | 50 62 | 63 | /_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 118 | 119 | 124 | 125 | 132 | 133 | 137 | 138 | 139 | false 140 | 141 | 143 | 144 | true 145 | true 146 | true 147 | true 148 | 149 | 150 | -------------------------------------------------------------------------------- /hieradata/dev/wso2/wso2esb/pattern-2/common.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | classes: 16 | - wso2esb 17 | 18 | wso2::service_name: wso2esb 19 | wso2::hostname: "%{::fqdn}" 20 | wso2::mgt_hostname: "%{::fqdn}" 21 | 22 | wso2::file_list: 23 | - "repository/components/lib/%{hiera('wso2::datasources::mysql::connector_jar')}" 24 | 25 | #wso2::template_list: 26 | # - repository/conf/security/cipher-text.properties 27 | # - repository/conf/security/cipher-tool.properties 28 | # - bin/ciphertool.sh 29 | # - password-tmp 30 | 31 | # Defines WSDL EPR Prefix 32 | wso2::esb_wsdl_epr_prefix: 33 | http: 34 | bind_address: "%{hiera('wso2::hostname')}" 35 | prefix: "http://%{hiera('wso2::hostname')}:8280" 36 | https: 37 | bind_address: "%{hiera('wso2::hostname')}" 38 | prefix: "https://%{hiera('wso2::hostname')}::8243" 39 | 40 | wso2::usermgt_datasource: wso2_user_db 41 | 42 | wso2::master_datasources: 43 | wso2_config_db: 44 | name: WSO2_CONFIG_DB 45 | description: The datasource used for config registry 46 | driver_class_name: "%{hiera('wso2::datasources::mysql::driver_class_name')}" 47 | url: jdbc:mysql://192.168.100.1:3306/WSO2_CONFIG_DB?autoReconnect=true 48 | username: "%{hiera('wso2::datasources::mysql::username')}" 49 | password: "%{hiera('wso2::datasources::mysql::password')}" 50 | jndi_config: jdbc/WSO2_CONFIG_DB 51 | max_active: "%{hiera('wso2::datasources::common::max_active')}" 52 | max_wait: "%{hiera('wso2::datasources::common::max_wait')}" 53 | test_on_borrow: "%{hiera('wso2::datasources::common::test_on_borrow')}" 54 | default_auto_commit: "%{hiera('wso2::datasources::common::default_auto_commit')}" 55 | validation_query: "%{hiera('wso2::datasources::mysql::validation_query')}" 56 | validation_interval: "%{hiera('wso2::datasources::common::validation_interval')}" 57 | 58 | wso2_gov_db: 59 | name: WSO2_GOV_DB 60 | description: The datasource used for gov registry 61 | driver_class_name: "%{hiera('wso2::datasources::mysql::driver_class_name')}" 62 | url: jdbc:mysql://192.168.100.1:3306/WSO2_REG_DB?autoReconnect=true 63 | username: "%{hiera('wso2::datasources::mysql::username')}" 64 | password: "%{hiera('wso2::datasources::mysql::password')}" 65 | jndi_config: jdbc/WSO2_GOV_DB 66 | max_active: "%{hiera('wso2::datasources::common::max_active')}" 67 | max_wait: "%{hiera('wso2::datasources::common::max_wait')}" 68 | test_on_borrow: "%{hiera('wso2::datasources::common::test_on_borrow')}" 69 | validation_query: "%{hiera('wso2::datasources::mysql::validation_query')}" 70 | default_auto_commit: "%{hiera('wso2::datasources::common::default_auto_commit')}" 71 | validation_interval: "%{hiera('wso2::datasources::common::validation_interval')}" 72 | 73 | wso2_user_db: 74 | name: WSO2_USER_DB 75 | description: The datasource is used for user mangement and userstore 76 | driver_class_name: "%{hiera('wso2::datasources::mysql::driver_class_name')}" 77 | url: jdbc:mysql://192.168.100.1:3306/WSO2_USER_DB?autoReconnect=true 78 | username: "%{hiera('wso2::datasources::mysql::username')}" 79 | password: "%{hiera('wso2::datasources::mysql::password')}" 80 | jndi_config: jdbc/WSO2_USER_DB 81 | max_active: "%{hiera('wso2::datasources::common::max_active')}" 82 | max_wait: "%{hiera('wso2::datasources::common::max_wait')}" 83 | test_on_borrow: "%{hiera('wso2::datasources::common::test_on_borrow')}" 84 | default_auto_commit: "%{hiera('wso2::datasources::common::default_auto_commit')}" 85 | validation_query: "%{hiera('wso2::datasources::mysql::validation_query')}" 86 | validation_interval: "%{hiera('wso2::datasources::common::validation_interval')}" 87 | 88 | # Secure vault configuration 89 | #wso2::enable_secure_vault: true 90 | #wso2::secure_vault_configs: 91 | # key_store_password: 92 | # secret_alias: Carbon.Security.KeyStore.Password 93 | # secret_alias_value: repository/conf/carbon.xml//Server/Security/KeyStore/Password,false 94 | # password: "%{hiera('wso2::key_stores::key_store::password')}" 95 | # 96 | # key_store_key_password: 97 | # secret_alias: Carbon.Security.KeyStore.KeyPassword 98 | # secret_alias_value: repository/conf/carbon.xml//Server/Security/KeyStore/KeyPassword,false 99 | # password: "%{hiera('wso2::key_stores::key_store::key_password')}" 100 | # 101 | # trust_store_password: 102 | # secret_alias: Carbon.Security.TrustStore.Password 103 | # secret_alias_value: repository/conf/carbon.xml//Server/Security/TrustStore/Password,false 104 | # password: "%{hiera('wso2::key_stores::trust_store::password')}" 105 | # 106 | # user_manager_admin_password: 107 | # secret_alias: UserManager.AdminUser.Password 108 | # secret_alias_value: repository/conf/user-mgt.xml//UserManager/Realm/Configuration/AdminUser/Password,false 109 | # password: "%{hiera('wso2::super_admin::password')}" 110 | # 111 | # wso2_carbon_db_password: 112 | # secret_alias: Datasources.WSO2_CARBON_DB.Configuration.Password 113 | # secret_alias_value: repository/conf/datasources/master-datasources.xml//datasources-configuration/datasources/datasource[name='WSO2_CARBON_DB']/definition[@type='RDBMS']/configuration/password,false 114 | # password: "%{hiera('wso2::datasources::common::password')}" 115 | # 116 | # connector_key_store_password: 117 | # secret_alias: Server.Service.Connector.keystorePass 118 | # secret_alias_value: repository/conf/tomcat/catalina-server.xml//Server/Service/Connector[@keystorePass],true 119 | # password: "%{hiera('wso2::key_stores::connector_key_store::password')}" 120 | # 121 | # wso2_config_db_password: 122 | # secret_alias: Datasources.WSO2_CONFIG_DB.Configuration.Password 123 | # secret_alias_value: repository/conf/datasources/master-datasources.xml//datasources-configuration/datasources/datasource[name='WSO2_CONFIG_DB']/definition[@type='RDBMS']/configuration/password,false 124 | # password: "%{hiera('wso2::datasources::mysql::password')}" 125 | # 126 | # wso2_gov_db_password: 127 | # secret_alias: Datasources.WSO2_GOV_DB.Configuration.Password 128 | # secret_alias_value: repository/conf/datasources/master-datasources.xml//datasources-configuration/datasources/datasource[name='WSO2_GOV_DB']/definition[@type='RDBMS']/configuration/password,false 129 | # password: "%{hiera('wso2::datasources::mysql::password')}" 130 | # 131 | # wso2_user_db_password: 132 | # secret_alias: Datasources.WSO2_USER_DB.Configuration.Password 133 | # secret_alias_value: repository/conf/datasources/master-datasources.xml//datasources-configuration/datasources/datasource[name='WSO2_USER_DB']/definition[@type='RDBMS']/configuration/password,false 134 | # password: "%{hiera('wso2::datasources::mysql::password')}" 135 | # 136 | # axis2_https_listener_trust_store_password: 137 | # secret_alias: Axis2.Https.Listener.TrustStore.Password 138 | # secret_alias_value: repository/conf/axis2/axis2.xml//axisconfig/transportReceiver[@name='https']/parameter[@name='truststore']/TrustStore/Password,false 139 | # password: "%{hiera('wso2::key_stores::trust_store::password')}" 140 | # 141 | # axis2_https_listener_key_store_password: 142 | # secret_alias: Axis2.Https.Listener.KeyStore.Password 143 | # secret_alias_value: repository/conf/axis2/axis2.xml//axisconfig/transportReceiver[@name='https']/parameter[@name='keystore']/KeyStore/Password,false 144 | # password: "%{hiera('wso2::key_stores::key_store::password')}" 145 | # 146 | # axis2_https_listener_key_store_key_password: 147 | # secret_alias: Axis2.Https.Listener.KeyStore.KeyPassword 148 | # secret_alias_value: repository/conf/axis2/axis2.xml//axisconfig/transportReceiver[@name='https']/parameter[@name='keystore']/KeyStore/KeyPassword,false 149 | # password: "%{hiera('wso2::key_stores::key_store::key_password')}" 150 | # 151 | # axis2_https_sender_trust_store_password: 152 | # secret_alias: Axis2.Https.Sender.TrustStore.Password 153 | # secret_alias_value: repository/conf/axis2/axis2.xml//axisconfig/transportSender[@name='https']/parameter[@name='truststore']/TrustStore/Password,false 154 | # password: "%{hiera('wso2::key_stores::trust_store::password')}" 155 | # 156 | # axis2_https_sender_key_store_password: 157 | # secret_alias: Axis2.Https.Sender.KeyStore.Password 158 | # secret_alias_value: repository/conf/axis2/axis2.xml//axisconfig/transportSender[@name='https']/parameter[@name='keystore']/KeyStore/Password,false 159 | # password: "%{hiera('wso2::key_stores::key_store::password')}" 160 | # 161 | # axis2_https_sender_key_store_key_password: 162 | # secret_alias: Axis2.Https.Sender.KeyStore.KeyPassword 163 | # secret_alias_value: repository/conf/axis2/axis2.xml//axisconfig/transportSender[@name='https']/parameter[@name='keystore']/KeyStore/KeyPassword,false 164 | # password: "%{hiera('wso2::key_stores::key_store::key_password')}" 165 | # 166 | # dep_sync_svn_password: 167 | # secret_alias: Carbon.DeploymentSynchronizer.SvnPassword 168 | # secret_alias_value: repository/conf/carbon.xml//Server/DeploymentSynchronizer/SvnPassword,true 169 | # password: password 170 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 4.0.0 22 | org.wso2.puppet 23 | wso2esb-puppet-module 24 | pom 25 | 5.0.0-SNAPSHOT 26 | WSO2 Enterprise Service Bus Puppet Module 27 | 28 | 29 | 30 | Apache License Version 2.0 31 | http://www.apache.org/licenses/LICENSE-2.0 32 | 33 | 34 | 35 | 36 | 37 | 38 | maven-assembly-plugin 39 | true 40 | 2.5.3 41 | 42 | ${project.artifactId}-${puppet.hieradata}-${project.version} 43 | package.xml 44 | false 45 | 46 | 47 | 48 | create-archive 49 | package 50 | 51 | single 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | pedantic 63 | 64 | 65 | 66 | org.apache.rat 67 | apache-rat-plugin 68 | 0.12 69 | 70 | 71 | 72 | WSO2 73 | WSO2 License 1.0 74 | 75 | 76 | Copyright WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 77 | WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 78 | WSO2, Inc. http://www.wso2.org 79 | WSO2 Inc. (http://wso2.com) All Rights Reserved. 80 | WSO2, Inc. (http://wso2.com) 81 | 82 | 83 | 84 | 85 | 86 | 87 | WSO2 License 1.0 88 | 89 | 90 | 91 | 92 | **/target/**/* 93 | **/.settings/**/* 94 | **/.project 95 | **/.classpath 96 | **/.git/**/* 97 | **/.vagrant/**/* 98 | **/README.md 99 | **/*.iml 100 | **/*.iws 101 | **/*.ipr 102 | **/.gitignore 103 | **/.pmtignore 104 | **/.gitkeep 105 | **/*.key 106 | **/*.json 107 | **/*.json.erb 108 | 109 | **/*.config.erb 110 | **/*.sql 111 | **/.idea/**/* 112 | **/.idea 113 | **/tlds/**/* 114 | **/*.log 115 | **/.gitmodules 116 | **/password-tmp.erb 117 | 118 | false 119 | 120 | 121 | 122 | verify 123 | 124 | check 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | puppet-build 135 | 136 | 137 | 138 | org.codehaus.mojo 139 | exec-maven-plugin 140 | 1.5.0 141 | 142 | 143 | compile 144 | 145 | puppet 146 | ${puppet.module.home} 147 | 148 | module 149 | build 150 | 151 | 152 | compile 153 | 154 | exec 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | central 167 | Maven Central Repository 168 | default 169 | http://repo1.maven.org/maven2 170 | 171 | true 172 | daily 173 | ignore 174 | 175 | 176 | 177 | wso2-nexus 178 | WSO2 Internal Repository 179 | http://maven.wso2.org/nexus/content/groups/wso2-public/ 180 | 181 | true 182 | daily 183 | ignore 184 | 185 | 186 | 187 | 188 | 189 | UTF-8 190 | ${project.basedir} 191 | hieradata 192 | 193 | 194 | -------------------------------------------------------------------------------- /manifests/params.pp: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------------------- 2 | # Copyright (c) 2016 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 wso2esb::params { 18 | 19 | # Set facter variables 20 | $vm_type = $::vm_type 21 | $ipaddress = $::ipaddress 22 | $fqdn = $::fqdn 23 | 24 | # use_hieradata facter flags whether parameter lookup should be done via Hiera 25 | if $::use_hieradata == "true" { 26 | $esb_wsdl_epr_prefix = hiera('wso2::esb_wsdl_epr_prefix', undef) 27 | $java_prefs_system_root = hiera('java_prefs_system_root') 28 | $java_prefs_user_root = hiera('java_prefs_user_root') 29 | $java_home = hiera('java_home') 30 | 31 | # system configuration data 32 | $packages = hiera_array('packages') 33 | $template_list = hiera_array('wso2::template_list') 34 | $file_list = hiera_array('wso2::file_list', undef) 35 | $patch_list = hiera('wso2::patch_list', undef) 36 | $system_file_list = hiera_hash('wso2::system_file_list', undef) 37 | $directory_list = hiera_array('wso2::directory_list', undef) 38 | $cert_list = hiera_hash('wso2::cert_list', undef) 39 | $hosts_mapping = hiera_hash('wso2::hosts_mapping') 40 | 41 | $master_datasources = hiera_hash('wso2::master_datasources') 42 | $registry_mounts = hiera_hash('wso2::registry_mounts', undef) 43 | $carbon_home_symlink = hiera('wso2::carbon_home_symlink') 44 | $wso2_user = hiera('wso2::user') 45 | $wso2_group = hiera('wso2::group') 46 | $maintenance_mode = hiera('wso2::maintenance_mode') 47 | $install_mode = hiera('wso2::install_mode') 48 | 49 | if $install_mode == 'file_repo' { 50 | $remote_file_url = hiera('remote_file_url') 51 | } 52 | 53 | $install_dir = hiera('wso2::install_dir') 54 | $pack_dir = hiera('wso2::pack_dir') 55 | $pack_filename = hiera('wso2::pack_filename') 56 | $pack_extracted_dir = hiera('wso2::pack_extracted_dir') 57 | $hostname = hiera('wso2::hostname') 58 | $mgt_hostname = hiera('wso2::mgt_hostname') 59 | $worker_node = hiera('wso2::worker_node') 60 | $patches_dir = hiera('wso2::patches_dir') 61 | $service_name = hiera('wso2::service_name') 62 | $service_template = hiera('wso2::service_template') 63 | $usermgt_datasource = hiera('wso2::usermgt_datasource') 64 | $local_reg_datasource = hiera('wso2::local_reg_datasource') 65 | $clustering = hiera('wso2::clustering') 66 | $dep_sync = hiera('wso2::dep_sync') 67 | $ports = hiera('wso2::ports') 68 | $jvm = hiera('wso2::jvm') 69 | $sso_authentication = hiera('wso2::sso_authentication') 70 | $user_management = hiera('wso2::user_management') 71 | $enable_secure_vault = hiera('wso2::enable_secure_vault') 72 | 73 | if $enable_secure_vault { 74 | $secure_vault_configs = hiera('wso2::secure_vault_configs') 75 | } 76 | 77 | $key_stores = hiera('wso2::key_stores') 78 | 79 | } else { 80 | 81 | $esb_wsdl_epr_prefix ={ 82 | http => { 83 | bind_address=> "esb.dev.wso2.org", 84 | prefix => "http: //esb.dev.wso2.org:9763" 85 | }, 86 | https=>{ 87 | bind_address=> "esb.dev.wso2.org", 88 | prefix => "https: //esb.dev.wso2.org:9443" 89 | } 90 | } 91 | 92 | $java_prefs_system_root = '/home/wso2user/.java' 93 | $java_prefs_user_root = '/home/wso2user/.java/.systemPrefs' 94 | $java_home = '/opt/java' 95 | 96 | # system configuration data 97 | $packages = [ 98 | 'zip', 99 | 'unzip' 100 | ] 101 | 102 | $template_list = [ 103 | 'repository/conf/carbon.xml', 104 | 'repository/conf/user-mgt.xml', 105 | 'repository/conf/registry.xml', 106 | 'repository/conf/datasources/master-datasources.xml', 107 | 'repository/conf/tomcat/catalina-server.xml', 108 | 'repository/conf/axis2/axis2.xml', 109 | 'repository/conf/security/authenticators.xml', 110 | 'bin/wso2server.sh' 111 | ] 112 | 113 | $hosts_mapping = { 114 | localhost => { 115 | ip => '127.0.0.1', 116 | name => 'localhost' 117 | } 118 | } 119 | 120 | $master_datasources = { 121 | wso2_carbon_db => { 122 | name => 'WSO2_CARBON_DB', 123 | description => 'The datasource used for registry and user manager', 124 | driver_class_name => 'org.h2.Driver', 125 | url => 'jdbc:h2:repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000', 126 | username => 'wso2carbon', 127 | password => 'wso2carbon', 128 | jndi_config => 'jdbc/WSO2CarbonDB', 129 | max_active => '50', 130 | max_wait => '60000', 131 | test_on_borrow => true, 132 | default_auto_commit => false, 133 | validation_query => 'SELECT 1', 134 | validation_interval => '30000' 135 | } 136 | } 137 | 138 | $carbon_home_symlink = "/mnt/${product_name}-${product_version}" 139 | $wso2_user = 'wso2user' 140 | $wso2_group = 'wso2' 141 | $maintenance_mode = 'refresh' 142 | $install_mode = 'file_bucket' 143 | $install_dir = "/mnt/${ipaddress}" 144 | $pack_dir = '/mnt/packs' 145 | $pack_filename = "${product_name}-${product_version}.zip" 146 | $pack_extracted_dir = "${product_name}-${product_version}" 147 | $hostname = 'localhost' 148 | $mgt_hostname = 'localhost' 149 | $worker_node = false 150 | $patches_dir = 'repository/components/patches' 151 | $service_name = $product_name 152 | $service_template = 'wso2base/wso2service.erb' 153 | $usermgt_datasource = 'wso2_carbon_db' 154 | $local_reg_datasource = 'wso2_carbon_db' 155 | 156 | $clustering = { 157 | enabled => false, 158 | membership_scheme => 'wka', 159 | domain => 'wso2.carbon.domain', 160 | local_member_host => '127.0.0.1', 161 | local_member_port => '4000', 162 | sub_domain => 'mgt', 163 | wka => { 164 | members => [ 165 | { 166 | hostname => '127.0.0.1', 167 | port => 4000 168 | } 169 | ] 170 | } 171 | } 172 | 173 | $dep_sync = { 174 | enabled => false 175 | } 176 | 177 | $ports = { 178 | offset => 0 179 | } 180 | 181 | $jvm = { 182 | xms => '256m', 183 | xmx => '1024m', 184 | max_perm_size => '256m' 185 | } 186 | 187 | $sso_authentication = { 188 | enabled => false 189 | } 190 | 191 | $user_management = { 192 | admin_role => 'admin', 193 | admin_username => 'admin', 194 | admin_password => 'admin' 195 | } 196 | 197 | $enable_secure_vault = false 198 | 199 | $key_stores = { 200 | key_store => { 201 | location => 'repository/resources/security/wso2carbon.jks', 202 | type => 'JKS', 203 | password => 'wso2carbon', 204 | key_alias => 'wso2carbon', 205 | key_password => 'wso2carbon' 206 | }, 207 | registry_key_store => { 208 | location => 'repository/resources/security/wso2carbon.jks', 209 | type => 'JKS', 210 | password => 'wso2carbon', 211 | key_alias => 'wso2carbon', 212 | key_password => 'wso2carbon' 213 | }, 214 | trust_store => { 215 | location => 'repository/resources/security/client-truststore.jks', 216 | type => 'JKS', 217 | password => 'wso2carbon' 218 | }, 219 | connector_key_store => { 220 | location => 'repository/resources/security/wso2carbon.jks', 221 | password => 'wso2carbon' 222 | }, 223 | user_trusted_rp_store => { 224 | location => 'repository/resources/security/userRP.jks', 225 | type => 'JKS', 226 | password => 'wso2carbon', 227 | key_password => 'wso2carbon' 228 | } 229 | } 230 | } 231 | 232 | $product_name = 'wso2esb' 233 | $product_version = '5.0.0' 234 | $platform_version = '4.4.0' 235 | $carbon_home = "${install_dir}/${product_name}-${product_version}" 236 | $pack_file_abs_path = "${pack_dir}/${pack_filename}" 237 | } -------------------------------------------------------------------------------- /hieradata/dev/wso2/wso2esb/pattern-1/default.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | classes: 16 | - wso2esb 17 | 18 | wso2::service_name: wso2esb 19 | wso2::hostname: "%{::fqdn}" 20 | wso2::mgt_hostname: "%{::fqdn}" 21 | 22 | ## Uncomment the following for a clustered setup 23 | #wso2::file_list: 24 | # - "repository/components/lib/%{hiera('wso2::datasources::mysql::connector_jar')}" 25 | 26 | #wso2::template_list: 27 | # - repository/conf/security/cipher-text.properties 28 | # - repository/conf/security/cipher-tool.properties 29 | # - bin/ciphertool.sh 30 | # - password-tmp 31 | 32 | # Defines WSDL EPR Prefix 33 | wso2::esb_wsdl_epr_prefix: 34 | http: 35 | bind_address: "%{hiera('wso2::hostname')}" 36 | prefix: "http://%{hiera('wso2::hostname')}:8280" 37 | https: 38 | bind_address: "%{hiera('wso2::hostname')}" 39 | prefix: "https://%{hiera('wso2::hostname')}::8243" 40 | 41 | ## Uncomment the following for a clustered setup 42 | #wso2::usermgt_datasource: wso2_user_db 43 | 44 | ## Uncomment the following MySQL data sources for a clustered setup 45 | #wso2::master_datasources: 46 | # wso2_config_db: 47 | # name: WSO2_CONFIG_DB 48 | # description: The datasource used for config registry 49 | # driver_class_name: "%{hiera('wso2::datasources::mysql::driver_class_name')}" 50 | # url: jdbc:mysql://192.168.100.1:3306/WSO2_CONFIG_DB?autoReconnect=true 51 | # username: "%{hiera('wso2::datasources::mysql::username')}" 52 | # password: "%{hiera('wso2::datasources::mysql::password')}" 53 | # jndi_config: jdbc/WSO2_CONFIG_DB 54 | # max_active: "%{hiera('wso2::datasources::common::max_active')}" 55 | # max_wait: "%{hiera('wso2::datasources::common::max_wait')}" 56 | # test_on_borrow: "%{hiera('wso2::datasources::common::test_on_borrow')}" 57 | # default_auto_commit: "%{hiera('wso2::datasources::common::default_auto_commit')}" 58 | # validation_query: "%{hiera('wso2::datasources::mysql::validation_query')}" 59 | # validation_interval: "%{hiera('wso2::datasources::common::validation_interval')}" 60 | # 61 | # wso2_gov_db: 62 | # name: WSO2_GOV_DB 63 | # description: The datasource used for gov registry 64 | # driver_class_name: "%{hiera('wso2::datasources::mysql::driver_class_name')}" 65 | # url: jdbc:mysql://192.168.100.1:3306/WSO2_REG_DB?autoReconnect=true 66 | # username: "%{hiera('wso2::datasources::mysql::username')}" 67 | # password: "%{hiera('wso2::datasources::mysql::password')}" 68 | # jndi_config: jdbc/WSO2_GOV_DB 69 | # max_active: "%{hiera('wso2::datasources::common::max_active')}" 70 | # max_wait: "%{hiera('wso2::datasources::common::max_wait')}" 71 | # test_on_borrow: "%{hiera('wso2::datasources::common::test_on_borrow')}" 72 | # validation_query: "%{hiera('wso2::datasources::mysql::validation_query')}" 73 | # default_auto_commit: "%{hiera('wso2::datasources::common::default_auto_commit')}" 74 | # validation_interval: "%{hiera('wso2::datasources::common::validation_interval')}" 75 | # 76 | # wso2_user_db: 77 | # name: WSO2_USER_DB 78 | # description: The datasource is used for user mangement and userstore 79 | # driver_class_name: "%{hiera('wso2::datasources::mysql::driver_class_name')}" 80 | # url: jdbc:mysql://192.168.100.1:3306/WSO2_USER_DB?autoReconnect=true 81 | # username: "%{hiera('wso2::datasources::mysql::username')}" 82 | # password: "%{hiera('wso2::datasources::mysql::password')}" 83 | # jndi_config: jdbc/WSO2_USER_DB 84 | # max_active: "%{hiera('wso2::datasources::common::max_active')}" 85 | # max_wait: "%{hiera('wso2::datasources::common::max_wait')}" 86 | # test_on_borrow: "%{hiera('wso2::datasources::common::test_on_borrow')}" 87 | # default_auto_commit: "%{hiera('wso2::datasources::common::default_auto_commit')}" 88 | # validation_query: "%{hiera('wso2::datasources::mysql::validation_query')}" 89 | # validation_interval: "%{hiera('wso2::datasources::common::validation_interval')}" 90 | 91 | # Secure vault configuration 92 | #wso2::enable_secure_vault: true 93 | #wso2::secure_vault_configs: 94 | # key_store_password: 95 | # secret_alias: Carbon.Security.KeyStore.Password 96 | # secret_alias_value: repository/conf/carbon.xml//Server/Security/KeyStore/Password,false 97 | # password: "%{hiera('wso2::key_stores::key_store::password')}" 98 | # 99 | # key_store_key_password: 100 | # secret_alias: Carbon.Security.KeyStore.KeyPassword 101 | # secret_alias_value: repository/conf/carbon.xml//Server/Security/KeyStore/KeyPassword,false 102 | # password: "%{hiera('wso2::key_stores::key_store::key_password')}" 103 | # 104 | # trust_store_password: 105 | # secret_alias: Carbon.Security.TrustStore.Password 106 | # secret_alias_value: repository/conf/carbon.xml//Server/Security/TrustStore/Password,false 107 | # password: "%{hiera('wso2::key_stores::trust_store::password')}" 108 | # 109 | # user_manager_admin_password: 110 | # secret_alias: UserManager.AdminUser.Password 111 | # secret_alias_value: repository/conf/user-mgt.xml//UserManager/Realm/Configuration/AdminUser/Password,false 112 | # password: "%{hiera('wso2::super_admin::password')}" 113 | # 114 | # wso2_carbon_db_password: 115 | # secret_alias: Datasources.WSO2_CARBON_DB.Configuration.Password 116 | # secret_alias_value: repository/conf/datasources/master-datasources.xml//datasources-configuration/datasources/datasource[name='WSO2_CARBON_DB']/definition[@type='RDBMS']/configuration/password,false 117 | # password: "%{hiera('wso2::datasources::common::password')}" 118 | # 119 | # connector_key_store_password: 120 | # secret_alias: Server.Service.Connector.keystorePass 121 | # secret_alias_value: repository/conf/tomcat/catalina-server.xml//Server/Service/Connector[@keystorePass],true 122 | # password: "%{hiera('wso2::key_stores::connector_key_store::password')}" 123 | # 124 | # wso2_config_db_password: 125 | # secret_alias: Datasources.WSO2_CONFIG_DB.Configuration.Password 126 | # secret_alias_value: repository/conf/datasources/master-datasources.xml//datasources-configuration/datasources/datasource[name='WSO2_CONFIG_DB']/definition[@type='RDBMS']/configuration/password,false 127 | # password: "%{hiera('wso2::datasources::mysql::password')}" 128 | # 129 | # wso2_gov_db_password: 130 | # secret_alias: Datasources.WSO2_GOV_DB.Configuration.Password 131 | # secret_alias_value: repository/conf/datasources/master-datasources.xml//datasources-configuration/datasources/datasource[name='WSO2_GOV_DB']/definition[@type='RDBMS']/configuration/password,false 132 | # password: "%{hiera('wso2::datasources::mysql::password')}" 133 | # 134 | # wso2_user_db_password: 135 | # secret_alias: Datasources.WSO2_USER_DB.Configuration.Password 136 | # secret_alias_value: repository/conf/datasources/master-datasources.xml//datasources-configuration/datasources/datasource[name='WSO2_USER_DB']/definition[@type='RDBMS']/configuration/password,false 137 | # password: "%{hiera('wso2::datasources::mysql::password')}" 138 | # 139 | # axis2_https_listener_trust_store_password: 140 | # secret_alias: Axis2.Https.Listener.TrustStore.Password 141 | # secret_alias_value: repository/conf/axis2/axis2.xml//axisconfig/transportReceiver[@name='https']/parameter[@name='truststore']/TrustStore/Password,false 142 | # password: "%{hiera('wso2::key_stores::trust_store::password')}" 143 | # 144 | # axis2_https_listener_key_store_password: 145 | # secret_alias: Axis2.Https.Listener.KeyStore.Password 146 | # secret_alias_value: repository/conf/axis2/axis2.xml//axisconfig/transportReceiver[@name='https']/parameter[@name='keystore']/KeyStore/Password,false 147 | # password: "%{hiera('wso2::key_stores::key_store::password')}" 148 | # 149 | # axis2_https_listener_key_store_key_password: 150 | # secret_alias: Axis2.Https.Listener.KeyStore.KeyPassword 151 | # secret_alias_value: repository/conf/axis2/axis2.xml//axisconfig/transportReceiver[@name='https']/parameter[@name='keystore']/KeyStore/KeyPassword,false 152 | # password: "%{hiera('wso2::key_stores::key_store::key_password')}" 153 | # 154 | # axis2_https_sender_trust_store_password: 155 | # secret_alias: Axis2.Https.Sender.TrustStore.Password 156 | # secret_alias_value: repository/conf/axis2/axis2.xml//axisconfig/transportSender[@name='https']/parameter[@name='truststore']/TrustStore/Password,false 157 | # password: "%{hiera('wso2::key_stores::trust_store::password')}" 158 | # 159 | # axis2_https_sender_key_store_password: 160 | # secret_alias: Axis2.Https.Sender.KeyStore.Password 161 | # secret_alias_value: repository/conf/axis2/axis2.xml//axisconfig/transportSender[@name='https']/parameter[@name='keystore']/KeyStore/Password,false 162 | # password: "%{hiera('wso2::key_stores::key_store::password')}" 163 | # 164 | # axis2_https_sender_key_store_key_password: 165 | # secret_alias: Axis2.Https.Sender.KeyStore.KeyPassword 166 | # secret_alias_value: repository/conf/axis2/axis2.xml//axisconfig/transportSender[@name='https']/parameter[@name='keystore']/KeyStore/KeyPassword,false 167 | # password: "%{hiera('wso2::key_stores::key_store::key_password')}" 168 | # 169 | # dep_sync_svn_password: 170 | # secret_alias: Carbon.DeploymentSynchronizer.SvnPassword 171 | # secret_alias_value: repository/conf/carbon.xml//Server/DeploymentSynchronizer/SvnPassword,true 172 | # password: password 173 | -------------------------------------------------------------------------------- /templates/bin/wso2server.sh.erb: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ---------------------------------------------------------------------------- 3 | # Copyright (c) 2015 WSO2, Inc. http://www.wso2.org 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 | # ---------------------------------------------------------------------------- 18 | # Main Script for the WSO2 Carbon Server 19 | # 20 | # Environment Variable Prequisites 21 | # 22 | # CARBON_HOME Home of WSO2 Carbon installation. If not set I will try 23 | # to figure it out. 24 | # 25 | # JAVA_HOME Must point at your Java Development Kit installation. 26 | # 27 | # JAVA_OPTS (Optional) Java runtime options used when the commands 28 | # is executed. 29 | # 30 | # NOTE: Borrowed generously from Apache Tomcat startup scripts. 31 | # ----------------------------------------------------------------------------- 32 | 33 | # OS specific support. $var _must_ be set to either true or false. 34 | #ulimit -n 100000 35 | 36 | JAVA_HOME=<%= @java_home %> 37 | 38 | cygwin=false; 39 | darwin=false; 40 | os400=false; 41 | mingw=false; 42 | case "`uname`" in 43 | CYGWIN*) cygwin=true;; 44 | MINGW*) mingw=true;; 45 | OS400*) os400=true;; 46 | Darwin*) darwin=true 47 | if [ -z "$JAVA_VERSION" ] ; then 48 | JAVA_VERSION="CurrentJDK" 49 | else 50 | echo "Using Java version: $JAVA_VERSION" 51 | fi 52 | if [ -z "$JAVA_HOME" ] ; then 53 | JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home 54 | fi 55 | ;; 56 | esac 57 | 58 | # resolve links - $0 may be a softlink 59 | PRG="$0" 60 | 61 | while [ -h "$PRG" ]; do 62 | ls=`ls -ld "$PRG"` 63 | link=`expr "$ls" : '.*-> \(.*\)$'` 64 | if expr "$link" : '.*/.*' > /dev/null; then 65 | PRG="$link" 66 | else 67 | PRG=`dirname "$PRG"`/"$link" 68 | fi 69 | done 70 | 71 | # Get standard environment variables 72 | PRGDIR=`dirname "$PRG"` 73 | 74 | # Only set CARBON_HOME if not already set 75 | [ -z "$CARBON_HOME" ] && CARBON_HOME=`cd "$PRGDIR/.." ; pwd` 76 | 77 | # Set AXIS2_HOME. Needed for One Click JAR Download 78 | AXIS2_HOME=$CARBON_HOME 79 | 80 | # For Cygwin, ensure paths are in UNIX format before anything is touched 81 | if $cygwin; then 82 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 83 | [ -n "$CARBON_HOME" ] && CARBON_HOME=`cygpath --unix "$CARBON_HOME"` 84 | [ -n "$AXIS2_HOME" ] && CARBON_HOME=`cygpath --unix "$CARBON_HOME"` 85 | fi 86 | 87 | # For OS400 88 | if $os400; then 89 | # Set job priority to standard for interactive (interactive - 6) by using 90 | # the interactive priority - 6, the helper threads that respond to requests 91 | # will be running at the same priority as interactive jobs. 92 | COMMAND='chgjob job('$JOBNAME') runpty(6)' 93 | system $COMMAND 94 | 95 | # Enable multi threading 96 | QIBM_MULTI_THREADED=Y 97 | export QIBM_MULTI_THREADED 98 | fi 99 | 100 | # For Migwn, ensure paths are in UNIX format before anything is touched 101 | if $mingw ; then 102 | [ -n "$CARBON_HOME" ] && 103 | CARBON_HOME="`(cd "$CARBON_HOME"; pwd)`" 104 | [ -n "$JAVA_HOME" ] && 105 | JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" 106 | [ -n "$AXIS2_HOME" ] && 107 | CARBON_HOME="`(cd "$CARBON_HOME"; pwd)`" 108 | # TODO classpath? 109 | fi 110 | 111 | if [ -z "$JAVACMD" ] ; then 112 | if [ -n "$JAVA_HOME" ] ; then 113 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 114 | # IBM's JDK on AIX uses strange locations for the executables 115 | JAVACMD="$JAVA_HOME/jre/sh/java" 116 | else 117 | JAVACMD="$JAVA_HOME/bin/java" 118 | fi 119 | else 120 | JAVACMD=java 121 | fi 122 | fi 123 | 124 | if [ ! -x "$JAVACMD" ] ; then 125 | echo "Error: JAVA_HOME is not defined correctly." 126 | echo " CARBON cannot execute $JAVACMD" 127 | exit 1 128 | fi 129 | 130 | # if JAVA_HOME is not set we're not happy 131 | if [ -z "$JAVA_HOME" ]; then 132 | echo "You must set the JAVA_HOME variable before running CARBON." 133 | exit 1 134 | fi 135 | 136 | if [ -e "$CARBON_HOME/wso2carbon.pid" ]; then 137 | PID=`cat "$CARBON_HOME"/wso2carbon.pid` 138 | fi 139 | 140 | # ----- Process the input command ---------------------------------------------- 141 | args="" 142 | for c in $* 143 | do 144 | if [ "$c" = "--debug" ] || [ "$c" = "-debug" ] || [ "$c" = "debug" ]; then 145 | CMD="--debug" 146 | continue 147 | elif [ "$CMD" = "--debug" ]; then 148 | if [ -z "$PORT" ]; then 149 | PORT=$c 150 | fi 151 | elif [ "$c" = "--stop" ] || [ "$c" = "-stop" ] || [ "$c" = "stop" ]; then 152 | CMD="stop" 153 | elif [ "$c" = "--start" ] || [ "$c" = "-start" ] || [ "$c" = "start" ]; then 154 | CMD="start" 155 | elif [ "$c" = "--version" ] || [ "$c" = "-version" ] || [ "$c" = "version" ]; then 156 | CMD="version" 157 | elif [ "$c" = "--restart" ] || [ "$c" = "-restart" ] || [ "$c" = "restart" ]; then 158 | CMD="restart" 159 | elif [ "$c" = "--test" ] || [ "$c" = "-test" ] || [ "$c" = "test" ]; then 160 | CMD="test" 161 | else 162 | args="$args $c" 163 | fi 164 | done 165 | 166 | if [ "$CMD" = "--debug" ]; then 167 | if [ "$PORT" = "" ]; then 168 | echo " Please specify the debug port after the --debug option" 169 | exit 1 170 | fi 171 | if [ -n "$JAVA_OPTS" ]; then 172 | echo "Warning !!!. User specified JAVA_OPTS will be ignored, once you give the --debug option." 173 | fi 174 | CMD="RUN" 175 | JAVA_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=$PORT" 176 | echo "Please start the remote debugging client to continue..." 177 | elif [ "$CMD" = "start" ]; then 178 | if [ -e "$CARBON_HOME/wso2carbon.pid" ]; then 179 | if ps -p $PID > /dev/null ; then 180 | echo "Process is already running" 181 | exit 0 182 | fi 183 | fi 184 | export CARBON_HOME=$CARBON_HOME 185 | # using nohup sh to avoid erros in solaris OS.TODO 186 | nohup sh $CARBON_HOME/bin/wso2server.sh $args > /dev/null 2>&1 & 187 | exit 0 188 | elif [ "$CMD" = "stop" ]; then 189 | export CARBON_HOME=$CARBON_HOME 190 | kill -term `cat $CARBON_HOME/wso2carbon.pid` 191 | exit 0 192 | elif [ "$CMD" = "restart" ]; then 193 | export CARBON_HOME=$CARBON_HOME 194 | kill -term `cat $CARBON_HOME/wso2carbon.pid` 195 | process_status=0 196 | pid=`cat $CARBON_HOME/wso2carbon.pid` 197 | while [ "$process_status" -eq "0" ] 198 | do 199 | sleep 1; 200 | ps -p$pid 2>&1 > /dev/null 201 | process_status=$? 202 | done 203 | 204 | # using nohup sh to avoid erros in solaris OS.TODO 205 | nohup sh $CARBON_HOME/bin/wso2server.sh $args > /dev/null 2>&1 & 206 | exit 0 207 | elif [ "$CMD" = "test" ]; then 208 | JAVACMD="exec "$JAVACMD"" 209 | elif [ "$CMD" = "version" ]; then 210 | cat $CARBON_HOME/bin/version.txt 211 | cat $CARBON_HOME/bin/wso2carbon-version.txt 212 | exit 0 213 | fi 214 | 215 | # ---------- Handle the SSL Issue with proper JDK version -------------------- 216 | jdk_17=`$JAVA_HOME/bin/java -version 2>&1 | grep "1.[7|8]"` 217 | if [ "$jdk_17" = "" ]; then 218 | echo " Starting WSO2 Carbon (in unsupported JDK)" 219 | echo " [ERROR] CARBON is supported only on JDK 1.7 and 1.8" 220 | fi 221 | 222 | CARBON_XBOOTCLASSPATH="" 223 | for f in "$CARBON_HOME"/lib/xboot/*.jar 224 | do 225 | if [ "$f" != "$CARBON_HOME/lib/xboot/*.jar" ];then 226 | CARBON_XBOOTCLASSPATH="$CARBON_XBOOTCLASSPATH":$f 227 | fi 228 | done 229 | 230 | JAVA_ENDORSED_DIRS="$CARBON_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" 231 | 232 | CARBON_CLASSPATH="" 233 | if [ -e "$JAVA_HOME/lib/tools.jar" ]; then 234 | CARBON_CLASSPATH="$JAVA_HOME/lib/tools.jar" 235 | fi 236 | for f in "$CARBON_HOME"/bin/*.jar 237 | do 238 | if [ "$f" != "$CARBON_HOME/bin/*.jar" ];then 239 | CARBON_CLASSPATH="$CARBON_CLASSPATH":$f 240 | fi 241 | done 242 | for t in "$CARBON_HOME"/lib/commons-lang*.jar 243 | do 244 | CARBON_CLASSPATH="$CARBON_CLASSPATH":$t 245 | done 246 | # For Cygwin, switch paths to Windows format before running java 247 | if $cygwin; then 248 | JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"` 249 | CARBON_HOME=`cygpath --absolute --windows "$CARBON_HOME"` 250 | AXIS2_HOME=`cygpath --absolute --windows "$CARBON_HOME"` 251 | CLASSPATH=`cygpath --path --windows "$CLASSPATH"` 252 | JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"` 253 | CARBON_CLASSPATH=`cygpath --path --windows "$CARBON_CLASSPATH"` 254 | CARBON_XBOOTCLASSPATH=`cygpath --path --windows "$CARBON_XBOOTCLASSPATH"` 255 | fi 256 | 257 | # ----- Execute The Requested Command ----------------------------------------- 258 | 259 | echo JAVA_HOME environment variable is set to $JAVA_HOME 260 | echo CARBON_HOME environment variable is set to $CARBON_HOME 261 | 262 | cd "$CARBON_HOME" 263 | 264 | TMP_DIR=$CARBON_HOME/tmp 265 | if [ -d "$TMP_DIR" ]; then 266 | rm -rf "$TMP_DIR" 267 | fi 268 | 269 | START_EXIT_STATUS=121 270 | status=$START_EXIT_STATUS 271 | 272 | #To monitor a Carbon server in remote JMX mode on linux host machines, set the below system property. 273 | # -Djava.rmi.server.hostname="your.IP.goes.here" 274 | 275 | while [ "$status" = "$START_EXIT_STATUS" ] 276 | do 277 | $JAVACMD \ 278 | -Xbootclasspath/a:"$CARBON_XBOOTCLASSPATH" \ 279 | -Xms<%= @jvm['xms'] %> -Xmx<%= @jvm['xmx'] %> -XX:MaxPermSize=<%= @jvm['max_perm_size'] %> \ 280 | -XX:+HeapDumpOnOutOfMemoryError \ 281 | -XX:HeapDumpPath="$CARBON_HOME/repository/logs/heap-dump.hprof" \ 282 | $JAVA_OPTS \ 283 | -Dcom.sun.management.jmxremote \ 284 | -classpath "$CARBON_CLASSPATH" \ 285 | -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \ 286 | -Djava.io.tmpdir="$CARBON_HOME/tmp" \ 287 | -Dcatalina.base="$CARBON_HOME/lib/tomcat" \ 288 | -Dwso2.server.standalone=true \ 289 | -Dcarbon.registry.root=/ \ 290 | -Djava.command="$JAVACMD" \ 291 | -Dcarbon.home="$CARBON_HOME" \ 292 | -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \ 293 | -Dcarbon.config.dir.path="$CARBON_HOME/repository/conf" \ 294 | -Djava.util.logging.config.file="$CARBON_HOME/repository/conf/etc/logging-bridge.properties" \ 295 | -Dcomponents.repo="$CARBON_HOME/repository/components/plugins" \ 296 | -Dconf.location="$CARBON_HOME/repository/conf"\ 297 | -Dcom.atomikos.icatch.file="$CARBON_HOME/lib/transactions.properties" \ 298 | -Dcom.atomikos.icatch.hide_init_file_path=true \ 299 | -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false \ 300 | -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true \ 301 | -Dcom.sun.jndi.ldap.connect.pool.authentication=simple \ 302 | -Dcom.sun.jndi.ldap.connect.pool.timeout=3000 \ 303 | -Dorg.terracotta.quartz.skipUpdateCheck=true \ 304 | -Djava.security.egd=file:/dev/./urandom \ 305 | -Dfile.encoding=UTF8 \ 306 | -Djava.net.preferIPv4Stack=true \ 307 | -Dcom.ibm.cacheLocalHost=true \ 308 | -Dsetup \ 309 | <%- if @product_profile == 'worker' -%> 310 | -DworkerNode=true \ 311 | <%- else -%> 312 | -DworkerNode=false \ 313 | <%- end -%> 314 | org.wso2.carbon.bootstrap.Bootstrap $* 315 | status=$? 316 | done 317 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /templates/repository/conf/user-mgt.xml.erb: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | true 21 | <%= @user_management['admin_role'] %> 22 | 23 | <%= @user_management['admin_username'] %> 24 | <%= @user_management['admin_password'] %> 25 | 26 | everyone 27 | true 28 | <%= @master_datasources[@usermgt_datasource]['jndi_config'] %> 29 | 30 | 31 | 40 | 41 | org.wso2.carbon.user.core.tenant.JDBCTenantManager 42 | false 43 | true 44 | true 45 | ^[\S]{3,30}$ 46 | ^[\S]{3,30}$ 47 | Username pattern policy violated 48 | ^[\S]{5,30}$ 49 | ^[\S]{5,30}$ 50 | Password length should be within 5 to 30 characters 51 | ^[\S]{3,30}$ 52 | ^[\S]{3,30}$ 53 | true 54 | false 55 | true 56 | SHA-256 57 | true 58 | , 59 | 100 60 | 100 61 | true 62 | false 63 | 64 | 65 | 69 | 101 | 102 | 112 | 159 | 160 | 167 | 210 | 211 | 212 | /permission 213 | true 214 | false 215 | 216 | 217 | 218 | 219 | -------------------------------------------------------------------------------- /templates/repository/conf/carbon.xml.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 18 | 19 | 25 | 26 | 27 | 30 | WSO2 Enterprise Service Bus 31 | 32 | 35 | ESB 36 | 37 | 40 | 5.0.0 41 | 42 | 48 | <% if @hostname %> 49 | <%= @hostname %> 50 | <%- else -%> 51 | 52 | <% end %> 53 | 54 | 57 | <%- if @mgt_hostname -%> 58 | <%= @mgt_hostname %> 59 | <%- else -%> 60 | 61 | <%- end -%> 62 | 63 | 68 | local:/${carbon.context}/services/ 69 | 72 | 76 | 77 | 78 | 84 | 85 | EnterpriseServiceBus 86 | 87 | 88 | 89 | 90 | 91 | 94 | org.wso2.carbon 95 | 96 | 99 | / 100 | 101 | 110 | 114 | 115 | 116 | 117 | 118 | 122 | 15 123 | 124 | 125 | 126 | 127 | 130 | 131 | 132 | 136 | <%- if @ports['offset'] -%> 137 | <%= @ports['offset'] %> 138 | <%- else -%> 139 | 0 140 | <%- end -%> 141 | 142 | 143 | 144 | 145 | 9999 146 | 147 | 11111 148 | 149 | 150 | 151 | 152 | 153 | 10389 154 | 155 | 8000 156 | 157 | 158 | 161 | 162 | 163 | 10500 164 | 165 | 172 | 173 | 174 | 175 | 178 | 179 | 182 | org.wso2.carbon.tomcat.jndi.CarbonJavaURLContextFactory 183 | 186 | 187 | 190 | 200 | 203 | 204 | 205 | 206 | java 207 | 208 | 211 | 212 | 213 | 217 | 218 | 219 | 220 | 225 | false 226 | 227 | 230 | false 231 | 232 | 233 | 600 234 | 235 | 240 | 241 | false 242 | 243 | 244 | 245 | 267 | 268 | 269 | 270 | 30 271 | 272 | 275 | 276 | 277 | 278 | 281 | 282 | 283 | 15 284 | 285 | 286 | 289 | 290 | 301 | ${carbon.home}/repository/deployment/server/ 302 | 303 | 307 | 15 308 | 309 | 320 | ${carbon.home}/repository/conf/axis2/axis2.xml 321 | 322 | 327 | 30000 328 | 329 | 333 | ${carbon.home}/repository/deployment/client/ 334 | 336 | ${carbon.home}/repository/conf/axis2/axis2_client.xml 337 | 338 | true 339 | 340 | 343 | 344 | 345 | 346 | 347 | 351 | 352 | 353 | admin 354 | Default Administrator Role 355 | 356 | 357 | user 358 | Default User Role 359 | 360 | 361 | 362 | 365 | 366 | 367 | 370 | 371 | 375 | 376 | 377 | ${carbon.home}/<%= @key_stores['key_store']['location'] %> 378 | 379 | <%= @key_stores['key_store']['type'] %> 380 | 381 | <%= @key_stores['key_store']['password'] %> 382 | 383 | <%= @key_stores['key_store']['key_alias'] %> 384 | 385 | <%= @key_stores['key_store']['key_password'] %> 386 | 387 | 388 | 392 | 393 | 394 | ${carbon.home}/<%= @key_stores['trust_store']['location'] %> 395 | 396 | <%= @key_stores['trust_store']['type'] %> 397 | 398 | <%= @key_stores['trust_store']['password'] %> 399 | 400 | 401 | 406 | 407 | 412 | 413 | 417 | 418 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 440 | UserManager 441 | 442 | 443 | false 444 | 445 | 449 | 450 | 451 | 452 | true 453 | allow 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | false 465 | 466 | (.*)(/images|/css|/js|/docs)(.*) 467 | 468 | 469 | 470 | 471 | 472 | 473 | true 474 | 475 | 476 | 477 | 480 | ${carbon.home}/tmp/work 481 | 482 | 485 | 486 | 487 | 492 | true 493 | 494 | 497 | 10 498 | 499 | 505 | 30 506 | 507 | 508 | 514 | 515 | 518 | 100 519 | 520 | 521 | 522 | keystore 523 | certificate 524 | * 525 | 526 | org.wso2.carbon.ui.transports.fileupload.AnyFileUploadExecutor 527 | 528 | 529 | 530 | 531 | jarZip 532 | 533 | org.wso2.carbon.ui.transports.fileupload.JarZipUploadExecutor 534 | 535 | 536 | 537 | dbs 538 | 539 | org.wso2.carbon.ui.transports.fileupload.DBSFileUploadExecutor 540 | 541 | 542 | 543 | tools 544 | 545 | org.wso2.carbon.ui.transports.fileupload.ToolsFileUploadExecutor 546 | 547 | 548 | 549 | toolsAny 550 | 551 | org.wso2.carbon.ui.transports.fileupload.ToolsAnyFileUploadExecutor 552 | 553 | 554 | 555 | 559 | 560 | 561 | 573 | 574 | 575 | info 576 | org.wso2.carbon.core.transports.util.InfoProcessor 577 | 578 | 579 | wsdl 580 | org.wso2.carbon.core.transports.util.Wsdl11Processor 581 | 582 | 583 | wsdl2 584 | org.wso2.carbon.core.transports.util.Wsdl20Processor 585 | 586 | 587 | xsd 588 | org.wso2.carbon.core.transports.util.XsdProcessor 589 | 590 | 591 | 592 | 596 | 597 | <%= @dep_sync['enabled'] %> 598 | <%= @dep_sync['auto_commit'] %> 599 | <%= @dep_sync['auto_checkout'] %> 600 | <%= @dep_sync['repository_type'] %> 601 | <%- if @dep_sync['repository_type'] == "svn" -%> 602 | <%= @dep_sync['svn']['url'] -%> 603 | <%= @dep_sync['svn']['user'] -%> 604 | <%= @dep_sync['svn']['password'] -%> 605 | <%= @dep_sync['svn']['append_tenant_id'] -%> 606 | <%- end -%> 607 | 608 | 609 | 613 | 618 | 619 | 620 | 626 | 627 | 631 | 632 | 633 | 634 | 635 | 639 | ${require.carbon.servlet} 640 | 641 | 658 | 673 | 674 | true 675 | 676 | 677 | 678 | 679 | 682 | 683 | default repository 684 | http://product-dist.wso2.com/p2/carbon/releases/wilkes/ 685 | 686 | 687 | 690 | 691 | 692 | 694 | 695 | true 696 | 697 | 699 | 700 | 706 | 707 | true 708 | 709 | 710 | -------------------------------------------------------------------------------- /templates/repository/conf/axis2/axis2.xml.erb: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | true 28 | 29 | true 30 | 31 | 32 | false 33 | 34 | false 35 | 36 | 37 | false 38 | 39 | work/mtom 40 | 41 | 4000 42 | 43 | 44 | false 45 | 46 | 47 | inmemory 48 | 49 | 50 | 51 | 52 | services 53 | 54 | 55 | axis2services 56 | 57 | 58 | axis2modules 59 | 60 | 61 | WSO2 ESB 5.0.0 62 | WSO2 ESB 5.0.0 63 | 64 | 65 | 66 | false 67 | 68 | 69 | 70 | 71 | 72 | 73 | false 74 | 75 | 76 | true 77 | 78 | 79 | 30000 80 | 81 | 82 | repository/deployment/server/synapse-configs 83 | 84 | . 85 | 86 | . 87 | 88 | localhost 89 | 90 | true 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 143 | 145 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 159 | 161 | 163 | 165 | 167 | 169 | 170 | 171 | 173 | 175 | 177 | 179 | 181 | 183 | 185 | 187 | 189 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 203 | 205 | 207 | 209 | 210 | 211 | 213 | 215 | 217 | 219 | 221 | 223 | 225 | 227 | 229 | 231 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 8280 241 | true 242 | <%- if @esb_wsdl_epr_prefix and @esb_wsdl_epr_prefix['http']-%> 243 | <%= @esb_wsdl_epr_prefix['http']['bind_address'] %> 244 | <%= @esb_wsdl_epr_prefix['http']['prefix'] %> 245 | <%- end -%> 246 | org.wso2.carbon.mediation.transport.handlers.PassThroughNHttpGetProcessor 247 | 248 | 249 | 250 | 251 | 8243 252 | true 253 | TLSv1,TLSv1.1,TLSv1.2 254 | <%- if @esb_wsdl_epr_prefix and @esb_wsdl_epr_prefix['https']-%> 255 | <%= @esb_wsdl_epr_prefix['https']['bind_address'] %> 256 | <%= @esb_wsdl_epr_prefix['https']['prefix'] %> 257 | <%- end -%> 258 | org.wso2.carbon.mediation.transport.handlers.PassThroughNHttpGetProcessor 259 | 260 | 261 | <%= @key_stores['key_store']['location'] %> 262 | <%= @key_stores['key_store']['type'] %> 263 | <%= @key_stores['key_store']['password'] %> 264 | <%= @key_stores['key_store']['key_password'] %> 265 | 266 | 267 | 268 | 269 | <%= @key_stores['trust_store']['location'] %> 270 | <%= @key_stores['trust_store']['type'] %> 271 | <%= @key_stores['trust_store']['password'] %> 272 | 273 | 274 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 285 | 286 | 287 | 310 | 311 | 312 | 334 | 335 | 336 | 358 | 359 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 380 | 381 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | true 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | true 405 | 406 | 407 | <%= @key_stores['key_store']['location'] %> 408 | <%= @key_stores['key_store']['type'] %> 409 | <%= @key_stores['key_store']['password'] %> 410 | <%= @key_stores['key_store']['key_password'] %> 411 | 412 | 413 | 414 | 415 | <%= @key_stores['trust_store']['location'] %> 416 | <%= @key_stores['trust_store']['type'] %> 417 | <%= @key_stores['trust_store']['password'] %> 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 431 | 432 | 433 | 434 | 445 | 446 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 458 | 459 | 460 | 461 | 465 | 466 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 492 | 494 | 495 | 497 | WorkerManager 498 | 503 | true 504 | 505 | 518 | <%= @clustering['membership_scheme'] %> 519 | <%= scope.function_template(["wso2base/clustering/#{@clustering['membership_scheme']}.erb"]) %> 520 | 521 | 522 | 523 | 524 | 528 | <%= @clustering['domain'] %> 529 | 530 | 531 | 532 | 533 | 534 | 45564 535 | 536 | 100 537 | 538 | 60 539 | 540 | 544 | 547 | 548 | 549 | <%= @clustering['local_member_host'] %> 550 | 551 | 556 | 559 | 560 | 564 | 565 | <%= @clustering['local_member_port'] %> 566 | 567 | 572 | 575 | 576 | 579 | 580 | 581 | 582 | 583 | 586 | <%- if @ports['proxyPort'] and @ports['proxyPort']['pass_through_http'] -%> 587 | 588 | <%- end -%> 589 | 590 | <%- if @ports['proxyPort'] and @ports['proxyPort']['pass_through_https'] -%> 591 | 592 | <%- end -%> 593 | 594 | 595 | 596 | 597 | 598 | 602 | <%- if @clustering['membership_scheme'] == 'wka' -%> 603 | 604 | <%- @clustering['wka']['members'].each do |member| -%> 605 | 606 | <%= member['hostname'] %> 607 | <%= member['port'] %> 608 | 609 | <%- end -%> 610 | 611 | <%- end -%> 612 | 613 | 618 | 619 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 634 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 654 | 655 | 657 | 658 | 659 | 660 | 662 | 663 | 664 | 666 | 668 | 670 | 671 | 672 | 676 | 677 | 678 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 692 | 694 | 696 | 698 | 699 | 701 | 703 | 705 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 723 | 724 | 725 | 726 | 727 | 728 | 729 | 731 | 732 | 733 | 734 | 735 | 742 | 743 | 744 | 745 | 746 | 753 | 754 | 755 | 756 | 758 | 759 | 760 | 762 | 763 | 764 | 765 | 766 | 768 | 769 | 770 | 771 | 772 | 773 | 774 | 776 | 778 | 780 | 782 | 783 | 785 | 786 | 787 | 788 | 789 | 790 | 791 | 792 | 793 | 794 | 795 | 796 | 797 | 798 | 799 | 800 | 801 | 802 | 803 | 804 | 805 | 812 | 813 | 814 | 815 | 816 | --------------------------------------------------------------------------------