Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Identity Server as Key Manager job to the BOSH release #46

Merged
merged 3 commits into from
Jan 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions pattern-2/bosh-release/config/blobs.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
mysqldriver/mysql-connector-java-5.1.45-bin.jar:
size: 999810
object_id: dddd3ec0-8aa5-4002-52a7-2113fad4d8f9
object_id: 1c50a2ec-b283-45d8-4134-68e1f6a4e7e2
sha: 6223be933fbc8d81f819aacad0ce09346d5911c4
openjdk/jdk-8u202-ea-bin-b03-linux-x64-07_nov_2018.tar.gz:
size: 139097684
object_id: f65eb11d-8f45-416c-5506-321adf8233ad
object_id: a9ae6c0e-da80-4e1d-60b9-185238462c1d
sha: 43df5d55fff80327cc83680cda6170f33308883c
wso2am/wso2am-2.6.0.zip:
size: 444084271
object_id: 2b96b58e-b661-48b2-5b34-e669bae0d69f
object_id: c579b86c-5d39-48d3-45d2-ba3965b48e4e
sha: c31c9c9dd87a6a6065779c28c6908bd76e4914f3
wso2am_analytics/wso2am-analytics-2.6.0.zip:
size: 180832478
object_id: 765d5000-1cfc-4c5d-44e8-963e95f1deaf
object_id: d8bed920-c888-4486-592c-25fe4bd52e8b
sha: b60e811d5abb500f5793cc73012f1040bc2a88c0
wso2is_km/wso2is-km-5.7.0.zip:
size: 536044196
object_id: 1e785c73-8207-4ff2-6ffd-15ad6b4349f9
sha: 5c4e2a7e838340c92c77541ac3cec07c34a2e4dd
12 changes: 12 additions & 0 deletions pattern-2/bosh-release/create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ set -e
: ${wso2_product_version:="2.6.0"}
: ${wso2_product_pack_identifier:="${wso2_product}-${wso2_product_version}"}
: ${wso2_product_distribution:=${wso2_product_pack_identifier}"*.zip"}
: ${wso2_product_keymanager_pack_identifier:="wso2is-km-5.7.0"}
: ${wso2_product_keymanager_distribution:=${wso2_product_keymanager_pack_identifier}"*.zip"}
: ${wso2_product_analytics_pack_identifier:="${wso2_product}-analytics-${wso2_product_version}"}
: ${wso2_product_analytics_distribution:=${wso2_product_analytics_pack_identifier}"*.zip"}
: ${jdk_distribution:="jdk-8u*linux-x64*.tar.gz"}
Expand All @@ -48,6 +50,10 @@ if [ ! -f ${wso2_product_pack_identifier}.zip ]; then
cp ${wso2_product_distribution} ${wso2_product_pack_identifier}.zip
fi

if [ ! -f ${wso2_product_keymanager_pack_identifier}.zip ]; then
cp ${wso2_product_keymanager_distribution} ${wso2_product_keymanager_pack_identifier}.zip
fi

if [ ! -f ${wso2_product_analytics_pack_identifier}.zip ]; then
cp ${wso2_product_analytics_distribution} ${wso2_product_analytics_pack_identifier}.zip
fi
Expand All @@ -60,6 +66,11 @@ if [ ! -f ${wso2_product_pack_identifier}.zip ]; then
exit 1
fi

if [ ! -f ${wso2_product_keymanager_pack_identifier}.zip ]; then
echo "---> WSO2 Identity Server as Key Manager product distribution not found! Please add it to ${distributions} directory."
exit 1
fi

if [ ! -f ${wso2_product_analytics_pack_identifier}.zip ]; then
echo "---> WSO2 analytics product distribution not found! Please add it to ${distributions} directory."
exit 1
Expand Down Expand Up @@ -153,6 +164,7 @@ echo "---> Adding blobs..."
bosh -e vbox add-blob ${distributions}/${jdk_distribution} openjdk/${jdk_distribution}
bosh -e vbox add-blob ${distributions}/${mysql_driver} mysqldriver/${mysql_driver}
bosh -e vbox add-blob ${distributions}/${wso2_product_pack_identifier}.zip ${wso2_product}/${wso2_product_pack_identifier}.zip
bosh -e vbox add-blob ${distributions}/${wso2_product_keymanager_pack_identifier}.zip wso2is_km/${wso2_product_keymanager_pack_identifier}.zip
bosh -e vbox add-blob ${distributions}/${wso2_product_analytics_pack_identifier}.zip ${wso2_product}_analytics/${wso2_product_analytics_pack_identifier}.zip

echo "---> Uploading blobs..."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</datasource>

<datasource>
<name>WSO2UM_DS</name>
<name>WSO2UM_DB</name>
<description>The datasource used by user manager</description>
<jndiConfig>
<name>jdbc/WSO2UM_DB</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</dbConfig>
<remoteInstance url="https://publisher.apim-wso2.com">
<id>gov</id>
<cacheId><%=properties.wso2apim.mysql.username %>@jdbc:mysql://<%=properties.wso2apim.mysql.hostname %>:3306/<%=properties.wso2apim.mysql.product_db %></cacheId>
<cacheId><%= properties.wso2apim.mysql.username %>@jdbc:mysql://<%= properties.wso2apim.mysql.hostname %>:3306/<%= properties.wso2apim.mysql.product_db %></cacheId>
<dbConfig>govregistry</dbConfig>
<readOnly>false</readOnly>
<enableCache>true</enableCache>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</datasource>

<datasource>
<name>WSO2UM_DS</name>
<name>WSO2UM_DB</name>
<description>The datasource used by user manager</description>
<jndiConfig>
<name>jdbc/WSO2UM_DB</name>
Expand All @@ -50,7 +50,7 @@
</datasource>

<datasource>
<name>WSO2REG_DS</name>
<name>WSO2REG_DB</name>
<description>The datasource used by the registry</description>
<jndiConfig>
<name>jdbc/WSO2REG_DB</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</dbConfig>
<remoteInstance url="https://publisher.apim-wso2.com">
<id>gov</id>
<cacheId><%=properties.wso2apim.mysql.username %>@jdbc:mysql://<%=properties.wso2apim.mysql.hostname %>:3306/<%=properties.wso2apim.mysql.product_db %></cacheId>
<cacheId><%= properties.wso2apim.mysql.username %>@jdbc:mysql://<%= properties.wso2apim.mysql.hostname %>:3306/<%= properties.wso2apim.mysql.product_db %></cacheId>
<dbConfig>govregistry</dbConfig>
<readOnly>false</readOnly>
<enableCache>true</enableCache>
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
logic relies on this. -->
<AuthManager>
<!-- Server URL of the Authentication service -->
<ServerURL>https://localhost:${mgt.transport.https.port}${carbon.context}services/</ServerURL>
<ServerURL>https://<%= link("keymanager").p('route_registrar.routes')[0]['uris'][0] %>${carbon.context}services/</ServerURL>
<!-- Admin username for the Authentication manager. -->
<Username>${admin.username}</Username>
<!-- Admin password for the Authentication manager. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</dbConfig>
<remoteInstance url="https://publisher.apim-wso2.com">
<id>gov</id>
<cacheId><%=properties.wso2apim.mysql.username %>@jdbc:mysql://<%=properties.wso2apim.mysql.hostname %>:3306/<%=properties.wso2apim.mysql.product_db %></cacheId>
<cacheId><%= properties.wso2apim.mysql.username %>@jdbc:mysql://<%= properties.wso2apim.mysql.hostname %>:3306/<%= properties.wso2apim.mysql.product_db %></cacheId>
<dbConfig>govregistry</dbConfig>
<readOnly>false</readOnly>
<enableCache>true</enableCache>
Expand Down
7 changes: 7 additions & 0 deletions pattern-2/bosh-release/jobs/wso2is_km/monit
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
check process wso2is_km
with pidfile /var/vcap/sys/run/wso2is_km/pid
start program "/var/vcap/jobs/wso2is_km/bin/ctl start"
with timeout 100 seconds
stop program "/var/vcap/jobs/wso2is_km/bin/ctl stop"
with timeout 30 seconds
group vcap
95 changes: 95 additions & 0 deletions pattern-2/bosh-release/jobs/wso2is_km/spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
name: wso2is_km
templates:
ctl.erb: bin/ctl
repository/conf/axis2/axis2.xml: repository/conf/axis2/axis2.xml
repository/conf/carbon.xml: repository/conf/carbon.xml
repository/conf/registry.xml: repository/conf/registry.xml
repository/conf/api-manager.xml: repository/conf/api-manager.xml
repository/conf/datasources/master-datasources.xml: repository/conf/datasources/master-datasources.xml
repository/conf/log4j.properties: repository/conf/log4j.properties
repository/conf/user-mgt.xml: repository/conf/user-mgt.xml
repository/conf/tomcat/catalina-server.xml: repository/conf/tomcat/catalina-server.xml
repository/resources/security/client-truststore.jks: repository/resources/security/client-truststore.jks
repository/resources/security/wso2carbon.jks: repository/resources/security/wso2carbon.jks

packages:
- openjdk
- mysqldriver
- wso2is_km
- common

provides:
- name: keymanager
type: keymanager-node
properties:
- route_registrar.routes

consumes:
- name: apim-analytics
type: analytics-node
- name: wso2apim
type: wso2apim-node
- name: gateway
type: gateway-node
- name: nfs-server
type: nfs

properties:
keymanager.memory.min_heap:
description: "Min Heap in MB"
default: 2048
keymanager.memory.max_heap:
description: "Max Heap in MB"
default: 2048
keymanager.memory.max_permgen:
description: "Max permgen in MB"
default: 1024

wso2apim.password:
description: wso2apim password
wso2apim.username:
description: wso2apim username
wso2apim.address:
description: wso2apim address

wso2apim.carbon_db.hostname:
description: WSO2 Carbon database server hostname
wso2apim.carbon_db.db_name:
description: WSO2 Carbon database database name
wso2apim.carbon_db.username:
description: WSO2 Carbon database username
wso2apim.carbon_db.password:
description: WSO2 Carbon database password

wso2apim.am_db.hostname:
description: WSO2 APIM database server hostname
wso2apim.am_db.db_name:
description: WSO2 APIM database database name
wso2apim.am_db.username:
description: WSO2 APIM database username
wso2apim.am_db.password:
description: WSO2 APIM database password

wso2apim.mysql.stats_db:
description: wso2apim mysql statistics database name
wso2apim.mysql.event_store_db:
description: wso2apim mysql event store database name
wso2apim.mysql.processed_data_db:
description: wso2apim mysql analytics processed data database name
wso2apim.analytics.hostname:
description: wso2apim analytics hostname

route_registrar.routes:
description: routes registered for WSO2 APIM apps and gateway

cf.apps_domain:
description: Domain shared by the UAA and CF API eg 'bosh-lite.com'
cf.nats.host:
description: Hostname/IP of NATS
cf.nats.port:
description: Port that NATS listens on
cf.nats.username:
description: The user to use when authenticating with NATS
cf.nats.password:
description: The password to use when authenticating with NATS
Loading