├── pattern-1 ├── bosh-release │ ├── dist │ │ └── .gitkeep │ ├── config │ │ ├── blobs.yml │ │ └── final.yml │ ├── deployment │ │ └── .gitkeep │ ├── jobs │ │ ├── health_check │ │ │ ├── monit │ │ │ ├── spec │ │ │ └── templates │ │ │ │ └── run.sh.erb │ │ ├── nfs_server │ │ │ ├── spec │ │ │ ├── monit │ │ │ └── templates │ │ │ │ └── ctl.erb │ │ └── wso2is │ │ │ ├── monit │ │ │ ├── templates │ │ │ ├── repository │ │ │ │ ├── deployment │ │ │ │ │ └── server │ │ │ │ │ │ └── jaggeryapps │ │ │ │ │ │ ├── portal │ │ │ │ │ │ └── conf │ │ │ │ │ │ │ └── site.json.erb │ │ │ │ │ │ └── dashboard │ │ │ │ │ │ └── conf │ │ │ │ │ │ └── site.json.erb │ │ │ │ └── conf │ │ │ │ │ ├── datasources │ │ │ │ │ ├── bps-datasources.xml.erb │ │ │ │ │ └── master-datasources.xml.erb │ │ │ │ │ ├── health-check-config.xml │ │ │ │ │ ├── tomcat │ │ │ │ │ ├── context.xml │ │ │ │ │ ├── catalina-server.xml.erb │ │ │ │ │ └── carbon │ │ │ │ │ │ └── WEB-INF │ │ │ │ │ │ └── web.xml │ │ │ │ │ ├── consent-mgt-config.xml.erb │ │ │ │ │ ├── identity │ │ │ │ │ ├── sso-idp-config.xml.erb │ │ │ │ │ └── embedded-ldap.xml │ │ │ │ │ └── registry.xml.erb │ │ │ └── ctl.erb │ │ │ └── spec │ ├── packages │ │ ├── common │ │ │ ├── packaging │ │ │ └── spec │ │ ├── wso2is │ │ │ ├── spec │ │ │ └── packaging │ │ ├── openjdk │ │ │ ├── spec │ │ │ └── packaging │ │ └── jdbcdrivers │ │ │ ├── spec │ │ │ └── packaging │ ├── src │ │ └── common │ │ │ └── utils.sh │ └── create.sh ├── tile │ ├── .gitignore │ ├── resources │ │ └── wso2-logo.png │ ├── build.sh │ └── tile.yml ├── images │ ├── pattern-1.png │ ├── add-new-tile.png │ ├── apply-changes.png │ ├── review-pending-changes.png │ ├── trusted-ca-certificate.png │ ├── datasource-configurations.png │ └── az-and-network-assignments.png ├── ops_update.sh └── README.md ├── pattern-2 ├── bosh-release │ ├── dist │ │ └── .gitkeep │ ├── config │ │ ├── blobs.yml │ │ └── final.yml │ ├── deployment │ │ └── .gitkeep │ ├── jobs │ │ ├── health_check │ │ │ ├── monit │ │ │ ├── spec │ │ │ └── templates │ │ │ │ └── run.sh.erb │ │ ├── nfs_server │ │ │ ├── spec │ │ │ ├── monit │ │ │ └── templates │ │ │ │ └── ctl.erb │ │ ├── wso2is │ │ │ ├── monit │ │ │ ├── templates │ │ │ │ ├── repository │ │ │ │ │ ├── deployment │ │ │ │ │ │ └── server │ │ │ │ │ │ │ ├── jaggeryapps │ │ │ │ │ │ │ └── dashboard │ │ │ │ │ │ │ │ └── conf │ │ │ │ │ │ │ │ └── site.json.erb │ │ │ │ │ │ │ └── eventpublishers │ │ │ │ │ │ │ ├── IsAnalytics-Publisher-wso2event-SessionData.xml.erb │ │ │ │ │ │ │ ├── IsAnalytics-Publisher-wso2event-AuthenticationData.xml.erb │ │ │ │ │ │ │ ├── IsAnalytics-Publisher-wso2event-RoleData.xml.erb │ │ │ │ │ │ │ └── IsAnalytics-Publisher-wso2event-UserData.xml.erb │ │ │ │ │ └── conf │ │ │ │ │ │ ├── datasources │ │ │ │ │ │ ├── bps-datasources.xml.erb │ │ │ │ │ │ └── master-datasources.xml.erb │ │ │ │ │ │ ├── identity │ │ │ │ │ │ ├── sso-idp-config.xml.erb │ │ │ │ │ │ └── embedded-ldap.xml │ │ │ │ │ │ └── registry.xml.erb │ │ │ │ └── ctl.erb │ │ │ └── spec │ │ ├── wso2is_analytics_worker │ │ │ ├── monit │ │ │ ├── spec │ │ │ └── templates │ │ │ │ └── ctl.erb │ │ └── wso2is_analytics_dashboard │ │ │ ├── monit │ │ │ ├── spec │ │ │ └── templates │ │ │ └── ctl.erb │ ├── packages │ │ ├── common │ │ │ ├── packaging │ │ │ └── spec │ │ ├── wso2is │ │ │ ├── spec │ │ │ └── packaging │ │ ├── openjdk │ │ │ ├── spec │ │ │ └── packaging │ │ ├── wso2is_analytics │ │ │ ├── spec │ │ │ └── packaging │ │ └── jdbcdrivers │ │ │ ├── spec │ │ │ └── packaging │ ├── src │ │ └── common │ │ │ └── utils.sh │ └── create.sh ├── tile │ ├── .gitignore │ ├── resources │ │ └── wso2-logo.png │ ├── build.sh │ └── tile.yml ├── images │ ├── pattern-2.png │ ├── add-new-tile.png │ ├── apply-changes.png │ ├── review-pending-changes.png │ ├── trusted-ca-certificate.png │ ├── datasource-configurations.png │ └── az-and-network-assignments.png └── README.md ├── README.md ├── issue_template.md ├── .gitignore ├── pull_request_template.md └── LICENSE.txt /pattern-1/bosh-release/dist/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/dist/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/config/blobs.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/deployment/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/config/blobs.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/deployment/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/jobs/health_check/monit: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/jobs/health_check/monit: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pattern-1/tile/.gitignore: -------------------------------------------------------------------------------- 1 | product/ 2 | release/ 3 | cache/* 4 | !cache/.gitkeep 5 | -------------------------------------------------------------------------------- /pattern-2/tile/.gitignore: -------------------------------------------------------------------------------- 1 | product/ 2 | release/ 3 | cache/* 4 | !cache/.gitkeep 5 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/packages/common/packaging: -------------------------------------------------------------------------------- 1 | set -e -x 2 | 3 | cp -a common/* ${BOSH_INSTALL_TARGET} 4 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/packages/common/packaging: -------------------------------------------------------------------------------- 1 | set -e -x 2 | 3 | cp -a common/* ${BOSH_INSTALL_TARGET} 4 | -------------------------------------------------------------------------------- /pattern-1/images/pattern-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2-attic/pivotal-cf-is/HEAD/pattern-1/images/pattern-1.png -------------------------------------------------------------------------------- /pattern-2/images/pattern-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2-attic/pivotal-cf-is/HEAD/pattern-2/images/pattern-2.png -------------------------------------------------------------------------------- /pattern-1/images/add-new-tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2-attic/pivotal-cf-is/HEAD/pattern-1/images/add-new-tile.png -------------------------------------------------------------------------------- /pattern-1/images/apply-changes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2-attic/pivotal-cf-is/HEAD/pattern-1/images/apply-changes.png -------------------------------------------------------------------------------- /pattern-2/images/add-new-tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2-attic/pivotal-cf-is/HEAD/pattern-2/images/add-new-tile.png -------------------------------------------------------------------------------- /pattern-2/images/apply-changes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2-attic/pivotal-cf-is/HEAD/pattern-2/images/apply-changes.png -------------------------------------------------------------------------------- /pattern-1/bosh-release/packages/common/spec: -------------------------------------------------------------------------------- 1 | --- 2 | name: common 3 | 4 | dependencies: [] 5 | 6 | files: 7 | - common/utils.sh 8 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/packages/common/spec: -------------------------------------------------------------------------------- 1 | --- 2 | name: common 3 | 4 | dependencies: [] 5 | 6 | files: 7 | - common/utils.sh 8 | -------------------------------------------------------------------------------- /pattern-1/tile/resources/wso2-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2-attic/pivotal-cf-is/HEAD/pattern-1/tile/resources/wso2-logo.png -------------------------------------------------------------------------------- /pattern-2/tile/resources/wso2-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2-attic/pivotal-cf-is/HEAD/pattern-2/tile/resources/wso2-logo.png -------------------------------------------------------------------------------- /pattern-1/bosh-release/packages/wso2is/spec: -------------------------------------------------------------------------------- 1 | --- 2 | name: wso2is 3 | 4 | dependencies: [] 5 | 6 | files: 7 | - wso2is/wso2is-5.7.0.zip 8 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/packages/wso2is/spec: -------------------------------------------------------------------------------- 1 | --- 2 | name: wso2is 3 | 4 | dependencies: [] 5 | 6 | files: 7 | - wso2is/wso2is-5.7.0.zip 8 | -------------------------------------------------------------------------------- /pattern-1/images/review-pending-changes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2-attic/pivotal-cf-is/HEAD/pattern-1/images/review-pending-changes.png -------------------------------------------------------------------------------- /pattern-1/images/trusted-ca-certificate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2-attic/pivotal-cf-is/HEAD/pattern-1/images/trusted-ca-certificate.png -------------------------------------------------------------------------------- /pattern-2/images/review-pending-changes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2-attic/pivotal-cf-is/HEAD/pattern-2/images/review-pending-changes.png -------------------------------------------------------------------------------- /pattern-2/images/trusted-ca-certificate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2-attic/pivotal-cf-is/HEAD/pattern-2/images/trusted-ca-certificate.png -------------------------------------------------------------------------------- /pattern-1/images/datasource-configurations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2-attic/pivotal-cf-is/HEAD/pattern-1/images/datasource-configurations.png -------------------------------------------------------------------------------- /pattern-2/images/datasource-configurations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2-attic/pivotal-cf-is/HEAD/pattern-2/images/datasource-configurations.png -------------------------------------------------------------------------------- /pattern-1/images/az-and-network-assignments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2-attic/pivotal-cf-is/HEAD/pattern-1/images/az-and-network-assignments.png -------------------------------------------------------------------------------- /pattern-2/images/az-and-network-assignments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2-attic/pivotal-cf-is/HEAD/pattern-2/images/az-and-network-assignments.png -------------------------------------------------------------------------------- /pattern-1/bosh-release/jobs/nfs_server/spec: -------------------------------------------------------------------------------- 1 | --- 2 | name: nfs_server 3 | templates: 4 | ctl.erb: bin/ctl 5 | 6 | provides: 7 | - name: nfs-server 8 | type: nfs 9 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/jobs/nfs_server/spec: -------------------------------------------------------------------------------- 1 | --- 2 | name: nfs_server 3 | templates: 4 | ctl.erb: bin/ctl 5 | 6 | provides: 7 | - name: nfs-server 8 | type: nfs 9 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/packages/openjdk/spec: -------------------------------------------------------------------------------- 1 | --- 2 | name: openjdk 3 | 4 | dependencies: [] 5 | 6 | files: 7 | - openjdk/OpenJDK8U-jdk_x64_linux_hotspot_8u212b04.tar.gz 8 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/packages/openjdk/spec: -------------------------------------------------------------------------------- 1 | --- 2 | name: openjdk 3 | 4 | dependencies: [] 5 | 6 | files: 7 | - openjdk/OpenJDK8U-jdk_x64_linux_hotspot_8u192b12.tar.gz 8 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/packages/wso2is_analytics/spec: -------------------------------------------------------------------------------- 1 | --- 2 | name: wso2is_analytics 3 | 4 | dependencies: [] 5 | 6 | files: 7 | - wso2is_analytics/wso2is-analytics-5.7.0*.zip 8 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/packages/jdbcdrivers/spec: -------------------------------------------------------------------------------- 1 | --- 2 | name: jdbcdrivers 3 | 4 | dependencies: [] 5 | 6 | files: 7 | - jdbcdrivers/mysql-connector-java-5.1.*-bin.jar 8 | - jdbcdrivers/mssql-jdbc-7.0.0.jre8.jar 9 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/packages/jdbcdrivers/spec: -------------------------------------------------------------------------------- 1 | --- 2 | name: jdbcdrivers 3 | 4 | dependencies: [] 5 | 6 | files: 7 | - jdbcdrivers/mysql-connector-java-5.1.*-bin.jar 8 | - jdbcdrivers/mssql-jdbc-7.0.0.jre8.jar 9 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/jobs/wso2is/monit: -------------------------------------------------------------------------------- 1 | check process wso2is 2 | with pidfile /var/vcap/sys/run/wso2is/pid 3 | start program "/var/vcap/jobs/wso2is/bin/ctl start" 4 | with timeout 100 seconds 5 | group vcap 6 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/jobs/wso2is/monit: -------------------------------------------------------------------------------- 1 | check process wso2is 2 | with pidfile /var/vcap/sys/run/wso2is/pid 3 | start program "/var/vcap/jobs/wso2is/bin/ctl start" 4 | with timeout 100 seconds 5 | stop program "/var/vcap/jobs/wso2is/bin/ctl stop" 6 | with timeout 30 seconds 7 | group vcap 8 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/jobs/nfs_server/monit: -------------------------------------------------------------------------------- 1 | check process nfs_server 2 | with pidfile /var/vcap/sys/run/nfs_server/pid 3 | start program "/var/vcap/jobs/nfs_server/bin/ctl start" 4 | with timeout 100 seconds 5 | stop program "/var/vcap/jobs/nfs_server/bin/ctl stop" 6 | with timeout 30 seconds 7 | group vcap 8 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/jobs/nfs_server/monit: -------------------------------------------------------------------------------- 1 | check process nfs_server 2 | with pidfile /var/vcap/sys/run/nfs_server/pid 3 | start program "/var/vcap/jobs/nfs_server/bin/ctl start" 4 | with timeout 100 seconds 5 | stop program "/var/vcap/jobs/nfs_server/bin/ctl stop" 6 | with timeout 30 seconds 7 | group vcap 8 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/jobs/wso2is/templates/repository/deployment/server/jaggeryapps/portal/conf/site.json.erb: -------------------------------------------------------------------------------- 1 | { 2 | "proxy":{ 3 | "proxyHost":"<%= p('route_registrar.routes')[0]['uris'][0] %>" 4 | "proxyHTTPSPort":"443", 5 | "proxyContextPath":"" 6 | }, 7 | "fido":{ 8 | "appId":"" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/jobs/wso2is/templates/repository/deployment/server/jaggeryapps/dashboard/conf/site.json.erb: -------------------------------------------------------------------------------- 1 | { 2 | "proxy" : { 3 | "proxyHost" : "<%= p('route_registrar.routes')[0]['uris'][0] %>", 4 | "proxyHTTPSPort" : "443", 5 | "proxyContextPath" : "", 6 | "servicePath" : "/services" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/jobs/wso2is/templates/repository/deployment/server/jaggeryapps/dashboard/conf/site.json.erb: -------------------------------------------------------------------------------- 1 | { 2 | "proxy" : { 3 | "proxyHost" : "<%= p('route_registrar.routes')[0]['uris'][0] %>", 4 | "proxyHTTPSPort" : "443", 5 | "proxyContextPath" : "", 6 | "servicePath" : "/services" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/jobs/wso2is_analytics_worker/monit: -------------------------------------------------------------------------------- 1 | check process wso2is_analytics_worker 2 | with pidfile /var/vcap/sys/run/wso2is_analytics_worker/pid 3 | start program "/var/vcap/jobs/wso2is_analytics_worker/bin/ctl start" 4 | with timeout 100 seconds 5 | stop program "/var/vcap/jobs/wso2is_analytics_worker/bin/ctl stop" 6 | with timeout 30 seconds 7 | group vcap 8 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/packages/wso2is/packaging: -------------------------------------------------------------------------------- 1 | # abort script on any command that exit with a non zero value 2 | set -e 3 | 4 | archive=`echo wso2is/wso2is-5.7.0*.zip` 5 | 6 | if [[ -f $archive ]] ; then 7 | echo "WSO2 Identity Server archive found" 8 | else 9 | echo "WSO2 Identity Server archive not found" 10 | exit 1 11 | fi 12 | 13 | cp -r $archive ${BOSH_INSTALL_TARGET} 14 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/packages/wso2is/packaging: -------------------------------------------------------------------------------- 1 | # abort script on any command that exit with a non zero value 2 | set -e 3 | 4 | archive=`echo wso2is/wso2is-5.7.0*.zip` 5 | 6 | if [[ -f $archive ]] ; then 7 | echo "WSO2 Identity Server archive found" 8 | else 9 | echo "WSO2 Identity Server archive not found" 10 | exit 1 11 | fi 12 | 13 | cp -r $archive ${BOSH_INSTALL_TARGET} 14 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/jobs/health_check/spec: -------------------------------------------------------------------------------- 1 | --- 2 | name: health_check 3 | 4 | templates: 5 | run.sh.erb: bin/run 6 | 7 | packages: [] 8 | 9 | properties: 10 | health_check.endpoint: 11 | description: Health Check endpoint 12 | health_check.name: 13 | description: Health Check name 14 | health_check.status_code: 15 | description: Health Check expected status code 16 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/jobs/health_check/spec: -------------------------------------------------------------------------------- 1 | --- 2 | name: health_check 3 | 4 | templates: 5 | run.sh.erb: bin/run 6 | 7 | packages: [] 8 | 9 | properties: 10 | health_check.endpoint: 11 | description: Health Check endpoint 12 | health_check.name: 13 | description: Health Check name 14 | health_check.status_code: 15 | description: Health Check expected status code 16 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/packages/openjdk/packaging: -------------------------------------------------------------------------------- 1 | # abort script on any command that exit with a non zero value 2 | set -e 3 | 4 | archive=`echo openjdk/OpenJDK8U-jdk_x64_linux_hotspot_8u212b04.tar.gz` 5 | 6 | if [[ -f $archive ]] ; then 7 | echo "Open JDK archive found" 8 | else 9 | echo "Open JDK archive not found" 10 | exit 1 11 | fi 12 | 13 | cp -r $archive ${BOSH_INSTALL_TARGET} 14 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/jobs/wso2is_analytics_dashboard/monit: -------------------------------------------------------------------------------- 1 | check process wso2is_analytics_dashboard 2 | with pidfile /var/vcap/sys/run/wso2is_analytics_dashboard/pid 3 | start program "/var/vcap/jobs/wso2is_analytics_dashboard/bin/ctl start" 4 | with timeout 100 seconds 5 | stop program "/var/vcap/jobs/wso2is_analytics_dashboard/bin/ctl stop" 6 | with timeout 30 seconds 7 | group vcap 8 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/packages/openjdk/packaging: -------------------------------------------------------------------------------- 1 | # abort script on any command that exit with a non zero value 2 | set -e 3 | 4 | archive=`echo openjdk/OpenJDK8U-jdk_x64_linux_hotspot_8u192b12.tar.gz` 5 | 6 | if [[ -f $archive ]] ; then 7 | echo "Open JDK archive found" 8 | else 9 | echo "Open JDK archive not found" 10 | exit 1 11 | fi 12 | 13 | cp -r $archive ${BOSH_INSTALL_TARGET} 14 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/packages/wso2is_analytics/packaging: -------------------------------------------------------------------------------- 1 | # abort script on any command that exit with a non zero value 2 | set -e 3 | 4 | archive=`echo wso2is_analytics/wso2is-analytics-5.7.0*.zip` 5 | 6 | if [[ -f $archive ]] ; then 7 | echo "WSO2 Identity Server Analytics archive found" 8 | else 9 | echo "WSO2 Identity Server Analytics archive not found" 10 | exit 1 11 | fi 12 | 13 | cp -r $archive ${BOSH_INSTALL_TARGET} 14 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/packages/jdbcdrivers/packaging: -------------------------------------------------------------------------------- 1 | # abort script on any command that exit with a non zero value 2 | set -e 3 | 4 | mysql=`echo jdbcdrivers/mysql-connector-java-5.1.*-bin.jar` 5 | 6 | if [[ -f $mysql ]] ; then 7 | echo "MySQL driver found" 8 | else 9 | echo "MySQL driver not found" 10 | exit 1 11 | fi 12 | 13 | mssql=`echo jdbcdrivers/mssql-jdbc-7.0.0.jre8.jar` 14 | 15 | if [[ -f $mssql ]] ; then 16 | echo "MS SQL driver found" 17 | else 18 | echo "MS SQL driver not found" 19 | exit 1 20 | fi 21 | 22 | cp -r $mysql ${BOSH_INSTALL_TARGET} 23 | cp -r $mssql ${BOSH_INSTALL_TARGET} 24 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/packages/jdbcdrivers/packaging: -------------------------------------------------------------------------------- 1 | # abort script on any command that exit with a non zero value 2 | set -e 3 | 4 | mysql=`echo jdbcdrivers/mysql-connector-java-5.1.*-bin.jar` 5 | 6 | if [[ -f $mysql ]] ; then 7 | echo "MySQL driver found" 8 | else 9 | echo "MySQL driver not found" 10 | exit 1 11 | fi 12 | 13 | mssql=`echo jdbcdrivers/mssql-jdbc-7.0.*.jre8.jar` 14 | 15 | if [[ -f $mssql ]] ; then 16 | echo "MS SQL driver found" 17 | else 18 | echo "MS SQL driver not found" 19 | exit 1 20 | fi 21 | 22 | cp -r $mysql ${BOSH_INSTALL_TARGET} 23 | cp -r $mssql ${BOSH_INSTALL_TARGET} 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # This repository is no longer maintained. 2 | Issue reports and pull requests will not be attended. 3 | 4 | #### ⚠️ DISCLAIMER 5 | 6 | Use these artefacts as a reference to build your deployment artefacts. Existing artefacts only developed to demonstrate a reference deployment and should not be used as is in production 7 | 8 | ------------------------------------------------------------------ 9 | 10 | # WSO2 Identity Server Pivotal Cloud Foundry Resources 11 | 12 | This repository contains Pivotal Cloud Foundry resources for WSO2 Identity Server. 13 | 14 | * BOSH releases for WSO2 Identity Server deployment patterns 15 | * Pivotal Cloud Foundry Tiles for WSO2 Identity Server deployment patterns 16 | -------------------------------------------------------------------------------- /pattern-2/tile/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ------------------------------------------------------------------------ 3 | # 4 | # Copyright 2019 WSO2, Inc. (http://wso2.com) 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License 17 | # 18 | # ------------------------------------------------------------------------ 19 | 20 | tile build --cache cache/ 21 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /pattern-1/tile/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ------------------------------------------------------------------------ 3 | # 4 | # Copyright 2019 WSO2, Inc. (http://wso2.com) 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License 17 | # 18 | # ------------------------------------------------------------------------ 19 | 20 | rm cache/wso2is.tgz 21 | rm -rf product 22 | rm -rf release 23 | tile build --cache cache/ 24 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/jobs/wso2is/templates/repository/deployment/server/eventpublishers/IsAnalytics-Publisher-wso2event-SessionData.xml.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | admin 7 | thrift 8 | non-blocking 9 | 0 10 | tcp://<%= link("is-analytics-worker").instances[0].address %>:7612 11 | admin 12 | 13 | 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.jar 15 | *.war 16 | *.ear 17 | *.zip 18 | *.tar.gz 19 | *.rar 20 | 21 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 22 | hs_err_pid* 23 | 24 | .idea/ 25 | **/.dev_builds/ 26 | **/blobs/ 27 | **/dev_releases/ 28 | 29 | pattern-*/bosh-release/deployment/* 30 | !pattern-*/bosh-release/deployment/.gitkeep 31 | **/dist/* 32 | !**/dist/.gitkeep 33 | **/.final_builds/* 34 | **/releases/* 35 | 36 | **/tile/product/ 37 | !**/tile/product/.gitkeep 38 | **/tile/cache/ 39 | !**/tile/cache/.gitkeep 40 | **/tile/release/ 41 | **/tile/routing-0.188.0.tgz 42 | **/tile/bpm-release-1.1.0.tgz 43 | **/tile/wso2is-5.7.0* 44 | **/tile/tile-history.yml 45 | 46 | **/bosh-release/wso2* 47 | 48 | pattern-*/bosh-release/config/blobs.yml 49 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/jobs/wso2is/templates/repository/deployment/server/eventpublishers/IsAnalytics-Publisher-wso2event-AuthenticationData.xml.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | admin 7 | thrift 8 | non-blocking 9 | 0 10 | tcp://<%= link("is-analytics-worker").instances[0].address %>:7612 11 | admin 12 | 13 | 14 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/config/final.yml: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------------------------------------- 2 | # 3 | # Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 4 | # 5 | # WSO2 Inc. licenses this file to you under the Apache License, 6 | # Version 2.0 (the "License"); you may not use this file except 7 | # in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | # ---------------------------------------------------------------------------- 20 | --- 21 | blobstore: 22 | provider: local 23 | options: 24 | blobstore_path: /tmp/wso2is-release-blobs 25 | final_name: wso2is-release 26 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/config/final.yml: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------------------------------------- 2 | # 3 | # Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 4 | # 5 | # WSO2 Inc. licenses this file to you under the Apache License, 6 | # Version 2.0 (the "License"); you may not use this file except 7 | # in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | # ---------------------------------------------------------------------------- 20 | --- 21 | blobstore: 22 | provider: local 23 | options: 24 | blobstore_path: /tmp/wso2is-release-blobs 25 | final_name: wso2is-release 26 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/jobs/wso2is_analytics_worker/spec: -------------------------------------------------------------------------------- 1 | --- 2 | name: wso2is_analytics_worker 3 | templates: 4 | ctl.erb: bin/ctl 5 | conf/worker/deployment.yaml.erb: conf/worker/deployment.yaml 6 | 7 | packages: 8 | - openjdk 9 | - jdbcdrivers 10 | - wso2is_analytics 11 | - common 12 | 13 | provides: 14 | - name: is-analytics-worker 15 | type: analytics-worker-node 16 | 17 | properties: 18 | wso2is_analytics.memory.min_heap: 19 | description: "Min Heap in MB" 20 | default: 2048 21 | wso2is_analytics.memory.max_heap: 22 | description: "Max Heap in MB" 23 | default: 2048 24 | wso2is_analytics.memory.max_permgen: 25 | description: "Max permgen in MB" 26 | default: 1024 27 | 28 | wso2is.analytics_db.jdbc_url: 29 | description: Analytics Datasource JDBC URL 30 | wso2is.analytics_db.username: 31 | description: Analytics Datasource username 32 | wso2is.analytics_db.password: 33 | description: Analytics Datasource password 34 | wso2is.analytics_db.driver: 35 | description: Analytics Datasource driver class name 36 | wso2is.analytics_db.query: 37 | description: Analytics Datasource validation query 38 | 39 | wso2is.certs.value: 40 | description: Trusted CA certificate 41 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/jobs/health_check/templates/run.sh.erb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | isAlive=0 6 | 7 | health_check() { 8 | # Check if health check endpoint is alive 9 | if curl --output /dev/null --silent --fail -k "$1" 10 | then 11 | status_code=$(curl --write-out %{http_code} --silent --output /dev/null -k ${1}) 12 | 13 | # Check if requests to the health check endpoint produces a valid response 14 | if [[ "$status_code" -ne <%= p("health_check.status_code") %> ]] ; then 15 | >&2 echo "WSO2 IS $2 produces an invalid response: $status_code" 16 | exit 1 17 | else 18 | echo "WSO2 IS $2 is Running!" 19 | isAlive=1 20 | fi 21 | else 22 | >&2 echo "WSO2 IS $2 is not alive. Retrying in 10s..." 23 | isAlive=0 24 | fi 25 | } 26 | 27 | healthCheckEP=<%= p("health_check.endpoint") %> 28 | COUNTER=0 29 | 30 | # While the endpoint is not alive, and the server has been retrying for less than 3 minutes 31 | while [ ${isAlive} -eq 0 ]&&[ ${COUNTER} -lt 18 ]; do 32 | sleep 10s 33 | health_check ${healthCheckEP} "<%= p("health_check.name") %>" 34 | let COUNTER=COUNTER+1 35 | done 36 | 37 | if [ ${isAlive} -eq 0 ]; then 38 | >&2 echo "Could not connect to WSO2 IS $2. Exiting..." 39 | exit 1 40 | fi 41 | 42 | exit 0 43 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/jobs/health_check/templates/run.sh.erb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | isAlive=0 6 | 7 | health_check() { 8 | # Check if health check endpoint is alive 9 | if curl --output /dev/null --silent --fail -k "$1" 10 | then 11 | status_code=$(curl --write-out %{http_code} --silent --output /dev/null -k ${1}) 12 | 13 | # Check if requests to the health check endpoint produces a valid response 14 | if [[ "$status_code" -ne <%= p("health_check.status_code") %> ]] ; then 15 | >&2 echo "WSO2 IS $2 produces an invalid response: $status_code" 16 | exit 1 17 | else 18 | echo "WSO2 IS $2 is Running!" 19 | isAlive=1 20 | fi 21 | else 22 | >&2 echo "WSO2 IS $2 is not alive. Retrying in 10s..." 23 | isAlive=0 24 | fi 25 | } 26 | 27 | healthCheckEP=<%= p("health_check.endpoint") %> 28 | COUNTER=0 29 | 30 | # While the endpoint is not alive, and the server has been retrying for less than 3 minutes 31 | while [ ${isAlive} -eq 0 ]&&[ ${COUNTER} -lt 18 ]; do 32 | sleep 10s 33 | health_check ${healthCheckEP} "<%= p("health_check.name") %>" 34 | let COUNTER=COUNTER+1 35 | done 36 | 37 | if [ ${isAlive} -eq 0 ]; then 38 | >&2 echo "Could not connect to WSO2 IS $2. Exiting..." 39 | exit 1 40 | fi 41 | 42 | exit 0 43 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/jobs/wso2is_analytics_dashboard/spec: -------------------------------------------------------------------------------- 1 | --- 2 | name: wso2is_analytics_dashboard 3 | templates: 4 | ctl.erb: bin/ctl 5 | conf/dashboard/deployment.yaml.erb: conf/dashboard/deployment.yaml 6 | 7 | packages: 8 | - openjdk 9 | - jdbcdrivers 10 | - wso2is_analytics 11 | - common 12 | 13 | provides: 14 | - name: is-analytics-dashboard 15 | type: analytics-dashboard-node 16 | properties: 17 | - route_registrar.routes 18 | 19 | properties: 20 | wso2is_analytics.memory.min_heap: 21 | description: "Min Heap in MB" 22 | default: 2048 23 | wso2is_analytics.memory.max_heap: 24 | description: "Max Heap in MB" 25 | default: 2048 26 | wso2is_analytics.memory.max_permgen: 27 | description: "Max permgen in MB" 28 | default: 1024 29 | 30 | route_registrar.routes: 31 | description: routes registered for WSO2 IS Analytics Dashboard 32 | 33 | wso2is.analytics_db.jdbc_url: 34 | description: Analytics Datasource JDBC URL 35 | wso2is.analytics_db.username: 36 | description: Analytics Datasource username 37 | wso2is.analytics_db.password: 38 | description: Analytics Datasource password 39 | wso2is.analytics_db.driver: 40 | description: Analytics Datasource driver class name 41 | wso2is.analytics_db.query: 42 | description: Analytics Datasource validation query 43 | 44 | wso2is.certs.value: 45 | description: Trusted CA certificate 46 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/jobs/wso2is/templates/repository/conf/datasources/bps-datasources.xml.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader 5 | 6 | 7 | 8 | 9 | BPS_DS 10 | 11 | 12 | bpsds 13 | 14 | 15 | 16 | <%= p("wso2is.bps_ds.jdbc_url") %> 17 | <%= p("wso2is.bps_ds.username") %> 18 | <%= p("wso2is.bps_ds.password") %> 19 | <%= p("wso2is.bps_ds.driver") %> 20 | true 21 | <%= p("wso2is.bps_ds.query") %> 22 | 30000 23 | false 24 | true 25 | 100 26 | 20 27 | 10000 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/jobs/wso2is/templates/repository/conf/health-check-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | true 23 | 24 | 25 | 26 | 27 | 80 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/jobs/wso2is/templates/repository/conf/datasources/bps-datasources.xml.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader 5 | 6 | 7 | 8 | 9 | BPS_DS 10 | 11 | 12 | bpsds 13 | 14 | 15 | 16 | <%= p("wso2is.bps_ds.jdbc_url") %> 17 | <%= p("wso2is.bps_ds.username") %> 18 | <%= p("wso2is.bps_ds.password") %> 19 | <%= p("wso2is.bps_ds.driver") %> 20 | true 21 | <%= p("wso2is.bps_ds.query") %> 22 | 30000 23 | false 24 | true 25 | 100 26 | 20 27 | 10000 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/jobs/wso2is/templates/repository/deployment/server/eventpublishers/IsAnalytics-Publisher-wso2event-RoleData.xml.erb: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 22 | 23 | 24 | 25 | admin 26 | thrift 27 | non-blocking 28 | 0 29 | tcp://<%= link("is-analytics-worker").instances[0].address %>:7612 30 | admin 31 | 32 | 33 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/jobs/wso2is/templates/repository/deployment/server/eventpublishers/IsAnalytics-Publisher-wso2event-UserData.xml.erb: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 22 | 23 | 24 | 25 | admin 26 | thrift 27 | non-blocking 28 | 0 29 | tcp://<%= link("is-analytics-worker").instances[0].address %>:7612 30 | admin 31 | 32 | 33 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/jobs/wso2is/templates/repository/conf/tomcat/context.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | 25 | 26 | 27 | 30 | 31 | 32 | 34 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/jobs/wso2is/templates/repository/conf/consent-mgt-config.xml.erb: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 21 | 22 | jdbc/WSO2ConsentDS 23 | 24 | 25 | <%= p("wso2is.consent_mgt_conf.piicontroller") %> 26 | <%= p("wso2is.consent_mgt_conf.contact") %> 27 | <%= p("wso2is.consent_mgt_conf.email") %> 28 | <%= p("wso2is.consent_mgt_conf.phone") %> 29 | false 30 | <%= p("wso2is.consent_mgt_conf.piicontroller_url") %> 31 |
32 | <%= p("wso2is.consent_mgt_conf.country") %> 33 | <%= p("wso2is.consent_mgt_conf.locality") %> 34 | <%= p("wso2is.consent_mgt_conf.region") %> 35 | <%= p("wso2is.consent_mgt_conf.postoffice_box_number") %> 36 | <%= p("wso2is.consent_mgt_conf.postalcode") %> 37 | <%= p("wso2is.consent_mgt_conf.street_address") %> 38 |
39 |
40 | 41 | 100 42 | 43 |
44 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/src/common/utils.sh: -------------------------------------------------------------------------------- 1 | 2 | mkdir -p /var/vcap/sys/log 3 | 4 | exec > >(tee -a >(logger -p user.info -t vcap.$(basename $0).stdout) | awk -W interactive '{ gsub(/\\n/, ""); system("echo -n [$(date +\"%Y-%m-%d %H:%M:%S%z\")]"); print " " $0 }' >>/var/vcap/sys/log/$(basename $0).log) 5 | exec 2> >(tee -a >(logger -p user.error -t vcap.$(basename $0).stderr) | awk -W interactive '{ gsub(/\\n/, ""); system("echo -n [$(date +\"%Y-%m-%d %H:%M:%S%z\")]"); print " " $0 }' >>/var/vcap/sys/log/$(basename $0).err.log) 6 | 7 | pid_guard() { 8 | echo "------------ STARTING `basename $0` at `date` --------------" | tee /dev/stderr 9 | pidfile=$1 10 | name=$2 11 | 12 | if [ -f "$pidfile" ]; then 13 | pid=$(head -1 "$pidfile") 14 | 15 | if [ -n "$pid" ] && [ -e /proc/$pid ]; then 16 | echo "$name is already running, please stop it first" 17 | exit 1 18 | fi 19 | 20 | echo "Removing stale pidfile..." 21 | rm $pidfile 22 | fi 23 | } 24 | 25 | wait_pidfile() { 26 | pidfile=$1 27 | try_kill=$2 28 | timeout=${3:-0} 29 | force=${4:-0} 30 | countdown=$(( $timeout * 10 )) 31 | 32 | if [ -f "$pidfile" ]; then 33 | pid=$(head -1 "$pidfile") 34 | 35 | if [ -z "$pid" ]; then 36 | echo "Unable to get pid from $pidfile" 37 | exit 1 38 | fi 39 | 40 | if [ -e /proc/$pid ]; then 41 | if [ "$try_kill" = "1" ]; then 42 | echo "Killing $pidfile: $pid " 43 | kill $pid 44 | fi 45 | while [ -e /proc/$pid ]; do 46 | sleep 0.1 47 | [ "$countdown" != '0' -a $(( $countdown % 10 )) = '0' ] && echo -n . 48 | if [ $timeout -gt 0 ]; then 49 | if [ $countdown -eq 0 ]; then 50 | if [ "$force" = "1" ]; then 51 | echo -ne "\nKill timed out, using kill -9 on $pid... " 52 | kill -9 $pid 53 | sleep 0.5 54 | fi 55 | break 56 | else 57 | countdown=$(( $countdown - 1 )) 58 | fi 59 | fi 60 | done 61 | if [ -e /proc/$pid ]; then 62 | echo "Timed Out" 63 | else 64 | echo "Stopped" 65 | fi 66 | else 67 | echo "Process $pid is not running" 68 | fi 69 | 70 | rm -f $pidfile 71 | else 72 | echo "Pidfile $pidfile doesn't exist" 73 | fi 74 | } 75 | 76 | kill_and_wait() { 77 | pidfile=$1 78 | # Monit default timeout for start/stop is 30s 79 | # Append 'with timeout {n} seconds' to monit start/stop program configs 80 | timeout=${2:-25} 81 | force=${3:-1} 82 | 83 | wait_pidfile $pidfile 1 $timeout $force 84 | } 85 | 86 | running_in_container() { 87 | # look for a non-root cgroup 88 | grep --quiet --invert-match ':/$' /proc/self/cgroup 89 | } 90 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/src/common/utils.sh: -------------------------------------------------------------------------------- 1 | 2 | mkdir -p /var/vcap/sys/log 3 | 4 | exec > >(tee -a >(logger -p user.info -t vcap.$(basename $0).stdout) | awk -W interactive '{ gsub(/\\n/, ""); system("echo -n [$(date +\"%Y-%m-%d %H:%M:%S%z\")]"); print " " $0 }' >>/var/vcap/sys/log/$(basename $0).log) 5 | exec 2> >(tee -a >(logger -p user.error -t vcap.$(basename $0).stderr) | awk -W interactive '{ gsub(/\\n/, ""); system("echo -n [$(date +\"%Y-%m-%d %H:%M:%S%z\")]"); print " " $0 }' >>/var/vcap/sys/log/$(basename $0).err.log) 6 | 7 | pid_guard() { 8 | echo "------------ STARTING `basename $0` at `date` --------------" | tee /dev/stderr 9 | pidfile=$1 10 | name=$2 11 | 12 | if [ -f "$pidfile" ]; then 13 | pid=$(head -1 "$pidfile") 14 | 15 | if [ -n "$pid" ] && [ -e /proc/$pid ]; then 16 | echo "$name is already running, please stop it first" 17 | exit 1 18 | fi 19 | 20 | echo "Removing stale pidfile..." 21 | rm $pidfile 22 | fi 23 | } 24 | 25 | wait_pidfile() { 26 | pidfile=$1 27 | try_kill=$2 28 | timeout=${3:-0} 29 | force=${4:-0} 30 | countdown=$(( $timeout * 10 )) 31 | 32 | if [ -f "$pidfile" ]; then 33 | pid=$(head -1 "$pidfile") 34 | 35 | if [ -z "$pid" ]; then 36 | echo "Unable to get pid from $pidfile" 37 | exit 1 38 | fi 39 | 40 | if [ -e /proc/$pid ]; then 41 | if [ "$try_kill" = "1" ]; then 42 | echo "Killing $pidfile: $pid " 43 | kill $pid 44 | fi 45 | while [ -e /proc/$pid ]; do 46 | sleep 0.1 47 | [ "$countdown" != '0' -a $(( $countdown % 10 )) = '0' ] && echo -n . 48 | if [ $timeout -gt 0 ]; then 49 | if [ $countdown -eq 0 ]; then 50 | if [ "$force" = "1" ]; then 51 | echo -ne "\nKill timed out, using kill -9 on $pid... " 52 | kill -9 $pid 53 | sleep 0.5 54 | fi 55 | break 56 | else 57 | countdown=$(( $countdown - 1 )) 58 | fi 59 | fi 60 | done 61 | if [ -e /proc/$pid ]; then 62 | echo "Timed Out" 63 | else 64 | echo "Stopped" 65 | fi 66 | else 67 | echo "Process $pid is not running" 68 | fi 69 | 70 | rm -f $pidfile 71 | else 72 | echo "Pidfile $pidfile doesn't exist" 73 | fi 74 | } 75 | 76 | kill_and_wait() { 77 | pidfile=$1 78 | # Monit default timeout for start/stop is 30s 79 | # Append 'with timeout {n} seconds' to monit start/stop program configs 80 | timeout=${2:-25} 81 | force=${3:-1} 82 | 83 | wait_pidfile $pidfile 1 $timeout $force 84 | } 85 | 86 | running_in_container() { 87 | # look for a non-root cgroup 88 | grep --quiet --invert-match ':/$' /proc/self/cgroup 89 | } 90 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /pattern-2/bosh-release/jobs/nfs_server/templates/ctl.erb: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ---------------------------------------------------------------------------- 3 | # 4 | # Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 5 | # 6 | # WSO2 Inc. licenses this file to you under the Apache License, 7 | # Version 2.0 (the "License"); you may not use this file except 8 | # in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # 20 | # ---------------------------------------------------------------------------- 21 | 22 | set +e 23 | set -xv 24 | 25 | script_dir=$(dirname $0) 26 | job_dir=${script_dir}/.. 27 | 28 | run_dir=/var/vcap/sys/run/nfs_server 29 | log_dir=/var/vcap/sys/log/nfs_server 30 | pid_file=${run_dir}/pid 31 | 32 | mkdir -p ${run_dir} ${log_dir} 33 | chown -R vcap:vcap ${run_dir} ${log_dir} 34 | 35 | export NFS_EXPORT_SERVER_DIR_IS=/mnt/nfs-export/wso2is/repository/deployment 36 | export NFS_EXPORT_TENANTS_DIR_IS=/mnt/nfs-export/wso2is/repository/tenants 37 | 38 | export DEBUG_LOG=${log_dir}/nfs_server.log 39 | 40 | touch $DEBUG_LOG 41 | chmod -R 755 /var/vcap/sys 42 | chmod 777 $DEBUG_LOG 43 | 44 | function log_debug() { 45 | echo `date` $1 >> $DEBUG_LOG 46 | } 47 | 48 | log_debug "Kicking off ctl script as `whoami` with $1" 49 | 50 | # install nfs packages 51 | 52 | dpkg -s nfs-kernel-server >/dev/null 2>&1 53 | if [ $? -ne 0 ] ; then 54 | apt-get update 55 | apt-get install nfs-kernel-server -y 56 | fi 57 | 58 | # create the share directory and set permission 59 | 60 | mkdir -p ${NFS_EXPORT_SERVER_DIR_IS} 61 | mkdir -p ${NFS_EXPORT_TENANTS_DIR_IS} 62 | 63 | chown nobody:nogroup ${NFS_EXPORT_SERVER_DIR_IS} 64 | chown nobody:nogroup ${NFS_EXPORT_TENANTS_DIR_IS} 65 | 66 | # configure the exports 67 | 68 | if [ -z "$(cat /etc/exports | grep wso2is )" ]; then 69 | echo "${NFS_EXPORT_SERVER_DIR_IS} *(rw,sync,no_subtree_check)" >> /etc/exports 70 | echo "${NFS_EXPORT_TENANTS_DIR_IS} *(rw,sync,no_subtree_check)" >> /etc/exports 71 | fi 72 | 73 | exportfs -a 74 | 75 | case $1 in 76 | 77 | start) 78 | 79 | service nfs-kernel-server start 80 | 81 | sleep 20 82 | 83 | nfs_pid=`ps aux | grep -w nfsd | grep -v grep | awk '{print$2}'` 84 | echo $nfs_pid > ${pid_file} 85 | 86 | ;; 87 | 88 | stop) 89 | 90 | service nfs-kernel-server stop 91 | 92 | ;; 93 | 94 | *) 95 | echo "Usage: ctl {start|stop}" ;; 96 | 97 | esac 98 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/jobs/nfs_server/templates/ctl.erb: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ---------------------------------------------------------------------------- 3 | # 4 | # Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 5 | # 6 | # WSO2 Inc. licenses this file to you under the Apache License, 7 | # Version 2.0 (the "License"); you may not use this file except 8 | # in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # 20 | # ---------------------------------------------------------------------------- 21 | 22 | set -xv 23 | 24 | script_dir=$(dirname $0) 25 | job_dir=${script_dir}/.. 26 | 27 | run_dir=/var/vcap/sys/run/nfs_server 28 | log_dir=/var/vcap/sys/log/nfs_server 29 | pid_file=${run_dir}/pid 30 | 31 | mkdir -p ${run_dir} ${log_dir} 32 | chown -R vcap:vcap ${run_dir} ${log_dir} 33 | 34 | export NFS_EXPORT_SERVER_DIR_IS=/mnt/nfs-export/wso2is/repository/deployment 35 | 36 | export DEBUG_LOG=${log_dir}/nfs_server.log 37 | 38 | touch $DEBUG_LOG 39 | chmod -R 755 /var/vcap/sys 40 | chmod 777 $DEBUG_LOG 41 | 42 | function log_debug() { 43 | echo `date` $1 >> $DEBUG_LOG 44 | } 45 | 46 | log_debug "Kicking off ctl script as `whoami` with $1" 47 | 48 | # install nfs packages 49 | 50 | dpkg -s nfs-kernel-server >/dev/null 2>&1 51 | if [ $? -ne 0 ] ; then 52 | chmod 1777 /tmp 53 | apt-get update 54 | if [ $? -ne 0 ] ; then 55 | log_debug "apt-get update failed" 56 | fi 57 | log_debug "Installing nfs-common" 58 | apt-get install nfs-common=1:1.2.8-9ubuntu12 -y 59 | if [ $? -ne 0 ] ; then 60 | log_debug "Installing nfs-common failed" 61 | fi 62 | 63 | log_debug "Installing nfs-kernel-server" 64 | apt-get install nfs-kernel-server=1:1.2.8-9ubuntu12 -y 65 | if [ $? -ne 0 ] ; then 66 | log_debug "Installing nfs-kernel-server failed" 67 | fi 68 | fi 69 | 70 | # create the share directory and set permission 71 | 72 | mkdir -p ${NFS_EXPORT_SERVER_DIR_IS} 73 | 74 | chown nobody:nogroup ${NFS_EXPORT_SERVER_DIR_IS} 75 | 76 | # configure the exports 77 | 78 | if [ -z "$(cat /etc/exports | grep wso2is )" ]; then 79 | echo "${NFS_EXPORT_SERVER_DIR_IS} *(rw,sync,no_subtree_check)" >> /etc/exports 80 | fi 81 | 82 | exportfs -a 83 | 84 | case $1 in 85 | 86 | start) 87 | 88 | service nfs-kernel-server start 89 | 90 | sleep 20 91 | 92 | nfs_pid=`ps aux | grep -w nfsd | grep -v grep | awk '{print$2}'` 93 | echo $nfs_pid > ${pid_file} 94 | 95 | ;; 96 | 97 | stop) 98 | 99 | service nfs-kernel-server stop 100 | 101 | ;; 102 | 103 | *) 104 | echo "Usage: ctl {start|stop}" ;; 105 | 106 | esac 107 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/jobs/wso2is/templates/repository/conf/identity/sso-idp-config.xml.erb: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 51 | 52 | 53 | 54 | 55 | wso2.my.dashboard 56 | 57 | https://<%= p('route_registrar.routes')[0]['uris'][0] %>/dashboard/acs 58 | 59 | https://<%= p('route_registrar.routes')[0]['uris'][0] %>/dashboard/acs 60 | true 61 | true 62 | 63 | carbonServer 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/jobs/wso2is/templates/repository/conf/identity/sso-idp-config.xml.erb: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 51 | 52 | 53 | 54 | 55 | wso2.my.dashboard 56 | 57 | 58 | https://<%= p('route_registrar.routes')[0]['uris'][0] %>/dashboard/acs 59 | 60 | 61 | https://<%= p('route_registrar.routes')[0]['uris'][0] %>/dashboard/acs 62 | true 63 | true 64 | 65 | carbonServer 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /pattern-1/ops_update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ---------------------------------------------------------------------------- 3 | # 4 | # Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 5 | # 6 | # WSO2 Inc. licenses this file to you under the Apache License, 7 | # Version 2.0 (the "License"); you may not use this file except 8 | # in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # 20 | # ---------------------------------------------------------------------------- 21 | 22 | # exit immediately if a command exits with a non-zero status 23 | set -e 24 | 25 | usage() { echo "Usage: $0 [-b ] [-u ] [-p ]" 1>&2; exit 1; } 26 | 27 | while getopts ":b:u:p:" o; do 28 | case "${o}" in 29 | b) 30 | branch=${OPTARG} 31 | ;; 32 | u) 33 | username=${OPTARG} 34 | ;; 35 | p) 36 | password=${OPTARG} 37 | ;; 38 | *) 39 | usage 40 | ;; 41 | esac 42 | done 43 | shift $((OPTIND-1)) 44 | 45 | if [ -z "${branch}" ] || [ -z "${username}" ] || [ -z "${password}" ]; then 46 | usage 47 | fi 48 | 49 | echo "Pulling changes from branch..." 50 | git fetch 51 | git checkout ${branch} 52 | # Check for changes 53 | upstream=${1:-'@{u}'} 54 | local=$(git rev-parse @) 55 | remote=$(git rev-parse "$upstream") 56 | base=$(git merge-base @ "$upstream") 57 | if [ ${local} = ${remote} ]; then 58 | # up-to-date 59 | exit 0 60 | elif [ ${local} = ${base} ]; then 61 | git pull origin ${branch} 62 | elif [ ${remote} = ${base} ]; then 63 | echo "Changes made in local branch. Please revert changes and retry." 64 | exit 1 65 | else 66 | echo "Local repository Diverged. Please revert changes and retry." 67 | exit 1 68 | fi 69 | 70 | echo "Updating tile..." 71 | /bin/bash update.sh 72 | rc=$?; 73 | if [[ ${rc} != 0 ]]; then 74 | echo "Error occurred while updating tile. Terminating with exit code $rc" 75 | exit ${rc}; 76 | fi 77 | 78 | echo "Obtaining access token..." 79 | response=$(curl -s -k -H 'Accept: application/json;charset=utf-8' -d 'grant_type=password' -d "username=$username" -d "password=$password" -u 'opsman:' https://localhost/uaa/oauth/token) 80 | access_token=$(echo ${response} | sed -nE 's/.*"access_token":"(.*)","token.*/\1/p') 81 | if [ -z "$access_token" ] 82 | then 83 | status_code=$(curl --write-out %{http_code} --output /dev/null -s -k -H 'Accept: application/json;charset=utf-8' -d 'grant_type=password' -d "username=$username" -d "password=$password" -u 'opsman:' https://localhost/uaa/oauth/token) 84 | echo "Access token could not be obtained. Status code: $status_code" 85 | exit 1 86 | fi 87 | 88 | echo "Uploading new tile..." 89 | cd tile/product 90 | product_dir=$(pwd) 91 | : ${product_tile:="wso2is*.pivotal"} 92 | 93 | # capture the exact product distribution identifiers 94 | product_tile=$(ls ${product_tile}) 95 | tile_filepath=${product_dir}/${product_tile} 96 | 97 | status_code=$(curl --write-out %{http_code} --output /dev/null -H "Authorization: Bearer $access_token" 'https://localhost/api/products' -F "product[file]=@$tile_filepath" -X POST -k) 98 | if [ ${status_code} = 200 ]; then 99 | echo "Updated tile successfully added to Ops Manager" 100 | else 101 | echo "Error while adding tile to Ops Manager. Status code ${status_code}" 102 | fi 103 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/jobs/wso2is_analytics_worker/templates/ctl.erb: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ---------------------------------------------------------------------------- 3 | # 4 | # Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 5 | # 6 | # WSO2 Inc. licenses this file to you under the Apache License, 7 | # Version 2.0 (the "License"); you may not use this file except 8 | # in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # 20 | # ---------------------------------------------------------------------------- 21 | 22 | set +e 23 | set -xv 24 | 25 | script_dir=$(dirname $0) 26 | job_dir=${script_dir}/.. 27 | 28 | run_dir=/var/vcap/sys/run/wso2is_analytics_worker 29 | log_dir=/var/vcap/sys/log/wso2is_analytics_worker 30 | pid_file=${run_dir}/pid 31 | 32 | CA_CERT="<%= p("wso2is.certs.value") %>" 33 | ALIAS='custom' 34 | TRUSTSTORE_PASSWORD='wso2carbon' 35 | 36 | mkdir -p ${run_dir} ${log_dir} 37 | chown -R vcap:vcap ${run_dir} ${log_dir} 38 | 39 | mkdir -p /var/vcap/store/wso2is_analytics/data 40 | export WSO2_IS_ANALYTICS_DATA_DIR=/var/vcap/store/wso2is_analytics/data/wso2is_analytics 41 | 42 | export JDK_HOME=/var/vcap/packages/openjdk/ 43 | export WSO2_IS_ANALYTICS_PKG_HOME=/var/vcap/packages/wso2is_analytics/ 44 | export WSO2_IS_ANALYTICS_SERVER_PACKAGE=/var/vcap/packages/wso2is_analytics/ 45 | 46 | # set any environment variables for your software 47 | export MIN_HEAP=<%= properties.wso2is_analytics.memory.min_heap %> 48 | export MAX_HEAP=<%= properties.wso2is_analytics.memory.max_heap %> 49 | export MAX_PERMGEN=<%= properties.wso2is_analytics.memory.max_permgen %> 50 | export JAVA_OPTS=" -Xmx${MAX_HEAP}m -Xms${MIN_HEAP}m -XX:MaxPermSize=${MAX_PERMGEN}m" 51 | 52 | export DEBUG_LOG=${log_dir}/wso2is_analytics.log 53 | 54 | touch $DEBUG_LOG 55 | chmod -R 755 /var/vcap/sys 56 | chmod 777 $DEBUG_LOG 57 | 58 | function log_debug() { 59 | echo `date` $1 >> $DEBUG_LOG 60 | } 61 | 62 | log_debug "Kicking off ctl script as `whoami` with $1" 63 | 64 | case $1 in 65 | 66 | start) 67 | # Kill the previously running instance if any 68 | kill -9 `cat ${pid_file}` 69 | 70 | pushd ${JDK_HOME} 71 | archive=`ls OpenJDK*gz` 72 | tar -zxvf $archive 73 | export JAVA_HOME=`pwd`/jdk8u192-b12 74 | export JAVA_BINARY=${JAVA_HOME}/bin/java 75 | 76 | KEYTOOL=`pwd`/jdk8u192-b12/jre/bin/keytool 77 | 78 | log_debug "JAVA_HOME: ${JAVA_HOME}" 79 | log_debug "JAVA_BINARY: ${JAVA_BINARY}" 80 | 81 | pushd ${WSO2_IS_ANALYTICS_PKG_HOME} 82 | archive=`ls wso2is-analytics*zip` 83 | unzip $archive 84 | cd wso2is-analytics* 85 | WSO2_IS_ANALYTICS_HOME=`pwd` 86 | 87 | KEYSTORE_PATH=${WSO2_IS_HOME}/resources/security/client-truststore.jks 88 | 89 | # Here any config files your application needs: 90 | cp -Tr ${job_dir}/conf/ ${WSO2_IS_ANALYTICS_HOME}/conf/ 91 | cp -Tr ${job_dir}/resources/ ${WSO2_IS_ANALYTICS_HOME}/resources/ 92 | 93 | # Here add any libraries your application needs: 94 | cp /var/vcap/packages/jdbcdrivers/* ${WSO2_IS_ANALYTICS_HOME}/lib/ 95 | 96 | # Create symbolic link for logging 97 | ln -s $WSO2_IS_ANALYTICS_HOME/wso2/worker/logs ${log_dir} 98 | 99 | #write the cert details to a file 100 | echo ${CA_CERT} >> tmp.cert 101 | 102 | ${KEYTOOL} -import -noprompt -trustcacerts -alias ${ALIAS} -file tmp.cert \ 103 | -storetype JKS -keystore ${KEYSTORE_PATH} -storepass ${TRUSTSTORE_PASSWORD} 104 | 105 | rm tmp.cert 106 | 107 | $WSO2_IS_ANALYTICS_HOME/bin/worker.sh start 108 | 109 | # Sleep for a little while so the server comes up 110 | sleep 20 111 | WSO2_IS_PID=`ps -ef | grep java | grep -v grep | awk '{print $2}' ` 112 | echo $WSO2_IS_PID > ${pid_file} 113 | 114 | ;; 115 | 116 | stop) 117 | 118 | kill -9 `cat ${pid_file}` 119 | rm -f ${pid_file} 120 | ;; 121 | 122 | *) 123 | echo "Usage: ctl {start|stop}" ;; 124 | 125 | esac 126 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/jobs/wso2is_analytics_dashboard/templates/ctl.erb: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ---------------------------------------------------------------------------- 3 | # 4 | # Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 5 | # 6 | # WSO2 Inc. licenses this file to you under the Apache License, 7 | # Version 2.0 (the "License"); you may not use this file except 8 | # in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # 20 | # ---------------------------------------------------------------------------- 21 | 22 | set +e 23 | set -xv 24 | 25 | script_dir=$(dirname $0) 26 | job_dir=${script_dir}/.. 27 | 28 | run_dir=/var/vcap/sys/run/wso2is_analytics_dashboard 29 | log_dir=/var/vcap/sys/log/wso2is_analytics_dashboard 30 | pid_file=${run_dir}/pid 31 | 32 | CA_CERT="<%= p("wso2is.certs.value") %>" 33 | ALIAS='custom' 34 | TRUSTSTORE_PASSWORD='wso2carbon' 35 | 36 | mkdir -p ${run_dir} ${log_dir} 37 | chown -R vcap:vcap ${run_dir} ${log_dir} 38 | 39 | mkdir -p /var/vcap/store/wso2is_analytics/data 40 | export WSO2_IS_ANALYTICS_DATA_DIR=/var/vcap/store/wso2is_analytics/data/wso2is_analytics 41 | 42 | export JDK_HOME=/var/vcap/packages/openjdk/ 43 | export WSO2_IS_ANALYTICS_PKG_HOME=/var/vcap/packages/wso2is_analytics/ 44 | export WSO2_IS_ANALYTICS_SERVER_PACKAGE=/var/vcap/packages/wso2is_analytics/ 45 | 46 | # set any environment variables for your software 47 | export MIN_HEAP=<%= properties.wso2is_analytics.memory.min_heap %> 48 | export MAX_HEAP=<%= properties.wso2is_analytics.memory.max_heap %> 49 | export MAX_PERMGEN=<%= properties.wso2is_analytics.memory.max_permgen %> 50 | export JAVA_OPTS=" -Xmx${MAX_HEAP}m -Xms${MIN_HEAP}m -XX:MaxPermSize=${MAX_PERMGEN}m" 51 | 52 | export DEBUG_LOG=${log_dir}/wso2is_analytics.log 53 | 54 | touch $DEBUG_LOG 55 | chmod -R 755 /var/vcap/sys 56 | chmod 777 $DEBUG_LOG 57 | 58 | function log_debug() { 59 | echo `date` $1 >> $DEBUG_LOG 60 | } 61 | 62 | log_debug "Kicking off ctl script as `whoami` with $1" 63 | 64 | case $1 in 65 | 66 | start) 67 | # Kill the previously running instance if any 68 | kill -9 `cat ${pid_file}` 69 | 70 | pushd ${JDK_HOME} 71 | archive=`ls OpenJDK*gz` 72 | tar -zxvf $archive 73 | export JAVA_HOME=`pwd`/jdk8u192-b12 74 | export JAVA_BINARY=${JAVA_HOME}/bin/java 75 | 76 | KEYTOOL=`pwd`/jdk8u192-b12/jre/bin/keytool 77 | 78 | log_debug "JAVA_HOME: ${JAVA_HOME}" 79 | log_debug "JAVA_BINARY: ${JAVA_BINARY}" 80 | 81 | pushd ${WSO2_IS_ANALYTICS_PKG_HOME} 82 | archive=`ls wso2is-analytics*zip` 83 | unzip $archive 84 | cd wso2is-analytics* 85 | WSO2_IS_ANALYTICS_HOME=`pwd` 86 | 87 | KEYSTORE_PATH=${WSO2_IS_HOME}/resources/security/client-truststore.jks 88 | 89 | # Here any config files your application needs: 90 | cp -Tr ${job_dir}/conf/ ${WSO2_IS_ANALYTICS_HOME}/conf/ 91 | cp -Tr ${job_dir}/resources/ ${WSO2_IS_ANALYTICS_HOME}/resources/ 92 | 93 | # Here add any libraries your application needs: 94 | cp /var/vcap/packages/jdbcdrivers/* ${WSO2_IS_ANALYTICS_HOME}/lib/ 95 | 96 | # Create symbolic link for logging 97 | ln -s $WSO2_IS_ANALYTICS_HOME/wso2/dashboard/logs ${log_dir} 98 | 99 | #write the cert details to a file 100 | echo ${CA_CERT} >> tmp.cert 101 | 102 | ${KEYTOOL} -import -noprompt -trustcacerts -alias ${ALIAS} -file tmp.cert \ 103 | -storetype JKS -keystore ${KEYSTORE_PATH} -storepass ${TRUSTSTORE_PASSWORD} 104 | 105 | rm tmp.cert 106 | 107 | $WSO2_IS_ANALYTICS_HOME/wso2/dashboard/bin/carbon.sh start 108 | 109 | # Sleep for a little while so the server comes up 110 | sleep 20 111 | WSO2_IS_PID=`ps -ef | grep java | grep -v grep | awk '{print $2}' ` 112 | echo $WSO2_IS_PID > ${pid_file} 113 | 114 | ;; 115 | 116 | stop) 117 | 118 | kill -9 `cat ${pid_file}` 119 | rm -f ${pid_file} 120 | ;; 121 | 122 | *) 123 | echo "Usage: ctl {start|stop}" ;; 124 | 125 | esac 126 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/create.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ---------------------------------------------------------------------------- 3 | # 4 | # Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 5 | # 6 | # WSO2 Inc. licenses this file to you under the Apache License, 7 | # Version 2.0 (the "License"); you may not use this file except 8 | # in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # 20 | # ---------------------------------------------------------------------------- 21 | 22 | # exit immediately if a command exits with a non-zero status 23 | set -e 24 | 25 | # deployment artifacts and versions (if they aren't set) 26 | : ${wso2_product:="wso2is"} 27 | : ${wso2_product_version:="5.7.0"} 28 | : ${wso2_product_pack_identifier:="${wso2_product}-${wso2_product_version}"} 29 | : ${wso2_product_distribution:=${wso2_product_pack_identifier}"*.zip"} 30 | : ${jdk_distribution:="OpenJDK8U-jdk_x64_linux_hotspot_8u212b04.tar.gz"} 31 | : ${mysql_driver:="mysql-connector-java-5.1.*-bin.jar"} 32 | : ${mssql_driver:="mssql-jdbc-7.0.0.jre8.jar"} 33 | 34 | # repository folder structure variables 35 | : ${distributions:="dist"} 36 | : ${deployment:="deployment"} 37 | 38 | # move to the directory containing the distributions 39 | cd ${distributions} 40 | 41 | # capture the exact product distribution identifiers 42 | mysql_driver=$(ls ${mysql_driver}) 43 | jdk_distribution=$(ls ${jdk_distribution}) 44 | 45 | # make copies of the WSO2 original product distributions with the generic WSO2 product identifiers 46 | if [ ! -f ${wso2_product_pack_identifier}.zip ]; then 47 | cp ${wso2_product_distribution} ${wso2_product_pack_identifier}.zip 48 | fi 49 | 50 | # check the availability of required utility software, product packs and distributions 51 | 52 | # check if the WSO2 product distributions have been provided 53 | if [ ! -f ${wso2_product_pack_identifier}.zip ]; then 54 | echo "---> WSO2 product distribution not found! Please add it to ${distributions} directory." 55 | exit 1 56 | fi 57 | 58 | # check if the JDK distribution has been provided 59 | if [ ! -f ${jdk_distribution} ]; then 60 | echo "---> Java Development Kit (JDK) distribution not found! Please add it to ${distributions} directory." 61 | exit 1 62 | fi 63 | 64 | # check if the MySQL Connector has been provided 65 | if [ ! -f ${mysql_driver} ]; then 66 | echo "---> MySQL Driver not found! Please add it to ${distributions} directory." 67 | exit 1 68 | fi 69 | 70 | # check if the MS SQL Connector has been provided 71 | if [ ! -f ${mssql_driver} ]; then 72 | echo "---> MS SQL Driver not found! Please add it to ${distributions} directory." 73 | exit 1 74 | fi 75 | 76 | # check if Git has been installed 77 | if [ ! -x "$(command -v git)" ]; then 78 | echo "---> Please install Git client." 79 | exit 1 80 | fi 81 | 82 | # check if Bosh CLI has been installed 83 | if [ ! -x "$(command -v bosh)" ]; then 84 | echo "---> Please install Bosh CLI v2." 85 | exit 1 86 | fi 87 | 88 | # move to the deployment directory 89 | cd ../${deployment} 90 | 91 | # Git clone the collection of BOSH manifests referenced by cloudfoundry/docs-bosh, required to create the BOSH environment 92 | if [ ! -d bosh-deployment ]; then 93 | echo "---> Cloning https://github.com/cloudfoundry/bosh-deployment..." 94 | git clone https://github.com/cloudfoundry/bosh-deployment bosh-deployment 95 | fi 96 | 97 | cd .. 98 | # add the locally available WSO2 product distribution(s) and dependencies as blobs to the BOSH Director 99 | echo "---> Adding blobs..." 100 | 101 | # add openjdk 102 | bosh add-blob ${distributions}/${jdk_distribution} openjdk/${jdk_distribution} 103 | # add wso2 product packs 104 | bosh add-blob ${distributions}/${wso2_product_pack_identifier}.zip ${wso2_product}/${wso2_product_pack_identifier}.zip 105 | # add JDBC Drivers 106 | bosh add-blob ${distributions}/${mysql_driver} jdbcdrivers/${mysql_driver} 107 | bosh add-blob ${distributions}/${mssql_driver} jdbcdrivers/${mssql_driver} 108 | 109 | echo "---> Uploading blobs..." 110 | bosh -n upload-blobs 111 | 112 | # create the BOSH release 113 | echo "---> Creating bosh release..." 114 | bosh create-release --tarball wso2is-5.7.0-bosh-release.tgz --force 115 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/jobs/wso2is/spec: -------------------------------------------------------------------------------- 1 | --- 2 | name: wso2is 3 | templates: 4 | ctl.erb: bin/ctl 5 | repository/conf/axis2/axis2.xml.erb: repository/conf/axis2/axis2.xml 6 | repository/conf/carbon.xml.erb: repository/conf/carbon.xml 7 | repository/conf/datasources/bps-datasources.xml.erb: repository/conf/datasources/bps-datasources.xml 8 | repository/conf/datasources/master-datasources.xml.erb: repository/conf/datasources/master-datasources.xml 9 | repository/conf/identity/embedded-ldap.xml: repository/conf/identity/embedded-ldap.xml 10 | repository/conf/identity/identity.xml: repository/conf/identity/identity.xml 11 | repository/conf/identity/sso-idp-config.xml.erb: repository/conf/identity/sso-idp-config.xml 12 | repository/conf/registry.xml.erb: repository/conf/registry.xml 13 | repository/conf/user-mgt.xml: repository/conf/user-mgt.xml 14 | repository/deployment/server/eventpublishers/IsAnalytics-Publisher-wso2event-AuthenticationData.xml.erb: repository/deployment/server/eventpublishers/IsAnalytics-Publisher-wso2event-AuthenticationData.xml 15 | repository/deployment/server/eventpublishers/IsAnalytics-Publisher-wso2event-SessionData.xml.erb: repository/deployment/server/eventpublishers/IsAnalytics-Publisher-wso2event-SessionData.xml 16 | repository/deployment/server/eventpublishers/IsAnalytics-Publisher-wso2event-RoleData.xml.erb: repository/deployment/server/eventpublishers/IsAnalytics-Publisher-wso2event-RoleData.xml 17 | repository/deployment/server/eventpublishers/IsAnalytics-Publisher-wso2event-UserData.xml.erb: repository/deployment/server/eventpublishers/IsAnalytics-Publisher-wso2event-UserData.xml 18 | repository/deployment/server/jaggeryapps/dashboard/conf/site.json.erb: repository/deployment/server/jaggeryapps/dashboard/conf/site.json 19 | repository/deployment/server/webapps/shindig/WEB-INF/web.xml.erb: repository/deployment/server/webapps/shindig/WEB-INF/web.xml 20 | 21 | packages: 22 | - common 23 | - jdbcdrivers 24 | - openjdk 25 | - wso2is 26 | 27 | provides: 28 | - name: wso2is 29 | type: wso2is-node 30 | properties: 31 | - route_registrar.routes 32 | - name: is-peers 33 | type: is-peers 34 | 35 | consumes: 36 | - name: nfs-server 37 | type: nfs 38 | - name: is-peers 39 | type: is-peers 40 | - name: is-analytics-worker 41 | type: analytics-worker-node 42 | 43 | properties: 44 | wso2is.bps_ds.jdbc_url: 45 | description: BPS Datasource JDBC URL 46 | wso2is.bps_ds.username: 47 | description: BPS Datasource username 48 | wso2is.bps_ds.password: 49 | description: BPS Datasource password 50 | wso2is.bps_ds.driver: 51 | description: BPS Datasource driver class name 52 | wso2is.bps_ds.query: 53 | description: BPS Datasource validation query 54 | 55 | wso2is.user_db.jdbc_url: 56 | description: Registry and User Management Datasource JDBC URL 57 | wso2is.user_db.username: 58 | description: Registry and User Management Datasource username 59 | wso2is.user_db.password: 60 | description: Registry and User Management Datasource password 61 | wso2is.user_db.driver: 62 | description: Registry and User Management Datasource driver class name 63 | wso2is.user_db.query: 64 | description: Registry and User Management Datasource validation query 65 | 66 | wso2is.conf_reg_db.jdbc_url: 67 | description: Configuration Registry Datasource JDBC URL 68 | wso2is.conf_reg_db.username: 69 | description: Configuration Registry Datasource username 70 | wso2is.conf_reg_db.password: 71 | description: Configuration Registry Datasource password 72 | wso2is.conf_reg_db.driver: 73 | description: Configuration Registry Datasource driver class name 74 | wso2is.conf_reg_db.query: 75 | description: Configuration Registry Datasource validation query 76 | 77 | wso2is.identity_db.jdbc_url: 78 | description: Identity Datasource JDBC URL 79 | wso2is.identity_db.username: 80 | description: Identity Datasource username 81 | wso2is.identity_db.password: 82 | description: Identity Datasource password 83 | wso2is.identity_db.driver: 84 | description: Identity Datasource driver class name 85 | wso2is.identity_db.query: 86 | description: Identity Datasource validation query 87 | 88 | wso2is.memory.min_heap: 89 | description: "Min Heap in MB" 90 | default: 2048 91 | wso2is.memory.max_heap: 92 | description: "Max Heap in MB" 93 | default: 2048 94 | wso2is.memory.max_permgen: 95 | description: "Max permgen in MB" 96 | default: 1024 97 | 98 | route_registrar.routes: 99 | description: routes registered for WSO2 APIM apps and gateway 100 | 101 | wso2is.certs.value: 102 | description: Trusted CA certificate 103 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/create.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ---------------------------------------------------------------------------- 3 | # 4 | # Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 5 | # 6 | # WSO2 Inc. licenses this file to you under the Apache License, 7 | # Version 2.0 (the "License"); you may not use this file except 8 | # in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # 20 | # ---------------------------------------------------------------------------- 21 | 22 | # exit immediately if a command exits with a non-zero status 23 | set -e 24 | 25 | # deployment artifacts and versions (if they aren't set) 26 | : ${wso2_product:="wso2is"} 27 | : ${wso2_product_version:="5.7.0"} 28 | : ${wso2_product_pack_identifier:="${wso2_product}-${wso2_product_version}"} 29 | : ${wso2_product_analytics_pack_identifier:="${wso2_product}-analytics-${wso2_product_version}"} 30 | : ${wso2_product_distribution:=${wso2_product_pack_identifier}"*.zip"} 31 | : ${wso2_product_analytics_distribution:=${wso2_product_analytics_pack_identifier}"*.zip"} 32 | : ${jdk_distribution:="OpenJDK8U-jdk_x64_linux_hotspot_8u192b12.tar.gz"} 33 | : ${mysql_driver:="mysql-connector-java-5.1.*-bin.jar"} 34 | : ${mssql_driver:="mssql-jdbc-7.0.*.jre8.jar"} 35 | 36 | # repository folder structure variables 37 | : ${distributions:="dist"} 38 | : ${deployment:="deployment"} 39 | 40 | # move to the directory containing the distributions 41 | cd ${distributions} 42 | 43 | # capture the exact product distribution identifiers 44 | mysql_driver=$(ls ${mysql_driver}) 45 | mssql_driver=$(ls ${mssql_driver}) 46 | jdk_distribution=$(ls ${jdk_distribution}) 47 | 48 | # make copies of the WSO2 original product distributions with the generic WSO2 product identifiers 49 | if [ ! -f ${wso2_product_pack_identifier}.zip ]; then 50 | cp ${wso2_product_distribution} ${wso2_product_pack_identifier}.zip 51 | fi 52 | 53 | if [ ! -f ${wso2_product_analytics_pack_identifier}.zip ]; then 54 | cp ${wso2_product_analytics_distribution} ${wso2_product_analytics_pack_identifier}.zip 55 | fi 56 | 57 | # check the availability of required utility software, product packs and distributions 58 | 59 | # check if the WSO2 product distributions have been provided 60 | if [ ! -f ${wso2_product_pack_identifier}.zip ]; then 61 | echo "---> WSO2 product distribution not found! Please add it to ${distributions} directory." 62 | exit 1 63 | fi 64 | 65 | if [ ! -f ${wso2_product_analytics_pack_identifier}.zip ]; then 66 | echo "---> WSO2 Analytics product distribution not found! Please add it to ${distributions} directory." 67 | exit 1 68 | fi 69 | 70 | # check if the JDK distribution has been provided 71 | if [ ! -f ${jdk_distribution} ]; then 72 | echo "---> Java Development Kit (JDK) distribution not found! Please add it to ${distributions} directory." 73 | exit 1 74 | fi 75 | 76 | # check if the MySQL Connector has been provided 77 | if [ ! -f ${mysql_driver} ]; then 78 | echo "---> MySQL Driver not found! Please add it to ${distributions} directory." 79 | exit 1 80 | fi 81 | 82 | # check if the MS SQL Connector has been provided 83 | if [ ! -f ${mssql_driver} ]; then 84 | echo "---> MS SQL Driver not found! Please add it to ${distributions} directory." 85 | exit 1 86 | fi 87 | 88 | # check if Git has been installed 89 | if [ ! -x "$(command -v git)" ]; then 90 | echo "---> Please install Git client." 91 | exit 1 92 | fi 93 | 94 | # check if Bosh CLI has been installed 95 | if [ ! -x "$(command -v bosh)" ]; then 96 | echo "---> Please install Bosh CLI v2." 97 | exit 1 98 | fi 99 | 100 | # move to the deployment directory 101 | cd ../${deployment} 102 | 103 | # Git clone the collection of BOSH manifests referenced by cloudfoundry/docs-bosh, required to create the BOSH environment 104 | if [ ! -d bosh-deployment ]; then 105 | echo "---> Cloning https://github.com/cloudfoundry/bosh-deployment..." 106 | git clone https://github.com/cloudfoundry/bosh-deployment bosh-deployment 107 | fi 108 | 109 | cd .. 110 | # add the locally available WSO2 product distribution(s) and dependencies as blobs to the BOSH Director 111 | echo "---> Adding blobs..." 112 | 113 | # add openjdk 114 | bosh add-blob ${distributions}/${jdk_distribution} openjdk/${jdk_distribution} 115 | # add wso2 product packs 116 | bosh add-blob ${distributions}/${wso2_product_pack_identifier}.zip ${wso2_product}/${wso2_product_pack_identifier}.zip 117 | bosh add-blob ${distributions}/${wso2_product_analytics_pack_identifier}.zip ${wso2_product}_analytics/${wso2_product_analytics_pack_identifier}.zip 118 | # add JDBC Drivers 119 | bosh add-blob ${distributions}/${mysql_driver} jdbcdrivers/${mysql_driver} 120 | bosh add-blob ${distributions}/${mssql_driver} jdbcdrivers/${mssql_driver} 121 | 122 | echo "---> Uploading blobs..." 123 | bosh -n upload-blobs 124 | 125 | # create the BOSH release 126 | echo "---> Creating bosh release..." 127 | bosh create-release --tarball wso2is-5.7.0-bosh-release.tgz --force 128 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/jobs/wso2is/templates/ctl.erb: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ---------------------------------------------------------------------------- 3 | # 4 | # Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 5 | # 6 | # WSO2 Inc. licenses this file to you under the Apache License, 7 | # Version 2.0 (the "License"); you may not use this file except 8 | # in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # 20 | # ---------------------------------------------------------------------------- 21 | 22 | set -xv 23 | 24 | script_dir=$(dirname $0) 25 | job_dir=${script_dir}/.. 26 | 27 | run_dir=/var/vcap/sys/run/wso2is 28 | log_dir=/var/vcap/sys/log/wso2is 29 | pid_file=${run_dir}/pid 30 | 31 | CA_CERT="<%= p("wso2is.certs.value") %>" 32 | ALIAS='custom' 33 | TRUSTSTORE_PASSWORD='wso2carbon' 34 | 35 | mkdir -p ${run_dir} ${log_dir} 36 | chown -R vcap:vcap ${run_dir} ${log_dir} 37 | 38 | mkdir -p /var/vcap/store/wso2is/data 39 | export WSO2_IS_DATA_DIR=/var/vcap/store/wso2is/data/wso2is 40 | 41 | export JDK_HOME=/var/vcap/packages/openjdk/ 42 | export WSO2_IS_PKG_HOME=/var/vcap/packages/wso2is/ 43 | export WSO2_IS_SERVER_PACKAGE=/var/vcap/packages/wso2is/ 44 | 45 | # set any environment variables for your software 46 | export MIN_HEAP=<%= properties.wso2is.memory.min_heap %> 47 | export MAX_HEAP=<%= properties.wso2is.memory.max_heap %> 48 | 49 | export JAVA_OPTS=" -Xmx${MAX_HEAP}m -Xms${MIN_HEAP}m \ 50 | -Djdk.tls.ephemeralDHKeySize=2048 \ 51 | -Djdk.tls.rejectClientInitiatedRenegotiation=true \ 52 | -Dhttpclient.hostnameVerifier=Strict" 53 | 54 | export DEBUG_LOG=${log_dir}/wso2is.log 55 | 56 | export NFS_EXPORT_SERVER_DIR=/mnt/nfs-export/wso2is/repository/deployment 57 | 58 | export NFS_SHARE_SERVER_DIR=/mnt/nfs-share/wso2is/repository/deployment 59 | 60 | touch $DEBUG_LOG 61 | chmod -R 755 /var/vcap/sys 62 | chmod 777 $DEBUG_LOG 63 | 64 | function log_debug() { 65 | echo `date` $1 >> $DEBUG_LOG 66 | } 67 | 68 | log_debug "Kicking off ctl script as `whoami` with $1" 69 | 70 | dpkg -s nfs-common >/dev/null 2>&1 71 | if [ $? -ne 0 ] ; then 72 | chmod 1777 /tmp 73 | apt-get update 74 | if [ $? -ne 0 ] ; then 75 | log_debug "apt-get update failed" 76 | fi 77 | log_debug "Installing NFS Client" 78 | apt-get install nfs-common=1:1.2.8-9ubuntu12 -y 79 | if [ $? -ne 0 ] ; then 80 | log_debug "Installing nfs-common failed" 81 | fi 82 | fi 83 | 84 | mkdir -p ${NFS_SHARE_SERVER_DIR} 85 | log_debug "`ls -la ${NFS_SHARE_SERVER_DIR}`" 86 | 87 | case $1 in 88 | 89 | start) 90 | # kill the previously running instance if any 91 | kill -9 `cat ${pid_file}` 92 | 93 | pushd ${JDK_HOME} 94 | archive=`ls OpenJDK*gz` 95 | tar -zxvf $archive 96 | export JAVA_HOME=`pwd`/jdk8u212-b04 97 | export JAVA_BINARY=${JAVA_HOME}/bin/java 98 | 99 | KEYTOOL=`pwd`/jdk8u212-b04/jre/bin/keytool 100 | 101 | log_debug "JAVA_HOME: ${JAVA_HOME}" 102 | log_debug "JAVA_BINARY: ${JAVA_BINARY}" 103 | 104 | pushd ${WSO2_IS_PKG_HOME} 105 | archive=`ls wso2is*zip` 106 | unzip $archive 107 | cd wso2is* 108 | WSO2_IS_HOME=`pwd` 109 | KEYSTORE_PATH=${WSO2_IS_HOME}/repository/resources/security/wso2carbon.jks 110 | TRUSTSTORE_PATH=${WSO2_IS_HOME}/repository/resources/security/client-truststore.jks 111 | 112 | # Unzip shindig.war archive 113 | unzip -d ${WSO2_IS_HOME}/repository/deployment/server/webapps/shindig ${WSO2_IS_HOME}/repository/deployment/server/webapps/shindig.war 114 | rm ${WSO2_IS_HOME}/repository/deployment/server/webapps/shindig.war 115 | 116 | # Here any config files your application needs: 117 | cp -Tr ${job_dir}/repository/ ${WSO2_IS_HOME}/repository/ 118 | 119 | # Here add any libraries your application needs: 120 | cp /var/vcap/packages/jdbcdrivers/* ${WSO2_IS_HOME}/repository/components/lib/ 121 | 122 | mkdir /tmp/wso2is 123 | mv $WSO2_IS_HOME/repository/deployment/server/ /tmp/wso2is/ 124 | 125 | mount -t nfs <%= link("nfs-server").instances[0].address %>:${NFS_EXPORT_SERVER_DIR} ${NFS_SHARE_SERVER_DIR} 126 | 127 | if [ -z "$(ls -A ${NFS_SHARE_SERVER_DIR})" ]; then 128 | cp -r /tmp/wso2is/* ${NFS_SHARE_SERVER_DIR}/ 129 | fi 130 | 131 | ln -s ${NFS_SHARE_SERVER_DIR}/server $WSO2_IS_HOME/repository/deployment 132 | 133 | # Create symbolic link for logging 134 | ln -s $WSO2_IS_HOME/repository/logs ${log_dir} 135 | 136 | #write the cert details to a file 137 | echo ${CA_CERT} >> tmp.cert 138 | 139 | ${KEYTOOL} -import -noprompt -trustcacerts -alias ${ALIAS} -file tmp.cert \ 140 | -storetype JKS -keystore ${KEYSTORE_PATH} -storepass ${TRUSTSTORE_PASSWORD} 141 | 142 | ${KEYTOOL} -import -noprompt -trustcacerts -alias ${ALIAS} -file tmp.cert \ 143 | -storetype JKS -keystore ${TRUSTSTORE_PATH} -storepass ${TRUSTSTORE_PASSWORD} 144 | 145 | rm tmp.cert 146 | 147 | $WSO2_IS_HOME/bin/wso2server.sh start 148 | 149 | # Sleep for a little while so the server comes up 150 | sleep 20 151 | WSO2_IS_PID=`ps -ef | grep java | grep -v grep | awk '{print $2}' ` 152 | echo $WSO2_IS_PID > ${pid_file} 153 | 154 | ;; 155 | 156 | stop) 157 | 158 | kill -9 `cat ${pid_file}` 159 | rm -f ${pid_file} 160 | sleep 10 161 | umount ${NFS_SHARE_SERVER_DIR} 162 | 163 | ;; 164 | 165 | *) 166 | echo "Usage: ctl {start|stop}" ;; 167 | 168 | esac 169 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/jobs/wso2is/templates/ctl.erb: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ---------------------------------------------------------------------------- 3 | # 4 | # Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 5 | # 6 | # WSO2 Inc. licenses this file to you under the Apache License, 7 | # Version 2.0 (the "License"); you may not use this file except 8 | # in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # 20 | # ---------------------------------------------------------------------------- 21 | 22 | set +e 23 | set -xv 24 | 25 | script_dir=$(dirname $0) 26 | job_dir=${script_dir}/.. 27 | 28 | run_dir=/var/vcap/sys/run/wso2is 29 | log_dir=/var/vcap/sys/log/wso2is 30 | pid_file=${run_dir}/pid 31 | 32 | CA_CERT="<%= p("wso2is.certs.value") %>" 33 | ALIAS='custom' 34 | TRUSTSTORE_PASSWORD='wso2carbon' 35 | 36 | mkdir -p ${run_dir} ${log_dir} 37 | chown -R vcap:vcap ${run_dir} ${log_dir} 38 | 39 | mkdir -p /var/vcap/store/wso2is/data 40 | export WSO2_IS_DATA_DIR=/var/vcap/store/wso2is/data/wso2is 41 | 42 | export JDK_HOME=/var/vcap/packages/openjdk/ 43 | export WSO2_IS_PKG_HOME=/var/vcap/packages/wso2is/ 44 | export WSO2_IS_SERVER_PACKAGE=/var/vcap/packages/wso2is/ 45 | 46 | # set any environment variables for your software 47 | export MIN_HEAP=<%= properties.wso2is.memory.min_heap %> 48 | export MAX_HEAP=<%= properties.wso2is.memory.max_heap %> 49 | export MAX_PERMGEN=<%= properties.wso2is.memory.max_permgen %> 50 | export JAVA_OPTS=" -Xmx${MAX_HEAP}m -Xms${MIN_HEAP}m -XX:MaxPermSize=${MAX_PERMGEN}m" 51 | 52 | export DEBUG_LOG=${log_dir}/wso2is.log 53 | 54 | export NFS_EXPORT_SERVER_DIR=/mnt/nfs-export/wso2is/repository/deployment 55 | export NFS_EXPORT_TENANTS_DIR=/mnt/nfs-export/wso2is-tenants/repository 56 | 57 | export NFS_SHARE_SERVER_DIR=/mnt/nfs-share/wso2is/repository/deployment 58 | export NFS_SHARE_TENANTS_DIR=/mnt/nfs-share/wso2is-tenants/repository 59 | 60 | touch $DEBUG_LOG 61 | chmod -R 755 /var/vcap/sys 62 | chmod 777 $DEBUG_LOG 63 | 64 | function log_debug() { 65 | echo `date` $1 >> $DEBUG_LOG 66 | } 67 | 68 | log_debug "Kicking off ctl script as `whoami` with $1" 69 | 70 | dpkg -s nfs-common >/dev/null 2>&1 71 | if [ $? -ne 0 ] ; then 72 | log_debug "Installing NFS Client" 73 | sudo apt-get update 74 | sudo apt-get install nfs-common -y 75 | fi 76 | 77 | mkdir -p ${NFS_SHARE_SERVER_DIR} 78 | mkdir -p ${NFS_SHARE_TENANTS_DIR} 79 | 80 | case $1 in 81 | 82 | start) 83 | # kill the previously running instance if any 84 | kill -9 `cat ${pid_file}` 85 | 86 | pushd ${JDK_HOME} 87 | archive=`ls OpenJDK*gz` 88 | tar -zxvf $archive 89 | export JAVA_HOME=`pwd`/jdk8u192-b12 90 | export JAVA_BINARY=${JAVA_HOME}/bin/java 91 | 92 | KEYTOOL=`pwd`/jdk8u192-b12/jre/bin/keytool 93 | 94 | log_debug "JAVA_HOME: ${JAVA_HOME}" 95 | log_debug "JAVA_BINARY: ${JAVA_BINARY}" 96 | 97 | pushd ${WSO2_IS_PKG_HOME} 98 | archive=`ls wso2is*zip` 99 | unzip $archive 100 | cd wso2is* 101 | WSO2_IS_HOME=`pwd` 102 | 103 | KEYSTORE_PATH=${WSO2_IS_HOME}/resources/security/client-truststore.jks 104 | 105 | # Here any config files your application needs: 106 | cp -Tr ${job_dir}/repository/ ${WSO2_IS_HOME}/repository/ 107 | 108 | # Here add any libraries your application needs: 109 | cp /var/vcap/packages/jdbcdrivers/* ${WSO2_IS_HOME}/repository/components/lib/ 110 | 111 | mkdir /tmp/wso2is-server 112 | mkdir /tmp/wso2is-tenants 113 | mv $WSO2_IS_HOME/repository/deployment/server/ /tmp/wso2is-server/ 114 | mv $WSO2_IS_HOME/repository/tenants/ /tmp/wso2is-tenants/ 115 | 116 | mount -t nfs <%= link("nfs-server").instances[0].address %>:${NFS_EXPORT_SERVER_DIR} ${NFS_SHARE_SERVER_DIR} 117 | mount -t nfs <%= link("nfs-server").instances[0].address %>:${NFS_EXPORT_TENANTS_DIR} ${NFS_SHARE_TENANTS_DIR} 118 | 119 | if [ -z "$(ls -A ${NFS_SHARE_SERVER_DIR})" ]; then 120 | cp -r /tmp/wso2is-server/* ${NFS_SHARE_SERVER_DIR}/ 121 | fi 122 | 123 | if [ -z "$(ls -A ${NFS_SHARE_TENANTS_DIR})" ]; then 124 | cp -r /tmp/wso2is-tenants/* ${NFS_SHARE_TENANTS_DIR}/ 125 | fi 126 | 127 | ln -s ${NFS_SHARE_SERVER_DIR}/server $WSO2_IS_HOME/repository/deployment 128 | ln -s ${NFS_SHARE_TENANTS_DIR}/tenants $WSO2_IS_HOME/repository 129 | 130 | # Create symbolic link for logging 131 | ln -s $WSO2_IS_HOME/repository/logs ${log_dir} 132 | 133 | #write the cert details to a file 134 | echo ${CA_CERT} >> tmp.cert 135 | 136 | ${KEYTOOL} -import -noprompt -trustcacerts -alias ${ALIAS} -file tmp.cert \ 137 | -storetype JKS -keystore ${KEYSTORE_PATH} -storepass ${TRUSTSTORE_PASSWORD} 138 | 139 | rm tmp.cert 140 | 141 | $WSO2_IS_HOME/bin/wso2server.sh start 142 | 143 | # Sleep for a little while so the server comes up 144 | sleep 20 145 | cp ${job_dir}/repository/deployment/server/webapps/shindig/WEB-INF/web.xml ${WSO2_IS_HOME}/repository/deployment/server/webapps/shindig/WEB-INF/web.xml 146 | WSO2_IS_PID=`ps -ef | grep java | grep -v grep | awk '{print $2}' ` 147 | echo $WSO2_IS_PID > ${pid_file} 148 | 149 | ;; 150 | 151 | stop) 152 | 153 | kill -9 `cat ${pid_file}` 154 | rm -f ${pid_file} 155 | sleep 10 156 | umount ${NFS_SHARE_SERVER_DIR} 157 | umount ${NFS_SHARE_TENANTS_DIR} 158 | 159 | ;; 160 | 161 | *) 162 | echo "Usage: ctl {start|stop}" ;; 163 | 164 | esac 165 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/jobs/wso2is/spec: -------------------------------------------------------------------------------- 1 | --- 2 | name: wso2is 3 | templates: 4 | ctl.erb: bin/ctl 5 | repository/conf/axis2/axis2.xml.erb: repository/conf/axis2/axis2.xml 6 | repository/conf/identity/embedded-ldap.xml: repository/conf/identity/embedded-ldap.xml 7 | repository/conf/identity/identity.xml.erb: repository/conf/identity/identity.xml 8 | repository/conf/identity/sso-idp-config.xml.erb: repository/conf/identity/sso-idp-config.xml 9 | repository/conf/datasources/master-datasources.xml.erb: repository/conf/datasources/master-datasources.xml 10 | repository/conf/datasources/bps-datasources.xml.erb: repository/conf/datasources/bps-datasources.xml 11 | repository/conf/tomcat/catalina-server.xml.erb: repository/conf/tomcat/catalina-server.xml 12 | repository/conf/tomcat/context.xml: repository/conf/tomcat/context.xml 13 | repository/conf/carbon.xml.erb: repository/conf/carbon.xml 14 | repository/conf/consent-mgt-config.xml.erb: repository/conf/consent-mgt-config.xml 15 | repository/conf/health-check-config.xml: repository/conf/health-check-config.xml 16 | repository/conf/log4j.properties: repository/conf/log4j.properties 17 | repository/conf/registry.xml.erb: repository/conf/registry.xml 18 | repository/conf/user-mgt.xml.erb: repository/conf/user-mgt.xml 19 | repository/deployment/server/jaggeryapps/dashboard/conf/site.json.erb: repository/deployment/server/jaggeryapps/dashboard/conf/site.json 20 | repository/deployment/server/jaggeryapps/portal/conf/site.json.erb: repository/deployment/server/jaggeryapps/portal/conf/site.json 21 | repository/deployment/server/webapps/shindig/WEB-INF/web.xml.erb: repository/deployment/server/webapps/shindig/WEB-INF/web.xml 22 | 23 | packages: 24 | - common 25 | - jdbcdrivers 26 | - openjdk 27 | - wso2is 28 | 29 | provides: 30 | - name: wso2is 31 | type: wso2is-node 32 | properties: 33 | - route_registrar.routes 34 | - name: peers 35 | type: peers 36 | 37 | consumes: 38 | - name: nfs-server 39 | type: nfs 40 | - name: peers 41 | type: peers 42 | 43 | properties: 44 | wso2is.bps_ds.jdbc_url: 45 | description: BPS Datasource JDBC URL 46 | wso2is.bps_ds.username: 47 | description: BPS Datasource username 48 | wso2is.bps_ds.password: 49 | description: BPS Datasource password 50 | wso2is.bps_ds.driver: 51 | description: BPS Datasource driver class name 52 | wso2is.bps_ds.query: 53 | description: BPS Datasource validation query 54 | 55 | wso2is.user_db.jdbc_url: 56 | description: Registry and User Management Datasource JDBC URL 57 | wso2is.user_db.username: 58 | description: Registry and User Management Datasource username 59 | wso2is.user_db.password: 60 | description: Registry and User Management Datasource password 61 | wso2is.user_db.driver: 62 | description: Registry and User Management Datasource driver class name 63 | wso2is.user_db.query: 64 | description: Registry and User Management Datasource validation query 65 | 66 | wso2is.conf_reg_db.jdbc_url: 67 | description: Configuration Registry Datasource JDBC URL 68 | wso2is.conf_reg_db.username: 69 | description: Configuration Registry Datasource username 70 | wso2is.conf_reg_db.password: 71 | description: Configuration Registry Datasource password 72 | wso2is.conf_reg_db.driver: 73 | description: Configuration Registry Datasource driver class name 74 | wso2is.conf_reg_db.query: 75 | description: Configuration Registry Datasource validation query 76 | 77 | wso2is.identity_db.jdbc_url: 78 | description: Identity Datasource JDBC URL 79 | wso2is.identity_db.username: 80 | description: Identity Datasource username 81 | wso2is.identity_db.password: 82 | description: Identity Datasource password 83 | wso2is.identity_db.driver: 84 | description: Identity Datasource driver class name 85 | wso2is.identity_db.query: 86 | description: Identity Datasource validation query 87 | 88 | wso2is.memory.min_heap: 89 | description: "Min Heap in MB" 90 | default: 2048 91 | wso2is.memory.max_heap: 92 | description: "Max Heap in MB" 93 | default: 2048 94 | 95 | wso2is.admin.password: 96 | description: wso2is password 97 | default: admin 98 | wso2is.admin.username: 99 | description: wso2is username 100 | default: admin 101 | 102 | route_registrar.routes: 103 | description: routes registered for WSO2 APIM apps and gateway 104 | 105 | wso2is.certs.value: 106 | description: Trusted CA certificate 107 | 108 | wso2is.consent_mgt_conf.consent_db.jdbc_url: 109 | description: Consent Datasource JDBC URL 110 | wso2is.consent_mgt_conf.consent_db.username: 111 | description: Consent Datasource username 112 | wso2is.consent_mgt_conf.consent_db.password: 113 | description: Consent Datasource password 114 | wso2is.consent_mgt_conf.consent_db.driver: 115 | description: Consent Datasource driver class name 116 | wso2is.consent_mgt_conf.consent_db.query: 117 | description: Consent Datasource validation query 118 | 119 | wso2is.consent_mgt_conf.piicontroller: 120 | description: PII Controller 121 | default: change-me 122 | wso2is.consent_mgt_conf.contact: 123 | description: Contact 124 | default: change-me 125 | wso2is.consent_mgt_conf.email: 126 | description: Email 127 | default: change-me 128 | wso2is.consent_mgt_conf.phone: 129 | description: Phone 130 | default: change-me 131 | wso2is.consent_mgt_conf.piicontroller_url: 132 | description: PII Controller URL 133 | default: change-me 134 | wso2is.consent_mgt_conf.country: 135 | description: Country 136 | default: change-me 137 | wso2is.consent_mgt_conf.locality: 138 | description: Locality 139 | default: change-me 140 | wso2is.consent_mgt_conf.region: 141 | description: Region 142 | default: change-me 143 | wso2is.consent_mgt_conf.postoffice_box_number: 144 | description: Post office box number 145 | default: change-me 146 | wso2is.consent_mgt_conf.postalcode: 147 | description: Postal Code 148 | default: change-me 149 | wso2is.consent_mgt_conf.street_address: 150 | description: Street Address 151 | default: change-me 152 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/jobs/wso2is/templates/repository/conf/tomcat/catalina-server.xml.erb: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | 28 | 47 | 48 | 54 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 93 | 94 | 95 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/jobs/wso2is/templates/repository/conf/datasources/master-datasources.xml.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader 5 | 6 | 7 | 8 | 9 | 10 | WSO2_CARBON_DB 11 | The datasource used for registry and user manager 12 | 13 | jdbc/WSO2CarbonDB 14 | 15 | 16 | 17 | jdbc:h2:./repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000 18 | wso2carbon 19 | wso2carbon 20 | org.h2.Driver 21 | 50 22 | 60000 23 | true 24 | SELECT 1 25 | 30000 26 | false 27 | 28 | 29 | 30 | 31 | 32 | WSO2_USER_DS 33 | The datasource used for registry and user manager 34 | 35 | jdbc/WSO2UMDS 36 | 37 | 38 | 39 | <%= p("wso2is.user_db.jdbc_url") %> 40 | <%= p("wso2is.user_db.username") %> 41 | <%= p("wso2is.user_db.password") %> 42 | <%= p("wso2is.user_db.driver") %> 43 | true 44 | <%= p("wso2is.user_db.query") %> 45 | 50 46 | 60000 47 | 30000 48 | 49 | 50 | 51 | 52 | 53 | WSO2_REGISTRY_DS 54 | The datasource used for configuration registry 55 | 56 | jdbc/WSO2RegistryDS 57 | 58 | 59 | 60 | <%= p("wso2is.conf_reg_db.jdbc_url") %> 61 | <%= p("wso2is.conf_reg_db.username") %> 62 | <%= p("wso2is.conf_reg_db.password") %> 63 | <%= p("wso2is.conf_reg_db.driver") %> 64 | 50 65 | 60000 66 | true 67 | <%= p("wso2is.conf_reg_db.query") %> 68 | 30000 69 | 70 | 71 | 72 | 73 | 74 | WSO2_IDENTITY_DS 75 | The datasource used for identity data 76 | 77 | jdbc/WSO2IdentityDS 78 | 79 | 80 | 81 | <%= p("wso2is.identity_db.jdbc_url") %> 82 | <%= p("wso2is.identity_db.username") %> 83 | <%= p("wso2is.identity_db.password") %> 84 | <%= p("wso2is.identity_db.driver") %> 85 | 50 86 | 60000 87 | true 88 | <%= p("wso2is.identity_db.query") %> 89 | 30000 90 | 91 | 92 | 93 | 94 | 95 | 128 | 129 | 130 | 131 | 132 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/jobs/wso2is/templates/repository/conf/datasources/master-datasources.xml.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader 5 | 6 | 7 | 8 | 9 | 10 | WSO2_CARBON_DB 11 | The datasource used for registry and user manager 12 | 13 | jdbc/WSO2CarbonDB 14 | 15 | 16 | 17 | jdbc:h2:./repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000 18 | wso2carbon 19 | wso2carbon 20 | org.h2.Driver 21 | 50 22 | 60000 23 | true 24 | SELECT 1 25 | 30000 26 | false 27 | 28 | 29 | 30 | 31 | 32 | WSO2_USER_DS 33 | The datasource used for registry and user manager 34 | 35 | jdbc/WSO2UMDS 36 | 37 | 38 | 39 | <%= p("wso2is.user_db.jdbc_url") %> 40 | <%= p("wso2is.user_db.username") %> 41 | <%= p("wso2is.user_db.password") %> 42 | <%= p("wso2is.user_db.driver") %> 43 | true 44 | <%= p("wso2is.user_db.query") %> 45 | 50 46 | 60000 47 | 30000 48 | 49 | 50 | 51 | 52 | 53 | WSO2_REGISTRY_DS 54 | The datasource used for configuration registry 55 | 56 | jdbc/WSO2RegistryDS 57 | 58 | 59 | 60 | <%= p("wso2is.conf_reg_db.jdbc_url") %> 61 | <%= p("wso2is.conf_reg_db.username") %> 62 | <%= p("wso2is.conf_reg_db.password") %> 63 | <%= p("wso2is.conf_reg_db.driver") %> 64 | 50 65 | 60000 66 | true 67 | <%= p("wso2is.conf_reg_db.query") %> 68 | 30000 69 | 70 | 71 | 72 | 73 | 74 | WSO2_IDENTITY_DS 75 | The datasource used for identity data 76 | 77 | jdbc/WSO2IdentityDS 78 | 79 | 80 | 81 | <%= p("wso2is.identity_db.jdbc_url") %> 82 | <%= p("wso2is.identity_db.username") %> 83 | <%= p("wso2is.identity_db.password") %> 84 | <%= p("wso2is.identity_db.driver") %> 85 | 50 86 | 60000 87 | true 88 | <%= p("wso2is.identity_db.query") %> 89 | 30000 90 | 91 | 92 | 93 | 94 | 95 | WSO2_CONSENT_DS 96 | The datasource used for consent data 97 | 98 | jdbc/WSO2ConsentDS 99 | 100 | 101 | 102 | <%= p("wso2is.consent_mgt_conf.consent_db.jdbc_url") %> 103 | <%= p("wso2is.consent_mgt_conf.consent_db.username") %> 104 | <%= p("wso2is.consent_mgt_conf.consent_db.password") %> 105 | <%= p("wso2is.consent_mgt_conf.consent_db.driver") %> 106 | 50 107 | 60000 108 | true 109 | <%= p("wso2is.consent_mgt_conf.consent_db.query") %> 110 | 30000 111 | 112 | 113 | 114 | 115 | 116 | 149 | 150 | 151 | 152 | 153 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/jobs/wso2is/templates/repository/conf/registry.xml.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 18 | 19 | 20 | 24 | 25 | wso2registry 26 | false 27 | true 28 | / 29 | 30 | jdbc/WSO2CarbonDB 31 | 32 | 33 | jdbc/WSO2RegistryDS 34 | 35 | 36 | sharedregistry 37 | sharedregistry 38 | false 39 | / 40 | true 41 | <%= p("wso2is.conf_reg_db.jdbc_url") %> 42 | 43 | 44 | sharedregistry 45 | /_system/config 46 | 47 | 48 | sharedregistry 49 | /_system/governance 50 | 51 | 52 | 53 | application/xacml-policy+xml 54 | 55 | 56 | 57 | 92 | 93 | 98 | 99 | 106 | 107 | 111 | 112 | 113 | false 114 | 35 115 | 5 116 | 117 | 40 118 | 119 | 40 120 | 121 | /_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | false 143 | 144 | 146 | 147 | true 148 | true 149 | true 150 | true 151 | 152 | 153 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/jobs/wso2is/templates/repository/conf/registry.xml.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 18 | 19 | 20 | 24 | 25 | wso2registry 26 | false 27 | true 28 | / 29 | 30 | 31 | jdbc/WSO2CarbonDB 32 | 33 | 34 | jdbc/WSO2RegistryDS 35 | 36 | 37 | gov 38 | <%= p("wso2is.conf_reg_db.username") %>@<%= p("wso2is.conf_reg_db.jdbc_url") %> 39 | govregistry 40 | false 41 | true 42 | / 43 | 44 | 45 | gov 46 | /_system/governance 47 | 48 | 49 | gov 50 | /_system/config 51 | 52 | 53 | 54 | 55 | application/xacml-policy+xml 56 | 57 | 58 | 59 | 94 | 95 | 100 | 101 | 108 | 109 | 113 | 114 | 115 | false 116 | 35 117 | 5 118 | 119 | 40 120 | 121 | 40 122 | 123 | /_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | false 145 | 146 | 148 | 149 | true 150 | true 151 | true 152 | true 153 | 154 | 155 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/jobs/wso2is/templates/repository/conf/tomcat/carbon/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 21 | 22 | 23 | 24 | 25 | Owasp.CsrfGuard.Config 26 | repository/conf/security/Owasp.CsrfGuard.Carbon.properties 27 | 28 | 29 | bridgeservlet 30 | Carbon Bridge Servlet 31 | Carbon Bridge Servlet 32 | org.wso2.carbon.tomcat.ext.servlet.DelegationServlet 33 | 1 34 | 35 | 36 | 37 | JavaScriptServlet 38 | org.owasp.csrfguard.servlet.JavaScriptServlet 39 | 40 | 41 | bridgeservlet 42 | /* 43 | 44 | 45 | 46 | bridgeservlet 47 | *.jsp 48 | 49 | 50 | JavaScriptServlet 51 | /carbon/admin/js/csrfPrevention.js 52 | 53 | 54 | 55 | CharsetFilter 56 | org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter 57 | 58 | requestEncoding 59 | UTF-8 60 | 61 | 62 | 63 | 64 | CSRFGuard 65 | org.owasp.csrfguard.CsrfGuardFilter 66 | 67 | 68 | 69 | HttpHeaderSecurityFilter 70 | org.apache.catalina.filters.HttpHeaderSecurityFilter 71 | 72 | hstsMaxAgeSeconds 73 | 15768000 74 | 75 | 76 | hstsEnabled 77 | true 78 | 79 | 80 | antiClickJackingEnabled 81 | false 82 | 83 | 84 | 85 | HttpHeaderSecurityFilter_EnableAntiClickJacking 86 | org.apache.catalina.filters.HttpHeaderSecurityFilter 87 | 88 | hstsEnabled 89 | false 90 | 91 | 92 | blockContentTypeSniffingEnabled 93 | false 94 | 95 | 96 | xssProtectionEnabled 97 | false 98 | 99 | 100 | 101 | HttpHeaderSecurityFilter 102 | * 103 | 104 | 105 | CharsetFilter 106 | /* 107 | 108 | 109 | HttpHeaderSecurityFilter_EnableAntiClickJacking 110 | /carbon/* 111 | /services/* 112 | /samlsso/* 113 | /openid/* 114 | /openidserver/* 115 | /passivests/* 116 | /acs/* 117 | /iwa/* 118 | /identity/* 119 | /thriftAuthenticator/* 120 | 121 | 122 | CSRFGuard 123 | /* 124 | 125 | 126 | 127 | org.owasp.csrfguard.CsrfGuardServletContextListener 128 | 129 | 130 | 131 | org.owasp.csrfguard.CsrfGuardHttpSessionListener 132 | 133 | 134 | CaptchaFilter 135 | org.wso2.carbon.identity.captcha.filter.CaptchaFilter 136 | 137 | 138 | CaptchaFilter 139 | /samlsso 140 | /oauth2 141 | /commonauth 142 | FORWARD 143 | REQUEST 144 | 145 | 146 | 15 147 | 148 | true 149 | 150 | COOKIE 151 | 152 | 153 | 154 | 400 155 | /carbon/errors/error_400.html 156 | 157 | 158 | 401 159 | /carbon/errors/error_401.html 160 | 161 | 162 | 403 163 | /carbon/errors/error_403.html 164 | 165 | 166 | 404 167 | /carbon/errors/error_404.html 168 | 169 | 170 | 405 171 | /carbon/errors/error_405.html 172 | 173 | 174 | 408 175 | /carbon/errors/error_408.html 176 | 177 | 178 | 410 179 | /carbon/errors/error_410.html 180 | 181 | 182 | 500 183 | /carbon/errors/error_500.html 184 | 185 | 186 | 502 187 | /carbon/errors/error_502.html 188 | 189 | 190 | 503 191 | /carbon/errors/error_503.html 192 | 193 | 194 | 504 195 | /carbon/errors/error_504.html 196 | 197 | 198 | /carbon/errors/error.html 199 | 200 | 201 | -------------------------------------------------------------------------------- /pattern-1/bosh-release/jobs/wso2is/templates/repository/conf/identity/embedded-ldap.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 26 | 27 | 28 | 29 | 50 | 51 | false 52 | ${Ports.EmbeddedLDAP.LDAPServerPort} 53 | default 54 | admin 55 | . 56 | identityPerson 57 | false 58 | true 59 | false 60 | 2000000 61 | localhost 62 | ldap/localhost@EXAMPLE.COM 63 | 64 | 65 | 81 | 82 | root 83 | WSO2.ORG 84 | secret 85 | randall 86 | 87 | 88 | 104 | 105 | admin 106 | admin 107 | admin 108 | admin@wso2.com 109 | admin 110 | SHA 111 | 112 | 113 | 127 | 128 | admin 129 | cn 130 | member 131 | 132 | 133 | 151 | 152 | defaultKDC 153 | false 154 | UDP 155 | localhost 156 | ${Ports.EmbeddedLDAP.KDCServerPort} 157 | 8640000 158 | 604800000 159 | true 160 | 161 | 162 | 163 | -------------------------------------------------------------------------------- /pattern-2/bosh-release/jobs/wso2is/templates/repository/conf/identity/embedded-ldap.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 26 | 27 | 28 | 29 | 50 | 51 | false 52 | ${Ports.EmbeddedLDAP.LDAPServerPort} 53 | default 54 | admin 55 | . 56 | identityPerson 57 | false 58 | true 59 | false 60 | 2000000 61 | localhost 62 | ldap/localhost@EXAMPLE.COM 63 | 64 | 65 | 81 | 82 | root 83 | WSO2.ORG 84 | secret 85 | randall 86 | 87 | 88 | 104 | 105 | admin 106 | admin 107 | admin 108 | admin@wso2.com 109 | admin 110 | SHA 111 | 112 | 113 | 127 | 128 | admin 129 | cn 130 | member 131 | 132 | 133 | 151 | 152 | defaultKDC 153 | false 154 | UDP 155 | localhost 156 | ${Ports.EmbeddedLDAP.KDCServerPort} 157 | 8640000 158 | 604800000 159 | true 160 | 161 | 162 | 163 | -------------------------------------------------------------------------------- /pattern-1/README.md: -------------------------------------------------------------------------------- 1 | # Pivotal Cloud Foundry Resources for WSO2 Identity Server deployment pattern 1 2 | 3 | This directory contains the BOSH release implementation and PCF tile creation resources for WSO2 Identity Server 5.7.0 4 | [deployment pattern 1](https://docs.wso2.com/display/IS570/Deployment+Patterns#DeploymentPatterns-Pattern1-HAclustereddeploymentofWSO2IdentityServer). 5 | 6 | ![WSO2 Identity Server 5.7.0 deployment pattern 1](images/pattern-1.png) 7 | 8 | For step-by-step guidelines to manage the BOSH release and to build the PCF tile, refer the following: 9 | 10 | ## Contents 11 | 12 | * [Prerequisites](#prerequisites) 13 | * [Create the BOSH Release](#create-the-bosh-release) 14 | * [Build the CF tile](#build-the-cf-tile) 15 | * [Output](#output) 16 | * [Delete Deployment](#delete-deployment) 17 | * [BOSH Release Structure](#bosh-release-structure) 18 | * [References](#references) 19 | 20 | ## Prerequisites 21 | 22 | 1. Install the following software. 23 | - [BOSH Command Line Interface (CLI) v2+](https://bosh.io/docs/cli-v2.html) 24 | - [Git client](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) 25 | - [PCF Tile Generator](https://docs.pivotal.io/tiledev/2-3/tile-generator.html) 26 | 27 | 28 | 2. Obtain the following software distributions. 29 | - [WSO2 Identity Server 5.7.0](https://wso2.com/identity-and-access-management/install/) product distribution 30 | - [Java Development Kit (JDK) 1.8](https://adoptopenjdk.net/archive.html) 31 | - Relevant Java Database Connectivity (JDBC) drivers 32 | - [mssql-jdbc-7.0.0.jre8.jar](https://www.microsoft.com/en-us/download/details.aspx?id=57175) 33 | - [mysql-connector-java-5.1.45-bin.jar](https://dev.mysql.com/downloads/connector/j/) 34 | 35 | 3. Clone this Git repository. 36 | 37 | ``` 38 | git clone https://github.com/wso2/pivotal-cf-is 39 | ``` 40 | 41 | **Note**: In the remaining sections, the project root directory has been referred to as, **pivotal-cf-is**. 42 | 43 | ## Create the BOSH release 44 | 45 | In order to create the BOSH release for deployment pattern 1, follow the below steps. 46 | 47 | 1. Move to root directory of the deployment pattern 1 BOSH release. 48 | 49 | ``` 50 | cd pivotal-cf-is/pattern-1/bosh-release/ 51 | ``` 52 | 2. Copy the software obtained in step 2 of [Prerequisites](#prerequisites) to the `dist` folder. 53 | 54 | 3. Create the BOSH release and export it to a tarball. 55 | ``` 56 | ./create.sh 57 | ``` 58 | 59 | ## Build the CF tile 60 | 61 | In order to build the CF tile for deployment pattern 1, follow the below steps. 62 | 63 | 1. Move the BOSH release tarball created in the above step to the root of tile directory and navigate into it. 64 | 65 | ``` 66 | mv wso2is-5.7.0-bosh-release.tgz ../tile/ 67 | cd ../tile/ 68 | ``` 69 | 70 | 2. Navigate to pivotal-cf-is/pattern-1/tile directory and execute build.sh 71 | ``` 72 | ./build.sh 73 | ``` 74 | Executing this script will generate the tile for WSO2 IS 5.7.0 deployment. The tile will be created in the root of the ```product``` folder under tile directory. 75 | 76 | ## Install Identity Server in PCF 77 | 78 | 1. Log in to PCF Ops Manager and upload the tile built by clicking **Import a Product**. 79 | 80 | 2. After the tile is uploaded, add the tile to the PCF environment by clicking the + icon next to it. 81 | ![Add a new tile](images/add-new-tile.png) 82 | 83 | 3. After the tile is added to the environment, click on the Identity Server tile in the PCF environment to add configurations to the setup. 84 | 85 | i. AZ and Network Assignments Page: 86 | ![AZ and network assignments](images/az-and-network-assignments.png) 87 | - Place singleton jobs in: Select the AZ in which the Identity server VM needs to run. The broker runs as a singleton job 88 | - Balance other jobs in: Select any combination of AZs. 89 | - Network: Select pcf-pas-network 90 | 91 | Click save. 92 | 93 | ii. Datasource configurations. 94 | ![Datasource configurations](images/datasource-configurations.png) 95 | 96 | - WSO2 Identity Server - BPS Datasource connection information 97 | 98 | - **JDBC URL**: 99 | 100 | - **MySQL**: `jdbc:mysql://:/?autoReconnect=true&useSSL=false` 101 | 102 | - **MS SQL**: `jdbc:sqlserver://:;databaseName=;` 103 | 104 | - **Driver Class Name**: Select the class name of the JDBC driver relevant to the database being used. 105 | 106 | - **Validation Query**: SELECT 1 107 | 108 | - **Username**: Username for database 109 | 110 | - **Password**: Password for database 111 | 112 | - WSO2 Identity Server - Registry and User Management Datasource connection information 113 | 114 | - **JDBC URL**: 115 | 116 | - **MySQL**: `jdbc:mysql://:/?autoReconnect=true&useSSL=false` 117 | 118 | - **MS SQL**: `jdbc:sqlserver://:;databaseName=;` 119 | 120 | - **Driver Class Name**: Select the class name of the JDBC driver relevant to the database being used. 121 | 122 | - **Validation Query**: SELECT 1 123 | 124 | - **Username**: Username for database 125 | 126 | - **Password**: Password for database 127 | 128 | - WSO2 Identity Server - Configuration Registry Datasource connection information 129 | 130 | - **JDBC URL**: 131 | 132 | - **MySQL**: `jdbc:mysql://:/?autoReconnect=true&useSSL=false` 133 | 134 | - **MS SQL**: `jdbc:sqlserver://:;databaseName=;` 135 | 136 | - **Driver Class Name**: Select the class name of the JDBC driver relevant to the database being used. 137 | 138 | - **Validation Query**: SELECT 1 139 | 140 | - **Username**: Username for database 141 | 142 | - **Password**: Password for database 143 | 144 | - WSO2 Identity Server - Identity Datasource connection information 145 | 146 | - **JDBC URL**: 147 | 148 | - **MySQL**: `jdbc:mysql://:/?autoReconnect=true&useSSL=false` 149 | 150 | - **MS SQL**: `jdbc:sqlserver://:;databaseName=;` 151 | 152 | - **Driver Class Name**: Select the class name of the JDBC driver relevant to the database being used. 153 | 154 | - **Validation Query**: SELECT 1 155 | 156 | - **Username**: Username for database 157 | 158 | - **Password**: Password for database 159 | 160 | Click Save. 161 | 162 | iii. Trusted CA certificate 163 | ![Trusted CA certificate](images/trusted-ca-certificate.png) 164 | 165 | vi. Errands contain health check jobs for the Identity server nodes. These jobs check if the nodes are alive, and responding to requests as expected. These health checks begin running after the relevant nodes have been deployed. The execution of errands are enabled by default. However, users have the option to disable the execution of errands. 166 | 167 | vii. Resource Config contains deployment information for each job. Users have the options to change the number of instances, persistent disk types, VM types, etc. for each job. 168 | 169 | viii. Return to the **Installation Dashboard** in Ops Manager and click **Review Pending Changes**. 170 | 171 | ![Review pending changes](images/review-pending-changes.png) 172 | 173 | ix. Select the checkbox for Identity Server and click Apply Changes. 174 | 175 | ![Apply changes](images/apply-changes.png) 176 | 177 | Add the trusted certificate of the domain here. 178 | 179 | Click save. 180 | 181 | ## Output 182 | 183 | To log into the created instances, run the following commands in the BOSH directory in the Pivotal environment. 184 | 185 | 1. List all the deployments. 186 | 187 | ``` 188 | bosh deployments 189 | ``` 190 | 191 | 2. List all the instances within a deployment. 192 | 193 | ``` 194 | bosh vms -d 195 | ``` 196 | 3. SSH into the vm as follows. 197 | 198 | ``` 199 | bosh -d ssh 200 | ``` 201 | 202 | 4. Access the WSO2 Identity Server carbon management console using the following URL. Here the domain name refers to the domain name of the Pivotal environment where the tile is deployed. 203 | 204 | ``` 205 | https://wso2is.sys./carbon 206 | ``` 207 | 208 | ## Delete deployment 209 | 210 | 1. Delete the deployment. 211 | 212 | ``` 213 | bosh -d delete-deployment 214 | ``` 215 | 216 | ## BOSH release structure 217 | 218 | Structure of the directories and files of the BOSH release is as follows: 219 | 220 | ``` 221 | └── bosh-release 222 | ├── config 223 | ├── deployment 224 | ├── dist 225 | ├── jobs 226 | ├── packages 227 | ├── src 228 | └── create.sh 229 | ``` 230 | 231 | ## References 232 | 233 | * [BOSH CLI v2 commands](https://bosh.io/docs/cli-v2.html) 234 | -------------------------------------------------------------------------------- /pattern-2/README.md: -------------------------------------------------------------------------------- 1 | # Pivotal Cloud Foundry Resources for WSO2 Identity Server deployment pattern 2 2 | 3 | This directory contains the BOSH release implementation and PCF tile creation resources for WSO2 Identity Server 5.7.0 4 | [deployment pattern 2](https://docs.wso2.com/display/IS570/Deployment+Patterns#DeploymentPatterns-Pattern2-HAclustereddeploymentofWSO2IdentityServerwithWSO2IdentityAnalytics). 5 | 6 | ![WSO2 Identity Server 5.7.0 deployment pattern 2](images/pattern-2.png) 7 | 8 | For step-by-step guidelines to manage the BOSH release and to build the PCF tile, refer the following: 9 | 10 | ## Contents 11 | 12 | * [Prerequisites](#prerequisites) 13 | * [Create the BOSH Release](#create-the-bosh-release) 14 | * [Build the CF tile](#build-the-cf-tile) 15 | * [Output](#output) 16 | * [Delete Deployment](#delete-deployment) 17 | * [BOSH Release Structure](#bosh-release-structure) 18 | * [References](#references) 19 | 20 | ## Prerequisites 21 | 22 | 1. Install the following software. 23 | - [BOSH Command Line Interface (CLI) v2+](https://bosh.io/docs/cli-v2.html) 24 | - [Git client](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) 25 | - [PCF Tile Generator](https://docs.pivotal.io/tiledev/2-3/tile-generator.html) 26 | 27 | 2. Obtain the following software distributions. 28 | - [WSO2 Identity Server 5.7.0](https://wso2.com/identity-and-access-management/install/) product distribution 29 | - [WSO2 Identity Server Analytics 5.7.0](https://wso2.com/identity-and-access-management/install/analytics/) product distribution 30 | - [Java Development Kit (JDK) 1.8](https://adoptopenjdk.net/archive.html) 31 | - Relevant Java Database Connectivity (JDBC) drivers 32 | - [mssql-jdbc-7.0.0.jre8.jar](https://www.microsoft.com/en-us/download/details.aspx?id=57175) 33 | - [mysql-connector-java-5.1.45-bin.jar](https://dev.mysql.com/downloads/connector/j/) 34 | 35 | 3. Clone this Git repository. 36 | 37 | ``` 38 | git clone https://github.com/wso2/pivotal-cf-is 39 | ``` 40 | 41 | **Note**: In the remaining sections, the project root directory has been referred to as, **pivotal-cf-is**. 42 | 43 | ## Create the BOSH release 44 | 45 | In order to create the BOSH release for deployment pattern 2, follow the below steps. 46 | 47 | 1. Move to root directory of the deployment pattern 2 BOSH release. 48 | 49 | ``` 50 | cd pivotal-cf-is/pattern-2/bosh-release/ 51 | ``` 52 | 2. Copy the software obtained in step 2 of [Prerequisites](#prerequisites) to the `dist` folder. 53 | 54 | 3. Create the BOSH release and export it to a tarball. 55 | ``` 56 | ./create.sh 57 | ``` 58 | 59 | ## Build the CF tile 60 | 61 | In order to build the CF tile for deployment pattern 2, follow the below steps. 62 | 63 | 1. Move the BOSH release tarball created in the above step to the root of tile directory and navigate into it. 64 | 65 | ``` 66 | mv wso2is-5.7.0-bosh-release.tgz ../tile/ 67 | cd ../tile/ 68 | ``` 69 | 70 | 2. Navigate to pivotal-cf-is/pattern-2/tile directory and execute build.sh 71 | ``` 72 | ./build.sh 73 | ``` 74 | Executing this script will generate the tile for WSO2 IS 5.7.0 deployment. The tile will be created in the root of the ```product``` folder under tile directory. 75 | 76 | ## Install Identity Server in PCF 77 | 78 | 1. Log in to PCF Ops Manager and upload the tile built by clicking **Import a Product**. 79 | 80 | 2. After the tile is uploaded, add the tile to the PCF environment by clicking the + icon next to it. 81 | ![Add a new tile](images/add-new-tile.png) 82 | 83 | 3. After the tile is added to the environment, click on the Identity Server tile in the PCF environment to add configurations to the setup. 84 | 85 | i. AZ and Network Assignments Page 86 | ![AZ and network assignments](images/az-and-network-assignments.png) 87 | 88 | - Place singleton jobs in: Select the AZ in which the Identity server VM needs to run. The broker runs as a singleton job 89 | - Balance other jobs in: Select any combination of AZs. 90 | - Network: Select pcf-pas-network 91 | 92 | Click save. 93 | 94 | ii. Datasource configurations 95 | ![Datasource configurations](images/datasource-configurations.png) 96 | 97 | - WSO2 Identity Server - BPS Datasource connection information 98 | 99 | - JDBC URL: 100 | 101 | - MySQL: `jdbc:mysql://:/?autoReconnect=true&useSSL=false` 102 | 103 | - MS SQL: `jdbc:sqlserver://:;databaseName=;` 104 | 105 | - Driver Class Name: Select the class name of the JDBC driver relevant to the database being used. 106 | 107 | - Validation Query: SELECT 1 108 | 109 | - Username: Username for database 110 | 111 | - Password: Password for database 112 | 113 | - WSO2 Identity Server - Registry and User Management Datasource connection information 114 | 115 | - JDBC URL: 116 | 117 | - MySQL: `jdbc:mysql://:/?autoReconnect=true&useSSL=false` 118 | 119 | - MS SQL: `jdbc:sqlserver://:;databaseName=;` 120 | 121 | - Driver Class Name: Select the class name of the JDBC driver relevant to the database being used. 122 | 123 | - Validation Query: SELECT 1 124 | 125 | - Username: Username for database 126 | 127 | - Password: Password for database 128 | 129 | - WSO2 Identity Server - Configuration Registry Datasource connection information 130 | 131 | - JDBC URL: 132 | 133 | - MySQL: `jdbc:mysql://:/?autoReconnect=true&useSSL=false` 134 | 135 | - MS SQL: `jdbc:sqlserver://:;databaseName=;` 136 | 137 | - Driver Class Name: Select the class name of the JDBC driver relevant to the database being used. 138 | 139 | - Validation Query: SELECT 1 140 | 141 | - Username: Username for database 142 | 143 | - Password: Password for database 144 | 145 | - WSO2 Identity Server - Identity Datasource connection information 146 | 147 | - JDBC URL: 148 | 149 | - MySQL: `jdbc:mysql://:/?autoReconnect=true&useSSL=false` 150 | 151 | - MS SQL: `jdbc:sqlserver://:;databaseName=;` 152 | 153 | - Driver Class Name: Select the class name of the JDBC driver relevant to the database being used. 154 | 155 | - Validation Query: SELECT 1 156 | 157 | - Username: Username for database 158 | 159 | - Password: Password for database 160 | 161 | - WSO2 Identity Server - Identity Server Analytics Datasource connection information 162 | 163 | - JDBC URL: 164 | 165 | - MySQL: `jdbc:mysql://:/?autoReconnect=true&useSSL=false` 166 | 167 | - MS SQL: `jdbc:sqlserver://:;databaseName=;` 168 | 169 | - Driver Class Name: Select the class name of the JDBC driver relevant to the database being used. 170 | 171 | - Validation Query: SELECT 1 172 | 173 | - Username: Username for database 174 | 175 | - Password: Password for database 176 | 177 | > Note that the JDBC URL for MySQL does not contain &. Instead, it indicates the & symbol. This is due to the fact that the first two configurations save the configuration data in XML format, and & is used as an escape character. However, this configuration stores its data in YAML and therefore, an escape character is not required. 178 | 179 | Click Save. 180 | 181 | iii. Errands contain health check jobs for the Identity server nodes. These jobs check if the nodes are alive, and responding to requests as expected. These health checks begin running after the relevant nodes have been deployed. The execution of errands are enabled by default. However, users have the option to disable the execution of errands. 182 | 183 | iv. Resource Config contains deployment information for each job. Users have the options to change the number of instances, persistent disk types, VM types, etc. for each job. 184 | 185 | v. Return to the **Installation Dashboard** in Ops Manager and click **Review Pending Changes**. 186 | 187 | ![Review pending changes](images/review-pending-changes.png) 188 | 189 | vi. Select the checkbox for Identity Server and click Apply Changes. 190 | 191 | ![Apply changes](images/apply-changes.png) 192 | 193 | ## Output 194 | 195 | To log into the created instances, run the following commands in the BOSH directory in the Pivotal environment. 196 | 197 | 1. List all the deployments. 198 | 199 | ``` 200 | bosh deployments 201 | ``` 202 | 203 | 2. List all the instances within a deployment. 204 | 205 | ``` 206 | bosh vms -d 207 | ``` 208 | 3. SSH into the vm as follows. 209 | 210 | ``` 211 | bosh -d ssh 212 | ``` 213 | 214 | 4. Access the WSO2 Identity Server management console using the following URL. Here the domain name refers to the domain name of the Pivotal environment where the tile is deployed. 215 | 216 | ``` 217 | https://wso2is.sys./carbon 218 | ``` 219 | 220 | 5. Access the WSO2 Identity Server Analytics management console using the following URL. Here the domain name refers to the domain name of the Pivotal environment where the tile is deployed. 221 | 222 | ``` 223 | https://wso2is-analytics-dashboard.sys./portal 224 | ``` 225 | 226 | ## Delete deployment 227 | 228 | 1. Delete the deployment. 229 | 230 | ``` 231 | bosh -d delete-deployment 232 | ``` 233 | 234 | ## BOSH release structure 235 | 236 | Structure of the directories and files of the BOSH release is as follows: 237 | 238 | ``` 239 | └── bosh-release 240 | ├── config 241 | ├── deployment 242 | ├── dist 243 | ├── jobs 244 | ├── packages 245 | ├── src 246 | └── create.sh 247 | ``` 248 | 249 | ## References 250 | 251 | * [BOSH CLI v2 commands](https://bosh.io/docs/cli-v2.html) 252 | -------------------------------------------------------------------------------- /pattern-1/tile/tile.yml: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------------------------------------- 2 | # 3 | # Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 4 | # 5 | # WSO2 Inc. licenses this file to you under the Apache License, 6 | # Version 2.0 (the "License"); you may not use this file except 7 | # in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | # ---------------------------------------------------------------------------- 20 | 21 | --- 22 | # The high-level description of your tile. 23 | 24 | name: wso2-identity-server 25 | icon_file: resources/wso2-logo.png 26 | label: WSO2 Identity Server 5.7.0 27 | description: PCF Tile for WSO2 Identity Server 5.7.0 28 | 29 | stemcell_criteria: 30 | os: ubuntu-xenial 31 | requires_cpi: false 32 | version: '170.162' 33 | 34 | forms: 35 | - name: Database configurations 36 | label: Database configurations 37 | description: Database configurations 38 | properties: 39 | - name: user_db_jdbc_url 40 | type: string 41 | label: User Management and Registry Datasource JDBC URL 42 | - name: user_db_driver 43 | type: dropdown_select 44 | label: User Management and Registry Datasource Driver Class Name 45 | options: 46 | - name: com.mysql.jdbc.Driver 47 | label: com.mysql.jdbc.Driver 48 | default: true 49 | - name: com.microsoft.sqlserver.jdbc.SQLServerDriver 50 | label: com.microsoft.sqlserver.jdbc.SQLServerDriver 51 | - name: user_db_query 52 | type: string 53 | label: User Management and Registry Datasource Validation Query 54 | - name: user_db_credentials 55 | label: User Management and Registry Datasource Credentials 56 | type: simple_credentials 57 | - name: identity_db_jdbc_url 58 | type: string 59 | label: Identity and Consent Management Datasource JDBC URL 60 | - name: identity_db_driver 61 | type: dropdown_select 62 | label: Identity and Consent Management Datasource Driver Class Name 63 | options: 64 | - name: com.mysql.jdbc.Driver 65 | label: com.mysql.jdbc.Driver 66 | default: true 67 | - name: com.microsoft.sqlserver.jdbc.SQLServerDriver 68 | label: com.microsoft.sqlserver.jdbc.SQLServerDriver 69 | - name: identity_db_query 70 | type: string 71 | label: Identity and Consent Management Datasource Validation Query 72 | - name: identity_db_credentials 73 | label: Identity and Consent Management Datasource Credentials 74 | type: simple_credentials 75 | - name: bps_db_jdbc_url 76 | type: string 77 | label: Business Process Datasource JDBC URL 78 | - name: bps_db_driver 79 | type: dropdown_select 80 | label: Business Process Datasource Driver Class Name 81 | options: 82 | - name: com.mysql.jdbc.Driver 83 | label: com.mysql.jdbc.Driver 84 | default: true 85 | - name: com.microsoft.sqlserver.jdbc.SQLServerDriver 86 | label: com.microsoft.sqlserver.jdbc.SQLServerDriver 87 | - name: bps_db_query 88 | type: string 89 | label: Business Process Datasource Validation Query 90 | - name: bps_db_credentials 91 | label: Business Process Datasource Credentials 92 | type: simple_credentials 93 | 94 | - name: Consent Management Configurations 95 | label: Consent Management Configurations 96 | description: Consent Management Configurations 97 | properties: 98 | - name: consent_mgt_config 99 | label: Enable custom consent configurations 100 | type: selector 101 | configurable: true 102 | default: default 103 | option_templates: 104 | - name: default_option 105 | select_value: default 106 | label: Use default PII Controller configurations 107 | - name: custom_option 108 | label: Customize PII Controller configurations 109 | select_value: custom 110 | property_blueprints: 111 | - name: piicontroller 112 | type: string 113 | label: PII Controller 114 | - name: contact 115 | type: string 116 | label: Contact 117 | - name: email 118 | type: string 119 | label: Email 120 | - name: phone 121 | type: string 122 | label: Phone 123 | - name: piicontroller_url 124 | type: string 125 | label: PII Controller URL 126 | - name: address_country 127 | type: string 128 | label: Country 129 | - name: address_locality 130 | type: string 131 | label: Locality 132 | - name: address_region 133 | type: string 134 | label: Region 135 | - name: address_postoffice_box_number 136 | type: string 137 | label: Post-Office box number 138 | - name: address_postalcode 139 | type: string 140 | label: Postal Code 141 | - name: address_street 142 | type: string 143 | label: Street Address 144 | 145 | - name: Certificate Information 146 | label: Trusted CA certificate 147 | description: Trusted CA certificate 148 | properties: 149 | - name: ca_cert 150 | label: These certificates will be trusted by the deployed services 151 | type: ca_certificate 152 | configurable: true 153 | 154 | - name: Admin credentials 155 | label: Admin credentials 156 | description: Admin credentials 157 | properties: 158 | - name: admin_credentials 159 | label: Identity Server Admin Credentials 160 | type: simple_credentials 161 | 162 | packages: 163 | - name: routing_release 164 | type: bosh-release 165 | path: routing-0.188.0.tgz 166 | - name: bpm_release 167 | type: bosh-release 168 | path: bpm-release-1.1.0.tgz 169 | 170 | - name: wso2is 171 | type: bosh-release 172 | path: wso2is-5.7.0-bosh-release.tgz 173 | jobs: 174 | - name: nfs_server 175 | templates: 176 | - name: nfs_server 177 | release: wso2is-release 178 | memory: 4096 179 | ephemeral_disk: 4096 180 | persistent_disk: 16384 181 | cpu: 2 182 | static_ip: 1 183 | - name: wso2is 184 | instances: 2 185 | templates: 186 | - name: bpm 187 | release: bpm 188 | - name: wso2is 189 | release: wso2is-release 190 | - name: route_registrar 191 | release: routing 192 | consumes: 193 | nats: 194 | from: nats 195 | deployment: (( ..cf.deployment_name )) 196 | - name: health_check 197 | instances: [wso2is] 198 | release: wso2is-release 199 | colocated: true 200 | post_deploy: true 201 | run_default: on 202 | label: IS Health Check 203 | description: Checks if Identity Server is up and running 204 | memory: 4096 205 | ephemeral_disk: 4096 206 | persistent_disk: 16384 207 | cpu: 2 208 | static_ip: 1 209 | max_in_flight: 1 210 | properties: 211 | health_check: 212 | endpoint: "https://localhost:9443/api/health-check/v1.0/health" 213 | name: "Identity Server Carbon" 214 | status_code: 200 215 | wso2is: 216 | admin: 217 | username: (( .properties.admin_credentials.identity )) 218 | password: (( .properties.admin_credentials.password )) 219 | certs: 220 | value: (( .properties.ca_cert.value )) 221 | bps_ds: 222 | jdbc_url: (( .properties.bps_db_jdbc_url.value )) 223 | driver: (( .properties.bps_db_driver.value )) 224 | query: (( .properties.bps_db_query.value )) 225 | username: (( .properties.bps_db_credentials.identity )) 226 | password: (( .properties.bps_db_credentials.password )) 227 | user_db: 228 | jdbc_url: (( .properties.user_db_jdbc_url.value )) 229 | driver: (( .properties.user_db_driver.value )) 230 | query: (( .properties.user_db_query.value )) 231 | username: (( .properties.user_db_credentials.identity )) 232 | password: (( .properties.user_db_credentials.password )) 233 | conf_reg_db: 234 | jdbc_url: (( .properties.user_db_jdbc_url.value )) 235 | driver: (( .properties.user_db_driver.value )) 236 | query: (( .properties.user_db_query.value )) 237 | username: (( .properties.user_db_credentials.identity )) 238 | password: (( .properties.user_db_credentials.password )) 239 | identity_db: 240 | jdbc_url: (( .properties.identity_db_jdbc_url.value )) 241 | driver: (( .properties.identity_db_driver.value )) 242 | query: (( .properties.identity_db_query.value )) 243 | username: (( .properties.identity_db_credentials.identity )) 244 | password: (( .properties.identity_db_credentials.password )) 245 | consent_mgt_conf: 246 | consent_db: 247 | jdbc_url: (( .properties.identity_db_jdbc_url.value )) 248 | driver: (( .properties.identity_db_driver.value )) 249 | query: (( .properties.identity_db_query.value )) 250 | username: (( .properties.identity_db_credentials.identity )) 251 | password: (( .properties.identity_db_credentials.password )) 252 | piicontroller: (( .properties.consent_mgt_config.custom_option.piicontroller.value )) 253 | contact: (( .properties.consent_mgt_config.custom_option.contact.value )) 254 | email: (( .properties.consent_mgt_config.custom_option.email.value )) 255 | phone: (( .properties.consent_mgt_config.custom_option.phone.value )) 256 | piicontroller_url: (( .properties.consent_mgt_config.custom_option.piicontroller_url.value )) 257 | country: (( .properties.consent_mgt_config.custom_option.address_country.value )) 258 | locality: (( .properties.consent_mgt_config.custom_option.address_locality.value )) 259 | region: (( .properties.consent_mgt_config.custom_option.address_region.value )) 260 | postoffice_box_number: (( .properties.consent_mgt_config.custom_option.address_postoffice_box_number.value )) 261 | postalcode: (( .properties.consent_mgt_config.custom_option.address_postalcode.value )) 262 | street_address: (( .properties.consent_mgt_config.custom_option.address_street.value )) 263 | 264 | route_registrar: 265 | routes: 266 | - name: wso2is 267 | port: 9763 268 | tls_port: 9443 269 | registration_interval: 20s 270 | uris: 271 | - wso2is.(( ..cf.cloud_controller.system_domain.value )) 272 | router_group: wso2is 273 | external_port: 9443 274 | server_cert_domain_san: localhost 275 | -------------------------------------------------------------------------------- /pattern-2/tile/tile.yml: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------------------------------------- 2 | # 3 | # Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 4 | # 5 | # WSO2 Inc. licenses this file to you under the Apache License, 6 | # Version 2.0 (the "License"); you may not use this file except 7 | # in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | # ---------------------------------------------------------------------------- 20 | 21 | --- 22 | # The high-level description of your tile. 23 | # Replace these properties with real values. 24 | # 25 | name: wso2is-tile-pattern-2 26 | icon_file: resources/wso2-logo.png 27 | label: WSO2 Identity Server 5.7.0 - Pattern 2 28 | description: PCF Tile for WSO2 Identity Server 5.7.0 - Pattern 2 29 | 30 | stemcell_criteria: 31 | os: ubuntu-xenial 32 | requires_cpi: false 33 | version: '170.15' 34 | 35 | forms: 36 | - name: Database configurations 37 | label: Database configurations 38 | description: Database configurations 39 | properties: 40 | - name: bps_db_jdbc_url 41 | type: string 42 | label: BPS Datasource JDBC URL 43 | - name: bps_db_driver 44 | type: dropdown_select 45 | label: BPS Datasource Driver Class Name 46 | options: 47 | - name: com.mysql.jdbc.Driver 48 | label: com.mysql.jdbc.Driver 49 | default: true 50 | - name: com.microsoft.sqlserver.jdbc.SQLServerDriver 51 | label: com.microsoft.sqlserver.jdbc.SQLServerDriver 52 | - name: bps_db_query 53 | type: string 54 | label: BPS Datasource Validation Query 55 | - name: bps_db_credentials 56 | label: BPS Datasource Credentials 57 | type: simple_credentials 58 | - name: user_db_jdbc_url 59 | type: string 60 | label: Registry and User Management Datasource JDBC URL 61 | - name: user_db_driver 62 | type: dropdown_select 63 | label: Registry and User Management Datasource Driver Class Name 64 | options: 65 | - name: com.mysql.jdbc.Driver 66 | label: com.mysql.jdbc.Driver 67 | default: true 68 | - name: com.microsoft.sqlserver.jdbc.SQLServerDriver 69 | label: com.microsoft.sqlserver.jdbc.SQLServerDriver 70 | - name: user_db_query 71 | type: string 72 | label: Registry and User Management Datasource Validation Query 73 | - name: user_db_credentials 74 | label: Registry and User Management Datasource Credentials 75 | type: simple_credentials 76 | - name: conf_reg_db_jdbc_url 77 | type: string 78 | label: Configuration Registry Datasource JDBC URL 79 | - name: conf_reg_db_driver 80 | type: dropdown_select 81 | label: Configuration Registry Datasource Driver Class Name 82 | options: 83 | - name: com.mysql.jdbc.Driver 84 | label: com.mysql.jdbc.Driver 85 | default: true 86 | - name: com.microsoft.sqlserver.jdbc.SQLServerDriver 87 | label: com.microsoft.sqlserver.jdbc.SQLServerDriver 88 | - name: conf_reg_db_query 89 | type: string 90 | label: Configuration Registry Datasource Validation Query 91 | - name: conf_reg_db_credentials 92 | label: Configuration Registry Datasource Credentials 93 | type: simple_credentials 94 | - name: identity_db_jdbc_url 95 | type: string 96 | label: Identity Datasource JDBC URL 97 | - name: identity_db_driver 98 | type: dropdown_select 99 | label: Identity Datasource Driver Class Name 100 | options: 101 | - name: com.mysql.jdbc.Driver 102 | label: com.mysql.jdbc.Driver 103 | default: true 104 | - name: com.microsoft.sqlserver.jdbc.SQLServerDriver 105 | label: com.microsoft.sqlserver.jdbc.SQLServerDriver 106 | - name: identity_db_query 107 | type: string 108 | label: Identity Datasource Validation Query 109 | - name: identity_db_credentials 110 | label: Identity Datasource Credentials 111 | type: simple_credentials 112 | - name: analytics_db_jdbc_url 113 | type: string 114 | label: Identity Server Analytics Datasource JDBC URL 115 | - name: analytics_db_driver 116 | type: dropdown_select 117 | label: Identity Server Analytics Datasource Driver Class Name 118 | options: 119 | - name: com.mysql.jdbc.Driver 120 | label: com.mysql.jdbc.Driver 121 | default: true 122 | - name: com.microsoft.sqlserver.jdbc.SQLServerDriver 123 | label: com.microsoft.sqlserver.jdbc.SQLServerDriver 124 | - name: analytics_db_query 125 | type: string 126 | label: Identity Server Analytics Datasource Validation Query 127 | - name: analytics_db_credentials 128 | label: Identity Server Analytics Datasource Credentials 129 | type: simple_credentials 130 | - name: Certificate Information 131 | label: Trusted CA certificate 132 | description: Trusted CA certificate 133 | properties: 134 | - name: ca_cert 135 | label: These certificates will be trusted by the deployed services 136 | type: ca_certificate 137 | configurable: true 138 | 139 | packages: 140 | - name: routing_release 141 | type: bosh-release 142 | path: routing-0.178.0.tgz 143 | 144 | - name: wso2is 145 | type: bosh-release 146 | path: wso2is-5.7.0-bosh-release.tgz 147 | jobs: 148 | - name: nfs_server 149 | templates: 150 | - name: nfs_server 151 | release: wso2is-release 152 | memory: 4096 153 | ephemeral_disk: 4096 154 | persistent_disk: 16384 155 | cpu: 2 156 | static_ip: 1 157 | 158 | - name: wso2is_analytics_worker 159 | instances: 2 160 | templates: 161 | - name: wso2is_analytics_worker 162 | release: wso2is-release 163 | provides: 164 | conn: {shared: true} 165 | properties: {} 166 | memory: 4096 167 | ephemeral_disk: 4096 168 | persistent_disk: 16384 169 | cpu: 2 170 | static_ip: 1 171 | max_in_flight: 1 172 | properties: 173 | wso2is: 174 | certs: 175 | value: (( .properties.ca_cert.value )) 176 | analytics_db: 177 | jdbc_url: (( .properties.analytics_db_jdbc_url.value )) 178 | driver: (( .properties.analytics_db_driver.value )) 179 | query: (( .properties.analytics_db_query.value )) 180 | username: (( .properties.analytics_db_credentials.identity )) 181 | password: (( .properties.analytics_db_credentials.password )) 182 | 183 | - name: wso2is_analytics_dashboard 184 | instances: 1 185 | templates: 186 | - name: wso2is_analytics_dashboard 187 | release: wso2is-release 188 | provides: 189 | conn: {shared: true} 190 | properties: {} 191 | - name: route_registrar 192 | release: routing 193 | consumes: 194 | nats: 195 | from: nats 196 | deployment: (( ..cf.deployment_name )) 197 | - name: health_check 198 | instances: 199 | - wso2is_analytics_dashboard 200 | release: wso2is-release 201 | colocated: true 202 | post_deploy: true 203 | run_default: on 204 | label: IS Analytics Dashboard Health Check 205 | description: Checks if Identity Server Analytics Dashboard is up and running 206 | memory: 4096 207 | ephemeral_disk: 4096 208 | persistent_disk: 16384 209 | cpu: 2 210 | static_ip: 1 211 | max_in_flight: 1 212 | properties: 213 | health_check: 214 | endpoint: "https://localhost:9643/portal/login?" 215 | name: "Identity Server Analytics Portal" 216 | status_code: 200 217 | wso2is: 218 | certs: 219 | value: (( .properties.ca_cert.value )) 220 | analytics_db: 221 | jdbc_url: (( .properties.analytics_db_jdbc_url.value )) 222 | driver: (( .properties.analytics_db_driver.value )) 223 | query: (( .properties.analytics_db_query.value )) 224 | username: (( .properties.analytics_db_credentials.identity )) 225 | password: (( .properties.analytics_db_credentials.password )) 226 | route_registrar: 227 | routes: 228 | - name: wso2is_analytics_dashboard 229 | port: 9290 230 | tls_port: 9643 231 | registration_interval: 20s 232 | uris: 233 | - wso2is-analytics-dashboard.(( ..cf.cloud_controller.system_domain.value )) 234 | - name: wso2is 235 | instances: 2 236 | templates: 237 | - name: wso2is 238 | release: wso2is-release 239 | provides: 240 | conn: {shared: true} 241 | properties: {} 242 | - name: route_registrar 243 | release: routing 244 | consumes: 245 | nats: 246 | from: nats 247 | deployment: (( ..cf.deployment_name )) 248 | - name: health_check 249 | instances: 250 | - wso2is 251 | release: wso2is-release 252 | colocated: true 253 | post_deploy: true 254 | run_default: on 255 | label: IS Health Check 256 | description: Checks if Identity Server is up and running 257 | memory: 4096 258 | ephemeral_disk: 4096 259 | persistent_disk: 16384 260 | cpu: 2 261 | static_ip: 1 262 | max_in_flight: 1 263 | properties: 264 | health_check: 265 | endpoint: "https://localhost:9443/carbon/admin/login.jsp" 266 | name: "Identity Server Carbon" 267 | status_code: 200 268 | wso2is: 269 | certs: 270 | value: (( .properties.ca_cert.value )) 271 | bps_ds: 272 | jdbc_url: (( .properties.bps_db_jdbc_url.value )) 273 | driver: (( .properties.bps_db_driver.value )) 274 | query: (( .properties.bps_db_query.value )) 275 | username: (( .properties.bps_db_credentials.identity )) 276 | password: (( .properties.bps_db_credentials.password )) 277 | user_db: 278 | jdbc_url: (( .properties.user_db_jdbc_url.value )) 279 | driver: (( .properties.user_db_driver.value )) 280 | query: (( .properties.user_db_query.value )) 281 | username: (( .properties.user_db_credentials.identity )) 282 | password: (( .properties.user_db_credentials.password )) 283 | conf_reg_db: 284 | jdbc_url: (( .properties.conf_reg_db_jdbc_url.value )) 285 | driver: (( .properties.conf_reg_db_driver.value )) 286 | query: (( .properties.conf_reg_db_query.value )) 287 | username: (( .properties.conf_reg_db_credentials.identity )) 288 | password: (( .properties.conf_reg_db_credentials.password )) 289 | identity_db: 290 | jdbc_url: (( .properties.identity_db_jdbc_url.value )) 291 | driver: (( .properties.identity_db_driver.value )) 292 | query: (( .properties.identity_db_query.value )) 293 | username: (( .properties.identity_db_credentials.identity )) 294 | password: (( .properties.identity_db_credentials.password )) 295 | route_registrar: 296 | routes: 297 | - name: wso2is 298 | port: 9763 299 | tls_port: 9443 300 | registration_interval: 20s 301 | uris: 302 | - wso2is.(( ..cf.cloud_controller.system_domain.value )) 303 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 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 | --------------------------------------------------------------------------------