From 0528399774ff4c2f280ab23494f979adaefa013e Mon Sep 17 00:00:00 2001 From: "ashbournerox@gmail.com" Date: Tue, 12 Jun 2018 16:49:59 +0530 Subject: [PATCH 01/13] Refactor product profile names --- .../README.md | 0 .../repository/components/lib/.gitkeep | 0 .../conf/datasources/analytics-datasources.xml | 0 .../conf/datasources/stats-datasources.xml | 0 .../apim/bin/wso2server.sh | 0 .../apim/repository/components/lib/.gitkeep | 0 .../apim/repository/conf/api-manager.xml | 0 .../apim/repository/conf/axis2/axis2.xml | 0 .../apim/repository/conf/carbon.xml | 0 .../conf/datasources/master-datasources.xml | 0 .../apim/repository/conf/registry.xml | 0 .../apim/repository/conf/tomcat/catalina-server.xml | 0 .../apim/repository/conf/user-mgt.xml | 0 .../docker-compose.yml | 0 .../is-as-km/repository/components/lib/.gitkeep | 0 .../is-as-km/repository/conf/consent-mgt-config.xml | 0 .../conf/datasources/master-datasources.xml | 0 .../is-as-km/repository/conf/identity/identity.xml | 0 .../is-as-km/repository/conf/registry.xml | 0 .../is-as-km/repository/conf/user-mgt.xml | 0 .../mysql/scripts/apim_mysql5.7.sql | 0 .../mysql/scripts/carbon_mysql5.7.sql | 0 .../mysql/scripts/mb_store_mysql.sql | 0 .../README.md | 0 .../conf/datasources/analytics-datasources.xml | 0 .../conf/datasources/stats-datasources.xml | 0 .../apim/bin/wso2server.sh | 0 .../apim/repository/conf/api-manager.xml | 0 .../apim/repository/conf/carbon.xml | 0 .../conf/datasources/master-datasources.xml | 0 .../repository/conf/on-premise-gateway.properties | 0 .../apim/repository/conf/registry.xml | 0 .../apim/repository/conf/tomcat/catalina-server.xml | 0 .../docker-compose.yml | 0 .../micro-gateway}/bin/wso2server.sh | 0 .../micro-gateway}/repository/conf/api-manager.xml | 0 .../micro-gateway}/repository/conf/axis2/axis2.xml | 0 .../micro-gateway}/repository/conf/carbon.xml | 0 .../micro-gateway}/repository/conf/jndi.properties | 0 .../micro-gateway}/repository/conf/log4j.properties | 0 .../repository/conf/on-premise-gateway.properties | 0 .../micro-gateway}/repository/conf/registry.xml | 0 .../mysql/scripts/apim_mysql5.7.sql | 0 .../mysql/scripts/carbon_mysql5.7.sql | 0 .../README.md | 0 .../conf/datasources/analytics-datasources.xml | 0 .../conf/datasources/stats-datasources.xml | 0 .../apim/bin/wso2server.sh | 0 .../apim/repository/conf/api-manager.xml | 0 .../apim/repository/conf/carbon.xml | 0 .../conf/datasources/master-datasources.xml | 0 .../apim/repository/conf/tomcat/catalina-server.xml | 0 .../deployment-diagram.png | Bin .../docker-compose.yml | 0 .../mysql/scripts/apim_mysql5.7.sql | 0 .../mysql/scripts/carbon_mysql5.7.sql | 0 .../{microgateway => micro-gateway}/Dockerfile | 0 .../{microgateway => micro-gateway}/README.md | 0 .../{microgateway => micro-gateway}/files/init.sh | 0 59 files changed, 0 insertions(+), 0 deletions(-) rename docker-compose/{APIM-ISasKM-with-Analytics => apim-is-as-km-with-analytics}/README.md (100%) rename docker-compose/{APIM-ISasKM-with-Analytics => apim-is-as-km-with-analytics}/apim-analytics/repository/components/lib/.gitkeep (100%) rename docker-compose/{APIM-ISasKM-with-Analytics => apim-is-as-km-with-analytics}/apim-analytics/repository/conf/datasources/analytics-datasources.xml (100%) rename docker-compose/{APIM-ISasKM-with-Analytics => apim-is-as-km-with-analytics}/apim-analytics/repository/conf/datasources/stats-datasources.xml (100%) rename docker-compose/{APIM-ISasKM-with-Analytics => apim-is-as-km-with-analytics}/apim/bin/wso2server.sh (100%) rename docker-compose/{APIM-ISasKM-with-Analytics => apim-is-as-km-with-analytics}/apim/repository/components/lib/.gitkeep (100%) rename docker-compose/{APIM-ISasKM-with-Analytics => apim-is-as-km-with-analytics}/apim/repository/conf/api-manager.xml (100%) rename docker-compose/{APIM-ISasKM-with-Analytics => apim-is-as-km-with-analytics}/apim/repository/conf/axis2/axis2.xml (100%) rename docker-compose/{APIM-ISasKM-with-Analytics => apim-is-as-km-with-analytics}/apim/repository/conf/carbon.xml (100%) rename docker-compose/{APIM-ISasKM-with-Analytics => apim-is-as-km-with-analytics}/apim/repository/conf/datasources/master-datasources.xml (100%) rename docker-compose/{APIM-ISasKM-with-Analytics => apim-is-as-km-with-analytics}/apim/repository/conf/registry.xml (100%) rename docker-compose/{APIM-ISasKM-with-Analytics => apim-is-as-km-with-analytics}/apim/repository/conf/tomcat/catalina-server.xml (100%) rename docker-compose/{APIM-ISasKM-with-Analytics => apim-is-as-km-with-analytics}/apim/repository/conf/user-mgt.xml (100%) rename docker-compose/{APIM-ISasKM-with-Analytics => apim-is-as-km-with-analytics}/docker-compose.yml (100%) rename docker-compose/{APIM-ISasKM-with-Analytics => apim-is-as-km-with-analytics}/is-as-km/repository/components/lib/.gitkeep (100%) rename docker-compose/{APIM-ISasKM-with-Analytics => apim-is-as-km-with-analytics}/is-as-km/repository/conf/consent-mgt-config.xml (100%) rename docker-compose/{APIM-ISasKM-with-Analytics => apim-is-as-km-with-analytics}/is-as-km/repository/conf/datasources/master-datasources.xml (100%) rename docker-compose/{APIM-ISasKM-with-Analytics => apim-is-as-km-with-analytics}/is-as-km/repository/conf/identity/identity.xml (100%) rename docker-compose/{APIM-ISasKM-with-Analytics => apim-is-as-km-with-analytics}/is-as-km/repository/conf/registry.xml (100%) rename docker-compose/{APIM-ISasKM-with-Analytics => apim-is-as-km-with-analytics}/is-as-km/repository/conf/user-mgt.xml (100%) rename docker-compose/{APIM-ISasKM-with-Analytics => apim-is-as-km-with-analytics}/mysql/scripts/apim_mysql5.7.sql (100%) rename docker-compose/{APIM-ISasKM-with-Analytics => apim-is-as-km-with-analytics}/mysql/scripts/carbon_mysql5.7.sql (100%) rename docker-compose/{APIM-ISasKM-with-Analytics => apim-is-as-km-with-analytics}/mysql/scripts/mb_store_mysql.sql (100%) rename docker-compose/{APIM-Microgateway-with-Analytics => apim-micro-gw-with-analytics}/README.md (100%) rename docker-compose/{APIM-Microgateway-with-Analytics => apim-micro-gw-with-analytics}/apim-analytics/repository/conf/datasources/analytics-datasources.xml (100%) rename docker-compose/{APIM-Microgateway-with-Analytics => apim-micro-gw-with-analytics}/apim-analytics/repository/conf/datasources/stats-datasources.xml (100%) rename docker-compose/{APIM-Microgateway-with-Analytics => apim-micro-gw-with-analytics}/apim/bin/wso2server.sh (100%) rename docker-compose/{APIM-Microgateway-with-Analytics => apim-micro-gw-with-analytics}/apim/repository/conf/api-manager.xml (100%) rename docker-compose/{APIM-Microgateway-with-Analytics => apim-micro-gw-with-analytics}/apim/repository/conf/carbon.xml (100%) rename docker-compose/{APIM-Microgateway-with-Analytics => apim-micro-gw-with-analytics}/apim/repository/conf/datasources/master-datasources.xml (100%) rename docker-compose/{APIM-Microgateway-with-Analytics => apim-micro-gw-with-analytics}/apim/repository/conf/on-premise-gateway.properties (100%) rename docker-compose/{APIM-Microgateway-with-Analytics => apim-micro-gw-with-analytics}/apim/repository/conf/registry.xml (100%) rename docker-compose/{APIM-Microgateway-with-Analytics => apim-micro-gw-with-analytics}/apim/repository/conf/tomcat/catalina-server.xml (100%) rename docker-compose/{APIM-Microgateway-with-Analytics => apim-micro-gw-with-analytics}/docker-compose.yml (100%) rename docker-compose/{APIM-Microgateway-with-Analytics/micro-gw => apim-micro-gw-with-analytics/micro-gateway}/bin/wso2server.sh (100%) rename docker-compose/{APIM-Microgateway-with-Analytics/micro-gw => apim-micro-gw-with-analytics/micro-gateway}/repository/conf/api-manager.xml (100%) rename docker-compose/{APIM-Microgateway-with-Analytics/micro-gw => apim-micro-gw-with-analytics/micro-gateway}/repository/conf/axis2/axis2.xml (100%) rename docker-compose/{APIM-Microgateway-with-Analytics/micro-gw => apim-micro-gw-with-analytics/micro-gateway}/repository/conf/carbon.xml (100%) rename docker-compose/{APIM-Microgateway-with-Analytics/micro-gw => apim-micro-gw-with-analytics/micro-gateway}/repository/conf/jndi.properties (100%) rename docker-compose/{APIM-Microgateway-with-Analytics/micro-gw => apim-micro-gw-with-analytics/micro-gateway}/repository/conf/log4j.properties (100%) rename docker-compose/{APIM-Microgateway-with-Analytics/micro-gw => apim-micro-gw-with-analytics/micro-gateway}/repository/conf/on-premise-gateway.properties (100%) rename docker-compose/{APIM-Microgateway-with-Analytics/micro-gw => apim-micro-gw-with-analytics/micro-gateway}/repository/conf/registry.xml (100%) rename docker-compose/{APIM-Microgateway-with-Analytics => apim-micro-gw-with-analytics}/mysql/scripts/apim_mysql5.7.sql (100%) rename docker-compose/{APIM-Microgateway-with-Analytics => apim-micro-gw-with-analytics}/mysql/scripts/carbon_mysql5.7.sql (100%) rename docker-compose/{APIM-with-Analytics => apim-with-analytics}/README.md (100%) rename docker-compose/{APIM-with-Analytics => apim-with-analytics}/apim-analytics/repository/conf/datasources/analytics-datasources.xml (100%) rename docker-compose/{APIM-with-Analytics => apim-with-analytics}/apim-analytics/repository/conf/datasources/stats-datasources.xml (100%) rename docker-compose/{APIM-with-Analytics => apim-with-analytics}/apim/bin/wso2server.sh (100%) rename docker-compose/{APIM-with-Analytics => apim-with-analytics}/apim/repository/conf/api-manager.xml (100%) rename docker-compose/{APIM-with-Analytics => apim-with-analytics}/apim/repository/conf/carbon.xml (100%) rename docker-compose/{APIM-with-Analytics => apim-with-analytics}/apim/repository/conf/datasources/master-datasources.xml (100%) rename docker-compose/{APIM-with-Analytics => apim-with-analytics}/apim/repository/conf/tomcat/catalina-server.xml (100%) rename docker-compose/{APIM-with-Analytics => apim-with-analytics}/deployment-diagram.png (100%) rename docker-compose/{APIM-with-Analytics => apim-with-analytics}/docker-compose.yml (100%) rename docker-compose/{APIM-with-Analytics => apim-with-analytics}/mysql/scripts/apim_mysql5.7.sql (100%) rename docker-compose/{APIM-with-Analytics => apim-with-analytics}/mysql/scripts/carbon_mysql5.7.sql (100%) rename dockerfiles/{microgateway => micro-gateway}/Dockerfile (100%) rename dockerfiles/{microgateway => micro-gateway}/README.md (100%) rename dockerfiles/{microgateway => micro-gateway}/files/init.sh (100%) diff --git a/docker-compose/APIM-ISasKM-with-Analytics/README.md b/docker-compose/apim-is-as-km-with-analytics/README.md similarity index 100% rename from docker-compose/APIM-ISasKM-with-Analytics/README.md rename to docker-compose/apim-is-as-km-with-analytics/README.md diff --git a/docker-compose/APIM-ISasKM-with-Analytics/apim-analytics/repository/components/lib/.gitkeep b/docker-compose/apim-is-as-km-with-analytics/apim-analytics/repository/components/lib/.gitkeep similarity index 100% rename from docker-compose/APIM-ISasKM-with-Analytics/apim-analytics/repository/components/lib/.gitkeep rename to docker-compose/apim-is-as-km-with-analytics/apim-analytics/repository/components/lib/.gitkeep diff --git a/docker-compose/APIM-ISasKM-with-Analytics/apim-analytics/repository/conf/datasources/analytics-datasources.xml b/docker-compose/apim-is-as-km-with-analytics/apim-analytics/repository/conf/datasources/analytics-datasources.xml similarity index 100% rename from docker-compose/APIM-ISasKM-with-Analytics/apim-analytics/repository/conf/datasources/analytics-datasources.xml rename to docker-compose/apim-is-as-km-with-analytics/apim-analytics/repository/conf/datasources/analytics-datasources.xml diff --git a/docker-compose/APIM-ISasKM-with-Analytics/apim-analytics/repository/conf/datasources/stats-datasources.xml b/docker-compose/apim-is-as-km-with-analytics/apim-analytics/repository/conf/datasources/stats-datasources.xml similarity index 100% rename from docker-compose/APIM-ISasKM-with-Analytics/apim-analytics/repository/conf/datasources/stats-datasources.xml rename to docker-compose/apim-is-as-km-with-analytics/apim-analytics/repository/conf/datasources/stats-datasources.xml diff --git a/docker-compose/APIM-ISasKM-with-Analytics/apim/bin/wso2server.sh b/docker-compose/apim-is-as-km-with-analytics/apim/bin/wso2server.sh similarity index 100% rename from docker-compose/APIM-ISasKM-with-Analytics/apim/bin/wso2server.sh rename to docker-compose/apim-is-as-km-with-analytics/apim/bin/wso2server.sh diff --git a/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/components/lib/.gitkeep b/docker-compose/apim-is-as-km-with-analytics/apim/repository/components/lib/.gitkeep similarity index 100% rename from docker-compose/APIM-ISasKM-with-Analytics/apim/repository/components/lib/.gitkeep rename to docker-compose/apim-is-as-km-with-analytics/apim/repository/components/lib/.gitkeep diff --git a/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/api-manager.xml b/docker-compose/apim-is-as-km-with-analytics/apim/repository/conf/api-manager.xml similarity index 100% rename from docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/api-manager.xml rename to docker-compose/apim-is-as-km-with-analytics/apim/repository/conf/api-manager.xml diff --git a/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/axis2/axis2.xml b/docker-compose/apim-is-as-km-with-analytics/apim/repository/conf/axis2/axis2.xml similarity index 100% rename from docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/axis2/axis2.xml rename to docker-compose/apim-is-as-km-with-analytics/apim/repository/conf/axis2/axis2.xml diff --git a/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/carbon.xml b/docker-compose/apim-is-as-km-with-analytics/apim/repository/conf/carbon.xml similarity index 100% rename from docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/carbon.xml rename to docker-compose/apim-is-as-km-with-analytics/apim/repository/conf/carbon.xml diff --git a/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/datasources/master-datasources.xml b/docker-compose/apim-is-as-km-with-analytics/apim/repository/conf/datasources/master-datasources.xml similarity index 100% rename from docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/datasources/master-datasources.xml rename to docker-compose/apim-is-as-km-with-analytics/apim/repository/conf/datasources/master-datasources.xml diff --git a/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/registry.xml b/docker-compose/apim-is-as-km-with-analytics/apim/repository/conf/registry.xml similarity index 100% rename from docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/registry.xml rename to docker-compose/apim-is-as-km-with-analytics/apim/repository/conf/registry.xml diff --git a/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/tomcat/catalina-server.xml b/docker-compose/apim-is-as-km-with-analytics/apim/repository/conf/tomcat/catalina-server.xml similarity index 100% rename from docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/tomcat/catalina-server.xml rename to docker-compose/apim-is-as-km-with-analytics/apim/repository/conf/tomcat/catalina-server.xml diff --git a/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/user-mgt.xml b/docker-compose/apim-is-as-km-with-analytics/apim/repository/conf/user-mgt.xml similarity index 100% rename from docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/user-mgt.xml rename to docker-compose/apim-is-as-km-with-analytics/apim/repository/conf/user-mgt.xml diff --git a/docker-compose/APIM-ISasKM-with-Analytics/docker-compose.yml b/docker-compose/apim-is-as-km-with-analytics/docker-compose.yml similarity index 100% rename from docker-compose/APIM-ISasKM-with-Analytics/docker-compose.yml rename to docker-compose/apim-is-as-km-with-analytics/docker-compose.yml diff --git a/docker-compose/APIM-ISasKM-with-Analytics/is-as-km/repository/components/lib/.gitkeep b/docker-compose/apim-is-as-km-with-analytics/is-as-km/repository/components/lib/.gitkeep similarity index 100% rename from docker-compose/APIM-ISasKM-with-Analytics/is-as-km/repository/components/lib/.gitkeep rename to docker-compose/apim-is-as-km-with-analytics/is-as-km/repository/components/lib/.gitkeep diff --git a/docker-compose/APIM-ISasKM-with-Analytics/is-as-km/repository/conf/consent-mgt-config.xml b/docker-compose/apim-is-as-km-with-analytics/is-as-km/repository/conf/consent-mgt-config.xml similarity index 100% rename from docker-compose/APIM-ISasKM-with-Analytics/is-as-km/repository/conf/consent-mgt-config.xml rename to docker-compose/apim-is-as-km-with-analytics/is-as-km/repository/conf/consent-mgt-config.xml diff --git a/docker-compose/APIM-ISasKM-with-Analytics/is-as-km/repository/conf/datasources/master-datasources.xml b/docker-compose/apim-is-as-km-with-analytics/is-as-km/repository/conf/datasources/master-datasources.xml similarity index 100% rename from docker-compose/APIM-ISasKM-with-Analytics/is-as-km/repository/conf/datasources/master-datasources.xml rename to docker-compose/apim-is-as-km-with-analytics/is-as-km/repository/conf/datasources/master-datasources.xml diff --git a/docker-compose/APIM-ISasKM-with-Analytics/is-as-km/repository/conf/identity/identity.xml b/docker-compose/apim-is-as-km-with-analytics/is-as-km/repository/conf/identity/identity.xml similarity index 100% rename from docker-compose/APIM-ISasKM-with-Analytics/is-as-km/repository/conf/identity/identity.xml rename to docker-compose/apim-is-as-km-with-analytics/is-as-km/repository/conf/identity/identity.xml diff --git a/docker-compose/APIM-ISasKM-with-Analytics/is-as-km/repository/conf/registry.xml b/docker-compose/apim-is-as-km-with-analytics/is-as-km/repository/conf/registry.xml similarity index 100% rename from docker-compose/APIM-ISasKM-with-Analytics/is-as-km/repository/conf/registry.xml rename to docker-compose/apim-is-as-km-with-analytics/is-as-km/repository/conf/registry.xml diff --git a/docker-compose/APIM-ISasKM-with-Analytics/is-as-km/repository/conf/user-mgt.xml b/docker-compose/apim-is-as-km-with-analytics/is-as-km/repository/conf/user-mgt.xml similarity index 100% rename from docker-compose/APIM-ISasKM-with-Analytics/is-as-km/repository/conf/user-mgt.xml rename to docker-compose/apim-is-as-km-with-analytics/is-as-km/repository/conf/user-mgt.xml diff --git a/docker-compose/APIM-ISasKM-with-Analytics/mysql/scripts/apim_mysql5.7.sql b/docker-compose/apim-is-as-km-with-analytics/mysql/scripts/apim_mysql5.7.sql similarity index 100% rename from docker-compose/APIM-ISasKM-with-Analytics/mysql/scripts/apim_mysql5.7.sql rename to docker-compose/apim-is-as-km-with-analytics/mysql/scripts/apim_mysql5.7.sql diff --git a/docker-compose/APIM-ISasKM-with-Analytics/mysql/scripts/carbon_mysql5.7.sql b/docker-compose/apim-is-as-km-with-analytics/mysql/scripts/carbon_mysql5.7.sql similarity index 100% rename from docker-compose/APIM-ISasKM-with-Analytics/mysql/scripts/carbon_mysql5.7.sql rename to docker-compose/apim-is-as-km-with-analytics/mysql/scripts/carbon_mysql5.7.sql diff --git a/docker-compose/APIM-ISasKM-with-Analytics/mysql/scripts/mb_store_mysql.sql b/docker-compose/apim-is-as-km-with-analytics/mysql/scripts/mb_store_mysql.sql similarity index 100% rename from docker-compose/APIM-ISasKM-with-Analytics/mysql/scripts/mb_store_mysql.sql rename to docker-compose/apim-is-as-km-with-analytics/mysql/scripts/mb_store_mysql.sql diff --git a/docker-compose/APIM-Microgateway-with-Analytics/README.md b/docker-compose/apim-micro-gw-with-analytics/README.md similarity index 100% rename from docker-compose/APIM-Microgateway-with-Analytics/README.md rename to docker-compose/apim-micro-gw-with-analytics/README.md diff --git a/docker-compose/APIM-Microgateway-with-Analytics/apim-analytics/repository/conf/datasources/analytics-datasources.xml b/docker-compose/apim-micro-gw-with-analytics/apim-analytics/repository/conf/datasources/analytics-datasources.xml similarity index 100% rename from docker-compose/APIM-Microgateway-with-Analytics/apim-analytics/repository/conf/datasources/analytics-datasources.xml rename to docker-compose/apim-micro-gw-with-analytics/apim-analytics/repository/conf/datasources/analytics-datasources.xml diff --git a/docker-compose/APIM-Microgateway-with-Analytics/apim-analytics/repository/conf/datasources/stats-datasources.xml b/docker-compose/apim-micro-gw-with-analytics/apim-analytics/repository/conf/datasources/stats-datasources.xml similarity index 100% rename from docker-compose/APIM-Microgateway-with-Analytics/apim-analytics/repository/conf/datasources/stats-datasources.xml rename to docker-compose/apim-micro-gw-with-analytics/apim-analytics/repository/conf/datasources/stats-datasources.xml diff --git a/docker-compose/APIM-Microgateway-with-Analytics/apim/bin/wso2server.sh b/docker-compose/apim-micro-gw-with-analytics/apim/bin/wso2server.sh similarity index 100% rename from docker-compose/APIM-Microgateway-with-Analytics/apim/bin/wso2server.sh rename to docker-compose/apim-micro-gw-with-analytics/apim/bin/wso2server.sh diff --git a/docker-compose/APIM-Microgateway-with-Analytics/apim/repository/conf/api-manager.xml b/docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/api-manager.xml similarity index 100% rename from docker-compose/APIM-Microgateway-with-Analytics/apim/repository/conf/api-manager.xml rename to docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/api-manager.xml diff --git a/docker-compose/APIM-Microgateway-with-Analytics/apim/repository/conf/carbon.xml b/docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/carbon.xml similarity index 100% rename from docker-compose/APIM-Microgateway-with-Analytics/apim/repository/conf/carbon.xml rename to docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/carbon.xml diff --git a/docker-compose/APIM-Microgateway-with-Analytics/apim/repository/conf/datasources/master-datasources.xml b/docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/datasources/master-datasources.xml similarity index 100% rename from docker-compose/APIM-Microgateway-with-Analytics/apim/repository/conf/datasources/master-datasources.xml rename to docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/datasources/master-datasources.xml diff --git a/docker-compose/APIM-Microgateway-with-Analytics/apim/repository/conf/on-premise-gateway.properties b/docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/on-premise-gateway.properties similarity index 100% rename from docker-compose/APIM-Microgateway-with-Analytics/apim/repository/conf/on-premise-gateway.properties rename to docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/on-premise-gateway.properties diff --git a/docker-compose/APIM-Microgateway-with-Analytics/apim/repository/conf/registry.xml b/docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/registry.xml similarity index 100% rename from docker-compose/APIM-Microgateway-with-Analytics/apim/repository/conf/registry.xml rename to docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/registry.xml diff --git a/docker-compose/APIM-Microgateway-with-Analytics/apim/repository/conf/tomcat/catalina-server.xml b/docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/tomcat/catalina-server.xml similarity index 100% rename from docker-compose/APIM-Microgateway-with-Analytics/apim/repository/conf/tomcat/catalina-server.xml rename to docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/tomcat/catalina-server.xml diff --git a/docker-compose/APIM-Microgateway-with-Analytics/docker-compose.yml b/docker-compose/apim-micro-gw-with-analytics/docker-compose.yml similarity index 100% rename from docker-compose/APIM-Microgateway-with-Analytics/docker-compose.yml rename to docker-compose/apim-micro-gw-with-analytics/docker-compose.yml diff --git a/docker-compose/APIM-Microgateway-with-Analytics/micro-gw/bin/wso2server.sh b/docker-compose/apim-micro-gw-with-analytics/micro-gateway/bin/wso2server.sh similarity index 100% rename from docker-compose/APIM-Microgateway-with-Analytics/micro-gw/bin/wso2server.sh rename to docker-compose/apim-micro-gw-with-analytics/micro-gateway/bin/wso2server.sh diff --git a/docker-compose/APIM-Microgateway-with-Analytics/micro-gw/repository/conf/api-manager.xml b/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/api-manager.xml similarity index 100% rename from docker-compose/APIM-Microgateway-with-Analytics/micro-gw/repository/conf/api-manager.xml rename to docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/api-manager.xml diff --git a/docker-compose/APIM-Microgateway-with-Analytics/micro-gw/repository/conf/axis2/axis2.xml b/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/axis2/axis2.xml similarity index 100% rename from docker-compose/APIM-Microgateway-with-Analytics/micro-gw/repository/conf/axis2/axis2.xml rename to docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/axis2/axis2.xml diff --git a/docker-compose/APIM-Microgateway-with-Analytics/micro-gw/repository/conf/carbon.xml b/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/carbon.xml similarity index 100% rename from docker-compose/APIM-Microgateway-with-Analytics/micro-gw/repository/conf/carbon.xml rename to docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/carbon.xml diff --git a/docker-compose/APIM-Microgateway-with-Analytics/micro-gw/repository/conf/jndi.properties b/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/jndi.properties similarity index 100% rename from docker-compose/APIM-Microgateway-with-Analytics/micro-gw/repository/conf/jndi.properties rename to docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/jndi.properties diff --git a/docker-compose/APIM-Microgateway-with-Analytics/micro-gw/repository/conf/log4j.properties b/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/log4j.properties similarity index 100% rename from docker-compose/APIM-Microgateway-with-Analytics/micro-gw/repository/conf/log4j.properties rename to docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/log4j.properties diff --git a/docker-compose/APIM-Microgateway-with-Analytics/micro-gw/repository/conf/on-premise-gateway.properties b/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/on-premise-gateway.properties similarity index 100% rename from docker-compose/APIM-Microgateway-with-Analytics/micro-gw/repository/conf/on-premise-gateway.properties rename to docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/on-premise-gateway.properties diff --git a/docker-compose/APIM-Microgateway-with-Analytics/micro-gw/repository/conf/registry.xml b/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/registry.xml similarity index 100% rename from docker-compose/APIM-Microgateway-with-Analytics/micro-gw/repository/conf/registry.xml rename to docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/registry.xml diff --git a/docker-compose/APIM-Microgateway-with-Analytics/mysql/scripts/apim_mysql5.7.sql b/docker-compose/apim-micro-gw-with-analytics/mysql/scripts/apim_mysql5.7.sql similarity index 100% rename from docker-compose/APIM-Microgateway-with-Analytics/mysql/scripts/apim_mysql5.7.sql rename to docker-compose/apim-micro-gw-with-analytics/mysql/scripts/apim_mysql5.7.sql diff --git a/docker-compose/APIM-Microgateway-with-Analytics/mysql/scripts/carbon_mysql5.7.sql b/docker-compose/apim-micro-gw-with-analytics/mysql/scripts/carbon_mysql5.7.sql similarity index 100% rename from docker-compose/APIM-Microgateway-with-Analytics/mysql/scripts/carbon_mysql5.7.sql rename to docker-compose/apim-micro-gw-with-analytics/mysql/scripts/carbon_mysql5.7.sql diff --git a/docker-compose/APIM-with-Analytics/README.md b/docker-compose/apim-with-analytics/README.md similarity index 100% rename from docker-compose/APIM-with-Analytics/README.md rename to docker-compose/apim-with-analytics/README.md diff --git a/docker-compose/APIM-with-Analytics/apim-analytics/repository/conf/datasources/analytics-datasources.xml b/docker-compose/apim-with-analytics/apim-analytics/repository/conf/datasources/analytics-datasources.xml similarity index 100% rename from docker-compose/APIM-with-Analytics/apim-analytics/repository/conf/datasources/analytics-datasources.xml rename to docker-compose/apim-with-analytics/apim-analytics/repository/conf/datasources/analytics-datasources.xml diff --git a/docker-compose/APIM-with-Analytics/apim-analytics/repository/conf/datasources/stats-datasources.xml b/docker-compose/apim-with-analytics/apim-analytics/repository/conf/datasources/stats-datasources.xml similarity index 100% rename from docker-compose/APIM-with-Analytics/apim-analytics/repository/conf/datasources/stats-datasources.xml rename to docker-compose/apim-with-analytics/apim-analytics/repository/conf/datasources/stats-datasources.xml diff --git a/docker-compose/APIM-with-Analytics/apim/bin/wso2server.sh b/docker-compose/apim-with-analytics/apim/bin/wso2server.sh similarity index 100% rename from docker-compose/APIM-with-Analytics/apim/bin/wso2server.sh rename to docker-compose/apim-with-analytics/apim/bin/wso2server.sh diff --git a/docker-compose/APIM-with-Analytics/apim/repository/conf/api-manager.xml b/docker-compose/apim-with-analytics/apim/repository/conf/api-manager.xml similarity index 100% rename from docker-compose/APIM-with-Analytics/apim/repository/conf/api-manager.xml rename to docker-compose/apim-with-analytics/apim/repository/conf/api-manager.xml diff --git a/docker-compose/APIM-with-Analytics/apim/repository/conf/carbon.xml b/docker-compose/apim-with-analytics/apim/repository/conf/carbon.xml similarity index 100% rename from docker-compose/APIM-with-Analytics/apim/repository/conf/carbon.xml rename to docker-compose/apim-with-analytics/apim/repository/conf/carbon.xml diff --git a/docker-compose/APIM-with-Analytics/apim/repository/conf/datasources/master-datasources.xml b/docker-compose/apim-with-analytics/apim/repository/conf/datasources/master-datasources.xml similarity index 100% rename from docker-compose/APIM-with-Analytics/apim/repository/conf/datasources/master-datasources.xml rename to docker-compose/apim-with-analytics/apim/repository/conf/datasources/master-datasources.xml diff --git a/docker-compose/APIM-with-Analytics/apim/repository/conf/tomcat/catalina-server.xml b/docker-compose/apim-with-analytics/apim/repository/conf/tomcat/catalina-server.xml similarity index 100% rename from docker-compose/APIM-with-Analytics/apim/repository/conf/tomcat/catalina-server.xml rename to docker-compose/apim-with-analytics/apim/repository/conf/tomcat/catalina-server.xml diff --git a/docker-compose/APIM-with-Analytics/deployment-diagram.png b/docker-compose/apim-with-analytics/deployment-diagram.png similarity index 100% rename from docker-compose/APIM-with-Analytics/deployment-diagram.png rename to docker-compose/apim-with-analytics/deployment-diagram.png diff --git a/docker-compose/APIM-with-Analytics/docker-compose.yml b/docker-compose/apim-with-analytics/docker-compose.yml similarity index 100% rename from docker-compose/APIM-with-Analytics/docker-compose.yml rename to docker-compose/apim-with-analytics/docker-compose.yml diff --git a/docker-compose/APIM-with-Analytics/mysql/scripts/apim_mysql5.7.sql b/docker-compose/apim-with-analytics/mysql/scripts/apim_mysql5.7.sql similarity index 100% rename from docker-compose/APIM-with-Analytics/mysql/scripts/apim_mysql5.7.sql rename to docker-compose/apim-with-analytics/mysql/scripts/apim_mysql5.7.sql diff --git a/docker-compose/APIM-with-Analytics/mysql/scripts/carbon_mysql5.7.sql b/docker-compose/apim-with-analytics/mysql/scripts/carbon_mysql5.7.sql similarity index 100% rename from docker-compose/APIM-with-Analytics/mysql/scripts/carbon_mysql5.7.sql rename to docker-compose/apim-with-analytics/mysql/scripts/carbon_mysql5.7.sql diff --git a/dockerfiles/microgateway/Dockerfile b/dockerfiles/micro-gateway/Dockerfile similarity index 100% rename from dockerfiles/microgateway/Dockerfile rename to dockerfiles/micro-gateway/Dockerfile diff --git a/dockerfiles/microgateway/README.md b/dockerfiles/micro-gateway/README.md similarity index 100% rename from dockerfiles/microgateway/README.md rename to dockerfiles/micro-gateway/README.md diff --git a/dockerfiles/microgateway/files/init.sh b/dockerfiles/micro-gateway/files/init.sh similarity index 100% rename from dockerfiles/microgateway/files/init.sh rename to dockerfiles/micro-gateway/files/init.sh From 6199df3ac6f088b6b1c4354dda1f28b01ae2052b Mon Sep 17 00:00:00 2001 From: "ashbournerox@gmail.com" Date: Tue, 12 Jun 2018 23:09:33 +0530 Subject: [PATCH 02/13] Add dockerfiles for apim 2.5.0 --- dockerfiles/apim-analytics/Dockerfile | 2 +- dockerfiles/apim-analytics/README.md | 16 ++++++++-------- dockerfiles/apim/Dockerfile | 2 +- dockerfiles/apim/README.md | 16 ++++++++-------- dockerfiles/is-as-km/Dockerfile | 2 +- dockerfiles/is-as-km/README.md | 14 +++++++------- dockerfiles/micro-gateway/Dockerfile | 2 +- dockerfiles/micro-gateway/README.md | 16 ++++++++-------- 8 files changed, 35 insertions(+), 35 deletions(-) diff --git a/dockerfiles/apim-analytics/Dockerfile b/dockerfiles/apim-analytics/Dockerfile index c0eee05c..6b66c9cb 100644 --- a/dockerfiles/apim-analytics/Dockerfile +++ b/dockerfiles/apim-analytics/Dockerfile @@ -33,7 +33,7 @@ ARG JDK=jdk1.8.0* ARG JAVA_HOME=${USER_HOME}/java # set wso2 product configurations ARG WSO2_SERVER=wso2am-analytics -ARG WSO2_SERVER_VERSION=2.2.0 +ARG WSO2_SERVER_VERSION=2.5.0 ARG WSO2_SERVER_DIST=${WSO2_SERVER}-${WSO2_SERVER_VERSION} ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER}-${WSO2_SERVER_VERSION} diff --git a/dockerfiles/apim-analytics/README.md b/dockerfiles/apim-analytics/README.md index deb78849..60576ca9 100644 --- a/dockerfiles/apim-analytics/README.md +++ b/dockerfiles/apim-analytics/README.md @@ -1,5 +1,5 @@ # Dockerfile for WSO2 API Manager Analytics # -The section defines the step-by-step instructions to build the Docker image for WSO2 API Manager Analytics 2.2.0. +The section defines the step-by-step instructions to build the Docker image for WSO2 API Manager Analytics 2.5.0. ## Prerequisites @@ -16,13 +16,13 @@ git clone https://github.com/wso2/docker-apim.git ##### 2. Add JDK, WSO2 API Manager Analytics distributions and MySQL Connector to `/files` - Download [JDK 1.8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) and extract that to `/files`. -- Download the WSO2 API Manager Analytics 2.2.0 distribution (http://wso2.com/api-management/try-it/) +- Download the WSO2 API Manager Analytics 2.5.0 distribution (http://wso2.com/api-management/try-it/) and extract that to `/files`.
- Once both JDK and WSO2 API Manager distributions are extracted the folder structure should be as follows; ```bash /files/jdk/ - /files/wso2am-analytics-2.2.0/ + /files/wso2am-analytics-2.5.0/ ``` - Download [MySQL Connector/J](https://dev.mysql.com/downloads/connector/j/) v5.1.45 and then copy that to `/files` folder @@ -32,10 +32,10 @@ in order to obtain latest bug fixes and updates for the product. ##### 3. Build the Docker image. - Navigate to `` directory.
Execute `docker build` command as shown below. - + `docker build -t wso2am-analytics:2.2.0 .` + + `docker build -t wso2am-analytics:2.5.0 .` ##### 4. Running the Docker image. -- `docker run -it -p 9444:9444 wso2am-analytics:2.2.0` +- `docker run -it -p 9444:9444 wso2am-analytics:2.5.0` >Here, only port 9444 (HTTPS servlet transport) has been mapped to a Docker host port. You may map other container service ports, which have been exposed to Docker host ports, as desired. @@ -51,7 +51,7 @@ Configurations would lie on the Docker host machine and they can be volume mount As an example, steps required to change the port offset using `carbon.xml` is as follows. ##### 1. Stop the API Manager container if it's already running. -In WSO2 API Manager Analytics 2.2.0 product distribution, `carbon.xml` configuration file
+In WSO2 API Manager Analytics 2.5.0 product distribution, `carbon.xml` configuration file
can be found at `/conf`. Copy the file to some suitable location of the host machine,
referred to as `/carbon.xml` and change the offset value under ports to 1. @@ -65,10 +65,10 @@ chmod o+r /carbon.xml docker run -p 9445:9445 --volume /carbon.xml:/carbon.xml -wso2am-analytics:2.2.0 +wso2am-analytics:2.5.0 ``` ->In here, refers to /home/wso2carbon/wso2am-analytics-2.2.0/repository/conf folder of the container. +>In here, refers to /home/wso2carbon/wso2am-analytics-2.5.0/repository/conf folder of the container. ## Docker command usage references diff --git a/dockerfiles/apim/Dockerfile b/dockerfiles/apim/Dockerfile index 10f6b9cb..cd90887f 100644 --- a/dockerfiles/apim/Dockerfile +++ b/dockerfiles/apim/Dockerfile @@ -33,7 +33,7 @@ ARG JDK=jdk1.8.0* ARG JAVA_HOME=${USER_HOME}/java # set wso2 product configurations ARG WSO2_SERVER=wso2am -ARG WSO2_SERVER_VERSION=2.2.0 +ARG WSO2_SERVER_VERSION=2.5.0 ARG WSO2_SERVER_DIST=${WSO2_SERVER}-${WSO2_SERVER_VERSION} ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER}-${WSO2_SERVER_VERSION} diff --git a/dockerfiles/apim/README.md b/dockerfiles/apim/README.md index 83d7c15f..76d074c9 100644 --- a/dockerfiles/apim/README.md +++ b/dockerfiles/apim/README.md @@ -1,5 +1,5 @@ # Dockerfile for WSO2 API Manager # -The section defines the step-by-step instructions to build the Docker image for WSO2 API Manager 2.2.0. +The section defines the step-by-step instructions to build the Docker image for WSO2 API Manager 2.5.0. ## Prerequisites @@ -17,13 +17,13 @@ git clone https://github.com/wso2/docker-apim.git ##### 2. Add JDK, WSO2 API Manager distributions and MySQL connector to `/files` - Download [JDK 1.8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) and extract that in `/files` folder. -- Download the WSO2 API Manager 2.2.0 distribution (http://wso2.com/api-management/try-it/) +- Download the WSO2 API Manager 2.5.0 distribution (http://wso2.com/api-management/try-it/) and extract that in `/files` folder. - Once both JDK and WSO2 API Manager distributions are extracted the folder structure should be as follows; ```bash /files/jdk/ - /files/wso2am-2.2.0/ + /files/wso2am-2.5.0/ ``` - Download [MySQL Connector/J](https://dev.mysql.com/downloads/connector/j/) v5.1.45 and then copy that to `/files` folder @@ -34,10 +34,10 @@ in order to obtain latest bug fixes and updates for the product. ##### 3. Build the Docker image. - Navigate to `` directory.
Execute `docker build` command as shown below. - + `docker build -t wso2am:2.2.0 .` + + `docker build -t wso2am:2.5.0 .` ##### 4. Running the Docker image. -- `docker run -it -p 9443:9443 wso2am:2.2.0` +- `docker run -it -p 9443:9443 wso2am:2.5.0` ##### 6. Accessing management console. - To access the management console, use the docker host IP and port 9443. @@ -51,7 +51,7 @@ Configurations would lie on the Docker host machine and they can be volume mount As an example, steps required to change the port offset using `carbon.xml` is as follows. ##### 1. Stop the API Manager container if it's already running. -In WSO2 API Manager 2.2.0 product distribution, `carbon.xml` configuration file
+In WSO2 API Manager 2.5.0 product distribution, `carbon.xml` configuration file
can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
referred to as `/carbon.xml` and change the offset value under ports to 1. @@ -65,10 +65,10 @@ chmod o+r /carbon.xml docker run \ -p 9444:9444 \ --volume /carbon.xml:/carbon.xml \ -wso2am:2.2.0 +wso2am:2.5.0 ``` ->In here, refers to /home/wso2carbon/wso2am-2.2.0/repository/conf folder of the container. +>In here, refers to /home/wso2carbon/wso2am-2.5.0/repository/conf folder of the container. ## Docker command usage references diff --git a/dockerfiles/is-as-km/Dockerfile b/dockerfiles/is-as-km/Dockerfile index 0f9670ab..7d133e04 100644 --- a/dockerfiles/is-as-km/Dockerfile +++ b/dockerfiles/is-as-km/Dockerfile @@ -33,7 +33,7 @@ ARG JDK=jdk1.8.0* ARG JAVA_HOME=${USER_HOME}/java # set wso2 product configurations ARG WSO2_SERVER=wso2is-km -ARG WSO2_SERVER_VERSION=5.5.0 +ARG WSO2_SERVER_VERSION=5.6.0 ARG WSO2_SERVER_DIST=${WSO2_SERVER}-${WSO2_SERVER_VERSION} ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER}-${WSO2_SERVER_VERSION} diff --git a/dockerfiles/is-as-km/README.md b/dockerfiles/is-as-km/README.md index 55d3a988..ae5242a2 100644 --- a/dockerfiles/is-as-km/README.md +++ b/dockerfiles/is-as-km/README.md @@ -16,13 +16,13 @@ git clone https://github.com/wso2/docker-apim.git ##### 2. Add JDK, WSO2 API Manager distributions and MySQL connector to `/files` - Download [JDK 1.8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) and extract that to `/files`. -- Download the WSO2 Identity Server as Key Manager 5.5.0 distribution (http://wso2.com/api-management/try-it/) +- Download the WSO2 Identity Server as Key Manager 5.6.0 distribution (http://wso2.com/api-management/try-it/) and extract that to `/files`.
- Once both JDK and WSO2 API Manager distributions are extracted the folder structure should be as follows; ```bash /files/jdk/ - /files/wso2is-km-5.5.0/ + /files/wso2is-km-5.6.0/ ``` - Download [MySQL Connector/J](https://dev.mysql.com/downloads/connector/j/) v5.1.45 and then copy that to `/files` folder @@ -32,10 +32,10 @@ in order to obtain latest bug fixes and updates for the product. ##### 3. Build the Docker image. - Navigate to `` directory.
Execute `docker build` command as shown below. - + `docker build -t wso2is-km:5.5.0 .` + + `docker build -t wso2is-km:5.6.0 .` ##### 4. Running the Docker image. -- `docker run -it -p 9443:9443 wso2is-km:5.5.0` +- `docker run -it -p 9443:9443 wso2is-km:5.6.0` ##### 5. Accessing management console. - To access the management console, use the docker host IP and port 9443. @@ -49,7 +49,7 @@ Configurations would lie on the Docker host machine and they can be volume mount As an example, steps required to change the port offset using `carbon.xml` is as follows. ##### 1. Stop the API Manager container if it's already running. -In WSO2 API Manager 2.2.0 product distribution, `carbon.xml` configuration file
+In WSO2 API Manager 2.5.0 product distribution, `carbon.xml` configuration file
can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
referred to as `/carbon.xml` and change the offset value under ports to 1. @@ -63,10 +63,10 @@ chmod o+r /carbon.xml docker run \ -p 9444:9444 \ --volume /carbon.xml:/carbon.xml \ -wso2is-km:5.5.0 +wso2is-km:5.6.0 ``` ->In here, refers to /home/wso2carbon/wso2is-km-5.5.0/repository/conf folder of the container. +>In here, refers to /home/wso2carbon/wso2is-km-5.6.0/repository/conf folder of the container. ## Docker command usage references diff --git a/dockerfiles/micro-gateway/Dockerfile b/dockerfiles/micro-gateway/Dockerfile index b91eca93..a4e4c6c1 100644 --- a/dockerfiles/micro-gateway/Dockerfile +++ b/dockerfiles/micro-gateway/Dockerfile @@ -33,7 +33,7 @@ ARG JDK=jdk1.8.0* ARG JAVA_HOME=${USER_HOME}/java # set wso2 product configurations ARG WSO2_SERVER=wso2am-micro-gw -ARG WSO2_SERVER_VERSION=2.2.0 +ARG WSO2_SERVER_VERSION=2.5.0 ARG WSO2_SERVER_DIST=${WSO2_SERVER}-${WSO2_SERVER_VERSION} ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER}-${WSO2_SERVER_VERSION} diff --git a/dockerfiles/micro-gateway/README.md b/dockerfiles/micro-gateway/README.md index cb679579..a7eff983 100644 --- a/dockerfiles/micro-gateway/README.md +++ b/dockerfiles/micro-gateway/README.md @@ -1,5 +1,5 @@ # Dockerfile for WSO2 API Microgateway # -The section defines the step-by-step instructions to build the Docker image for WSO2 API Microgateway 2.2.0. +The section defines the step-by-step instructions to build the Docker image for WSO2 API Microgateway 2.5.0. ## Prerequisites @@ -17,13 +17,13 @@ git clone https://github.com/wso2/docker-apim.git ##### 2. Add JDK, WSO2 API Microgateway distributions and MySQL connector to `/files` - Download [JDK 1.8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) and extract that in `/files` folder. -- Download the WSO2 API Microgateway 2.2.0 distribution (https://wso2.com/api-management/api-microgateway/#download-micro-api-gateway) +- Download the WSO2 API Microgateway 2.5.0 distribution (https://wso2.com/api-management/api-microgateway/#download-micro-api-gateway) and extract that in `/files` folder. - Once both JDK and WSO2 API Microgateway distributions are extracted the folder structure should be as follows; ```bash /files/jdk/ - /files/wso2am-micro-gw-2.2.0/ + /files/wso2am-micro-gw-2.5.0/ ``` >Please refer to [WSO2 Update Manager documentation](https://docs.wso2.com/display/ADMIN44x/Updating+WSO2+Products) @@ -32,10 +32,10 @@ in order to obtain latest bug fixes and updates for the product. ##### 3. Build the Docker image. - Navigate to `` directory.
Execute `docker build` command as shown below. - + `docker build -t wso2am-micro-gw:2.2.0 .` + + `docker build -t wso2am-micro-gw:2.5.0 .` ##### 4. Running the Docker image. -- `docker run -it -p 8243:8243 wso2am-micro-gw:2.2.0` +- `docker run -it -p 8243:8243 wso2am-micro-gw:2.5.0` >In here, refers to hostname or IP of the host machine on top of which containers are spawned. @@ -46,7 +46,7 @@ Configurations would lie on the Docker host machine and they can be volume mount As an example, steps required to change the port offset using `carbon.xml` is as follows. ##### 1. Stop the API Microgateway container if it's already running. -In WSO2 API Microgateway 2.2.0 product distribution, `carbon.xml` configuration file
+In WSO2 API Microgateway 2.5.0 product distribution, `carbon.xml` configuration file
can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
referred to as `/carbon.xml` and change the offset value under ports to 1. @@ -60,10 +60,10 @@ chmod o+r /carbon.xml docker run \ -p 8244:8244 \ --volume /carbon.xml:/carbon.xml \ -wso2am-micro-gw:2.2.0 +wso2am-micro-gw:2.5.0 ``` ->In here, refers to /home/wso2carbon/wso2am-micro-gw-2.2.0/repository/conf folder of the container. +>In here, refers to /home/wso2carbon/wso2am-micro-gw-2.5.0/repository/conf folder of the container. ## Docker command usage references From 1a8fd96a7fb26d21c25f692da5f3fcd13ca052e8 Mon Sep 17 00:00:00 2001 From: "ashbournerox@gmail.com" Date: Wed, 13 Jun 2018 00:48:30 +0530 Subject: [PATCH 03/13] Add apim-with-analytics pattern confs for apim 2.5.0 --- docker-compose/apim-with-analytics/README.md | 4 +- .../datasources/analytics-datasources.xml | 6 + .../conf/datasources/stats-datasources.xml | 56 +++--- .../apim/repository/conf/api-manager.xml | 44 +++-- .../apim/repository/conf/carbon.xml | 175 +++++++++--------- .../conf/datasources/master-datasources.xml | 2 +- .../conf/tomcat/catalina-server.xml | 5 + .../apim-with-analytics/docker-compose.yml | 4 +- 8 files changed, 165 insertions(+), 131 deletions(-) diff --git a/docker-compose/apim-with-analytics/README.md b/docker-compose/apim-with-analytics/README.md index 387ee19a..b49a3563 100755 --- a/docker-compose/apim-with-analytics/README.md +++ b/docker-compose/apim-with-analytics/README.md @@ -8,9 +8,9 @@ in order to run the steps provided in following Quick start guide.

* In order to run this Docker Compose setup, you will need an active [Free Trial Subscription](https://wso2.com/free-trial-subscription) from WSO2 since the referring Docker images hosted at docker.wso2.com contains the latest updates and fixes for WSO2 API Manager
and - API Manager Analytics 2.2.0 products. You can sign up for a Free Trial Subscription [here](https://wso2.com/free-trial-subscription).

+ API Manager Analytics 2.5.0 products. You can sign up for a Free Trial Subscription [here](https://wso2.com/free-trial-subscription).

* If you wish to run the Docker Compose setup using Docker images built locally, build Docker images using
[WSO2 API Manager Dockerfile](../../dockerfiles/apim/README.md) and [WSO2 API Manager Analytics Dockerfile](../../dockerfiles/apim-analytics/README.md) and remove `docker.wso2.com/` prefix from the `image` name in `docker-compose.yml`. - For example, change the line `image: docker.wso2.com/wso2am:2.2.0` to `image: wso2am:2.2.0`.
+ For example, change the line `image: docker.wso2.com/wso2am:2.5.0` to `image: wso2am:2.5.0`.

diff --git a/docker-compose/apim-with-analytics/apim-analytics/repository/conf/datasources/analytics-datasources.xml b/docker-compose/apim-with-analytics/apim-analytics/repository/conf/datasources/analytics-datasources.xml index 381dabca..717bf609 100755 --- a/docker-compose/apim-with-analytics/apim-analytics/repository/conf/datasources/analytics-datasources.xml +++ b/docker-compose/apim-with-analytics/apim-analytics/repository/conf/datasources/analytics-datasources.xml @@ -23,6 +23,9 @@ SELECT 1 30000 false + + + READ_COMMITTED @@ -43,6 +46,9 @@ SELECT 1 30000 false + + + READ_COMMITTED diff --git a/docker-compose/apim-with-analytics/apim-analytics/repository/conf/datasources/stats-datasources.xml b/docker-compose/apim-with-analytics/apim-analytics/repository/conf/datasources/stats-datasources.xml index 238b4435..06d7708e 100755 --- a/docker-compose/apim-with-analytics/apim-analytics/repository/conf/datasources/stats-datasources.xml +++ b/docker-compose/apim-with-analytics/apim-analytics/repository/conf/datasources/stats-datasources.xml @@ -1,32 +1,32 @@ - - - org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader - - - - - WSO2AM_STATS_DB - The datasource used for setting statistics to API Manager - - jdbc/WSO2AM_STATS_DB - - - - jdbc:mysql://mysql:3306/stats_db?autoReconnect=true&relaxAutoCommit=true&useSSL=false - root - root - com.mysql.jdbc.Driver - 50 - 60000 - true - SELECT 1 - 30000 - false - - - - + + org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader + + + + + WSO2AM_STATS_DB + The datasource used for setting statistics to API Manager + + jdbc/WSO2AM_STATS_DB + + + + jdbc:mysql://mysql:3306/stats_db?autoReconnect=true&relaxAutoCommit=true&useSSL=false + root + root + com.mysql.jdbc.Driver + 50 + 60000 + true + SELECT 1 + 30000 + false + + + + + diff --git a/docker-compose/apim-with-analytics/apim/repository/conf/api-manager.xml b/docker-compose/apim-with-analytics/apim/repository/conf/api-manager.xml index f7170bc2..94a72ea0 100755 --- a/docker-compose/apim-with-analytics/apim/repository/conf/api-manager.xml +++ b/docker-compose/apim-with-analytics/apim/repository/conf/api-manager.xml @@ -86,20 +86,20 @@ This is a hybrid gateway that handles both production and sandbox token traffic. https://localhost:${mgt.transport.https.port}${carbon.context}services/ - + ${admin.username} ${admin.password} - http://localhost:${http.nio.port},https://localhost:${https.nio.port} + http://${carbon.local.ip}:${http.nio.port},https://${carbon.local.ip}:${https.nio.port} - + true - + true false @@ -115,7 +115,7 @@ cache. However, if the system is in a state, where the role addition and deletion happens seamlessly, the cache will be in in-valid state.--> true - + @@ -162,6 +162,9 @@ the stats enabled flag is set to true. --> false + + false + org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageDataBridgeDataPublisher @@ -195,7 +198,7 @@ org.wso2.apimgt.statistics.execution.time 1.0.0 - + org.wso2.analytics.apim.alertStakeholderInfo 1.0.1 @@ -235,7 +238,7 @@ 100 50 - org.wso2.carbon.apimgt.keymgt.handlers.DefaultKeyValidationHandler @@ -278,6 +281,11 @@ Note: If changing this value to true, change the value of to org.wso2.carbon.identity.oauth.tokenprocessor.EncryptionDecryptionPersistenceProcessor in the identity.xml --> false + + false @@ -323,6 +331,12 @@ + + + @@ -342,7 +356,7 @@ false - + @@ -608,15 +622,15 @@ false false - + false - https://localhost:9445/bpmn - ${admin.username} - ${admin.password} - https://localhost:${mgt.transport.https.port}/api/am/publisher/v0.12/workflows/update-workflow-status + https://localhost:9445/bpmn + ${admin.username} + ${admin.password} + https://localhost:${mgt.transport.https.port}/api/am/publisher/v0.13/workflows/update-workflow-status https://localhost:${https.nio.port}/token - https://localhost:${mgt.transport.https.port}/client-registration/v0.12/register + https://localhost:${mgt.transport.https.port}/client-registration/v0.13/register ${admin.username} ${admin.password} diff --git a/docker-compose/apim-with-analytics/apim/repository/conf/carbon.xml b/docker-compose/apim-with-analytics/apim/repository/conf/carbon.xml index f0f9ba3a..1885a0bf 100755 --- a/docker-compose/apim-with-analytics/apim/repository/conf/carbon.xml +++ b/docker-compose/apim-with-analytics/apim/repository/conf/carbon.xml @@ -36,7 +36,7 @@ - 2.2.0 + 2.5.0 - + 8000 - - - - - 10500 - + + + + 10500 + + @@ -163,12 +163,12 @@ JNDI Configuration --> - org.wso2.carbon.tomcat.jndi.CarbonJavaURLContextFactory - - @@ -197,8 +197,8 @@ --> - @@ -268,6 +268,8 @@ 15 + + false 15 @@ -323,10 +325,10 @@ ${carbon.home}/repository/conf/axis2/axis2_client.xml true - - + + @@ -345,11 +347,11 @@ Default User Role - - - + + + - - - - - - - - - + + + + + + + + @@ -426,14 +428,14 @@ --> UserManager - - false + + false - - + + true @@ -444,6 +446,13 @@ + + + claim_mgt_menu + identity_mgt_emailtemplate_menu + identity_security_questions_menu + + @@ -536,7 +545,7 @@ The value of the Item element is the first parameter in the query string(e.g. ?wsdl) which needs special processing - + The value of the Class element is a class which implements org.wso2.carbon.transport.HttpGetRequestProcessor --> @@ -589,7 +598,7 @@ - + - default repository - http://product-dist.wso2.com/p2/carbon/releases/wilkes/ + default repository + http://product-dist.wso2.com/p2/carbon/releases/wilkes/ - - - - - true - - - - - - true - + + + + + true + + + + + + true + diff --git a/docker-compose/apim-with-analytics/apim/repository/conf/datasources/master-datasources.xml b/docker-compose/apim-with-analytics/apim/repository/conf/datasources/master-datasources.xml index 439c791a..e5feafdb 100755 --- a/docker-compose/apim-with-analytics/apim/repository/conf/datasources/master-datasources.xml +++ b/docker-compose/apim-with-analytics/apim/repository/conf/datasources/master-datasources.xml @@ -51,7 +51,7 @@ WSO2AM_STATS_DB - The datasource used for setting statistics to API Manager + The datasource used for getting statistics to API Manager jdbc/WSO2AM_STATS_DB diff --git a/docker-compose/apim-with-analytics/apim/repository/conf/tomcat/catalina-server.xml b/docker-compose/apim-with-analytics/apim/repository/conf/tomcat/catalina-server.xml index 6cce78cf..af0bf64d 100755 --- a/docker-compose/apim-with-analytics/apim/repository/conf/tomcat/catalina-server.xml +++ b/docker-compose/apim-with-analytics/apim/repository/conf/tomcat/catalina-server.xml @@ -92,6 +92,11 @@ pattern="combined"/> + + + + + diff --git a/docker-compose/apim-with-analytics/docker-compose.yml b/docker-compose/apim-with-analytics/docker-compose.yml index ff608dba..9783bb0b 100755 --- a/docker-compose/apim-with-analytics/docker-compose.yml +++ b/docker-compose/apim-with-analytics/docker-compose.yml @@ -15,7 +15,7 @@ services: timeout: 60s retries: 5 am-analytics: - image: docker.wso2.com/wso2am-analytics:2.2.0 + image: docker.wso2.com/wso2am-analytics:2.5.0 ports: - "9444:9444" - "9764:9764" @@ -33,7 +33,7 @@ services: links: - mysql api-manager: - image: docker.wso2.com/wso2am:2.2.0 + image: docker.wso2.com/wso2am:2.5.0 healthcheck: test: ["CMD", "curl", "-k", "-f", "https://localhost:9443/carbon/admin/login.jsp"] interval: 10s From 9800faea82762bf16be913a6f6a7d02d30ec4abd Mon Sep 17 00:00:00 2001 From: "ashbournerox@gmail.com" Date: Wed, 13 Jun 2018 13:59:52 +0530 Subject: [PATCH 04/13] Add docker-compose cofs for apim 2.5.0 and removing apim-micro-gateway pattern Modify Readme.md --- .../apim-is-as-km-with-analytics/README.md | 6 +- .../apim/repository/conf/axis2/axis2.xml | 4 +- .../apim/repository/conf/carbon.xml | 2 +- .../docker-compose.yml | 6 +- .../repository/conf/identity/identity.xml | 8 +- .../apim-micro-gw-with-analytics/README.md | 64 - .../datasources/analytics-datasources.xml | 110 -- .../conf/datasources/stats-datasources.xml | 32 - .../apim/bin/wso2server.sh | 321 ---- .../apim/repository/conf/api-manager.xml | 637 -------- .../apim/repository/conf/carbon.xml | 667 -------- .../conf/datasources/master-datasources.xml | 133 -- .../conf/on-premise-gateway.properties | 26 - .../apim/repository/conf/registry.xml | 369 ----- .../conf/tomcat/catalina-server.xml | 99 -- .../docker-compose.yml | 72 - .../micro-gateway/bin/wso2server.sh | 321 ---- .../repository/conf/api-manager.xml | 642 -------- .../repository/conf/axis2/axis2.xml | 968 ------------ .../micro-gateway/repository/conf/carbon.xml | 667 -------- .../repository/conf/jndi.properties | 27 - .../repository/conf/log4j.properties | 225 --- .../conf/on-premise-gateway.properties | 46 - .../repository/conf/registry.xml | 372 ----- .../mysql/scripts/apim_mysql5.7.sql | 1371 ----------------- .../mysql/scripts/carbon_mysql5.7.sql | 481 ------ docker-compose/apim-with-analytics/README.md | 2 +- dockerfiles/micro-gateway/Dockerfile | 76 - dockerfiles/micro-gateway/README.md | 73 - dockerfiles/micro-gateway/files/init.sh | 54 - 30 files changed, 14 insertions(+), 7867 deletions(-) delete mode 100755 docker-compose/apim-micro-gw-with-analytics/README.md delete mode 100755 docker-compose/apim-micro-gw-with-analytics/apim-analytics/repository/conf/datasources/analytics-datasources.xml delete mode 100755 docker-compose/apim-micro-gw-with-analytics/apim-analytics/repository/conf/datasources/stats-datasources.xml delete mode 100755 docker-compose/apim-micro-gw-with-analytics/apim/bin/wso2server.sh delete mode 100755 docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/api-manager.xml delete mode 100755 docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/carbon.xml delete mode 100755 docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/datasources/master-datasources.xml delete mode 100644 docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/on-premise-gateway.properties delete mode 100644 docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/registry.xml delete mode 100755 docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/tomcat/catalina-server.xml delete mode 100755 docker-compose/apim-micro-gw-with-analytics/docker-compose.yml delete mode 100755 docker-compose/apim-micro-gw-with-analytics/micro-gateway/bin/wso2server.sh delete mode 100644 docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/api-manager.xml delete mode 100644 docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/axis2/axis2.xml delete mode 100644 docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/carbon.xml delete mode 100644 docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/jndi.properties delete mode 100644 docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/log4j.properties delete mode 100644 docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/on-premise-gateway.properties delete mode 100644 docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/registry.xml delete mode 100644 docker-compose/apim-micro-gw-with-analytics/mysql/scripts/apim_mysql5.7.sql delete mode 100644 docker-compose/apim-micro-gw-with-analytics/mysql/scripts/carbon_mysql5.7.sql delete mode 100644 dockerfiles/micro-gateway/Dockerfile delete mode 100644 dockerfiles/micro-gateway/README.md delete mode 100755 dockerfiles/micro-gateway/files/init.sh diff --git a/docker-compose/apim-is-as-km-with-analytics/README.md b/docker-compose/apim-is-as-km-with-analytics/README.md index e7c13a6a..2a2ca31f 100755 --- a/docker-compose/apim-is-as-km-with-analytics/README.md +++ b/docker-compose/apim-is-as-km-with-analytics/README.md @@ -7,10 +7,10 @@ in order to run the steps provided in following Quick start guide.

* In order to run this Docker Compose setup, you will need an active [Free Trial Subscription](https://wso2.com/free-trial-subscription) from WSO2 since the referring Docker images hosted at docker.wso2.com contains the latest updates and fixes for WSO2 API Manager
and - API Manager Analytics 2.2.0 and WSO2 Identity Server as KM 5.3.0. You can sign up for a Free Trial Subscription [here](https://wso2.com/free-trial-subscription).

+ API Manager Analytics 2.5.0 and WSO2 Identity Server as KM 5.6.0. You can sign up for a Free Trial Subscription [here](https://wso2.com/free-trial-subscription).

* If you wish to run the Docker Compose setup using Docker images built locally, build Docker images using
[WSO2 API Manager Dockerfile](../../dockerfiles/apim/README.md), [API Manager Analytics Dockerfile](../../dockerfiles/apim-analytics/README.md) and [WSO2 Identity Server as KM Dockerfile](../../dockerfiles/is-as-km/README.md) and remove the `docker.wso2.com/` prefix - from the `image` name In the `docker-compose.yml`. For example, change the line
`image: docker.wso2.com/wso2am:2.2.0` to `image: wso2am:2.2.0` .

+ from the `image` name In the `docker-compose.yml`. For example, change the line
`image: docker.wso2.com/wso2am:2.5.0` to `image: wso2am:2.5.0` .

## Quick Start Guide 1. Clone WSO2 API Manager Docker git repository. @@ -27,7 +27,7 @@ Instead, extract the zip file and directly browse to `docker-apim-docker-compose/APIM-ISasKM-with-Analytics` folder. > If you want to try out an already released tag, after executing 2nd step, checkout the relevant tag, - i.e. for example: git checkout tags/v2.1.0.4 and continue below steps. + i.e. for example: git checkout tags/v2.5.0.1 and continue below steps. 3. Execute the following Docker Compose command to start the deployment. ``` diff --git a/docker-compose/apim-is-as-km-with-analytics/apim/repository/conf/axis2/axis2.xml b/docker-compose/apim-is-as-km-with-analytics/apim/repository/conf/axis2/axis2.xml index c8146eb2..b644e2a9 100644 --- a/docker-compose/apim-is-as-km-with-analytics/apim/repository/conf/axis2/axis2.xml +++ b/docker-compose/apim-is-as-km-with-analytics/apim/repository/conf/axis2/axis2.xml @@ -58,8 +58,8 @@ axis2modules - WSO2 AM 2.2.0 - WSO2 AM 2.2.0 + WSO2 AM 2.5.0 + WSO2 AM 2.5.0 diff --git a/docker-compose/apim-is-as-km-with-analytics/apim/repository/conf/carbon.xml b/docker-compose/apim-is-as-km-with-analytics/apim/repository/conf/carbon.xml index f0f9ba3a..7026d1e8 100755 --- a/docker-compose/apim-is-as-km-with-analytics/apim/repository/conf/carbon.xml +++ b/docker-compose/apim-is-as-km-with-analytics/apim/repository/conf/carbon.xml @@ -36,7 +36,7 @@ - 2.2.0 + 2.5.0 @@ -342,7 +342,7 @@ A128GCM - + RSA1_5 RSA-OAEP @@ -378,7 +378,7 @@ false 120 @@ -516,7 +516,7 @@ diff --git a/docker-compose/apim-micro-gw-with-analytics/README.md b/docker-compose/apim-micro-gw-with-analytics/README.md deleted file mode 100755 index b74e3fbd..00000000 --- a/docker-compose/apim-micro-gw-with-analytics/README.md +++ /dev/null @@ -1,64 +0,0 @@ -# WSO2 API Manager & API Micro Gateway deployment with WSO2 API Manager Analytics - - -## Prerequisites - - * Install [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git), [Docker](https://www.docker.com/get-docker) and [Docker Compose](https://docs.docker.com/compose/install/#install-compose) - in order to run the steps provided in following Quick start guide.

- * In order to run this Docker Compose setup, you will need an active [Free Trial Subscription](https://wso2.com/free-trial-subscription) - from WSO2 since the referring Docker images hosted at docker.wso2.com contains the latest updates and fixes for WSO2 API Microgateway
and - API Manager Analytics 2.2.0 products. You can sign up for a Free Trial Subscription [here](https://wso2.com/free-trial-subscription).

- * If you wish to run the Docker Compose setup using Docker images built locally, build Docker images using
[WSO2 API Microgateway Dockerfile](../../dockerfiles/microgateway/README.md) and [WSO2 API Manager Analytics Dockerfile](../../dockerfiles/apim-analytics/README.md) and remove `docker.wso2.com/` prefix from the `image` name in `docker-compose.yml`. - For example, change the line `image: docker.wso2.com/wso2am:2.2.0` to `image: wso2am:2.2.0`.
- -
- -## Quick Start Guide - -1. Clone WSO2 APIM Docker git repository. - ``` - git clone https://github.com/wso2/docker-apim - ``` - > If you are to try out an already released zip of this repo, please ignore this 1st step. - -2. Switch to `docker-compose/APIM-Microgateway-with-Analytics` folder. - ``` - cd docker-apim/docker-compose/APIM-Microgateway-with-Analytics - ``` - > If you are to try out an already released zip of this repo, please ignore this 2nd step also. - Instead, extract the zip file and directly browse to `docker-apim-docker-compose/APIM-Microgateway-with-Analytics` folder. - - > If you want to try out an already released tag, after executing 2nd step, checkout the relevant tag, - i.e. for example: git checkout tags/v2.2.0.4 and continue below steps. - -3. Execute following Docker command to start the deployment. - ``` - docker-compose up - ``` - -4. If you make any changes to the APIs or throttling policies after starting, restart the Microgateway server to make sure the changes are synced - ``` - docker-compose restart api-manager-gateway - ``` - -5. Once the deployment is started, try to access the web UIs via following URLs and default credentials
- on your favorite web browser. - - ``` - https://localhost:9443/publisher - https://localhost:9443/store - https://localhost:9443/admin - https://localhost:9443/carbon - ``` - Access the servers using following credentials. - - * Username: admin
- * Password: admin - - Please note that API Gateway will be available on following ports. - ``` - https://localhost:8244 - https://localhost:8243 - https://localhost:8280 - ``` - diff --git a/docker-compose/apim-micro-gw-with-analytics/apim-analytics/repository/conf/datasources/analytics-datasources.xml b/docker-compose/apim-micro-gw-with-analytics/apim-analytics/repository/conf/datasources/analytics-datasources.xml deleted file mode 100755 index 381dabca..00000000 --- a/docker-compose/apim-micro-gw-with-analytics/apim-analytics/repository/conf/datasources/analytics-datasources.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader - - - - - - - - WSO2_ANALYTICS_EVENT_STORE_DB - The datasource used for analytics record store - - - jdbc:mysql://mysql:3306/stats_db?autoReconnect=true&relaxAutoCommit=true&useSSL=false - root - root - com.mysql.jdbc.Driver - 50 - 60000 - true - SELECT 1 - 30000 - false - READ_COMMITTED - - - - - - WSO2_ANALYTICS_PROCESSED_DATA_STORE_DB - The datasource used for analytics record store - - - jdbc:mysql://mysql:3306/stats_db?autoReconnect=true&relaxAutoCommit=true&useSSL=false - root - root - com.mysql.jdbc.Driver - 50 - 60000 - true - SELECT 1 - 30000 - false - READ_COMMITTED - - - - - - - - - - - - - - diff --git a/docker-compose/apim-micro-gw-with-analytics/apim-analytics/repository/conf/datasources/stats-datasources.xml b/docker-compose/apim-micro-gw-with-analytics/apim-analytics/repository/conf/datasources/stats-datasources.xml deleted file mode 100755 index 238b4435..00000000 --- a/docker-compose/apim-micro-gw-with-analytics/apim-analytics/repository/conf/datasources/stats-datasources.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader - - - - - WSO2AM_STATS_DB - The datasource used for setting statistics to API Manager - - jdbc/WSO2AM_STATS_DB - - - - jdbc:mysql://mysql:3306/stats_db?autoReconnect=true&relaxAutoCommit=true&useSSL=false - root - root - com.mysql.jdbc.Driver - 50 - 60000 - true - SELECT 1 - 30000 - false - - - - - - - diff --git a/docker-compose/apim-micro-gw-with-analytics/apim/bin/wso2server.sh b/docker-compose/apim-micro-gw-with-analytics/apim/bin/wso2server.sh deleted file mode 100755 index e753ef7b..00000000 --- a/docker-compose/apim-micro-gw-with-analytics/apim/bin/wso2server.sh +++ /dev/null @@ -1,321 +0,0 @@ -#!/bin/sh -# ---------------------------------------------------------------------------- -# Copyright 2005-2012 WSO2, Inc. http://www.wso2.org -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# ---------------------------------------------------------------------------- -# Main Script for the WSO2 Carbon Server -# -# Environment Variable Prequisites -# -# CARBON_HOME Home of WSO2 Carbon installation. If not set I will try -# to figure it out. -# -# JAVA_HOME Must point at your Java Development Kit installation. -# -# JAVA_OPTS (Optional) Java runtime options used when the commands -# is executed. -# -# NOTE: Borrowed generously from Apache Tomcat startup scripts. -# ----------------------------------------------------------------------------- - -# OS specific support. $var _must_ be set to either true or false. -#ulimit -n 100000 - -cygwin=false; -darwin=false; -os400=false; -mingw=false; -case "`uname`" in -CYGWIN*) cygwin=true;; -MINGW*) mingw=true;; -OS400*) os400=true;; -Darwin*) darwin=true - if [ -z "$JAVA_VERSION" ] ; then - JAVA_VERSION="CurrentJDK" - else - echo "Using Java version: $JAVA_VERSION" - fi - if [ -z "$JAVA_HOME" ] ; then - JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home - fi - ;; -esac - -# resolve links - $0 may be a softlink -PRG="$0" - -while [ -h "$PRG" ]; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '.*/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`/"$link" - fi -done - -# Get standard environment variables -PRGDIR=`dirname "$PRG"` - -# Only set CARBON_HOME if not already set -[ -z "$CARBON_HOME" ] && CARBON_HOME=`cd "$PRGDIR/.." ; pwd` - -# Set AXIS2_HOME. Needed for One Click JAR Download -AXIS2_HOME="$CARBON_HOME" - -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` - [ -n "$CARBON_HOME" ] && CARBON_HOME=`cygpath --unix "$CARBON_HOME"` - [ -n "$AXIS2_HOME" ] && CARBON_HOME=`cygpath --unix "$CARBON_HOME"` -fi - -# For OS400 -if $os400; then - # Set job priority to standard for interactive (interactive - 6) by using - # the interactive priority - 6, the helper threads that respond to requests - # will be running at the same priority as interactive jobs. - COMMAND='chgjob job('$JOBNAME') runpty(6)' - system $COMMAND - - # Enable multi threading - QIBM_MULTI_THREADED=Y - export QIBM_MULTI_THREADED -fi - -# For Migwn, ensure paths are in UNIX format before anything is touched -if $mingw ; then - [ -n "$CARBON_HOME" ] && - CARBON_HOME="`(cd "$CARBON_HOME"; pwd)`" - [ -n "$JAVA_HOME" ] && - JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" - [ -n "$AXIS2_HOME" ] && - CARBON_HOME="`(cd "$CARBON_HOME"; pwd)`" - # TODO classpath? -fi - -if [ -z "$JAVACMD" ] ; then - if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - else - JAVACMD=java - fi -fi - -if [ ! -x "$JAVACMD" ] ; then - echo "Error: JAVA_HOME is not defined correctly." - echo " CARBON cannot execute $JAVACMD" - exit 1 -fi - -# if JAVA_HOME is not set we're not happy -if [ -z "$JAVA_HOME" ]; then - echo "You must set the JAVA_HOME variable before running CARBON." - exit 1 -fi - -if [ -e "$CARBON_HOME/wso2carbon.pid" ]; then - PID=`cat "$CARBON_HOME"/wso2carbon.pid` -fi - -# ----- Process the input command ---------------------------------------------- -args="" -for c in $* -do - if [ "$c" = "--debug" ] || [ "$c" = "-debug" ] || [ "$c" = "debug" ]; then - CMD="--debug" - continue - elif [ "$CMD" = "--debug" ]; then - if [ -z "$PORT" ]; then - PORT=$c - fi - elif [ "$c" = "--stop" ] || [ "$c" = "-stop" ] || [ "$c" = "stop" ]; then - CMD="stop" - elif [ "$c" = "--start" ] || [ "$c" = "-start" ] || [ "$c" = "start" ]; then - CMD="start" - elif [ "$c" = "--version" ] || [ "$c" = "-version" ] || [ "$c" = "version" ]; then - CMD="version" - elif [ "$c" = "--restart" ] || [ "$c" = "-restart" ] || [ "$c" = "restart" ]; then - CMD="restart" - elif [ "$c" = "--test" ] || [ "$c" = "-test" ] || [ "$c" = "test" ]; then - CMD="test" - else - args="$args $c" - fi -done - -if [ "$CMD" = "--debug" ]; then - if [ "$PORT" = "" ]; then - echo " Please specify the debug port after the --debug option" - exit 1 - fi - if [ -n "$JAVA_OPTS" ]; then - echo "Warning !!!. User specified JAVA_OPTS will be ignored, once you give the --debug option." - fi - CMD="RUN" - JAVA_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=$PORT" - echo "Please start the remote debugging client to continue..." -elif [ "$CMD" = "start" ]; then - if [ -e "$CARBON_HOME/wso2carbon.pid" ]; then - if ps -p $PID > /dev/null ; then - echo "Process is already running" - exit 0 - fi - fi - export CARBON_HOME="$CARBON_HOME" -# using nohup sh to avoid erros in solaris OS.TODO - nohup sh "$CARBON_HOME"/bin/wso2server.sh $args > /dev/null 2>&1 & - exit 0 -elif [ "$CMD" = "stop" ]; then - export CARBON_HOME="$CARBON_HOME" - kill -term `cat "$CARBON_HOME"/wso2carbon.pid` - exit 0 -elif [ "$CMD" = "restart" ]; then - export CARBON_HOME="$CARBON_HOME" - kill -term `cat "$CARBON_HOME"/wso2carbon.pid` - process_status=0 - pid=`cat "$CARBON_HOME"/wso2carbon.pid` - while [ "$process_status" -eq "0" ] - do - sleep 1; - ps -p$pid 2>&1 > /dev/null - process_status=$? - done - -# using nohup sh to avoid erros in solaris OS.TODO - nohup sh "$CARBON_HOME"/bin/wso2server.sh $args > /dev/null 2>&1 & - exit 0 -elif [ "$CMD" = "test" ]; then - JAVACMD="exec "$JAVACMD"" -elif [ "$CMD" = "version" ]; then - cat "$CARBON_HOME"/bin/version.txt - cat "$CARBON_HOME"/bin/wso2carbon-version.txt - exit 0 -fi - -# ---------- Handle the SSL Issue with proper JDK version -------------------- -jdk_17=`$JAVA_HOME/bin/java -version 2>&1 | grep "1.[7|8]"` -if [ "$jdk_17" = "" ]; then - echo " Starting WSO2 Carbon (in unsupported JDK)" - echo " [ERROR] CARBON is supported only on JDK 1.7 and 1.8" -fi - -CARBON_XBOOTCLASSPATH="" -for f in "$CARBON_HOME"/lib/xboot/*.jar -do - if [ "$f" != "$CARBON_HOME/lib/xboot/*.jar" ];then - CARBON_XBOOTCLASSPATH="$CARBON_XBOOTCLASSPATH":$f - fi -done - -JAVA_ENDORSED_DIRS="$CARBON_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" - -CARBON_CLASSPATH="" -if [ -e "$JAVA_HOME/lib/tools.jar" ]; then - CARBON_CLASSPATH="$JAVA_HOME/lib/tools.jar" -fi -for f in "$CARBON_HOME"/bin/*.jar -do - if [ "$f" != "$CARBON_HOME/bin/*.jar" ];then - CARBON_CLASSPATH="$CARBON_CLASSPATH":$f - fi -done -for t in "$CARBON_HOME"/lib/commons-lang*.jar -do - CARBON_CLASSPATH="$CARBON_CLASSPATH":$t -done -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"` - CARBON_HOME=`cygpath --absolute --windows "$CARBON_HOME"` - AXIS2_HOME=`cygpath --absolute --windows "$CARBON_HOME"` - CLASSPATH=`cygpath --path --windows "$CLASSPATH"` - JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"` - CARBON_CLASSPATH=`cygpath --path --windows "$CARBON_CLASSPATH"` - CARBON_XBOOTCLASSPATH=`cygpath --path --windows "$CARBON_XBOOTCLASSPATH"` -fi - -# ----- Execute The Requested Command ----------------------------------------- - -echo JAVA_HOME environment variable is set to $JAVA_HOME -echo CARBON_HOME environment variable is set to "$CARBON_HOME" - -cd "$CARBON_HOME" - -TMP_DIR="$CARBON_HOME"/tmp -if [ -d "$TMP_DIR" ]; then -rm -rf "$TMP_DIR" -fi - -START_EXIT_STATUS=121 -status=$START_EXIT_STATUS - -if [ -z "$JVM_MEM_OPTS" ]; then - java_version=$("$JAVACMD" -version 2>&1 | awk -F '"' '/version/ {print $2}') - JVM_MEM_OPTS="-Xms256m -Xmx1024m" - if [ "$java_version" \< "1.8" ]; then - JVM_MEM_OPTS="$JVM_MEM_OPTS -XX:MaxPermSize=256m" - fi -fi -echo "Using Java memory options: $JVM_MEM_OPTS" - -#To monitor a Carbon server in remote JMX mode on linux host machines, set the below system property. -# -Djava.rmi.server.hostname="your.IP.goes.here" - -while [ "$status" = "$START_EXIT_STATUS" ] -do - $JAVACMD \ - -Xbootclasspath/a:"$CARBON_XBOOTCLASSPATH" \ - $JVM_MEM_OPTS \ - -XX:+HeapDumpOnOutOfMemoryError \ - -XX:HeapDumpPath="$CARBON_HOME/repository/logs/heap-dump.hprof" \ - $JAVA_OPTS \ - -Dcom.sun.management.jmxremote \ - -classpath "$CARBON_CLASSPATH" \ - -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \ - -Djava.io.tmpdir="$CARBON_HOME/tmp" \ - -Dcatalina.base="$CARBON_HOME/lib/tomcat" \ - -Dwso2.server.standalone=true \ - -Dcarbon.registry.root=/ \ - -Djava.command="$JAVACMD" \ - -Dcarbon.home="$CARBON_HOME" \ - -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \ - -Dcarbon.config.dir.path="$CARBON_HOME/repository/conf" \ - -Djava.util.logging.config.file="$CARBON_HOME/repository/conf/etc/logging-bridge.properties" \ - -Dcomponents.repo="$CARBON_HOME/repository/components/plugins" \ - -Dconf.location="$CARBON_HOME/repository/conf"\ - -Dcom.atomikos.icatch.file="$CARBON_HOME/lib/transactions.properties" \ - -Dcom.atomikos.icatch.hide_init_file_path=true \ - -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false \ - -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true \ - -Dcom.sun.jndi.ldap.connect.pool.authentication=simple \ - -Dcom.sun.jndi.ldap.connect.pool.timeout=3000 \ - -Dorg.terracotta.quartz.skipUpdateCheck=true \ - -Djava.security.egd=file:/dev/./urandom \ - -Dfile.encoding=UTF8 \ - -Djava.net.preferIPv4Stack=true \ - -Dcom.ibm.cacheLocalHost=true \ - -Dorg.opensaml.httpclient.https.disableHostnameVerification=true \ - -Dorg.wso2.ignoreHostnameVerification=true \ - -Dhttpclient.hostnameVerifier="AllowAll" \ - -DworkerNode=false \ - org.wso2.carbon.bootstrap.Bootstrap $* - status=$? -done diff --git a/docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/api-manager.xml b/docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/api-manager.xml deleted file mode 100755 index f7170bc2..00000000 --- a/docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/api-manager.xml +++ /dev/null @@ -1,637 +0,0 @@ - - - jdbc/WSO2AM_DB - - - Synapse - - - false - - - - - https://localhost:${mgt.transport.https.port}${carbon.context}services/ - - ${admin.username} - - ${admin.password} - - false - - - - - - - - X-JWT-Assertion - - - - - - - - - - - - org.wso2.carbon.apimgt.keymgt.token.JWTGenerator - - - - - - - - - - - - - - - - - Production and Sandbox - This is a hybrid gateway that handles both production and sandbox token traffic. - - https://localhost:${mgt.transport.https.port}${carbon.context}services/ - - ${admin.username} - - ${admin.password} - - http://localhost:${http.nio.port},https://localhost:${https.nio.port} - - - - - - - true - - true - - false - - false - - true - - true - - - - - - - - - - - - true - - - tcp://am-analytics:7612 - ssl://am-analytics:7712 - - admin - - admin - - - org.wso2.carbon.apimgt.usage.client.impl.APIUsageStatisticsRdbmsClientImpl - - - https://am-analytics:9444 - admin - admin - - - false - - - org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageDataBridgeDataPublisher - - - false - - - - org.wso2.apimgt.statistics.request - 1.1.0 - - - org.wso2.apimgt.statistics.response - 1.1.0 - - - org.wso2.apimgt.statistics.fault - 1.0.0 - - - org.wso2.apimgt.statistics.throttle - 1.0.0 - - - org.wso2.apimgt.statistics.workflow - 1.0.0 - - - org.wso2.apimgt.statistics.execution.time - 1.0.0 - - - org.wso2.analytics.apim.alertStakeholderInfo - 1.0.1 - - - - - - - - - https://localhost:${mgt.transport.https.port}${carbon.context}services/ - - - ${admin.username} - - ${admin.password} - - - WSClient - 10000 - - - false - localhost - - - - - org.wso2.carbon.apimgt.keymgt.handlers.DefaultKeyValidationHandler - - - - - - - - - - - - am_application_scope - - - - /oauth2/token - - https://localhost:${https.nio.port}/revoke - - false - - - - - - true - - - - - false - - - true - false - https://localhost:${mgt.transport.https.port}/store - - - https://localhost:${mgt.transport.https.port}${carbon.context}services/ - - ${admin.username} - - - ${admin.password} - - false - - false - - - - - true - - - true - - - - - - - false - https://localhost:${mgt.transport.https.port}/publisher - - - - - - true - - - - - - - - - true - - - * - - - GET,PUT,POST,DELETE,PATCH,OPTIONS - - - authorization,Access-Control-Allow-Origin,Content-Type,SOAPAction - - - - false - - - - - - - - - - /api/am/publisher/{version}/swagger.json - GET,HEAD - - - /api/am/store/{version}/swagger.json - GET,HEAD - - - /api/am/admin/{version}/swagger.json - GET,HEAD - - - /api/am/store/{version}/apis - GET,HEAD - - - /api/am/store/{version}/apis/{apiId} - GET,HEAD - - - /api/am/store/{version}/apis/{apiId}/swagger - GET,HEAD - - - /api/am/store/{version}/apis/{apiId}/documents - GET,HEAD - - - /api/am/store/{version}/apis/{apiId}/documents/{documentId} - GET,HEAD - - - /api/am/store/{version}/apis/{apiId}/documents/{documentId}/content - GET,HEAD - - - /api/am/store/{version}/apis/{apiId}/thumbnail - GET,HEAD - - - /api/am/store/{version}/tags - GET,HEAD - - - /api/am/store/{version}/tiers/{tierLevel} - GET,HEAD - - - /api/am/store/{version}/tiers/{tierLevel}/{tierName} - GET,HEAD - - - - - /api/am/store/{version}/apis - GET - - - /api/am/store/{version}/apis/generate-sdk - POST - - - /api/am/store/{version}/apis/{apiId}/documents - GET - - - /api/am/store/{version}/applications - GET - - - /api/am/store/{version}/applications/generate-keys - POST - - - /api/am/store/{version}/subscriptions - GET,POST - - - /api/am/store/{version}/tags - GET - - - /api/am/store/{version}/tiers/{tierLevel} - GET - - - /api/am/store/{version}/tiers/{tierLevel}/{tierName} - GET - - - /api/am/publisher/{version}/apis - GET,POST - - - /api/am/publisher/{version}/apis/{apiId} - GET,DELETE,PUT - - - /api/am/publisher/{version}/apis/{apiId}/swagger - GET,PUT - - - /api/am/publisher/{version}/apis/{apiId}/thumbnail - GET,POST - - - /api/am/publisher/{version}/apis/{apiId}/change-lifecycle - POST - - - /api/am/publisher/{version}/apis/{apiId}/copy-api - POST - - - /api/am/publisher/{version}/applications/{applicationId} - GET - - - /api/am/publisher/{version}/apis/{apiId}/documents - GET,POST - - - /api/am/publisher/{version}/apis/{apiId}/documents/{documentId}/content - GET,POST - - - /api/am/publisher/{version}/apis/{apiId}/documents/{documentId} - GET,PUT,DELETE - - - /api/am/publisher/{version}/environments - GET - - - /api/am/publisher/{version}/subscriptions - GET - - - /api/am/publisher/{version}/subscriptions/block-subscription - POST - - - /api/am/publisher/{version}/subscriptions/{subscriptionId} - GET - - - /api/am/publisher/{version}/subscriptions/unblock-subscription - POST - - - /api/am/publisher/{version}/tiers/{tierLevel} - GET,POST - - - /api/am/publisher/{version}/tiers/{tierLevel}/{tierName} - GET,PUT,DELETE - - - /api/am/publisher/{version}/tiers/update-permission - POST - - - - - true - - Binary - tcp://${carbon.local.ip}:${receiver.url.port} - ssl://${carbon.local.ip}:${auth.url.port} - ${admin.username} - ${admin.password} - - - true - - 1000 - 200 - - - 200 - 1000 - 200 - - - - true - https://localhost:${mgt.transport.https.port}${carbon.context}services/ - ${admin.username} - ${admin.password} - - - true - - - - true - throttleData - - - TopicConnectionFactory - topic - org.wso2.andes.jndi.PropertiesFileInitialContextFactory - amqp://${admin.username}:${admin.password}@clientid/carbon?brokerlist='tcp://${carbon.local.ip}:${jms.port}' - - - - - true - false - false - false - - - - false - https://localhost:9445/bpmn - ${admin.username} - ${admin.password} - https://localhost:${mgt.transport.https.port}/api/am/publisher/v0.12/workflows/update-workflow-status - https://localhost:${https.nio.port}/token - https://localhost:${mgt.transport.https.port}/client-registration/v0.12/register - ${admin.username} - ${admin.password} - - - - - org.wso2 - org.wso2.client. - org.wso2.client.model. - org.wso2.client.api. - - java,android - - - - diff --git a/docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/carbon.xml b/docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/carbon.xml deleted file mode 100755 index f0f9ba3a..00000000 --- a/docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/carbon.xml +++ /dev/null @@ -1,667 +0,0 @@ - - - - - - - - WSO2 API Manager - - - AM - - - 2.2.0 - - - - - - - - - local:/${carbon.context}/services/ - - - - - - - APIManager - - - - - - - org.wso2.carbon - - - / - - - - - - - - - 15 - - - - - - - - - 0 - - - - - 9999 - - 11111 - - - - - - 10389 - - 8000 - - - - - - 10500 - - - - - - - - - org.wso2.carbon.tomcat.jndi.CarbonJavaURLContextFactory - - - - - - - - - java - - - - - - - - - - false - - - false - - - 600 - - - - false - - - - - - - - 30 - - - - - - - - - 15 - - - - - - ${carbon.home}/repository/deployment/server/ - - - 15 - - - ${carbon.home}/repository/conf/axis2/axis2.xml - - - 30000 - - - ${carbon.home}/repository/deployment/client/ - - ${carbon.home}/repository/conf/axis2/axis2_client.xml - - true - - - - - - - - - - admin - Default Administrator Role - - - user - Default User Role - - - - - - - - - - - - ${carbon.home}/repository/resources/security/wso2carbon.jks - - JKS - - wso2carbon - - wso2carbon - - wso2carbon - - - - - - ${carbon.home}/repository/resources/security/client-truststore.jks - - JKS - - wso2carbon - - - - - - - - - - - - - - - - - - - UserManager - - - false - - - - - - true - allow - - - - - - - - ${carbon.home}/tmp/work - - - - - - true - - - 10 - - - 30 - - - - - - 100 - - - - keystore - certificate - * - - org.wso2.carbon.ui.transports.fileupload.AnyFileUploadExecutor - - - - - jarZip - - org.wso2.carbon.ui.transports.fileupload.JarZipUploadExecutor - - - - dbs - - org.wso2.carbon.ui.transports.fileupload.DBSFileUploadExecutor - - - - tools - - org.wso2.carbon.ui.transports.fileupload.ToolsFileUploadExecutor - - - - toolsAny - - org.wso2.carbon.ui.transports.fileupload.ToolsAnyFileUploadExecutor - - - - - - - - - - info - org.wso2.carbon.core.transports.util.InfoProcessor - - - wsdl - org.wso2.carbon.core.transports.util.Wsdl11Processor - - - wsdl2 - org.wso2.carbon.core.transports.util.Wsdl20Processor - - - xsd - org.wso2.carbon.core.transports.util.XsdProcessor - - - - - - false - false - true - svn - http://svnrepo.example.com/repos/ - username - password - true - - - - - - - - - - - - ${require.carbon.servlet} - - - - - true - - - - - - - default repository - http://product-dist.wso2.com/p2/carbon/releases/wilkes/ - - - - - - - - true - - - - - - true - - diff --git a/docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/datasources/master-datasources.xml b/docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/datasources/master-datasources.xml deleted file mode 100755 index 439c791a..00000000 --- a/docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/datasources/master-datasources.xml +++ /dev/null @@ -1,133 +0,0 @@ - - - - org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader - - - - - - WSO2_CARBON_DB - The datasource used for registry and user manager - - jdbc/WSO2CarbonDB - - - - jdbc:mysql://mysql:3306/carbon_db?autoReconnect=true&useSSL=false - root - root - com.mysql.jdbc.Driver - 50 - 60000 - true - SELECT 1 - 30000 - - - - - - WSO2AM_DB - The datasource used for API Manager database - - jdbc/WSO2AM_DB - - - - jdbc:mysql://mysql:3306/apimgt_db?autoReconnect=true&useSSL=false - root - root - false - com.mysql.jdbc.Driver - 50 - 60000 - true - SELECT 1 - 30000 - - - - - - WSO2AM_STATS_DB - The datasource used for setting statistics to API Manager - - jdbc/WSO2AM_STATS_DB - - - - jdbc:mysql://mysql:3306/stats_db?autoReconnect=true&relaxAutoCommit=true&useSSL=false - root - root - com.mysql.jdbc.Driver - 50 - 60000 - true - SELECT 1 - 30000 - false - - - - - - WSO2_MB_STORE_DB - The datasource used for message broker database - - WSO2MBStoreDB - - - - jdbc:h2:repository/database/WSO2MB_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000 - wso2carbon - wso2carbon - org.h2.Driver - 50 - 60000 - true - SELECT 1 - 30000 - false - - - - - - - - - - diff --git a/docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/on-premise-gateway.properties b/docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/on-premise-gateway.properties deleted file mode 100644 index 38f8074b..00000000 --- a/docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/on-premise-gateway.properties +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -# -# WSO2 Inc. licenses this file to you under the Apache License, -# Version 2.0 (the "License"); you may not use this file except -# in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# Following configs are used by the Micro Gateway to communicate with your Master APIM Deployment -# If you want to connect the Micro Gateway to WSO2 Public Cloud, keep the existing URLs. -# If not please refer to the example urls and change the URLs accordingly. - -updated.api.info.retrieval.duration=15 -usage.data.publishing.enabled=true -usage.publishing.frequency=300000 - diff --git a/docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/registry.xml b/docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/registry.xml deleted file mode 100644 index fa8cb534..00000000 --- a/docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/registry.xml +++ /dev/null @@ -1,369 +0,0 @@ - - - - - - - wso2registry - false - true - / - - - jdbc/WSO2CarbonDB - - - - - - - .* - - - - - - - - .* - - - - - - - - true - - /trunk/schemas/ - - - /trunk/wsdls/ - - - /trunk/policies/ - - - - application/wsdl+xml - - - - - - - application/wsdl+xml - application/xsd+xml - 50 - true - - 3 - - /trunk/schemas/ - - - /trunk/wsdls/ - - - application/vnd.wso2.governance-archive - - - - - - - - 1.0.0-SNAPSHOT - true - - dev - qa - live - - - application/vnd.wso2-service+xml - - - - - - - - application/vnd.wso2-service+xml - - - - - - - - application/vnd.wso2-api+xml - - - - - - - - /_system/governance/event/topics/registry/notifications/.* - - - - - - - - - Created - Tested - Deployed - - - application/vnd.wso2-smart-link - - - - - - - - /trunk/policies/ - - - application/policy+xml - - - - - - - - true - - /trunk/schemas/ - - - application/x-xsd+xml - - - - - - - - application/vnd.wso2-hyperlink - - - - - - - application/vnd.wso2.endpoint - - /trunk/endpoints/ - - - - - - - - application/vnd.wso2-uri+xml - - - - - - - - .* - - - - - - - .* - - - - - - - workflow-config - - - - - - - - - - - - - - - - - - - - - - - true - - 35 - 3 - - 40 - - 40 - - /_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime - - - - - - - - - - - - - - - - - - - - - - - false - - - - true - true - true - true - - /trunk/services/ - - - - - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/tomcat/catalina-server.xml b/docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/tomcat/catalina-server.xml deleted file mode 100755 index 6cce78cf..00000000 --- a/docker-compose/apim-micro-gw-with-analytics/apim/repository/conf/tomcat/catalina-server.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docker-compose/apim-micro-gw-with-analytics/docker-compose.yml b/docker-compose/apim-micro-gw-with-analytics/docker-compose.yml deleted file mode 100755 index 2a2ffb2a..00000000 --- a/docker-compose/apim-micro-gw-with-analytics/docker-compose.yml +++ /dev/null @@ -1,72 +0,0 @@ -version: '2.3' -services: - mysql: - image: mysql:5.7.19 - ports: - - 3306 - environment: - MYSQL_ROOT_PASSWORD: root - volumes: - - ./mysql/scripts:/docker-entrypoint-initdb.d - command: [--ssl=0] - healthcheck: - test: ["CMD", "mysqladmin" ,"ping", "-uroot", "-proot"] - interval: 10s - timeout: 60s - retries: 5 - am-analytics: - image: docker.wso2.com/wso2am-analytics:2.2.0 - ports: - - "9444:9444" - - "9764:9764" - - "4041:4041" - healthcheck: - test: ["CMD", "curl", "-k", "-f", "https://localhost:9444/carbon/admin/login.jsp"] - interval: 10s - timeout: 120s - retries: 10 - depends_on: - mysql: - condition: service_healthy - volumes: - - ./apim-analytics:/home/wso2carbon/volumes - links: - - mysql - api-manager: - image: docker.wso2.com/wso2am:2.2.0 - healthcheck: - test: ["CMD", "curl", "-k", "-f", "https://localhost:9443/carbon/admin/login.jsp"] - interval: 10s - timeout: 120s - retries: 10 - depends_on: - am-analytics: - condition: service_healthy - mysql: - condition: service_healthy - volumes: - - ./apim:/home/wso2carbon/volumes - ports: - - "9763:9763" - - "9443:9443" - - "8280:8280" - - "8243:8243" - links: - - mysql - - am-analytics - api-manager-gateway: - image: docker.wso2.com/wso2am-micro-gw:2.2.0 - depends_on: - api-manager: - condition: service_healthy - mysql: - condition: service_healthy - volumes: - - ./micro-gw:/home/wso2carbon/volumes - ports: - - "5673:5673" - - "8244:8244" - links: - - mysql - - am-analytics - diff --git a/docker-compose/apim-micro-gw-with-analytics/micro-gateway/bin/wso2server.sh b/docker-compose/apim-micro-gw-with-analytics/micro-gateway/bin/wso2server.sh deleted file mode 100755 index b53939f1..00000000 --- a/docker-compose/apim-micro-gw-with-analytics/micro-gateway/bin/wso2server.sh +++ /dev/null @@ -1,321 +0,0 @@ -#!/bin/sh -# ---------------------------------------------------------------------------- -# Copyright 2005-2012 WSO2, Inc. http://www.wso2.org -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# ---------------------------------------------------------------------------- -# Main Script for the WSO2 Carbon Server -# -# Environment Variable Prequisites -# -# CARBON_HOME Home of WSO2 Carbon installation. If not set I will try -# to figure it out. -# -# JAVA_HOME Must point at your Java Development Kit installation. -# -# JAVA_OPTS (Optional) Java runtime options used when the commands -# is executed. -# -# NOTE: Borrowed generously from Apache Tomcat startup scripts. -# ----------------------------------------------------------------------------- - -# OS specific support. $var _must_ be set to either true or false. -#ulimit -n 100000 - -cygwin=false; -darwin=false; -os400=false; -mingw=false; -case "`uname`" in -CYGWIN*) cygwin=true;; -MINGW*) mingw=true;; -OS400*) os400=true;; -Darwin*) darwin=true - if [ -z "$JAVA_VERSION" ] ; then - JAVA_VERSION="CurrentJDK" - else - echo "Using Java version: $JAVA_VERSION" - fi - if [ -z "$JAVA_HOME" ] ; then - JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home - fi - ;; -esac - -# resolve links - $0 may be a softlink -PRG="$0" - -while [ -h "$PRG" ]; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '.*/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`/"$link" - fi -done - -# Get standard environment variables -PRGDIR=`dirname "$PRG"` - -# Only set CARBON_HOME if not already set -[ -z "$CARBON_HOME" ] && CARBON_HOME=`cd "$PRGDIR/.." ; pwd` - -# Set AXIS2_HOME. Needed for One Click JAR Download -AXIS2_HOME="$CARBON_HOME" - -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` - [ -n "$CARBON_HOME" ] && CARBON_HOME=`cygpath --unix "$CARBON_HOME"` - [ -n "$AXIS2_HOME" ] && CARBON_HOME=`cygpath --unix "$CARBON_HOME"` -fi - -# For OS400 -if $os400; then - # Set job priority to standard for interactive (interactive - 6) by using - # the interactive priority - 6, the helper threads that respond to requests - # will be running at the same priority as interactive jobs. - COMMAND='chgjob job('$JOBNAME') runpty(6)' - system $COMMAND - - # Enable multi threading - QIBM_MULTI_THREADED=Y - export QIBM_MULTI_THREADED -fi - -# For Migwn, ensure paths are in UNIX format before anything is touched -if $mingw ; then - [ -n "$CARBON_HOME" ] && - CARBON_HOME="`(cd "$CARBON_HOME"; pwd)`" - [ -n "$JAVA_HOME" ] && - JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" - [ -n "$AXIS2_HOME" ] && - CARBON_HOME="`(cd "$CARBON_HOME"; pwd)`" - # TODO classpath? -fi - -if [ -z "$JAVACMD" ] ; then - if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - else - JAVACMD=java - fi -fi - -if [ ! -x "$JAVACMD" ] ; then - echo "Error: JAVA_HOME is not defined correctly." - echo " CARBON cannot execute $JAVACMD" - exit 1 -fi - -# if JAVA_HOME is not set we're not happy -if [ -z "$JAVA_HOME" ]; then - echo "You must set the JAVA_HOME variable before running CARBON." - exit 1 -fi - -if [ -e "$CARBON_HOME/wso2carbon.pid" ]; then - PID=`cat "$CARBON_HOME"/wso2carbon.pid` -fi - -# ----- Process the input command ---------------------------------------------- -args="" -for c in $* -do - if [ "$c" = "--debug" ] || [ "$c" = "-debug" ] || [ "$c" = "debug" ]; then - CMD="--debug" - continue - elif [ "$CMD" = "--debug" ]; then - if [ -z "$PORT" ]; then - PORT=$c - fi - elif [ "$c" = "--stop" ] || [ "$c" = "-stop" ] || [ "$c" = "stop" ]; then - CMD="stop" - elif [ "$c" = "--start" ] || [ "$c" = "-start" ] || [ "$c" = "start" ]; then - CMD="start" - elif [ "$c" = "--version" ] || [ "$c" = "-version" ] || [ "$c" = "version" ]; then - CMD="version" - elif [ "$c" = "--restart" ] || [ "$c" = "-restart" ] || [ "$c" = "restart" ]; then - CMD="restart" - elif [ "$c" = "--test" ] || [ "$c" = "-test" ] || [ "$c" = "test" ]; then - CMD="test" - else - args="$args $c" - fi -done - -if [ "$CMD" = "--debug" ]; then - if [ "$PORT" = "" ]; then - echo " Please specify the debug port after the --debug option" - exit 1 - fi - if [ -n "$JAVA_OPTS" ]; then - echo "Warning !!!. User specified JAVA_OPTS will be ignored, once you give the --debug option." - fi - CMD="RUN" - JAVA_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=$PORT" - echo "Please start the remote debugging client to continue..." -elif [ "$CMD" = "start" ]; then - if [ -e "$CARBON_HOME/wso2carbon.pid" ]; then - if ps -p $PID > /dev/null ; then - echo "Process is already running" - exit 0 - fi - fi - export CARBON_HOME="$CARBON_HOME" -# using nohup sh to avoid erros in solaris OS.TODO - nohup sh "$CARBON_HOME"/bin/wso2server.sh $args > /dev/null 2>&1 & - exit 0 -elif [ "$CMD" = "stop" ]; then - export CARBON_HOME="$CARBON_HOME" - kill -term `cat "$CARBON_HOME"/wso2carbon.pid` - exit 0 -elif [ "$CMD" = "restart" ]; then - export CARBON_HOME="$CARBON_HOME" - kill -term `cat "$CARBON_HOME"/wso2carbon.pid` - process_status=0 - pid=`cat "$CARBON_HOME"/wso2carbon.pid` - while [ "$process_status" -eq "0" ] - do - sleep 1; - ps -p$pid 2>&1 > /dev/null - process_status=$? - done - -# using nohup sh to avoid erros in solaris OS.TODO - nohup sh "$CARBON_HOME"/bin/wso2server.sh $args > /dev/null 2>&1 & - exit 0 -elif [ "$CMD" = "test" ]; then - JAVACMD="exec "$JAVACMD"" -elif [ "$CMD" = "version" ]; then - cat "$CARBON_HOME"/bin/version.txt - cat "$CARBON_HOME"/bin/wso2carbon-version.txt - exit 0 -fi - -# ---------- Handle the SSL Issue with proper JDK version -------------------- -jdk_17=`$JAVA_HOME/bin/java -version 2>&1 | grep "1.[7|8]"` -if [ "$jdk_17" = "" ]; then - echo " Starting WSO2 Carbon (in unsupported JDK)" - echo " [ERROR] CARBON is supported only on JDK 1.7 and 1.8" -fi - -CARBON_XBOOTCLASSPATH="" -for f in "$CARBON_HOME"/lib/xboot/*.jar -do - if [ "$f" != "$CARBON_HOME/lib/xboot/*.jar" ];then - CARBON_XBOOTCLASSPATH="$CARBON_XBOOTCLASSPATH":$f - fi -done - -JAVA_ENDORSED_DIRS="$CARBON_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" - -CARBON_CLASSPATH="" -if [ -e "$JAVA_HOME/lib/tools.jar" ]; then - CARBON_CLASSPATH="$JAVA_HOME/lib/tools.jar" -fi -for f in "$CARBON_HOME"/bin/*.jar -do - if [ "$f" != "$CARBON_HOME/bin/*.jar" ];then - CARBON_CLASSPATH="$CARBON_CLASSPATH":$f - fi -done -for t in "$CARBON_HOME"/lib/commons-lang*.jar -do - CARBON_CLASSPATH="$CARBON_CLASSPATH":$t -done -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"` - CARBON_HOME=`cygpath --absolute --windows "$CARBON_HOME"` - AXIS2_HOME=`cygpath --absolute --windows "$CARBON_HOME"` - CLASSPATH=`cygpath --path --windows "$CLASSPATH"` - JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"` - CARBON_CLASSPATH=`cygpath --path --windows "$CARBON_CLASSPATH"` - CARBON_XBOOTCLASSPATH=`cygpath --path --windows "$CARBON_XBOOTCLASSPATH"` -fi - -# ----- Execute The Requested Command ----------------------------------------- - -echo JAVA_HOME environment variable is set to $JAVA_HOME -echo CARBON_HOME environment variable is set to "$CARBON_HOME" - -cd "$CARBON_HOME" - -TMP_DIR="$CARBON_HOME"/tmp -if [ -d "$TMP_DIR" ]; then -rm -rf "$TMP_DIR" -fi - -START_EXIT_STATUS=121 -status=$START_EXIT_STATUS - -if [ -z "$JVM_MEM_OPTS" ]; then - java_version=$("$JAVACMD" -version 2>&1 | awk -F '"' '/version/ {print $2}') - JVM_MEM_OPTS="-Xms256m -Xmx1024m" - if [ "$java_version" \< "1.8" ]; then - JVM_MEM_OPTS="$JVM_MEM_OPTS -XX:MaxPermSize=256m" - fi -fi -echo "Using Java memory options: $JVM_MEM_OPTS" - -#To monitor a Carbon server in remote JMX mode on linux host machines, set the below system property. -# -Djava.rmi.server.hostname="your.IP.goes.here" - -while [ "$status" = "$START_EXIT_STATUS" ] -do - $JAVACMD \ - -Xbootclasspath/a:"$CARBON_XBOOTCLASSPATH" \ - $JVM_MEM_OPTS \ - -XX:+HeapDumpOnOutOfMemoryError \ - -XX:HeapDumpPath="$CARBON_HOME/repository/logs/heap-dump.hprof" \ - $JAVA_OPTS \ - -Dcom.sun.management.jmxremote \ - -classpath "$CARBON_CLASSPATH" \ - -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \ - -Djava.io.tmpdir="$CARBON_HOME/tmp" \ - -Dcatalina.base="$CARBON_HOME/lib/tomcat" \ - -Dwso2.server.standalone=true \ - -Dcarbon.registry.root=/ \ - -Djava.command="$JAVACMD" \ - -Dcarbon.home="$CARBON_HOME" \ - -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \ - -Dcarbon.config.dir.path="$CARBON_HOME/repository/conf" \ - -Djava.util.logging.config.file="$CARBON_HOME/repository/conf/etc/logging-bridge.properties" \ - -Dcomponents.repo="$CARBON_HOME/repository/components/plugins" \ - -Dconf.location="$CARBON_HOME/repository/conf"\ - -Dcom.atomikos.icatch.file="$CARBON_HOME/lib/transactions.properties" \ - -Dcom.atomikos.icatch.hide_init_file_path=true \ - -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false \ - -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true \ - -Dcom.sun.jndi.ldap.connect.pool.authentication=simple \ - -Dcom.sun.jndi.ldap.connect.pool.timeout=3000 \ - -Dorg.terracotta.quartz.skipUpdateCheck=true \ - -Djava.security.egd=file:/dev/./urandom \ - -Dfile.encoding=UTF8 \ - -Djava.net.preferIPv4Stack=true \ - -Dcom.ibm.cacheLocalHost=true \ - -Dorg.opensaml.httpclient.https.disableHostnameVerification=true \ - -Dhttpclient.hostnameVerifier="AllowAll" \ - -Dorg.wso2.ignoreHostnameVerification=true \ - -DworkerNode=false \ - org.wso2.carbon.bootstrap.Bootstrap $* - status=$? -done diff --git a/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/api-manager.xml b/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/api-manager.xml deleted file mode 100644 index b8affed7..00000000 --- a/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/api-manager.xml +++ /dev/null @@ -1,642 +0,0 @@ - - - jdbc/WSO2AM_DB - - - Synapse - - - false - - - - - https://localhost:${mgt.transport.https.port}${carbon.context}services/ - - ${admin.username} - - ${admin.password} - - false - - - - - - - - X-JWT-Assertion - - - - - - - - - - - - org.wso2.carbon.apimgt.keymgt.token.JWTGenerator - - - - - - - - - - - - - - - - - Production and Sandbox - This is a hybrid gateway that handles both production and sandbox token traffic. - - https://localhost:${mgt.transport.https.port}${carbon.context}services/ - - ${admin.username} - - ${admin.password} - - http://${carbon.local.ip}:${http.nio.port},https://${carbon.local.ip}:${https.nio.port} - - - - - - - true - - true - - false - - false - - true - - true - - - - - - - - - - - - true - - - org.wso2.carbon.apimgt.micro.gateway.usage.publisher.APIMgtUsageFileDataPublisher - - - - - {tcp://localhost:7612} - - - ${admin.username} - - ${admin.password} - - - org.wso2.carbon.apimgt.usage.client.impl.APIUsageStatisticsRdbmsClientImpl - - - https://localhost:9444 - ${admin.username} - ${admin.password} - - - true - - - org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageDataBridgeDataPublisher - - - - - - org.wso2.apimgt.statistics.request - 1.1.0 - - - org.wso2.apimgt.statistics.response - 1.1.0 - - - org.wso2.apimgt.statistics.fault - 1.0.0 - - - org.wso2.apimgt.statistics.throttle - 1.0.0 - - - org.wso2.apimgt.statistics.workflow - 1.0.0 - - - org.wso2.apimgt.statistics.execution.time - 1.0.0 - - - org.wso2.analytics.apim.alertStakeholderInfo - 1.0.1 - - - true - - - - - - https://api-manager:9443/services/ - - - admin - - admin - - - WSClient - 10000 - - - false - localhost - - - - - org.wso2.carbon.apimgt.keymgt.handlers.DefaultKeyValidationHandler - - - - - - - - - - - - am_application_scope - - - - /oauth2/token - - https://localhost:${https.nio.port}/revoke - - false - - - - - - true - - - - - false - - - true - false - https://localhost:${mgt.transport.https.port}/store - - - https://localhost:${mgt.transport.https.port}${carbon.context}services/ - - ${admin.username} - - - ${admin.password} - - false - - false - - - - - true - - - true - - - - - - - false - https://localhost:${mgt.transport.https.port}/publisher - - - - - - true - - - - - - - - - true - - - * - - - GET,PUT,POST,DELETE,PATCH,OPTIONS - - - authorization,Access-Control-Allow-Origin,Content-Type,SOAPAction - - - - false - - - - - - - - - - /api/am/publisher/{version}/swagger.json - GET,HEAD - - - /api/am/store/{version}/swagger.json - GET,HEAD - - - /api/am/admin/{version}/swagger.json - GET,HEAD - - - /api/am/store/{version}/apis - GET,HEAD - - - /api/am/store/{version}/apis/{apiId} - GET,HEAD - - - /api/am/store/{version}/apis/{apiId}/swagger - GET,HEAD - - - /api/am/store/{version}/apis/{apiId}/documents - GET,HEAD - - - /api/am/store/{version}/apis/{apiId}/documents/{documentId} - GET,HEAD - - - /api/am/store/{version}/apis/{apiId}/documents/{documentId}/content - GET,HEAD - - - /api/am/store/{version}/apis/{apiId}/thumbnail - GET,HEAD - - - /api/am/store/{version}/tags - GET,HEAD - - - /api/am/store/{version}/tiers/{tierLevel} - GET,HEAD - - - /api/am/store/{version}/tiers/{tierLevel}/{tierName} - GET,HEAD - - - - - /api/am/store/{version}/apis - GET - - - /api/am/store/{version}/apis/generate-sdk - POST - - - /api/am/store/{version}/apis/{apiId}/documents - GET - - - /api/am/store/{version}/applications - GET - - - /api/am/store/{version}/applications/generate-keys - POST - - - /api/am/store/{version}/subscriptions - GET,POST - - - /api/am/store/{version}/tags - GET - - - /api/am/store/{version}/tiers/{tierLevel} - GET - - - /api/am/store/{version}/tiers/{tierLevel}/{tierName} - GET - - - /api/am/publisher/{version}/apis - GET,POST - - - /api/am/publisher/{version}/apis/{apiId} - GET,DELETE,PUT - - - /api/am/publisher/{version}/apis/{apiId}/swagger - GET,PUT - - - /api/am/publisher/{version}/apis/{apiId}/thumbnail - GET,POST - - - /api/am/publisher/{version}/apis/{apiId}/change-lifecycle - POST - - - /api/am/publisher/{version}/apis/{apiId}/copy-api - POST - - - /api/am/publisher/{version}/applications/{applicationId} - GET - - - /api/am/publisher/{version}/apis/{apiId}/documents - GET,POST - - - /api/am/publisher/{version}/apis/{apiId}/documents/{documentId}/content - GET,POST - - - /api/am/publisher/{version}/apis/{apiId}/documents/{documentId} - GET,PUT,DELETE - - - /api/am/publisher/{version}/environments - GET - - - /api/am/publisher/{version}/subscriptions - GET - - - /api/am/publisher/{version}/subscriptions/block-subscription - POST - - - /api/am/publisher/{version}/subscriptions/{subscriptionId} - GET - - - /api/am/publisher/{version}/subscriptions/unblock-subscription - POST - - - /api/am/publisher/{version}/tiers/{tierLevel} - GET,POST - - - /api/am/publisher/{version}/tiers/{tierLevel}/{tierName} - GET,PUT,DELETE - - - /api/am/publisher/{version}/tiers/update-permission - POST - - - - - true - - Binary - tcp://${carbon.local.ip}:${receiver.url.port} - ssl://${carbon.local.ip}:${auth.url.port} - ${admin.username} - ${admin.password} - - - true - - 1000 - 200 - - - 200 - 1000 - 200 - - - - true - https://localhost:${mgt.transport.https.port}${carbon.context}services/ - ${admin.username} - ${admin.password} - - - true - - - - true - throttleData - - - TopicConnectionFactory - topic - org.wso2.andes.jndi.PropertiesFileInitialContextFactory - amqp://${admin.username}:${admin.password}@clientid/carbon?brokerlist='tcp://${carbon.local.ip}:${jms.port}' - - - - - true - false - false - false - - - - false - https://localhost:9445/bpmn - ${admin.username} - ${admin.password} - https://localhost:${mgt.transport.https.port}/api/am/publisher/v0.12/workflows/update-workflow-status - https://localhost:${https.nio.port}/token - https://localhost:${mgt.transport.https.port}/client-registration/v0.12/register - ${admin.username} - ${admin.password} - - - - - org.wso2 - org.wso2.client. - org.wso2.client.model. - org.wso2.client.api. - - java,android - - - - diff --git a/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/axis2/axis2.xml b/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/axis2/axis2.xml deleted file mode 100644 index 80da46de..00000000 --- a/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/axis2/axis2.xml +++ /dev/null @@ -1,968 +0,0 @@ - - - - - - - - - - - true - - true - - - false - - false - - - false - - work/mtom - - 4000 - - - false - - - inmemory - - - - - services - - - axis2services - - - axis2modules - - - WSO2 AM 2.1.0 - WSO2 AM 2.1.0 - - - - false - - - - - - - false - - - true - - - 30000 - - - repository/deployment/server/synapse-configs - - . - - . - - localhost - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 8280 - true - - - org.wso2.carbon.mediation.transport.handlers.PassThroughNHttpGetProcessor - - - - - - - - - - - - 8243 - true - - - org.wso2.carbon.mediation.transport.handlers.PassThroughNHttpGetProcessor - - - repository/resources/security/wso2carbon.jks - JKS - wso2carbon - wso2carbon - - - - - repository/resources/security/client-truststore.jks - JKS - wso2carbon - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - - - - - - - - - - - - - - - true - - - repository/resources/security/wso2carbon.jks - JKS - wso2carbon - wso2carbon - - - - - repository/resources/security/client-truststore.jks - JKS - wso2carbon - - - - - - - - repository/resources/security/sslprofiles.xml - 600000 - - AllowAll - - - - - - - - - - - - - - - - - - - - - - - - - outflowDispatchSeq - outflowFaultSeq - - - - outflowDispatchSeq - outflowFaultSeq - - repository/resources/security/client-truststore.jks - wso2carbon - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - multicast - - - - - wso2.carbon.domain - - - - - - 45564 - - 100 - - 60 - - - - - - 127.0.0.1 - - - - - - 4000 - - - - - - - - - - - - - - - 127.0.0.1 - 4000 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/carbon.xml b/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/carbon.xml deleted file mode 100644 index 6c03dfc5..00000000 --- a/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/carbon.xml +++ /dev/null @@ -1,667 +0,0 @@ - - - - - - - - WSO2 API Manager - - - AM - - - 2.2.0 - - - - - - - - - local:/${carbon.context}/services/ - - - - - - - APIManager - - - - - - - org.wso2.carbon - - - / - - - - - - - - - 15 - - - - - - - - - 1 - - - - - 9999 - - 11111 - - - - - - 10389 - - 8000 - - - - - - 10500 - - - - - - - - - org.wso2.carbon.tomcat.jndi.CarbonJavaURLContextFactory - - - - - - - - - java - - - - - - - - - - false - - - false - - - 600 - - - - false - - - - - - - - 30 - - - - - - - - - 15 - - - - - - ${carbon.home}/repository/deployment/server/ - - - 15 - - - ${carbon.home}/repository/conf/axis2/axis2.xml - - - 30000 - - - ${carbon.home}/repository/deployment/client/ - - ${carbon.home}/repository/conf/axis2/axis2_client.xml - - true - - - - - - - - - - admin - Default Administrator Role - - - user - Default User Role - - - - - - - - - - - - ${carbon.home}/repository/resources/security/wso2carbon.jks - - JKS - - wso2carbon - - wso2carbon - - wso2carbon - - - - - - ${carbon.home}/repository/resources/security/client-truststore.jks - - JKS - - wso2carbon - - - - - - - - - - - - - - - - - - - UserManager - - - false - - - - - - true - allow - - - - - - - - ${carbon.home}/tmp/work - - - - - - true - - - 10 - - - 30 - - - - - - 100 - - - - keystore - certificate - * - - org.wso2.carbon.ui.transports.fileupload.AnyFileUploadExecutor - - - - - jarZip - - org.wso2.carbon.ui.transports.fileupload.JarZipUploadExecutor - - - - dbs - - org.wso2.carbon.ui.transports.fileupload.DBSFileUploadExecutor - - - - tools - - org.wso2.carbon.ui.transports.fileupload.ToolsFileUploadExecutor - - - - toolsAny - - org.wso2.carbon.ui.transports.fileupload.ToolsAnyFileUploadExecutor - - - - - - - - - - info - org.wso2.carbon.core.transports.util.InfoProcessor - - - wsdl - org.wso2.carbon.core.transports.util.Wsdl11Processor - - - wsdl2 - org.wso2.carbon.core.transports.util.Wsdl20Processor - - - xsd - org.wso2.carbon.core.transports.util.XsdProcessor - - - - - - false - false - true - svn - http://svnrepo.example.com/repos/ - username - password - true - - - - - - - - - - - - ${require.carbon.servlet} - - - - - true - - - - - - - default repository - http://product-dist.wso2.com/p2/carbon/releases/wilkes/ - - - - - - - - true - - - - - - true - - diff --git a/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/jndi.properties b/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/jndi.properties deleted file mode 100644 index 61f72cfa..00000000 --- a/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/jndi.properties +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# register some connection factories -# connectionfactory.[jndiname] = [ConnectionURL] -connectionfactory.TopicConnectionFactory = amqp://admin:admin@clientid/carbon?brokerlist='tcp://localhost:5673' -connectionfactory.QueueConnectionFactory = amqp://admin:admin@clientID/test?brokerlist='tcp://localhost:5673' -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -#queue.MyQueue = example.MyQueue - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -topic.throttleData = throttleData diff --git a/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/log4j.properties b/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/log4j.properties deleted file mode 100644 index e4624935..00000000 --- a/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/log4j.properties +++ /dev/null @@ -1,225 +0,0 @@ -# -# Copyright (c) 2005-2015, WSO2 Inc. (http://wso2.com) All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -## -# This is the log4j configuration file used by WSO2 AM -# ===================================================== -# -# IMPORTANT : Please do not remove or change the names of any of the Appenders defined here. -# The layout pattern & log file can be changed using the WSO2 AM Management Console, and those -# settings will override the settings in this file. -## - - -# the root category is ERROR (applies for all 3rd party JARs etc) and will be logged to the -# LOG_APPENDER and the CONSOLE_APPENDER - -log4j.rootLogger=ERROR, CARBON_CONSOLE, CARBON_LOGFILE, CARBON_MEMORY, CARBON_SYS_LOG, ERROR_LOGFILE - -log4j.logger.AUDIT_LOG=INFO, AUDIT_LOGFILE - -log4j.category.org.apache.synapse=INFO -log4j.category.org.apache.synapse.transport=INFO -log4j.category.org.apache.axis2=INFO -log4j.category.org.apache.axis2.transport=INFO -log4j.logger.com.atomikos=INFO,ATOMIKOS -log4j.logger.org.quartz=WARN -log4j.logger.org.wso2=INFO -log4j.logger.org.wso2.carbon=INFO -#log4j.category.org.apache.synapse.transport.nhttp.util=DEBUG -#log4j.category.org.apache.http.impl.nio.reactor=DEBUG -#log4j.logger.org.wso2.carbon.utils.deployment.ComponentBuilder=DEBUG -#log4j.logger.org.wso2.carbon.utils.deployment.OSGiBundleDeployer=DEBUG -log4j.logger.org.apache.catalina=WARN -log4j.logger.org.apache.coyote=WARN -log4j.logger.org.apache.axis2.enterprise=FATAL -log4j.logger.de.hunsicker.jalopy.io=FATAL - -# uncomment the following logs to see HTTP headers and messages -#log4j.logger.org.apache.synapse.transport.http.headers=DEBUG -#log4j.logger.org.apache.synapse.transport.http.wire=DEBUG - -# qpid related logs for the message broker -log4j.logger.qpid=WARN -log4j.logger.org.apache.qpid=WARN -log4j.logger.org.apache.qpid.server.Main=INFO -log4j.logger.qpid.message=WARN -log4j.logger.qpid.message.broker.listening=INFO -log4j.logger.org.wso2.carbon.databridge.agent.thrift.AsyncDataPublisher=WARN - -# The console appender is used to display general information at console -log4j.appender.CARBON_CONSOLE=org.wso2.carbon.utils.logging.appenders.CarbonConsoleAppender -log4j.appender.CARBON_CONSOLE.layout=org.apache.log4j.PatternLayout -log4j.appender.CARBON_CONSOLE.layout.ConversionPattern=[%d{ISO8601}] %5p - %c{1} %m%n - -# Configure the service logger at INFO level. Writes only run-time/mediation-time audit messages -log4j.category.SERVICE_LOGGER=INFO, SERVICE_APPENDER -log4j.additivity.SERVICE_LOGGER=false -log4j.appender.SERVICE_APPENDER=org.apache.log4j.RollingFileAppender -log4j.appender.SERVICE_APPENDER.File=${carbon.home}/repository/logs/${instance.log}/wso2-apigw-service${instance.log}.log -log4j.appender.SERVICE_APPENDER.MaxFileSize=1000KB -log4j.appender.SERVICE_APPENDER.MaxBackupIndex=10 -log4j.appender.SERVICE_APPENDER.layout=org.apache.log4j.PatternLayout -log4j.appender.SERVICE_APPENDER.layout.ConversionPattern=%d{ISO8601} [%X{ip}-%X{host}] [%t] %5p %c{1} %m%n - -# The trace logger dumps enough information @INFO level, but maybe pushed upto TRACE. -# Writes only run-time/mediation time tracing/debug messages for messages passing through trace -# enabled sequences, mediators and services. Enabling tracing on these has a performance impact -log4j.category.TRACE_LOGGER=INFO, TRACE_APPENDER, TRACE_MEMORYAPPENDER -log4j.additivity.TRACE_LOGGER=false -log4j.appender.TRACE_APPENDER=org.apache.log4j.DailyRollingFileAppender -log4j.appender.TRACE_APPENDER.File=${carbon.home}/repository/logs/${instance.log}/wso2-apigw-trace${instance.log}.log -log4j.appender.TRACE_APPENDER.Append=true -log4j.appender.TRACE_APPENDER.layout=org.apache.log4j.PatternLayout -log4j.appender.TRACE_APPENDER.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%X{ip}-%X{host}] [%t] %5p %c{1} %m%n - -# The memory appender for trace logger -log4j.appender.TRACE_MEMORYAPPENDER=org.wso2.carbon.utils.logging.appenders.MemoryAppender -log4j.appender.TRACE_MEMORYAPPENDER.bufferSize=2000 -log4j.appender.TRACE_MEMORYAPPENDER.layout=org.apache.log4j.PatternLayout -log4j.appender.TRACE_MEMORYAPPENDER.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%X{ip}-%X{host}] [%t] %5p %m%n - -# CARBON_LOGFILE is set to be a DailyRollingFileAppender using a PatternLayout. -log4j.appender.CARBON_LOGFILE=org.wso2.carbon.utils.logging.appenders.CarbonDailyRollingFileAppender -# Log file will be overridden by the configuration setting in the DB -# This path should be relative to WSO2 Carbon Home -log4j.appender.CARBON_LOGFILE.File=${carbon.home}/repository/logs/${instance.log}/wso2carbon${instance.log}.log -log4j.appender.CARBON_LOGFILE.Append=true -log4j.appender.CARBON_LOGFILE.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout -# ConversionPattern will be overridden by the configuration setting in the DB -log4j.appender.CARBON_LOGFILE.layout.ConversionPattern=TID: [%T] [%S] [%d] %P%5p {%c} - %x %m {%c}%n -log4j.appender.CARBON_LOGFILE.layout.TenantPattern=%U%@%D [%T] [%S] -log4j.appender.CARBON_LOGFILE.threshold=DEBUG - -# The standard error log where all the warnings, errors and fatal errors will be logged -log4j.appender.ERROR_LOGFILE=org.apache.log4j.FileAppender -log4j.appender.ERROR_LOGFILE.File=${carbon.home}/repository/logs/${instance.log}/wso2-apigw-errors.log -log4j.appender.ERROR_LOGFILE.layout=org.apache.log4j.PatternLayout -log4j.appender.ERROR_LOGFILE.layout.ConversionPattern=%d{ISO8601} [%X{ip}-%X{host}] [%t] %5p %c{1} %m%n -log4j.appender.ERROR_LOGFILE.threshold=WARN - -# The memory appender for logging -log4j.appender.CARBON_MEMORY=org.wso2.carbon.logging.service.appender.CarbonMemoryAppender -log4j.appender.CARBON_MEMORY.bufferSize=2000 -log4j.appender.CARBON_MEMORY.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout -# ConversionPattern will be overridden by the configuration setting in the DB -log4j.appender.CARBON_MEMORY.layout.ConversionPattern=TID: [%T] [%S] [%d] %P%5p {%c} - %x %m {%c}%n -log4j.appender.CARBON_MEMORY.layout.TenantPattern=%U%@%D [%T] [%S] -log4j.appender.CARBON_MEMORY.columnList=%T,%S,%A,%d,%c,%p,%m,%H,%I,%Stacktrace -log4j.appender.CARBON_MEMORY.threshold=DEBUG - -# LOGEVENT is set to be a LogEventAppender using a PatternLayout to send logs to LOGEVENT -log4j.appender.LOGEVENT=org.wso2.carbon.logging.appender.LogEventAppender -log4j.appender.LOGEVENT.url=tcp://localhost:7611 -log4j.appender.LOGEVENT.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout -log4j.appender.LOGEVENT.columnList=%T,%S,%A,%d,%c,%p,%m,%I,%Stacktrace -log4j.appender.LOGEVENT.userName=admin -log4j.appender.LOGEVENT.password=admin -log4j.appender.LOGEVENT.processingLimit=1000 -log4j.appender.LOGEVENT.maxTolerableConsecutiveFailure=20 - - -log4j.appender.CARBON_SYS_LOG = org.apache.log4j.net.SyslogAppender -log4j.appender.CARBON_SYS_LOG.layout=org.apache.log4j.PatternLayout -log4j.appender.CARBON_SYS_LOG.layout.ConversionPattern=[%d] %5p - %x %m {%c}%n -log4j.appender.CARBON_SYS_LOG.SyslogHost=localhost -log4j.appender.CARBON_SYS_LOG.Facility=USER -log4j.appender.CARBON_SYS_LOG.threshold=DEBUG - -# LOGEVENT is set to be a LogEventAppender using a PatternLayout to send logs to LOGEVENT -log4j.appender.LOGEVENT=org.wso2.carbon.logging.appender.LogEventAppender -log4j.appender.LOGEVENT.url=tcp://localhost:7611 -log4j.appender.LOGEVENT.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout -log4j.appender.LOGEVENT.columnList=%T,%S,%A,%d,%c,%p,%m,%H,%I,%Stacktrace -log4j.appender.LOGEVENT.userName=admin -log4j.appender.LOGEVENT.password=admin - -log4j.logger.org.apache.directory.shared.ldap=WARN, CARBON_CONSOLE -log4j.logger.org.apache.directory.server.ldap.handlers=WARN, CARBON_CONSOLE -log4j.logger.org.apache.directory.shared.ldap.entry.DefaultServerAttribute=FATAL, CARBON_CONSOLE -log4j.logger.org.apache.directory.shared.ldap.ldif.LdifReader=ERROR, CARBON_CONSOLE -log4j.logger.org.apache.directory.server.ldap.LdapProtocolHandler=ERROR, CARBON_CONSOLE - -## Trace Logger configuration which will append to a XMPP chatroom or JID ## -#log4j.appender.XMPP_APPENDER=org.wso2.carbon.utils.logging.IMAppender -#log4j.appender.XMPP_APPENDER.host=jabber.org -#log4j.appender.XMPP_APPENDER.username=wso2esb -#log4j.appender.XMPP_APPENDER.password=wso2esb -#log4j.appender.XMPP_APPENDER.recipient=ruwan@jabber.org -#log4j.appender.XMPP_APPENDER.layout=org.apache.log4j.PatternLayout -#log4j.appender.XMPP_APPENDER.layout.ConversionPattern=[%X{host}] [%t] %-5p [%d{HH:mm:ss,SSS}] %C{1} - %m%n - -# Appender config to AUDIT_LOGFILE -log4j.appender.AUDIT_LOGFILE=org.apache.log4j.DailyRollingFileAppender -log4j.appender.AUDIT_LOGFILE.File=${carbon.home}/repository/logs/audit.log -log4j.appender.AUDIT_LOGFILE.Append=true -log4j.appender.AUDIT_LOGFILE.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout -log4j.appender.AUDIT_LOGFILE.layout.ConversionPattern=[%d] %P%5p - %x %m %n -log4j.appender.AUDIT_LOGFILE.layout.TenantPattern=%U%@%D [%T] [%S] -log4j.appender.AUDIT_LOGFILE.threshold=INFO -log4j.additivity.AUDIT_LOG=false - -# Appender config to send Atomikos transaction logs to new log file tm.out. -log4j.appender.ATOMIKOS = org.apache.log4j.RollingFileAppender -log4j.appender.ATOMIKOS.File = repository/logs/tm.out -log4j.appender.ATOMIKOS.Append = true -log4j.appender.ATOMIKOS.layout = org.apache.log4j.PatternLayout -log4j.appender.ATOMIKOS.layout.ConversionPattern=%p %t %c - %m%n -log4j.additivity.com.atomikos=false - -# DAS_AGENT is set to be a Custom Log Appender. -log4j.appender.DAS_AGENT=org.wso2.carbon.analytics.shared.data.agents.log4j.appender.LogEventAppender -# DAS_AGENT uses PatternLayout. -log4j.appender.DAS_AGENT.layout=org.wso2.carbon.analytics.shared.data.agents.log4j.util.TenantAwarePatternLayout -log4j.appender.DAS_AGENT.columnList=%D,%S,%A,%d,%c,%p,%m,%H,%I,%Stacktrace -log4j.appender.DAS_AGENT.userName=admin -log4j.appender.DAS_AGENT.password=admin -log4j.appender.DAS_AGENT.url=tcp://localhost:7612 -log4j.appender.DAS_AGENT.maxTolerableConsecutiveFailure=5 -log4j.appender.DAS_AGENT.streamDef=loganalyzer:1.0.0 -log4j.logger.trace.messages=TRACE,CARBON_TRACE_LOGFILE - -# Appender config to CARBON_TRACE_LOGFILE -log4j.appender.CARBON_TRACE_LOGFILE=org.apache.log4j.DailyRollingFileAppender -log4j.appender.CARBON_TRACE_LOGFILE.File=${carbon.home}/repository/logs/${instance.log}/wso2carbon-trace-messages${instance.log}.log -log4j.appender.CARBON_TRACE_LOGFILE.Append=true -log4j.appender.CARBON_TRACE_LOGFILE.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout -log4j.appender.CARBON_TRACE_LOGFILE.layout.ConversionPattern=[%d] %P%5p {%c} - %x %m %n -log4j.appender.CARBON_TRACE_LOGFILE.layout.TenantPattern=%U%@%D [%T] [%S] -log4j.appender.CARBON_TRACE_LOGFILE.threshold=TRACE -log4j.additivity.trace.messages=false - - -# The event trace logger dumps enough information @INFO level, but maybe pushed upto TRACE. -# Writes only run-time/event processing time tracing/debug messages for event passing through trace -# enabled transport adapters event formatters, builders and processors. Enabling event tracing on these has a performance impact -log4j.category.EVENT_TRACE_LOGGER=INFO, EVENT_TRACE_APPENDER, EVENT_TRACE_MEMORYAPPENDER -log4j.additivity.EVENT_TRACE_LOGGER=false -log4j.appender.EVENT_TRACE_APPENDER=org.apache.log4j.DailyRollingFileAppender -log4j.appender.EVENT_TRACE_APPENDER.File=${carbon.home}/repository/logs/${instance.log}/wso2-cep-trace${instance.log}.log -log4j.appender.EVENT_TRACE_APPENDER.Append=true -log4j.appender.EVENT_TRACE_APPENDER.layout=org.apache.log4j.PatternLayout -log4j.appender.EVENT_TRACE_APPENDER.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%X{ip}-%X{host}] [%t] %5p %c{1} %m%n -# The memory appender for trace logger -log4j.appender.EVENT_TRACE_MEMORYAPPENDER=org.wso2.carbon.utils.logging.appenders.MemoryAppender -log4j.appender.EVENT_TRACE_MEMORYAPPENDER.bufferSize=2000 -log4j.appender.EVENT_TRACE_MEMORYAPPENDER.layout=org.apache.log4j.PatternLayout -log4j.appender.EVENT_TRACE_MEMORYAPPENDER.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%X{ip}-%X{host}] [%t] %5p %m%n - - - -log4j.logger.org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker=FATAL -log4j.logger.org.wso2.carbon.databridge.agent.endpoint.DataEndpointGroup=FATAL \ No newline at end of file diff --git a/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/on-premise-gateway.properties b/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/on-premise-gateway.properties deleted file mode 100644 index 09f45a81..00000000 --- a/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/on-premise-gateway.properties +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (c) 2018 WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -# -# WSO2 Inc. licenses this file to you under the Apache License, -# Version 2.0 (the "License"); you may not use this file except -# in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# Following configs are used by the Micro Gateway to communicate with your Master APIM Deployment - -# Configure the API gateway url below: -api.gateway.url=https://api-manager:8243 - -# Configure the publisher url below: -api.publisher.url=https://api-manager:9443 - -# Configure the publisher url below: -api.admin.url=https://api-manager:9443 - -# Configure the keymanager url below: -api.key.manager.url=https://api-manager:9443/services - -# Configure the publisher url below: -usage.upload.service.url=https://api-manager:9443/micro-gateway/v0.9/usage/upload-file - -# Configure the publisher url below: -api.lifecycle.event.publisher.url=https://api-manager:9443/micro-gateway/v0.9/updated-apis - - -# Version of the publisher and admin REST APIs -rest.api.version=v0.12 - -# Micro gateway status updater related configs -# Configure a URL to ping and a unique identifier. This is an optional configuraton. -unique.identifier=$token -ping.api.url=$ping.url diff --git a/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/registry.xml b/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/registry.xml deleted file mode 100644 index f6bc56cf..00000000 --- a/docker-compose/apim-micro-gw-with-analytics/micro-gateway/repository/conf/registry.xml +++ /dev/null @@ -1,372 +0,0 @@ - - - - - - - wso2registry - false - true - / - - - jdbc/WSO2CarbonDB - - - - - - - .* - - - - - - - - .* - - - - - - - - true - - /trunk/schemas/ - - - /trunk/wsdls/ - - - /trunk/policies/ - - - - application/wsdl+xml - - - - - - - application/wsdl+xml - application/xsd+xml - 50 - true - - 3 - - /trunk/schemas/ - - - /trunk/wsdls/ - - - application/vnd.wso2.governance-archive - - - - - - - - 1.0.0-SNAPSHOT - true - - dev - qa - live - - - application/vnd.wso2-service+xml - - - - - - - - application/vnd.wso2-service+xml - - - - - - - - application/vnd.wso2-api+xml - - - - - - - - /_system/governance/event/topics/registry/notifications/.* - - - - - - - - - Created - Tested - Deployed - - - application/vnd.wso2-smart-link - - - - - - - - /trunk/policies/ - - - application/policy+xml - - - - - - - - true - - /trunk/schemas/ - - - application/x-xsd+xml - - - - - - - - application/vnd.wso2-hyperlink - - - - - - - application/vnd.wso2.endpoint - - /trunk/endpoints/ - - - - - - - - application/vnd.wso2-uri+xml - - - - - - - - .* - - - - - - - .* - - - - - - - workflow-config - - - - - - - - - - - - - - - - - - - - - - - true - - 35 - 3 - - 40 - - 40 - - /_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime - - - - - - - - - - - - - - - - - - - - - - - false - - - - true - true - true - true - - /trunk/services/ - - - - - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docker-compose/apim-micro-gw-with-analytics/mysql/scripts/apim_mysql5.7.sql b/docker-compose/apim-micro-gw-with-analytics/mysql/scripts/apim_mysql5.7.sql deleted file mode 100644 index c6b4bf44..00000000 --- a/docker-compose/apim-micro-gw-with-analytics/mysql/scripts/apim_mysql5.7.sql +++ /dev/null @@ -1,1371 +0,0 @@ -CREATE Database `stats_db`; - -CREATE Database `apimgt_db`; - -USE `apimgt_db`; - --- Start of IDENTITY Tables-- - -CREATE TABLE IF NOT EXISTS IDN_BASE_TABLE ( - PRODUCT_NAME VARCHAR(20), - PRIMARY KEY (PRODUCT_NAME) -)ENGINE INNODB; - -INSERT INTO IDN_BASE_TABLE values ('WSO2 Identity Server'); - -CREATE TABLE IF NOT EXISTS IDN_OAUTH_CONSUMER_APPS ( - ID INTEGER NOT NULL AUTO_INCREMENT, - CONSUMER_KEY VARCHAR(255), - CONSUMER_SECRET VARCHAR(2048), - USERNAME VARCHAR(255), - TENANT_ID INTEGER DEFAULT 0, - USER_DOMAIN VARCHAR(50), - APP_NAME VARCHAR(255), - OAUTH_VERSION VARCHAR(128), - CALLBACK_URL VARCHAR(1024), - GRANT_TYPES VARCHAR (1024), - PKCE_MANDATORY CHAR(1) DEFAULT '0', - PKCE_SUPPORT_PLAIN CHAR(1) DEFAULT '0', - APP_STATE VARCHAR (25) DEFAULT 'ACTIVE', - USER_ACCESS_TOKEN_EXPIRE_TIME BIGINT DEFAULT 3600000, - APP_ACCESS_TOKEN_EXPIRE_TIME BIGINT DEFAULT 3600000, - REFRESH_TOKEN_EXPIRE_TIME BIGINT DEFAULT 84600000, - CONSTRAINT CONSUMER_KEY_CONSTRAINT UNIQUE (CONSUMER_KEY), - PRIMARY KEY (ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_OAUTH2_SCOPE_VALIDATORS ( - APP_ID INTEGER NOT NULL, - SCOPE_VALIDATOR VARCHAR (128) NOT NULL, - PRIMARY KEY (APP_ID,SCOPE_VALIDATOR), - FOREIGN KEY (APP_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_OAUTH1A_REQUEST_TOKEN ( - REQUEST_TOKEN VARCHAR(255), - REQUEST_TOKEN_SECRET VARCHAR(512), - CONSUMER_KEY_ID INTEGER, - CALLBACK_URL VARCHAR(1024), - SCOPE VARCHAR(2048), - AUTHORIZED VARCHAR(128), - OAUTH_VERIFIER VARCHAR(512), - AUTHZ_USER VARCHAR(512), - TENANT_ID INTEGER DEFAULT -1, - PRIMARY KEY (REQUEST_TOKEN), - FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_OAUTH1A_ACCESS_TOKEN ( - ACCESS_TOKEN VARCHAR(255), - ACCESS_TOKEN_SECRET VARCHAR(512), - CONSUMER_KEY_ID INTEGER, - SCOPE VARCHAR(2048), - AUTHZ_USER VARCHAR(512), - TENANT_ID INTEGER DEFAULT -1, - PRIMARY KEY (ACCESS_TOKEN), - FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_OAUTH2_ACCESS_TOKEN ( - TOKEN_ID VARCHAR (255), - ACCESS_TOKEN VARCHAR(2048), - REFRESH_TOKEN VARCHAR(2048), - CONSUMER_KEY_ID INTEGER, - AUTHZ_USER VARCHAR (100), - TENANT_ID INTEGER, - USER_DOMAIN VARCHAR(50), - USER_TYPE VARCHAR (25), - GRANT_TYPE VARCHAR (50), - TIME_CREATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - REFRESH_TOKEN_TIME_CREATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - VALIDITY_PERIOD BIGINT, - REFRESH_TOKEN_VALIDITY_PERIOD BIGINT, - TOKEN_SCOPE_HASH VARCHAR(32), - TOKEN_STATE VARCHAR(25) DEFAULT 'ACTIVE', - TOKEN_STATE_ID VARCHAR (128) DEFAULT 'NONE', - SUBJECT_IDENTIFIER VARCHAR(255), - ACCESS_TOKEN_HASH VARCHAR(512), - REFRESH_TOKEN_HASH VARCHAR(512), - PRIMARY KEY (TOKEN_ID), - FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE, - CONSTRAINT CON_APP_KEY UNIQUE (CONSUMER_KEY_ID,AUTHZ_USER,TENANT_ID,USER_DOMAIN,USER_TYPE,TOKEN_SCOPE_HASH, - TOKEN_STATE,TOKEN_STATE_ID) -)ENGINE INNODB; - -CREATE INDEX IDX_AT_CK_AU ON IDN_OAUTH2_ACCESS_TOKEN(CONSUMER_KEY_ID, AUTHZ_USER, TOKEN_STATE, USER_TYPE); - -CREATE INDEX IDX_TC ON IDN_OAUTH2_ACCESS_TOKEN(TIME_CREATED); - -CREATE INDEX IDX_ATH ON IDN_OAUTH2_ACCESS_TOKEN(ACCESS_TOKEN_HASH); - -CREATE TABLE IF NOT EXISTS IDN_OAUTH2_AUTHORIZATION_CODE ( - CODE_ID VARCHAR (255), - AUTHORIZATION_CODE VARCHAR(2048), - CONSUMER_KEY_ID INTEGER, - CALLBACK_URL VARCHAR(1024), - SCOPE VARCHAR(2048), - AUTHZ_USER VARCHAR (100), - TENANT_ID INTEGER, - USER_DOMAIN VARCHAR(50), - TIME_CREATED TIMESTAMP, - VALIDITY_PERIOD BIGINT, - STATE VARCHAR (25) DEFAULT 'ACTIVE', - TOKEN_ID VARCHAR(255), - SUBJECT_IDENTIFIER VARCHAR(255), - PKCE_CODE_CHALLENGE VARCHAR(255), - PKCE_CODE_CHALLENGE_METHOD VARCHAR(128), - AUTHORIZATION_CODE_HASH VARCHAR(512), - PRIMARY KEY (CODE_ID), - FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE -)ENGINE INNODB; - -CREATE INDEX IDX_AUTHORIZATION_CODE_HASH ON IDN_OAUTH2_AUTHORIZATION_CODE (AUTHORIZATION_CODE_HASH,CONSUMER_KEY_ID); - -CREATE TABLE IF NOT EXISTS IDN_OAUTH2_ACCESS_TOKEN_SCOPE ( - TOKEN_ID VARCHAR (255), - TOKEN_SCOPE VARCHAR (60), - TENANT_ID INTEGER DEFAULT -1, - PRIMARY KEY (TOKEN_ID, TOKEN_SCOPE), - FOREIGN KEY (TOKEN_ID) REFERENCES IDN_OAUTH2_ACCESS_TOKEN(TOKEN_ID) ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_OAUTH2_SCOPE ( - SCOPE_ID INTEGER NOT NULL AUTO_INCREMENT, - NAME VARCHAR(255) NOT NULL, - DISPLAY_NAME VARCHAR(255) NOT NULL, - DESCRIPTION VARCHAR(512), - TENANT_ID INTEGER NOT NULL DEFAULT -1, - PRIMARY KEY (SCOPE_ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_OAUTH2_SCOPE_BINDING ( - SCOPE_ID INTEGER NOT NULL, - SCOPE_BINDING VARCHAR(255), - FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE(SCOPE_ID) ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_OAUTH2_RESOURCE_SCOPE ( - RESOURCE_PATH VARCHAR(255) NOT NULL, - SCOPE_ID INTEGER NOT NULL, - TENANT_ID INTEGER DEFAULT -1, - PRIMARY KEY (RESOURCE_PATH), - FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE (SCOPE_ID) ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_SCIM_GROUP ( - ID INTEGER AUTO_INCREMENT, - TENANT_ID INTEGER NOT NULL, - ROLE_NAME VARCHAR(255) NOT NULL, - ATTR_NAME VARCHAR(1024) NOT NULL, - ATTR_VALUE VARCHAR(1024), - PRIMARY KEY (ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_OPENID_REMEMBER_ME ( - USER_NAME VARCHAR(255) NOT NULL, - TENANT_ID INTEGER DEFAULT 0, - COOKIE_VALUE VARCHAR(1024), - CREATED_TIME TIMESTAMP, - PRIMARY KEY (USER_NAME, TENANT_ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_OPENID_USER_RPS ( - USER_NAME VARCHAR(255) NOT NULL, - TENANT_ID INTEGER DEFAULT 0, - RP_URL VARCHAR(255) NOT NULL, - TRUSTED_ALWAYS VARCHAR(128) DEFAULT 'FALSE', - LAST_VISIT DATE NOT NULL, - VISIT_COUNT INTEGER DEFAULT 0, - DEFAULT_PROFILE_NAME VARCHAR(255) DEFAULT 'DEFAULT', - PRIMARY KEY (USER_NAME, TENANT_ID, RP_URL) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_OPENID_ASSOCIATIONS ( - HANDLE VARCHAR(255) NOT NULL, - ASSOC_TYPE VARCHAR(255) NOT NULL, - EXPIRE_IN TIMESTAMP NOT NULL, - MAC_KEY VARCHAR(255) NOT NULL, - ASSOC_STORE VARCHAR(128) DEFAULT 'SHARED', - TENANT_ID INTEGER DEFAULT -1, - PRIMARY KEY (HANDLE) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_STS_STORE ( - ID INTEGER AUTO_INCREMENT, - TOKEN_ID VARCHAR(255) NOT NULL, - TOKEN_CONTENT BLOB(1024) NOT NULL, - CREATE_DATE TIMESTAMP NOT NULL, - EXPIRE_DATE TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - STATE INTEGER DEFAULT 0, - PRIMARY KEY (ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_IDENTITY_USER_DATA ( - TENANT_ID INTEGER DEFAULT -1234, - USER_NAME VARCHAR(255) NOT NULL, - DATA_KEY VARCHAR(255) NOT NULL, - DATA_VALUE VARCHAR(2048), - PRIMARY KEY (TENANT_ID, USER_NAME, DATA_KEY) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_IDENTITY_META_DATA ( - USER_NAME VARCHAR(255) NOT NULL, - TENANT_ID INTEGER DEFAULT -1234, - METADATA_TYPE VARCHAR(255) NOT NULL, - METADATA VARCHAR(255) NOT NULL, - VALID VARCHAR(255) NOT NULL, - PRIMARY KEY (TENANT_ID, USER_NAME, METADATA_TYPE,METADATA) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_THRIFT_SESSION ( - SESSION_ID VARCHAR(255) NOT NULL, - USER_NAME VARCHAR(255) NOT NULL, - CREATED_TIME VARCHAR(255) NOT NULL, - LAST_MODIFIED_TIME VARCHAR(255) NOT NULL, - TENANT_ID INTEGER DEFAULT -1, - PRIMARY KEY (SESSION_ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_AUTH_SESSION_STORE ( - SESSION_ID VARCHAR (100) NOT NULL, - SESSION_TYPE VARCHAR(100) NOT NULL, - OPERATION VARCHAR(10) NOT NULL, - SESSION_OBJECT BLOB, - TIME_CREATED BIGINT, - TENANT_ID INTEGER DEFAULT -1, - PRIMARY KEY (SESSION_ID, SESSION_TYPE, TIME_CREATED, OPERATION) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS SP_APP ( - ID INTEGER NOT NULL AUTO_INCREMENT, - TENANT_ID INTEGER NOT NULL, - APP_NAME VARCHAR (255) NOT NULL , - USER_STORE VARCHAR (255) NOT NULL, - USERNAME VARCHAR (255) NOT NULL , - DESCRIPTION VARCHAR (1024), - ROLE_CLAIM VARCHAR (512), - AUTH_TYPE VARCHAR (255) NOT NULL, - PROVISIONING_USERSTORE_DOMAIN VARCHAR (512), - IS_LOCAL_CLAIM_DIALECT CHAR(1) DEFAULT '1', - IS_SEND_LOCAL_SUBJECT_ID CHAR(1) DEFAULT '0', - IS_SEND_AUTH_LIST_OF_IDPS CHAR(1) DEFAULT '0', - IS_USE_TENANT_DOMAIN_SUBJECT CHAR(1) DEFAULT '1', - IS_USE_USER_DOMAIN_SUBJECT CHAR(1) DEFAULT '1', - ENABLE_AUTHORIZATION CHAR(1) DEFAULT '0', - SUBJECT_CLAIM_URI VARCHAR (512), - IS_SAAS_APP CHAR(1) DEFAULT '0', - IS_DUMB_MODE CHAR(1) DEFAULT '0', - PRIMARY KEY (ID) -)ENGINE INNODB; - -ALTER TABLE SP_APP ADD CONSTRAINT APPLICATION_NAME_CONSTRAINT UNIQUE(APP_NAME, TENANT_ID); - -CREATE TABLE IF NOT EXISTS SP_METADATA ( - ID INTEGER AUTO_INCREMENT, - SP_ID INTEGER, - NAME VARCHAR(255) NOT NULL, - VALUE VARCHAR(255) NOT NULL, - DISPLAY_NAME VARCHAR(255), - TENANT_ID INTEGER DEFAULT -1, - PRIMARY KEY (ID), - CONSTRAINT SP_METADATA_CONSTRAINT UNIQUE (SP_ID, NAME), - FOREIGN KEY (SP_ID) REFERENCES SP_APP(ID) ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS SP_INBOUND_AUTH ( - ID INTEGER NOT NULL AUTO_INCREMENT, - TENANT_ID INTEGER NOT NULL, - INBOUND_AUTH_KEY VARCHAR (255), - INBOUND_AUTH_TYPE VARCHAR (255) NOT NULL, - INBOUND_CONFIG_TYPE VARCHAR (255) NOT NULL, - PROP_NAME VARCHAR (255), - PROP_VALUE VARCHAR (1024) , - APP_ID INTEGER NOT NULL, - PRIMARY KEY (ID) -)ENGINE INNODB; - -ALTER TABLE SP_INBOUND_AUTH ADD CONSTRAINT APPLICATION_ID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; - -CREATE TABLE IF NOT EXISTS SP_AUTH_STEP ( - ID INTEGER NOT NULL AUTO_INCREMENT, - TENANT_ID INTEGER NOT NULL, - STEP_ORDER INTEGER DEFAULT 1, - APP_ID INTEGER NOT NULL , - IS_SUBJECT_STEP CHAR(1) DEFAULT '0', - IS_ATTRIBUTE_STEP CHAR(1) DEFAULT '0', - PRIMARY KEY (ID) -)ENGINE INNODB; - -ALTER TABLE SP_AUTH_STEP ADD CONSTRAINT APPLICATION_ID_CONSTRAINT_STEP FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; - -CREATE TABLE IF NOT EXISTS SP_FEDERATED_IDP ( - ID INTEGER NOT NULL, - TENANT_ID INTEGER NOT NULL, - AUTHENTICATOR_ID INTEGER NOT NULL, - PRIMARY KEY (ID, AUTHENTICATOR_ID) -)ENGINE INNODB; - -ALTER TABLE SP_FEDERATED_IDP ADD CONSTRAINT STEP_ID_CONSTRAINT FOREIGN KEY (ID) REFERENCES SP_AUTH_STEP (ID) ON DELETE CASCADE; - -CREATE TABLE IF NOT EXISTS SP_CLAIM_MAPPING ( - ID INTEGER NOT NULL AUTO_INCREMENT, - TENANT_ID INTEGER NOT NULL, - IDP_CLAIM VARCHAR (512) NOT NULL , - SP_CLAIM VARCHAR (512) NOT NULL , - APP_ID INTEGER NOT NULL, - IS_REQUESTED VARCHAR(128) DEFAULT '0', - IS_MANDATORY VARCHAR(128) DEFAULT '0', - DEFAULT_VALUE VARCHAR(255), - PRIMARY KEY (ID) -)ENGINE INNODB; - -ALTER TABLE SP_CLAIM_MAPPING ADD CONSTRAINT CLAIMID_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; - -CREATE TABLE IF NOT EXISTS SP_ROLE_MAPPING ( - ID INTEGER NOT NULL AUTO_INCREMENT, - TENANT_ID INTEGER NOT NULL, - IDP_ROLE VARCHAR (255) NOT NULL , - SP_ROLE VARCHAR (255) NOT NULL , - APP_ID INTEGER NOT NULL, - PRIMARY KEY (ID) -)ENGINE INNODB; - -ALTER TABLE SP_ROLE_MAPPING ADD CONSTRAINT ROLEID_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; - -CREATE TABLE IF NOT EXISTS SP_REQ_PATH_AUTHENTICATOR ( - ID INTEGER NOT NULL AUTO_INCREMENT, - TENANT_ID INTEGER NOT NULL, - AUTHENTICATOR_NAME VARCHAR (255) NOT NULL , - APP_ID INTEGER NOT NULL, - PRIMARY KEY (ID) -)ENGINE INNODB; - -ALTER TABLE SP_REQ_PATH_AUTHENTICATOR ADD CONSTRAINT REQ_AUTH_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; - -CREATE TABLE IF NOT EXISTS SP_PROVISIONING_CONNECTOR ( - ID INTEGER NOT NULL AUTO_INCREMENT, - TENANT_ID INTEGER NOT NULL, - IDP_NAME VARCHAR (255) NOT NULL , - CONNECTOR_NAME VARCHAR (255) NOT NULL , - APP_ID INTEGER NOT NULL, - IS_JIT_ENABLED CHAR(1) NOT NULL DEFAULT '0', - BLOCKING CHAR(1) NOT NULL DEFAULT '0', - RULE_ENABLED CHAR(1) NOT NULL DEFAULT '0', - PRIMARY KEY (ID) -)ENGINE INNODB; - -ALTER TABLE SP_PROVISIONING_CONNECTOR ADD CONSTRAINT PRO_CONNECTOR_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; - -CREATE TABLE SP_AUTH_SCRIPT ( - ID INTEGER AUTO_INCREMENT NOT NULL, - TENANT_ID INTEGER NOT NULL, - APP_ID INTEGER NOT NULL, - TYPE VARCHAR(255) NOT NULL, - CONTENT BLOB DEFAULT NULL, - IS_ENABLED CHAR(1) NOT NULL DEFAULT '0', - PRIMARY KEY (ID)); - -CREATE TABLE IF NOT EXISTS IDP ( - ID INTEGER AUTO_INCREMENT, - TENANT_ID INTEGER, - NAME VARCHAR(254) NOT NULL, - IS_ENABLED CHAR(1) NOT NULL DEFAULT '1', - IS_PRIMARY CHAR(1) NOT NULL DEFAULT '0', - HOME_REALM_ID VARCHAR(254), - IMAGE MEDIUMBLOB, - CERTIFICATE BLOB, - ALIAS VARCHAR(254), - INBOUND_PROV_ENABLED CHAR (1) NOT NULL DEFAULT '0', - INBOUND_PROV_USER_STORE_ID VARCHAR(254), - USER_CLAIM_URI VARCHAR(254), - ROLE_CLAIM_URI VARCHAR(254), - DESCRIPTION VARCHAR (1024), - DEFAULT_AUTHENTICATOR_NAME VARCHAR(254), - DEFAULT_PRO_CONNECTOR_NAME VARCHAR(254), - PROVISIONING_ROLE VARCHAR(128), - IS_FEDERATION_HUB CHAR(1) NOT NULL DEFAULT '0', - IS_LOCAL_CLAIM_DIALECT CHAR(1) NOT NULL DEFAULT '0', - DISPLAY_NAME VARCHAR(255), - PRIMARY KEY (ID), - UNIQUE (TENANT_ID, NAME) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDP_ROLE ( - ID INTEGER AUTO_INCREMENT, - IDP_ID INTEGER, - TENANT_ID INTEGER, - ROLE VARCHAR(254), - PRIMARY KEY (ID), - UNIQUE (IDP_ID, ROLE), - FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDP_ROLE_MAPPING ( - ID INTEGER AUTO_INCREMENT, - IDP_ROLE_ID INTEGER, - TENANT_ID INTEGER, - USER_STORE_ID VARCHAR (253), - LOCAL_ROLE VARCHAR(253), - PRIMARY KEY (ID), - UNIQUE (IDP_ROLE_ID, TENANT_ID, USER_STORE_ID, LOCAL_ROLE), - FOREIGN KEY (IDP_ROLE_ID) REFERENCES IDP_ROLE(ID) ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDP_CLAIM ( - ID INTEGER AUTO_INCREMENT, - IDP_ID INTEGER, - TENANT_ID INTEGER, - CLAIM VARCHAR(254), - PRIMARY KEY (ID), - UNIQUE (IDP_ID, CLAIM), - FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDP_CLAIM_MAPPING ( - ID INTEGER AUTO_INCREMENT, - IDP_CLAIM_ID INTEGER, - TENANT_ID INTEGER, - LOCAL_CLAIM VARCHAR(253), - DEFAULT_VALUE VARCHAR(255), - IS_REQUESTED VARCHAR(128) DEFAULT '0', - PRIMARY KEY (ID), - UNIQUE (IDP_CLAIM_ID, TENANT_ID, LOCAL_CLAIM), - FOREIGN KEY (IDP_CLAIM_ID) REFERENCES IDP_CLAIM(ID) ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDP_AUTHENTICATOR ( - ID INTEGER AUTO_INCREMENT, - TENANT_ID INTEGER, - IDP_ID INTEGER, - NAME VARCHAR(255) NOT NULL, - IS_ENABLED CHAR (1) DEFAULT '1', - DISPLAY_NAME VARCHAR(255), - PRIMARY KEY (ID), - UNIQUE (TENANT_ID, IDP_ID, NAME), - FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDP_METADATA ( - ID INTEGER AUTO_INCREMENT, - IDP_ID INTEGER, - NAME VARCHAR(255) NOT NULL, - VALUE VARCHAR(255) NOT NULL, - DISPLAY_NAME VARCHAR(255), - TENANT_ID INTEGER DEFAULT -1, - PRIMARY KEY (ID), - CONSTRAINT IDP_METADATA_CONSTRAINT UNIQUE (IDP_ID, NAME), - FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDP_AUTHENTICATOR_PROPERTY ( - ID INTEGER AUTO_INCREMENT, - TENANT_ID INTEGER, - AUTHENTICATOR_ID INTEGER, - PROPERTY_KEY VARCHAR(255) NOT NULL, - PROPERTY_VALUE VARCHAR(2047), - IS_SECRET CHAR (1) DEFAULT '0', - PRIMARY KEY (ID), - UNIQUE (TENANT_ID, AUTHENTICATOR_ID, PROPERTY_KEY), - FOREIGN KEY (AUTHENTICATOR_ID) REFERENCES IDP_AUTHENTICATOR(ID) ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDP_PROVISIONING_CONFIG ( - ID INTEGER AUTO_INCREMENT, - TENANT_ID INTEGER, - IDP_ID INTEGER, - PROVISIONING_CONNECTOR_TYPE VARCHAR(255) NOT NULL, - IS_ENABLED CHAR (1) DEFAULT '0', - IS_BLOCKING CHAR (1) DEFAULT '0', - IS_RULES_ENABLED CHAR (1) DEFAULT '0', - PRIMARY KEY (ID), - UNIQUE (TENANT_ID, IDP_ID, PROVISIONING_CONNECTOR_TYPE), - FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDP_PROV_CONFIG_PROPERTY ( - ID INTEGER AUTO_INCREMENT, - TENANT_ID INTEGER, - PROVISIONING_CONFIG_ID INTEGER, - PROPERTY_KEY VARCHAR(255) NOT NULL, - PROPERTY_VALUE VARCHAR(2048), - PROPERTY_BLOB_VALUE BLOB, - PROPERTY_TYPE CHAR(32) NOT NULL, - IS_SECRET CHAR (1) DEFAULT '0', - PRIMARY KEY (ID), - UNIQUE (TENANT_ID, PROVISIONING_CONFIG_ID, PROPERTY_KEY), - FOREIGN KEY (PROVISIONING_CONFIG_ID) REFERENCES IDP_PROVISIONING_CONFIG(ID) ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDP_PROVISIONING_ENTITY ( - ID INTEGER AUTO_INCREMENT, - PROVISIONING_CONFIG_ID INTEGER, - ENTITY_TYPE VARCHAR(255) NOT NULL, - ENTITY_LOCAL_USERSTORE VARCHAR(255) NOT NULL, - ENTITY_NAME VARCHAR(255) NOT NULL, - ENTITY_VALUE VARCHAR(255), - TENANT_ID INTEGER, - ENTITY_LOCAL_ID VARCHAR(255), - PRIMARY KEY (ID), - UNIQUE (ENTITY_TYPE, TENANT_ID, ENTITY_LOCAL_USERSTORE, ENTITY_NAME, PROVISIONING_CONFIG_ID), - UNIQUE (PROVISIONING_CONFIG_ID, ENTITY_TYPE, ENTITY_VALUE), - FOREIGN KEY (PROVISIONING_CONFIG_ID) REFERENCES IDP_PROVISIONING_CONFIG(ID) ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDP_LOCAL_CLAIM ( - ID INTEGER AUTO_INCREMENT, - TENANT_ID INTEGER, - IDP_ID INTEGER, - CLAIM_URI VARCHAR(255) NOT NULL, - DEFAULT_VALUE VARCHAR(255), - IS_REQUESTED VARCHAR(128) DEFAULT '0', - PRIMARY KEY (ID), - UNIQUE (TENANT_ID, IDP_ID, CLAIM_URI), - FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_ASSOCIATED_ID ( - ID INTEGER AUTO_INCREMENT, - IDP_USER_ID VARCHAR(255) NOT NULL, - TENANT_ID INTEGER DEFAULT -1234, - IDP_ID INTEGER NOT NULL, - DOMAIN_NAME VARCHAR(255) NOT NULL, - USER_NAME VARCHAR(255) NOT NULL, - PRIMARY KEY (ID), - UNIQUE(IDP_USER_ID, TENANT_ID, IDP_ID), - FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_USER_ACCOUNT_ASSOCIATION ( - ASSOCIATION_KEY VARCHAR(255) NOT NULL, - TENANT_ID INTEGER, - DOMAIN_NAME VARCHAR(255) NOT NULL, - USER_NAME VARCHAR(255) NOT NULL, - PRIMARY KEY (TENANT_ID, DOMAIN_NAME, USER_NAME) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS FIDO_DEVICE_STORE ( - TENANT_ID INTEGER, - DOMAIN_NAME VARCHAR(255) NOT NULL, - USER_NAME VARCHAR(45) NOT NULL, - TIME_REGISTERED TIMESTAMP, - KEY_HANDLE VARCHAR(200) NOT NULL, - DEVICE_DATA VARCHAR(2048) NOT NULL, - PRIMARY KEY (TENANT_ID, DOMAIN_NAME, USER_NAME, KEY_HANDLE) - )ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS WF_REQUEST ( - UUID VARCHAR (45), - CREATED_BY VARCHAR (255), - TENANT_ID INTEGER DEFAULT -1, - OPERATION_TYPE VARCHAR (50), - CREATED_AT TIMESTAMP, - UPDATED_AT TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - STATUS VARCHAR (30), - REQUEST BLOB, - PRIMARY KEY (UUID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS WF_BPS_PROFILE ( - PROFILE_NAME VARCHAR(45), - HOST_URL_MANAGER VARCHAR(255), - HOST_URL_WORKER VARCHAR(255), - USERNAME VARCHAR(45), - PASSWORD VARCHAR(1023), - CALLBACK_HOST VARCHAR (45), - CALLBACK_USERNAME VARCHAR (45), - CALLBACK_PASSWORD VARCHAR (255), - TENANT_ID INTEGER DEFAULT -1, - PRIMARY KEY (PROFILE_NAME, TENANT_ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS WF_WORKFLOW( - ID VARCHAR (45), - WF_NAME VARCHAR (45), - DESCRIPTION VARCHAR (255), - TEMPLATE_ID VARCHAR (45), - IMPL_ID VARCHAR (45), - TENANT_ID INTEGER DEFAULT -1, - PRIMARY KEY (ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS WF_WORKFLOW_ASSOCIATION( - ID INTEGER NOT NULL AUTO_INCREMENT, - ASSOC_NAME VARCHAR (45), - EVENT_ID VARCHAR(45), - ASSOC_CONDITION VARCHAR (2000), - WORKFLOW_ID VARCHAR (45), - IS_ENABLED CHAR (1) DEFAULT '1', - TENANT_ID INTEGER DEFAULT -1, - PRIMARY KEY(ID), - FOREIGN KEY (WORKFLOW_ID) REFERENCES WF_WORKFLOW(ID)ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS WF_WORKFLOW_CONFIG_PARAM( - WORKFLOW_ID VARCHAR (45), - PARAM_NAME VARCHAR (45), - PARAM_VALUE VARCHAR (1000), - PARAM_QNAME VARCHAR (45), - PARAM_HOLDER VARCHAR (45), - TENANT_ID INTEGER DEFAULT -1, - PRIMARY KEY (WORKFLOW_ID, PARAM_NAME, PARAM_QNAME, PARAM_HOLDER), - FOREIGN KEY (WORKFLOW_ID) REFERENCES WF_WORKFLOW(ID)ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS WF_REQUEST_ENTITY_RELATIONSHIP( - REQUEST_ID VARCHAR (45), - ENTITY_NAME VARCHAR (255), - ENTITY_TYPE VARCHAR (50), - TENANT_ID INTEGER DEFAULT -1, - PRIMARY KEY(REQUEST_ID, ENTITY_NAME, ENTITY_TYPE, TENANT_ID), - FOREIGN KEY (REQUEST_ID) REFERENCES WF_REQUEST(UUID)ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS WF_WORKFLOW_REQUEST_RELATION( - RELATIONSHIP_ID VARCHAR (45), - WORKFLOW_ID VARCHAR (45), - REQUEST_ID VARCHAR (45), - UPDATED_AT TIMESTAMP, - STATUS VARCHAR (30), - TENANT_ID INTEGER DEFAULT -1, - PRIMARY KEY (RELATIONSHIP_ID), - FOREIGN KEY (WORKFLOW_ID) REFERENCES WF_WORKFLOW(ID)ON DELETE CASCADE, - FOREIGN KEY (REQUEST_ID) REFERENCES WF_REQUEST(UUID)ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_RECOVERY_DATA ( - USER_NAME VARCHAR(255) NOT NULL, - USER_DOMAIN VARCHAR(127) NOT NULL, - TENANT_ID INTEGER DEFAULT -1, - CODE VARCHAR(255) NOT NULL, - SCENARIO VARCHAR(255) NOT NULL, - STEP VARCHAR(127) NOT NULL, - TIME_CREATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - REMAINING_SETS VARCHAR(2500) DEFAULT NULL, - PRIMARY KEY(USER_NAME, USER_DOMAIN, TENANT_ID, SCENARIO,STEP), - UNIQUE(CODE) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_PASSWORD_HISTORY_DATA ( - ID INTEGER NOT NULL AUTO_INCREMENT, - USER_NAME VARCHAR(255) NOT NULL, - USER_DOMAIN VARCHAR(127) NOT NULL, - TENANT_ID INTEGER DEFAULT -1, - SALT_VALUE VARCHAR(255), - HASH VARCHAR(255) NOT NULL, - TIME_CREATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY(ID), - UNIQUE (USER_NAME,USER_DOMAIN,TENANT_ID,SALT_VALUE,HASH) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_CLAIM_DIALECT ( - ID INTEGER NOT NULL AUTO_INCREMENT, - DIALECT_URI VARCHAR (255) NOT NULL, - TENANT_ID INTEGER NOT NULL, - PRIMARY KEY (ID), - CONSTRAINT DIALECT_URI_CONSTRAINT UNIQUE (DIALECT_URI, TENANT_ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_CLAIM ( - ID INTEGER NOT NULL AUTO_INCREMENT, - DIALECT_ID INTEGER, - CLAIM_URI VARCHAR (255) NOT NULL, - TENANT_ID INTEGER NOT NULL, - PRIMARY KEY (ID), - FOREIGN KEY (DIALECT_ID) REFERENCES IDN_CLAIM_DIALECT(ID) ON DELETE CASCADE, - CONSTRAINT CLAIM_URI_CONSTRAINT UNIQUE (DIALECT_ID, CLAIM_URI, TENANT_ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_CLAIM_MAPPED_ATTRIBUTE ( - ID INTEGER NOT NULL AUTO_INCREMENT, - LOCAL_CLAIM_ID INTEGER, - USER_STORE_DOMAIN_NAME VARCHAR (255) NOT NULL, - ATTRIBUTE_NAME VARCHAR (255) NOT NULL, - TENANT_ID INTEGER NOT NULL, - PRIMARY KEY (ID), - FOREIGN KEY (LOCAL_CLAIM_ID) REFERENCES IDN_CLAIM(ID) ON DELETE CASCADE, - CONSTRAINT USER_STORE_DOMAIN_CONSTRAINT UNIQUE (LOCAL_CLAIM_ID, USER_STORE_DOMAIN_NAME, TENANT_ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_CLAIM_PROPERTY ( - ID INTEGER NOT NULL AUTO_INCREMENT, - LOCAL_CLAIM_ID INTEGER, - PROPERTY_NAME VARCHAR (255) NOT NULL, - PROPERTY_VALUE VARCHAR (255) NOT NULL, - TENANT_ID INTEGER NOT NULL, - PRIMARY KEY (ID), - FOREIGN KEY (LOCAL_CLAIM_ID) REFERENCES IDN_CLAIM(ID) ON DELETE CASCADE, - CONSTRAINT PROPERTY_NAME_CONSTRAINT UNIQUE (LOCAL_CLAIM_ID, PROPERTY_NAME, TENANT_ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_CLAIM_MAPPING ( - ID INTEGER NOT NULL AUTO_INCREMENT, - EXT_CLAIM_ID INTEGER NOT NULL, - MAPPED_LOCAL_CLAIM_ID INTEGER NOT NULL, - TENANT_ID INTEGER NOT NULL, - PRIMARY KEY (ID), - FOREIGN KEY (EXT_CLAIM_ID) REFERENCES IDN_CLAIM(ID) ON DELETE CASCADE, - FOREIGN KEY (MAPPED_LOCAL_CLAIM_ID) REFERENCES IDN_CLAIM(ID) ON DELETE CASCADE, - CONSTRAINT EXT_TO_LOC_MAPPING_CONSTRN UNIQUE (EXT_CLAIM_ID, TENANT_ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_SAML2_ASSERTION_STORE ( - ID INTEGER NOT NULL AUTO_INCREMENT, - SAML2_ID VARCHAR(255) , - SAML2_ISSUER VARCHAR(255) , - SAML2_SUBJECT VARCHAR(255) , - SAML2_SESSION_INDEX VARCHAR(255) , - SAML2_AUTHN_CONTEXT_CLASS_REF VARCHAR(255) , - SAML2_ASSERTION VARCHAR(4096) , - PRIMARY KEY (ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_OIDC_JTI ( - JWT_ID VARCHAR(255) NOT NULL, - EXP_TIME TIMESTAMP NOT NULL , - TIME_CREATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , - PRIMARY KEY (JWT_ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_OIDC_PROPERTY ( - ID INTEGER NOT NULL AUTO_INCREMENT, - TENANT_ID INTEGER, - CONSUMER_KEY VARCHAR(255) , - PROPERTY_KEY VARCHAR(255) NOT NULL, - PROPERTY_VALUE VARCHAR(2047) , - PRIMARY KEY (ID), - FOREIGN KEY (CONSUMER_KEY) REFERENCES IDN_OAUTH_CONSUMER_APPS(CONSUMER_KEY) ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_OIDC_REQ_OBJECT_REFERENCE ( - ID INTEGER NOT NULL AUTO_INCREMENT, - CONSUMER_KEY_ID INTEGER , - CODE_ID VARCHAR(255) , - TOKEN_ID VARCHAR(255) , - SESSION_DATA_KEY VARCHAR(255), - PRIMARY KEY (ID), - FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE, - FOREIGN KEY (TOKEN_ID) REFERENCES IDN_OAUTH2_ACCESS_TOKEN(TOKEN_ID) ON DELETE CASCADE, - FOREIGN KEY (CODE_ID) REFERENCES IDN_OAUTH2_AUTHORIZATION_CODE(CODE_ID) ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_OIDC_REQ_OBJECT_CLAIMS ( - ID INTEGER NOT NULL AUTO_INCREMENT, - REQ_OBJECT_ID INTEGER, - CLAIM_ATTRIBUTE VARCHAR(255) , - ESSENTIAL CHAR(1) NOT NULL DEFAULT '0' , - VALUE VARCHAR(255) , - IS_USERINFO CHAR(1) NOT NULL DEFAULT '0', - PRIMARY KEY (ID), - FOREIGN KEY (REQ_OBJECT_ID) REFERENCES IDN_OIDC_REQ_OBJECT_REFERENCE (ID) ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_OIDC_REQ_OBJ_CLAIM_VALUES ( - ID INTEGER NOT NULL AUTO_INCREMENT, - REQ_OBJECT_CLAIMS_ID INTEGER , - CLAIM_VALUES VARCHAR(255) , - PRIMARY KEY (ID), - FOREIGN KEY (REQ_OBJECT_CLAIMS_ID) REFERENCES IDN_OIDC_REQ_OBJECT_CLAIMS(ID) ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS IDN_CERTIFICATE ( - ID INTEGER NOT NULL AUTO_INCREMENT, - NAME VARCHAR(100), - CERTIFICATE_IN_PEM BLOB, - TENANT_ID INTEGER DEFAULT 0, - PRIMARY KEY(ID), - CONSTRAINT CERTIFICATE_UNIQUE_KEY UNIQUE (NAME, TENANT_ID) -)ENGINE INNODB; - - --- End of IDENTITY Tables-- - --- Start of CONSENT-MGT Tables -- - -CREATE TABLE CM_PII_CATEGORY ( - ID INTEGER AUTO_INCREMENT, - NAME VARCHAR(255) NOT NULL, - DESCRIPTION VARCHAR(1023), - DISPLAY_NAME VARCHAR(255), - IS_SENSITIVE INTEGER NOT NULL, - TENANT_ID INTEGER DEFAULT '-1234', - UNIQUE KEY (NAME, TENANT_ID), - PRIMARY KEY (ID) -)ENGINE INNODB; - -CREATE TABLE CM_RECEIPT ( - CONSENT_RECEIPT_ID VARCHAR(255) NOT NULL, - VERSION VARCHAR(255) NOT NULL, - JURISDICTION VARCHAR(255) NOT NULL, - CONSENT_TIMESTAMP TIMESTAMP NOT NULL, - COLLECTION_METHOD VARCHAR(255) NOT NULL, - LANGUAGE VARCHAR(255) NOT NULL, - PII_PRINCIPAL_ID VARCHAR(255) NOT NULL, - PRINCIPAL_TENANT_ID INTEGER DEFAULT '-1234', - POLICY_URL VARCHAR(255) NOT NULL, - STATE VARCHAR(255) NOT NULL, - PII_CONTROLLER VARCHAR(2048) NOT NULL, - PRIMARY KEY (CONSENT_RECEIPT_ID) -)ENGINE INNODB; - -CREATE TABLE CM_PURPOSE ( - ID INTEGER AUTO_INCREMENT, - NAME VARCHAR(255) NOT NULL, - DESCRIPTION VARCHAR(1023), - TENANT_ID INTEGER DEFAULT '-1234', - UNIQUE KEY (NAME, TENANT_ID), - PRIMARY KEY (ID) -)ENGINE INNODB; - -CREATE TABLE CM_PURPOSE_CATEGORY ( - ID INTEGER AUTO_INCREMENT, - NAME VARCHAR(255) NOT NULL, - DESCRIPTION VARCHAR(1023), - TENANT_ID INTEGER DEFAULT '-1234', - UNIQUE KEY (NAME, TENANT_ID), - PRIMARY KEY (ID) -)ENGINE INNODB; - -CREATE TABLE CM_RECEIPT_SP_ASSOC ( - ID INTEGER AUTO_INCREMENT, - CONSENT_RECEIPT_ID VARCHAR(255) NOT NULL, - SP_NAME VARCHAR(255) NOT NULL, - SP_DISPLAY_NAME VARCHAR(255), - SP_DESCRIPTION VARCHAR(255), - SP_TENANT_ID INTEGER DEFAULT '-1234', - UNIQUE KEY (CONSENT_RECEIPT_ID, SP_NAME, SP_TENANT_ID), - PRIMARY KEY (ID) -)ENGINE INNODB; - -CREATE TABLE CM_SP_PURPOSE_ASSOC ( - ID INTEGER AUTO_INCREMENT, - RECEIPT_SP_ASSOC INTEGER NOT NULL, - PURPOSE_ID INTEGER NOT NULL, - CONSENT_TYPE VARCHAR(255) NOT NULL, - IS_PRIMARY_PURPOSE INTEGER NOT NULL, - TERMINATION VARCHAR(255) NOT NULL, - THIRD_PARTY_DISCLOSURE INTEGER NOT NULL, - THIRD_PARTY_NAME VARCHAR(255), - UNIQUE KEY (RECEIPT_SP_ASSOC, PURPOSE_ID), - PRIMARY KEY (ID) -)ENGINE INNODB; - -CREATE TABLE CM_SP_PURPOSE_PURPOSE_CAT_ASSC ( - SP_PURPOSE_ASSOC_ID INTEGER NOT NULL, - PURPOSE_CATEGORY_ID INTEGER NOT NULL, - UNIQUE KEY (SP_PURPOSE_ASSOC_ID, PURPOSE_CATEGORY_ID) -)ENGINE INNODB; - -CREATE TABLE CM_PURPOSE_PII_CAT_ASSOC ( - PURPOSE_ID INTEGER NOT NULL, - CM_PII_CATEGORY_ID INTEGER NOT NULL, - UNIQUE KEY (PURPOSE_ID, CM_PII_CATEGORY_ID) -)ENGINE INNODB; - -CREATE TABLE CM_SP_PURPOSE_PII_CAT_ASSOC ( - SP_PURPOSE_ASSOC_ID INTEGER NOT NULL, - PII_CATEGORY_ID INTEGER NOT NULL, - VALIDITY VARCHAR(1023), - UNIQUE KEY (SP_PURPOSE_ASSOC_ID, PII_CATEGORY_ID) -)ENGINE INNODB; - -CREATE TABLE CM_CONSENT_RECEIPT_PROPERTY ( - CONSENT_RECEIPT_ID VARCHAR(255) NOT NULL, - NAME VARCHAR(255) NOT NULL, - VALUE VARCHAR(1023) NOT NULL, - UNIQUE KEY (CONSENT_RECEIPT_ID, NAME) -)ENGINE INNODB; - -ALTER TABLE CM_RECEIPT_SP_ASSOC - ADD CONSTRAINT CM_RECEIPT_SP_ASSOC_fk0 FOREIGN KEY (CONSENT_RECEIPT_ID) REFERENCES CM_RECEIPT (CONSENT_RECEIPT_ID); - -ALTER TABLE CM_SP_PURPOSE_ASSOC - ADD CONSTRAINT CM_SP_PURPOSE_ASSOC_fk0 FOREIGN KEY (RECEIPT_SP_ASSOC) REFERENCES CM_RECEIPT_SP_ASSOC (ID); - -ALTER TABLE CM_SP_PURPOSE_ASSOC - ADD CONSTRAINT CM_SP_PURPOSE_ASSOC_fk1 FOREIGN KEY (PURPOSE_ID) REFERENCES CM_PURPOSE (ID); - -ALTER TABLE CM_SP_PURPOSE_PURPOSE_CAT_ASSC - ADD CONSTRAINT CM_SP_P_P_CAT_ASSOC_fk0 FOREIGN KEY (SP_PURPOSE_ASSOC_ID) REFERENCES CM_SP_PURPOSE_ASSOC (ID); - -ALTER TABLE CM_SP_PURPOSE_PURPOSE_CAT_ASSC - ADD CONSTRAINT CM_SP_P_P_CAT_ASSOC_fk1 FOREIGN KEY (PURPOSE_CATEGORY_ID) REFERENCES CM_PURPOSE_CATEGORY (ID); - -ALTER TABLE CM_SP_PURPOSE_PII_CAT_ASSOC - ADD CONSTRAINT CM_SP_P_PII_CAT_ASSOC_fk0 FOREIGN KEY (SP_PURPOSE_ASSOC_ID) REFERENCES CM_SP_PURPOSE_ASSOC (ID); - -ALTER TABLE CM_SP_PURPOSE_PII_CAT_ASSOC - ADD CONSTRAINT CM_SP_P_PII_CAT_ASSOC_fk1 FOREIGN KEY (PII_CATEGORY_ID) REFERENCES CM_PII_CATEGORY (ID); - -ALTER TABLE CM_CONSENT_RECEIPT_PROPERTY - ADD CONSTRAINT CM_CONSENT_RECEIPT_PRT_fk0 FOREIGN KEY (CONSENT_RECEIPT_ID) REFERENCES CM_RECEIPT (CONSENT_RECEIPT_ID); - -INSERT INTO CM_PURPOSE (NAME, DESCRIPTION, TENANT_ID) values ('DEFAULT', 'For core functionalities of the product', '-1234'); - -INSERT INTO CM_PURPOSE_CATEGORY (NAME, DESCRIPTION, TENANT_ID) VALUES ('DEFAULT','For core functionalities of the product', '-1234'); - --- End of CONSENT-MGT Tables -- - --- Start of API-MGT Tables -- -CREATE TABLE IF NOT EXISTS AM_SUBSCRIBER ( - SUBSCRIBER_ID INTEGER AUTO_INCREMENT, - USER_ID VARCHAR(255) NOT NULL, - TENANT_ID INTEGER NOT NULL, - EMAIL_ADDRESS VARCHAR(256) NULL, - DATE_SUBSCRIBED TIMESTAMP NOT NULL, - PRIMARY KEY (SUBSCRIBER_ID), - CREATED_BY VARCHAR(100), - CREATED_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - UPDATED_BY VARCHAR(100), - UPDATED_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - UNIQUE (TENANT_ID,USER_ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS AM_APPLICATION ( - APPLICATION_ID INTEGER AUTO_INCREMENT, - NAME VARCHAR(100), - SUBSCRIBER_ID INTEGER, - APPLICATION_TIER VARCHAR(50) DEFAULT 'Unlimited', - CALLBACK_URL VARCHAR(512), - DESCRIPTION VARCHAR(512), - APPLICATION_STATUS VARCHAR(50) DEFAULT 'APPROVED', - GROUP_ID VARCHAR(100), - CREATED_BY VARCHAR(100), - CREATED_TIME TIMESTAMP, - UPDATED_BY VARCHAR(100), - UPDATED_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - UUID VARCHAR(256), - FOREIGN KEY(SUBSCRIBER_ID) REFERENCES AM_SUBSCRIBER(SUBSCRIBER_ID) ON UPDATE CASCADE ON DELETE RESTRICT, - PRIMARY KEY(APPLICATION_ID), - UNIQUE (NAME,SUBSCRIBER_ID), - UNIQUE (UUID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS AM_API ( - API_ID INTEGER AUTO_INCREMENT, - API_PROVIDER VARCHAR(200), - API_NAME VARCHAR(200), - API_VERSION VARCHAR(30), - CONTEXT VARCHAR(256), - CONTEXT_TEMPLATE VARCHAR(256), - API_TIER VARCHAR(256), - CREATED_BY VARCHAR(100), - CREATED_TIME TIMESTAMP, - UPDATED_BY VARCHAR(100), - UPDATED_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY(API_ID), - UNIQUE (API_PROVIDER,API_NAME,API_VERSION) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS AM_API_URL_MAPPING ( - URL_MAPPING_ID INTEGER AUTO_INCREMENT, - API_ID INTEGER NOT NULL, - HTTP_METHOD VARCHAR(20) NULL, - AUTH_SCHEME VARCHAR(50) NULL, - URL_PATTERN VARCHAR(512) NULL, - THROTTLING_TIER varchar(512) DEFAULT NULL, - MEDIATION_SCRIPT BLOB, - PRIMARY KEY (URL_MAPPING_ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS AM_SUBSCRIPTION ( - SUBSCRIPTION_ID INTEGER AUTO_INCREMENT, - TIER_ID VARCHAR(50), - API_ID INTEGER, - LAST_ACCESSED TIMESTAMP NULL, - APPLICATION_ID INTEGER, - SUB_STATUS VARCHAR(50), - SUBS_CREATE_STATE VARCHAR(50) DEFAULT 'SUBSCRIBE', - CREATED_BY VARCHAR(100), - CREATED_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - UPDATED_BY VARCHAR(100), - UPDATED_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - UUID VARCHAR(256), - FOREIGN KEY(APPLICATION_ID) REFERENCES AM_APPLICATION(APPLICATION_ID) ON UPDATE CASCADE ON DELETE RESTRICT, - FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON UPDATE CASCADE ON DELETE RESTRICT, - PRIMARY KEY (SUBSCRIPTION_ID), - UNIQUE (UUID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS AM_SUBSCRIPTION_KEY_MAPPING ( - SUBSCRIPTION_ID INTEGER, - ACCESS_TOKEN VARCHAR(512), - KEY_TYPE VARCHAR(512) NOT NULL, - FOREIGN KEY(SUBSCRIPTION_ID) REFERENCES AM_SUBSCRIPTION(SUBSCRIPTION_ID) ON UPDATE CASCADE ON DELETE RESTRICT, - PRIMARY KEY(SUBSCRIPTION_ID,ACCESS_TOKEN) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS AM_APPLICATION_KEY_MAPPING ( - APPLICATION_ID INTEGER, - CONSUMER_KEY VARCHAR(255), - KEY_TYPE VARCHAR(512) NOT NULL, - STATE VARCHAR(30) NOT NULL, - CREATE_MODE VARCHAR(30) DEFAULT 'CREATED', - FOREIGN KEY(APPLICATION_ID) REFERENCES AM_APPLICATION(APPLICATION_ID) ON UPDATE CASCADE ON DELETE RESTRICT, - PRIMARY KEY(APPLICATION_ID,KEY_TYPE) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS AM_API_LC_EVENT ( - EVENT_ID INTEGER AUTO_INCREMENT, - API_ID INTEGER NOT NULL, - PREVIOUS_STATE VARCHAR(50), - NEW_STATE VARCHAR(50) NOT NULL, - USER_ID VARCHAR(255) NOT NULL, - TENANT_ID INTEGER NOT NULL, - EVENT_DATE TIMESTAMP NOT NULL, - FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON UPDATE CASCADE ON DELETE RESTRICT, - PRIMARY KEY (EVENT_ID) -)ENGINE INNODB; - -CREATE TABLE AM_APP_KEY_DOMAIN_MAPPING ( - CONSUMER_KEY VARCHAR(255), - AUTHZ_DOMAIN VARCHAR(255) DEFAULT 'ALL', - PRIMARY KEY (CONSUMER_KEY,AUTHZ_DOMAIN) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS AM_API_COMMENTS ( - COMMENT_ID INTEGER AUTO_INCREMENT, - COMMENT_TEXT VARCHAR(512), - COMMENTED_USER VARCHAR(255), - DATE_COMMENTED TIMESTAMP NOT NULL, - API_ID INTEGER NOT NULL, - FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON UPDATE CASCADE ON DELETE RESTRICT, - PRIMARY KEY (COMMENT_ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS AM_API_RATINGS ( - RATING_ID INTEGER AUTO_INCREMENT, - API_ID INTEGER, - RATING INTEGER, - SUBSCRIBER_ID INTEGER, - FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON UPDATE CASCADE ON DELETE RESTRICT, - FOREIGN KEY(SUBSCRIBER_ID) REFERENCES AM_SUBSCRIBER(SUBSCRIBER_ID) ON UPDATE CASCADE ON DELETE RESTRICT, -PRIMARY KEY (RATING_ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS AM_TIER_PERMISSIONS ( - TIER_PERMISSIONS_ID INTEGER AUTO_INCREMENT, - TIER VARCHAR(50) NOT NULL, - PERMISSIONS_TYPE VARCHAR(50) NOT NULL, - ROLES VARCHAR(512) NOT NULL, - TENANT_ID INTEGER NOT NULL, - PRIMARY KEY(TIER_PERMISSIONS_ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS AM_EXTERNAL_STORES ( - APISTORE_ID INTEGER AUTO_INCREMENT, - API_ID INTEGER, - STORE_ID VARCHAR(255) NOT NULL, - STORE_DISPLAY_NAME VARCHAR(255) NOT NULL, - STORE_ENDPOINT VARCHAR(255) NOT NULL, - STORE_TYPE VARCHAR(255) NOT NULL, -FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON UPDATE CASCADE ON DELETE RESTRICT, -PRIMARY KEY (APISTORE_ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS AM_WORKFLOWS( - WF_ID INTEGER AUTO_INCREMENT, - WF_REFERENCE VARCHAR(255) NOT NULL, - WF_TYPE VARCHAR(255) NOT NULL, - WF_STATUS VARCHAR(255) NOT NULL, - WF_CREATED_TIME TIMESTAMP, - WF_UPDATED_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP , - WF_STATUS_DESC VARCHAR(1000), - TENANT_ID INTEGER, - TENANT_DOMAIN VARCHAR(255), - WF_EXTERNAL_REFERENCE VARCHAR(255) NOT NULL, - PRIMARY KEY (WF_ID), - UNIQUE (WF_EXTERNAL_REFERENCE) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS AM_APPLICATION_REGISTRATION ( - REG_ID INT AUTO_INCREMENT, - SUBSCRIBER_ID INT, - WF_REF VARCHAR(255) NOT NULL, - APP_ID INT, - TOKEN_TYPE VARCHAR(30), - TOKEN_SCOPE VARCHAR(1500) DEFAULT 'default', - INPUTS VARCHAR(1000), - ALLOWED_DOMAINS VARCHAR(256), - VALIDITY_PERIOD BIGINT, - UNIQUE (SUBSCRIBER_ID,APP_ID,TOKEN_TYPE), - FOREIGN KEY(SUBSCRIBER_ID) REFERENCES AM_SUBSCRIBER(SUBSCRIBER_ID) ON UPDATE CASCADE ON DELETE RESTRICT, - FOREIGN KEY(APP_ID) REFERENCES AM_APPLICATION(APPLICATION_ID) ON UPDATE CASCADE ON DELETE RESTRICT, - PRIMARY KEY (REG_ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS AM_API_SCOPES ( - API_ID INTEGER NOT NULL, - SCOPE_ID INTEGER NOT NULL, - FOREIGN KEY (API_ID) REFERENCES AM_API (API_ID) ON DELETE CASCADE ON UPDATE CASCADE, - FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE (SCOPE_ID) ON DELETE CASCADE ON UPDATE CASCADE -)ENGINE = INNODB; - -CREATE TABLE IF NOT EXISTS AM_API_DEFAULT_VERSION ( - DEFAULT_VERSION_ID INT AUTO_INCREMENT, - API_NAME VARCHAR(256) NOT NULL , - API_PROVIDER VARCHAR(256) NOT NULL , - DEFAULT_API_VERSION VARCHAR(30) , - PUBLISHED_DEFAULT_API_VERSION VARCHAR(30) , - PRIMARY KEY (DEFAULT_VERSION_ID) -)ENGINE = INNODB; - -CREATE INDEX IDX_SUB_APP_ID ON AM_SUBSCRIPTION (APPLICATION_ID, SUBSCRIPTION_ID); - - -CREATE TABLE IF NOT EXISTS AM_ALERT_TYPES ( - ALERT_TYPE_ID INTEGER AUTO_INCREMENT, - ALERT_TYPE_NAME VARCHAR(255) NOT NULL , - STAKE_HOLDER VARCHAR(100) NOT NULL, - PRIMARY KEY (ALERT_TYPE_ID) -)ENGINE = INNODB; - -CREATE TABLE IF NOT EXISTS AM_ALERT_TYPES_VALUES ( - ALERT_TYPE_ID INTEGER, - USER_NAME VARCHAR(255) NOT NULL , - STAKE_HOLDER VARCHAR(100) NOT NULL , - PRIMARY KEY (ALERT_TYPE_ID,USER_NAME,STAKE_HOLDER) -)ENGINE = INNODB; - -CREATE TABLE IF NOT EXISTS AM_ALERT_EMAILLIST ( - EMAIL_LIST_ID INTEGER AUTO_INCREMENT, - USER_NAME VARCHAR(255) NOT NULL , - STAKE_HOLDER VARCHAR(100) NOT NULL , - PRIMARY KEY (EMAIL_LIST_ID,USER_NAME,STAKE_HOLDER) -)ENGINE = INNODB; - -CREATE TABLE IF NOT EXISTS AM_ALERT_EMAILLIST_DETAILS ( - EMAIL_LIST_ID INTEGER, - EMAIL VARCHAR(255), - PRIMARY KEY (EMAIL_LIST_ID,EMAIL) -)ENGINE = INNODB; - -INSERT INTO AM_ALERT_TYPES (ALERT_TYPE_NAME, STAKE_HOLDER) VALUES ('abnormalResponseTime', 'publisher'); -INSERT INTO AM_ALERT_TYPES (ALERT_TYPE_NAME, STAKE_HOLDER) VALUES ('abnormalBackendTime', 'publisher'); -INSERT INTO AM_ALERT_TYPES (ALERT_TYPE_NAME, STAKE_HOLDER) VALUES ('abnormalRequestsPerMin', 'subscriber'); -INSERT INTO AM_ALERT_TYPES (ALERT_TYPE_NAME, STAKE_HOLDER) VALUES ('RequestPatternChanged', 'subscriber'); -INSERT INTO AM_ALERT_TYPES (ALERT_TYPE_NAME, STAKE_HOLDER) VALUES ('UnusualIPAccessAlert', 'subscriber'); -INSERT INTO AM_ALERT_TYPES (ALERT_TYPE_NAME, STAKE_HOLDER) VALUES ('AbnormalRefreshAlert', 'subscriber'); -INSERT INTO AM_ALERT_TYPES (ALERT_TYPE_NAME, STAKE_HOLDER) VALUES ('FrequentTierHittingAlert', 'subscriber'); -INSERT INTO AM_ALERT_TYPES (ALERT_TYPE_NAME, STAKE_HOLDER) VALUES ('AbnormalTierUsage', 'publisher'); -INSERT INTO AM_ALERT_TYPES (ALERT_TYPE_NAME, STAKE_HOLDER) VALUES ('healthAvailabilityPerMin', 'publisher'); - - - --- AM Throttling tables -- - -CREATE TABLE IF NOT EXISTS AM_POLICY_SUBSCRIPTION ( - POLICY_ID INT(11) NOT NULL AUTO_INCREMENT, - NAME VARCHAR(512) NOT NULL, - DISPLAY_NAME VARCHAR(512) NULL DEFAULT NULL, - TENANT_ID INT(11) NOT NULL, - DESCRIPTION VARCHAR(1024) NULL DEFAULT NULL, - QUOTA_TYPE VARCHAR(25) NOT NULL, - QUOTA INT(11) NOT NULL, - QUOTA_UNIT VARCHAR(10) NULL, - UNIT_TIME INT(11) NOT NULL, - TIME_UNIT VARCHAR(25) NOT NULL, - RATE_LIMIT_COUNT INT(11) NULL DEFAULT NULL, - RATE_LIMIT_TIME_UNIT VARCHAR(25) NULL DEFAULT NULL, - IS_DEPLOYED TINYINT(1) NOT NULL DEFAULT 0, - CUSTOM_ATTRIBUTES BLOB DEFAULT NULL, - STOP_ON_QUOTA_REACH BOOLEAN NOT NULL DEFAULT 0, - BILLING_PLAN VARCHAR(20) NOT NULL, - UUID VARCHAR(256), - PRIMARY KEY (POLICY_ID), - UNIQUE INDEX AM_POLICY_SUBSCRIPTION_NAME_TENANT (NAME, TENANT_ID), - UNIQUE (UUID) -)ENGINE = InnoDB; - -CREATE TABLE IF NOT EXISTS AM_POLICY_APPLICATION ( - POLICY_ID INT(11) NOT NULL AUTO_INCREMENT, - NAME VARCHAR(512) NOT NULL, - DISPLAY_NAME VARCHAR(512) NULL DEFAULT NULL, - TENANT_ID INT(11) NOT NULL, - DESCRIPTION VARCHAR(1024) NULL DEFAULT NULL, - QUOTA_TYPE VARCHAR(25) NOT NULL, - QUOTA INT(11) NOT NULL, - QUOTA_UNIT VARCHAR(10) NULL DEFAULT NULL, - UNIT_TIME INT(11) NOT NULL, - TIME_UNIT VARCHAR(25) NOT NULL, - IS_DEPLOYED TINYINT(1) NOT NULL DEFAULT 0, - CUSTOM_ATTRIBUTES BLOB DEFAULT NULL, - UUID VARCHAR(256), - PRIMARY KEY (POLICY_ID), - UNIQUE INDEX APP_NAME_TENANT (NAME, TENANT_ID), - UNIQUE (UUID) -)ENGINE = InnoDB; - -CREATE TABLE IF NOT EXISTS AM_POLICY_HARD_THROTTLING ( - POLICY_ID INT(11) NOT NULL AUTO_INCREMENT, - NAME VARCHAR(512) NOT NULL, - TENANT_ID INT(11) NOT NULL, - DESCRIPTION VARCHAR(1024) NULL DEFAULT NULL, - QUOTA_TYPE VARCHAR(25) NOT NULL, - QUOTA INT(11) NOT NULL, - QUOTA_UNIT VARCHAR(10) NULL DEFAULT NULL, - UNIT_TIME INT(11) NOT NULL, - TIME_UNIT VARCHAR(25) NOT NULL, - IS_DEPLOYED TINYINT(1) NOT NULL DEFAULT 0, - PRIMARY KEY (POLICY_ID), - UNIQUE INDEX POLICY_HARD_NAME_TENANT (NAME, TENANT_ID) -)ENGINE = InnoDB; - - -CREATE TABLE IF NOT EXISTS AM_API_THROTTLE_POLICY ( - POLICY_ID INT(11) NOT NULL AUTO_INCREMENT, - NAME VARCHAR(512) NOT NULL, - DISPLAY_NAME VARCHAR(512) NULL DEFAULT NULL, - TENANT_ID INT(11) NOT NULL, - DESCRIPTION VARCHAR (1024), - DEFAULT_QUOTA_TYPE VARCHAR(25) NOT NULL, - DEFAULT_QUOTA INTEGER NOT NULL, - DEFAULT_QUOTA_UNIT VARCHAR(10) NULL, - DEFAULT_UNIT_TIME INTEGER NOT NULL, - DEFAULT_TIME_UNIT VARCHAR(25) NOT NULL, - APPLICABLE_LEVEL VARCHAR(25) NOT NULL, - IS_DEPLOYED TINYINT(1) NOT NULL DEFAULT 0, - UUID VARCHAR(256), - PRIMARY KEY (POLICY_ID), - UNIQUE INDEX API_NAME_TENANT (NAME, TENANT_ID), - UNIQUE (UUID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS AM_CONDITION_GROUP ( - CONDITION_GROUP_ID INTEGER NOT NULL AUTO_INCREMENT, - POLICY_ID INTEGER NOT NULL, - QUOTA_TYPE VARCHAR(25), - QUOTA INTEGER NOT NULL, - QUOTA_UNIT VARCHAR(10) NULL DEFAULT NULL, - UNIT_TIME INTEGER NOT NULL, - TIME_UNIT VARCHAR(25) NOT NULL, - DESCRIPTION VARCHAR (1024) NULL DEFAULT NULL, - PRIMARY KEY (CONDITION_GROUP_ID), - FOREIGN KEY (POLICY_ID) REFERENCES AM_API_THROTTLE_POLICY(POLICY_ID) ON DELETE CASCADE ON UPDATE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS AM_QUERY_PARAMETER_CONDITION ( - QUERY_PARAMETER_ID INTEGER NOT NULL AUTO_INCREMENT, - CONDITION_GROUP_ID INTEGER NOT NULL, - PARAMETER_NAME VARCHAR(255) DEFAULT NULL, - PARAMETER_VALUE VARCHAR(255) DEFAULT NULL, - IS_PARAM_MAPPING BOOLEAN DEFAULT 1, - PRIMARY KEY (QUERY_PARAMETER_ID), - FOREIGN KEY (CONDITION_GROUP_ID) REFERENCES AM_CONDITION_GROUP(CONDITION_GROUP_ID) ON DELETE CASCADE ON UPDATE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS AM_HEADER_FIELD_CONDITION ( - HEADER_FIELD_ID INTEGER NOT NULL AUTO_INCREMENT, - CONDITION_GROUP_ID INTEGER NOT NULL, - HEADER_FIELD_NAME VARCHAR(255) DEFAULT NULL, - HEADER_FIELD_VALUE VARCHAR(255) DEFAULT NULL, - IS_HEADER_FIELD_MAPPING BOOLEAN DEFAULT 1, - PRIMARY KEY (HEADER_FIELD_ID), - FOREIGN KEY (CONDITION_GROUP_ID) REFERENCES AM_CONDITION_GROUP(CONDITION_GROUP_ID) ON DELETE CASCADE ON UPDATE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS AM_JWT_CLAIM_CONDITION ( - JWT_CLAIM_ID INTEGER NOT NULL AUTO_INCREMENT, - CONDITION_GROUP_ID INTEGER NOT NULL, - CLAIM_URI VARCHAR(512) DEFAULT NULL, - CLAIM_ATTRIB VARCHAR(1024) DEFAULT NULL, - IS_CLAIM_MAPPING BOOLEAN DEFAULT 1, - PRIMARY KEY (JWT_CLAIM_ID), - FOREIGN KEY (CONDITION_GROUP_ID) REFERENCES AM_CONDITION_GROUP(CONDITION_GROUP_ID) ON DELETE CASCADE ON UPDATE CASCADE -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS AM_IP_CONDITION ( - AM_IP_CONDITION_ID INT NOT NULL AUTO_INCREMENT, - STARTING_IP VARCHAR(45) NULL, - ENDING_IP VARCHAR(45) NULL, - SPECIFIC_IP VARCHAR(45) NULL, - WITHIN_IP_RANGE BOOLEAN DEFAULT 1, - CONDITION_GROUP_ID INT NULL, - PRIMARY KEY (AM_IP_CONDITION_ID), - INDEX fk_AM_IP_CONDITION_1_idx (CONDITION_GROUP_ID ASC), CONSTRAINT fk_AM_IP_CONDITION_1 FOREIGN KEY (CONDITION_GROUP_ID) - REFERENCES AM_CONDITION_GROUP (CONDITION_GROUP_ID) ON DELETE CASCADE ON UPDATE CASCADE) -ENGINE = InnoDB; - - -CREATE TABLE IF NOT EXISTS AM_POLICY_GLOBAL ( - POLICY_ID INT(11) NOT NULL AUTO_INCREMENT, - NAME VARCHAR(512) NOT NULL, - KEY_TEMPLATE VARCHAR(512) NOT NULL, - TENANT_ID INT(11) NOT NULL, - DESCRIPTION VARCHAR(1024) NULL DEFAULT NULL, - SIDDHI_QUERY BLOB DEFAULT NULL, - IS_DEPLOYED TINYINT(1) NOT NULL DEFAULT 0, - UUID VARCHAR(256), - PRIMARY KEY (POLICY_ID), - UNIQUE (UUID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS AM_THROTTLE_TIER_PERMISSIONS ( - THROTTLE_TIER_PERMISSIONS_ID INT NOT NULL AUTO_INCREMENT, - TIER VARCHAR(50) NULL, - PERMISSIONS_TYPE VARCHAR(50) NULL, - ROLES VARCHAR(512) NULL, - TENANT_ID INT(11) NULL, - PRIMARY KEY (THROTTLE_TIER_PERMISSIONS_ID)) -ENGINE = InnoDB; - -CREATE TABLE `AM_BLOCK_CONDITIONS` ( - `CONDITION_ID` int(11) NOT NULL AUTO_INCREMENT, - `TYPE` varchar(45) DEFAULT NULL, - `VALUE` varchar(512) DEFAULT NULL, - `ENABLED` varchar(45) DEFAULT NULL, - `DOMAIN` varchar(45) DEFAULT NULL, - `UUID` VARCHAR(256), - PRIMARY KEY (`CONDITION_ID`), - UNIQUE (`UUID`) -) ENGINE=InnoDB; - -CREATE TABLE IF NOT EXISTS `AM_CERTIFICATE_METADATA` ( - `TENANT_ID` INT(11) NOT NULL, - `ALIAS` VARCHAR(45) NOT NULL, - `END_POINT` VARCHAR(100) NOT NULL, - CONSTRAINT PK_ALIAS PRIMARY KEY (`ALIAS`), - CONSTRAINT END_POINT_CONSTRAINT UNIQUE (`END_POINT`) -) ENGINE=InnoDB; - -CREATE TABLE IF NOT EXISTS AM_APPLICATION_GROUP_MAPPING ( - APPLICATION_ID INTEGER NOT NULL, - GROUP_ID VARCHAR(512) NOT NULL, - TENANT VARCHAR(255), - PRIMARY KEY (APPLICATION_ID,GROUP_ID,TENANT), - FOREIGN KEY (APPLICATION_ID) REFERENCES AM_APPLICATION(APPLICATION_ID) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB; - -CREATE TABLE IF NOT EXISTS AM_USAGE_UPLOADED_FILES ( - TENANT_DOMAIN varchar(255) NOT NULL, - FILE_NAME varchar(255) NOT NULL, - FILE_TIMESTAMP TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - FILE_PROCESSED tinyint(1) DEFAULT FALSE, - FILE_CONTENT MEDIUMBLOB DEFAULT NULL, - PRIMARY KEY (TENANT_DOMAIN, FILE_NAME, FILE_TIMESTAMP) -) ENGINE=InnoDB; - -CREATE TABLE IF NOT EXISTS AM_API_LC_PUBLISH_EVENTS ( - ID INTEGER(11) NOT NULL AUTO_INCREMENT, - TENANT_DOMAIN VARCHAR(500) NOT NULL, - API_ID VARCHAR(500) NOT NULL, - EVENT_TIME TIMESTAMP NOT NULL, - PRIMARY KEY (ID) -) ENGINE=InnoDB; --- End of API-MGT Tables -- - --- Performance indexes start-- - -create index IDX_ITS_LMT on IDN_THRIFT_SESSION (LAST_MODIFIED_TIME); -create index IDX_IOAT_UT on IDN_OAUTH2_ACCESS_TOKEN (USER_TYPE); -create index IDX_AAI_CTX on AM_API (CONTEXT); -create index IDX_AAKM_CK on AM_APPLICATION_KEY_MAPPING (CONSUMER_KEY); -create index IDX_AAUM_AI on AM_API_URL_MAPPING (API_ID); -create index IDX_AAUM_TT on AM_API_URL_MAPPING (THROTTLING_TIER); -create index IDX_AATP_DQT on AM_API_THROTTLE_POLICY (DEFAULT_QUOTA_TYPE); -create index IDX_ACG_QT on AM_CONDITION_GROUP (QUOTA_TYPE); -create index IDX_APS_QT on AM_POLICY_SUBSCRIPTION (QUOTA_TYPE); -create index IDX_AS_AITIAI on AM_SUBSCRIPTION (API_ID,TIER_ID,APPLICATION_ID); -create index IDX_APA_QT on AM_POLICY_APPLICATION (QUOTA_TYPE); -create index IDX_AA_AT_CB on AM_APPLICATION (APPLICATION_TIER,CREATED_BY); - --- Performance indexes end-- diff --git a/docker-compose/apim-micro-gw-with-analytics/mysql/scripts/carbon_mysql5.7.sql b/docker-compose/apim-micro-gw-with-analytics/mysql/scripts/carbon_mysql5.7.sql deleted file mode 100644 index 614c1a55..00000000 --- a/docker-compose/apim-micro-gw-with-analytics/mysql/scripts/carbon_mysql5.7.sql +++ /dev/null @@ -1,481 +0,0 @@ -CREATE Database `carbon_db`; - -USE `carbon_db`; - -CREATE TABLE IF NOT EXISTS REG_CLUSTER_LOCK ( - REG_LOCK_NAME VARCHAR (20), - REG_LOCK_STATUS VARCHAR (20), - REG_LOCKED_TIME TIMESTAMP, - REG_TENANT_ID INTEGER DEFAULT 0, - PRIMARY KEY (REG_LOCK_NAME) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS REG_LOG ( - REG_LOG_ID INTEGER AUTO_INCREMENT, - REG_PATH VARCHAR (750), - REG_USER_ID VARCHAR (31) NOT NULL, - REG_LOGGED_TIME TIMESTAMP NOT NULL, - REG_ACTION INTEGER NOT NULL, - REG_ACTION_DATA VARCHAR (500), - REG_TENANT_ID INTEGER DEFAULT 0, - PRIMARY KEY (REG_LOG_ID, REG_TENANT_ID) -)ENGINE INNODB; - -CREATE INDEX REG_LOG_IND_BY_REGLOG USING HASH ON REG_LOG(REG_LOGGED_TIME, REG_TENANT_ID); - --- The REG_PATH_VALUE should be less than 767 bytes, and hence was fixed at 750. --- See CARBON-5917. - -CREATE TABLE IF NOT EXISTS REG_PATH( - REG_PATH_ID INTEGER NOT NULL AUTO_INCREMENT, - REG_PATH_VALUE VARCHAR(750) NOT NULL, - REG_PATH_PARENT_ID INTEGER, - REG_TENANT_ID INTEGER DEFAULT 0, - CONSTRAINT PK_REG_PATH PRIMARY KEY(REG_PATH_ID, REG_TENANT_ID) -)ENGINE INNODB; - -CREATE INDEX REG_PATH_IND_BY_PATH_VALUE USING HASH ON REG_PATH(REG_PATH_VALUE, REG_TENANT_ID); -CREATE INDEX REG_PATH_IND_BY_PATH_PARENT_ID USING HASH ON REG_PATH(REG_PATH_PARENT_ID, REG_TENANT_ID); - -CREATE TABLE IF NOT EXISTS REG_CONTENT ( - REG_CONTENT_ID INTEGER NOT NULL AUTO_INCREMENT, - REG_CONTENT_DATA LONGBLOB, - REG_TENANT_ID INTEGER DEFAULT 0, - CONSTRAINT PK_REG_CONTENT PRIMARY KEY(REG_CONTENT_ID, REG_TENANT_ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS REG_CONTENT_HISTORY ( - REG_CONTENT_ID INTEGER NOT NULL, - REG_CONTENT_DATA LONGBLOB, - REG_DELETED SMALLINT, - REG_TENANT_ID INTEGER DEFAULT 0, - CONSTRAINT PK_REG_CONTENT_HISTORY PRIMARY KEY(REG_CONTENT_ID, REG_TENANT_ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS REG_RESOURCE ( - REG_PATH_ID INTEGER NOT NULL, - REG_NAME VARCHAR(256), - REG_VERSION INTEGER NOT NULL AUTO_INCREMENT, - REG_MEDIA_TYPE VARCHAR(500), - REG_CREATOR VARCHAR(31) NOT NULL, - REG_CREATED_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - REG_LAST_UPDATOR VARCHAR(31), - REG_LAST_UPDATED_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - REG_DESCRIPTION VARCHAR(1000), - REG_CONTENT_ID INTEGER, - REG_TENANT_ID INTEGER DEFAULT 0, - REG_UUID VARCHAR(100) NOT NULL, - CONSTRAINT PK_REG_RESOURCE PRIMARY KEY(REG_VERSION, REG_TENANT_ID) -)ENGINE INNODB; - -ALTER TABLE REG_RESOURCE ADD CONSTRAINT REG_RESOURCE_FK_BY_PATH_ID FOREIGN KEY (REG_PATH_ID, REG_TENANT_ID) REFERENCES REG_PATH (REG_PATH_ID, REG_TENANT_ID); -ALTER TABLE REG_RESOURCE ADD CONSTRAINT REG_RESOURCE_FK_BY_CONTENT_ID FOREIGN KEY (REG_CONTENT_ID, REG_TENANT_ID) REFERENCES REG_CONTENT (REG_CONTENT_ID, REG_TENANT_ID); -CREATE INDEX REG_RESOURCE_IND_BY_NAME USING HASH ON REG_RESOURCE(REG_NAME, REG_TENANT_ID); -CREATE INDEX REG_RESOURCE_IND_BY_PATH_ID_NAME USING HASH ON REG_RESOURCE(REG_PATH_ID, REG_NAME, REG_TENANT_ID); -CREATE INDEX REG_RESOURCE_IND_BY_UUID USING HASH ON REG_RESOURCE(REG_UUID); -CREATE INDEX REG_RESOURCE_IND_BY_TENAN USING HASH ON REG_RESOURCE(REG_TENANT_ID, REG_UUID); -CREATE INDEX REG_RESOURCE_IND_BY_TYPE USING HASH ON REG_RESOURCE(REG_TENANT_ID, REG_MEDIA_TYPE); - -CREATE TABLE IF NOT EXISTS REG_RESOURCE_HISTORY ( - REG_PATH_ID INTEGER NOT NULL, - REG_NAME VARCHAR(256), - REG_VERSION INTEGER NOT NULL, - REG_MEDIA_TYPE VARCHAR(500), - REG_CREATOR VARCHAR(31) NOT NULL, - REG_CREATED_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - REG_LAST_UPDATOR VARCHAR(31), - REG_LAST_UPDATED_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - REG_DESCRIPTION VARCHAR(1000), - REG_CONTENT_ID INTEGER, - REG_DELETED SMALLINT, - REG_TENANT_ID INTEGER DEFAULT 0, - REG_UUID VARCHAR(100) NOT NULL, - CONSTRAINT PK_REG_RESOURCE_HISTORY PRIMARY KEY(REG_VERSION, REG_TENANT_ID) -)ENGINE INNODB; - -ALTER TABLE REG_RESOURCE_HISTORY ADD CONSTRAINT REG_RESOURCE_HIST_FK_BY_PATHID FOREIGN KEY (REG_PATH_ID, REG_TENANT_ID) REFERENCES REG_PATH (REG_PATH_ID, REG_TENANT_ID); -ALTER TABLE REG_RESOURCE_HISTORY ADD CONSTRAINT REG_RESOURCE_HIST_FK_BY_CONTENT_ID FOREIGN KEY (REG_CONTENT_ID, REG_TENANT_ID) REFERENCES REG_CONTENT_HISTORY (REG_CONTENT_ID, REG_TENANT_ID); -CREATE INDEX REG_RESOURCE_HISTORY_IND_BY_NAME USING HASH ON REG_RESOURCE_HISTORY(REG_NAME, REG_TENANT_ID); -CREATE INDEX REG_RESOURCE_HISTORY_IND_BY_PATH_ID_NAME USING HASH ON REG_RESOURCE(REG_PATH_ID, REG_NAME, REG_TENANT_ID); - -CREATE TABLE IF NOT EXISTS REG_COMMENT ( - REG_ID INTEGER NOT NULL AUTO_INCREMENT, - REG_COMMENT_TEXT VARCHAR(500) NOT NULL, - REG_USER_ID VARCHAR(31) NOT NULL, - REG_COMMENTED_TIME TIMESTAMP NOT NULL, - REG_TENANT_ID INTEGER DEFAULT 0, - CONSTRAINT PK_REG_COMMENT PRIMARY KEY(REG_ID, REG_TENANT_ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS REG_RESOURCE_COMMENT ( - REG_COMMENT_ID INTEGER NOT NULL, - REG_VERSION INTEGER, - REG_PATH_ID INTEGER, - REG_RESOURCE_NAME VARCHAR(256), - REG_TENANT_ID INTEGER DEFAULT 0 -)ENGINE INNODB; - -ALTER TABLE REG_RESOURCE_COMMENT ADD CONSTRAINT REG_RESOURCE_COMMENT_FK_BY_PATH_ID FOREIGN KEY (REG_PATH_ID, REG_TENANT_ID) REFERENCES REG_PATH (REG_PATH_ID, REG_TENANT_ID); -ALTER TABLE REG_RESOURCE_COMMENT ADD CONSTRAINT REG_RESOURCE_COMMENT_FK_BY_COMMENT_ID FOREIGN KEY (REG_COMMENT_ID, REG_TENANT_ID) REFERENCES REG_COMMENT (REG_ID, REG_TENANT_ID); -CREATE INDEX REG_RESOURCE_COMMENT_IND_BY_PATH_ID_AND_RESOURCE_NAME USING HASH ON REG_RESOURCE_COMMENT(REG_PATH_ID, REG_RESOURCE_NAME, REG_TENANT_ID); -CREATE INDEX REG_RESOURCE_COMMENT_IND_BY_VERSION USING HASH ON REG_RESOURCE_COMMENT(REG_VERSION, REG_TENANT_ID); - -CREATE TABLE IF NOT EXISTS REG_RATING ( - REG_ID INTEGER NOT NULL AUTO_INCREMENT, - REG_RATING INTEGER NOT NULL, - REG_USER_ID VARCHAR(31) NOT NULL, - REG_RATED_TIME TIMESTAMP NOT NULL, - REG_TENANT_ID INTEGER DEFAULT 0, - CONSTRAINT PK_REG_RATING PRIMARY KEY(REG_ID, REG_TENANT_ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS REG_RESOURCE_RATING ( - REG_RATING_ID INTEGER NOT NULL, - REG_VERSION INTEGER, - REG_PATH_ID INTEGER, - REG_RESOURCE_NAME VARCHAR(256), - REG_TENANT_ID INTEGER DEFAULT 0 -)ENGINE INNODB; - -ALTER TABLE REG_RESOURCE_RATING ADD CONSTRAINT REG_RESOURCE_RATING_FK_BY_PATH_ID FOREIGN KEY (REG_PATH_ID, REG_TENANT_ID) REFERENCES REG_PATH (REG_PATH_ID, REG_TENANT_ID); -ALTER TABLE REG_RESOURCE_RATING ADD CONSTRAINT REG_RESOURCE_RATING_FK_BY_RATING_ID FOREIGN KEY (REG_RATING_ID, REG_TENANT_ID) REFERENCES REG_RATING (REG_ID, REG_TENANT_ID); -CREATE INDEX REG_RESOURCE_RATING_IND_BY_PATH_ID_AND_RESOURCE_NAME USING HASH ON REG_RESOURCE_RATING(REG_PATH_ID, REG_RESOURCE_NAME, REG_TENANT_ID); -CREATE INDEX REG_RESOURCE_RATING_IND_BY_VERSION USING HASH ON REG_RESOURCE_RATING(REG_VERSION, REG_TENANT_ID); - - -CREATE TABLE IF NOT EXISTS REG_TAG ( - REG_ID INTEGER NOT NULL AUTO_INCREMENT, - REG_TAG_NAME VARCHAR(500) NOT NULL, - REG_USER_ID VARCHAR(31) NOT NULL, - REG_TAGGED_TIME TIMESTAMP NOT NULL, - REG_TENANT_ID INTEGER DEFAULT 0, - CONSTRAINT PK_REG_TAG PRIMARY KEY(REG_ID, REG_TENANT_ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS REG_RESOURCE_TAG ( - REG_TAG_ID INTEGER NOT NULL, - REG_VERSION INTEGER, - REG_PATH_ID INTEGER, - REG_RESOURCE_NAME VARCHAR(256), - REG_TENANT_ID INTEGER DEFAULT 0 -)ENGINE INNODB; - -ALTER TABLE REG_RESOURCE_TAG ADD CONSTRAINT REG_RESOURCE_TAG_FK_BY_PATH_ID FOREIGN KEY (REG_PATH_ID, REG_TENANT_ID) REFERENCES REG_PATH (REG_PATH_ID, REG_TENANT_ID); -ALTER TABLE REG_RESOURCE_TAG ADD CONSTRAINT REG_RESOURCE_TAG_FK_BY_TAG_ID FOREIGN KEY (REG_TAG_ID, REG_TENANT_ID) REFERENCES REG_TAG (REG_ID, REG_TENANT_ID); -CREATE INDEX REG_RESOURCE_TAG_IND_BY_PATH_ID_AND_RESOURCE_NAME USING HASH ON REG_RESOURCE_TAG(REG_PATH_ID, REG_RESOURCE_NAME, REG_TENANT_ID); -CREATE INDEX REG_RESOURCE_TAG_IND_BY_VERSION USING HASH ON REG_RESOURCE_TAG(REG_VERSION, REG_TENANT_ID); - -CREATE TABLE IF NOT EXISTS REG_PROPERTY ( - REG_ID INTEGER NOT NULL AUTO_INCREMENT, - REG_NAME VARCHAR(100) NOT NULL, - REG_VALUE VARCHAR(1000), - REG_TENANT_ID INTEGER DEFAULT 0, - CONSTRAINT PK_REG_PROPERTY PRIMARY KEY(REG_ID, REG_TENANT_ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS REG_RESOURCE_PROPERTY ( - REG_PROPERTY_ID INTEGER NOT NULL, - REG_VERSION INTEGER, - REG_PATH_ID INTEGER, - REG_RESOURCE_NAME VARCHAR(256), - REG_TENANT_ID INTEGER DEFAULT 0 -)ENGINE INNODB; - -ALTER TABLE REG_RESOURCE_PROPERTY ADD CONSTRAINT REG_RESOURCE_PROPERTY_FK_BY_PATH_ID FOREIGN KEY (REG_PATH_ID, REG_TENANT_ID) REFERENCES REG_PATH (REG_PATH_ID, REG_TENANT_ID); -ALTER TABLE REG_RESOURCE_PROPERTY ADD CONSTRAINT REG_RESOURCE_PROPERTY_FK_BY_TAG_ID FOREIGN KEY (REG_PROPERTY_ID, REG_TENANT_ID) REFERENCES REG_PROPERTY (REG_ID, REG_TENANT_ID); -CREATE INDEX REG_RESOURCE_PROPERTY_IND_BY_PATH_ID_AND_RESOURCE_NAME USING HASH ON REG_RESOURCE_PROPERTY(REG_PATH_ID, REG_RESOURCE_NAME, REG_TENANT_ID); -CREATE INDEX REG_RESOURCE_PROPERTY_IND_BY_VERSION USING HASH ON REG_RESOURCE_PROPERTY(REG_VERSION, REG_TENANT_ID); - --- CREATE TABLE IF NOT EXISTS REG_ASSOCIATIONS ( --- SRC_PATH_ID INTEGER, --- SRC_RESOURCE_NAME VARCHAR(256), --- SRC_VERSION INTEGER, --- TGT_PATH_ID INTEGER, --- TGT_RESOURCE_NAME VARCHAR(256), --- TGT_VERSION INTEGER --- )ENGINE INNODB; --- --- ALTER TABLE REG_ASSOCIATIONS ADD CONSTRAINT REG_ASSOCIATIONS_FK_BY_SRC_PATH_ID FOREIGN KEY (SRC_PATH_ID) REFERENCES REG_PATH (PATH_ID); --- ALTER TABLE REG_ASSOCIATIONS ADD CONSTRAINT REG_ASSOCIATIONS_FK_BY_TGT_PATH_ID FOREIGN KEY (TGT_PATH_ID) REFERENCES REG_PATH (PATH_ID); --- CREATE INDEX REG_ASSOCIATIONS_IND_BY_SRC_VERSION ON REG_ASSOCIATIONS(SRC_VERSION); --- CREATE INDEX REG_ASSOCIATIONS_IND_BY_TGT_VERSION ON REG_ASSOCIATIONS(TGT_VERSION); --- CREATE INDEX REG_ASSOCIATIONS_IND_BY_SRC_RESOURCE_NAME ON REG_ASSOCIATIONS(SRC_RESOURCE_NAME); --- CREATE INDEX REG_ASSOCIATIONS_IND_BY_TGT_RESOURCE_NAME ON REG_ASSOCIATIONS(TGT_RESOURCE_NAME); - - - -CREATE TABLE IF NOT EXISTS REG_ASSOCIATION ( - REG_ASSOCIATION_ID INTEGER AUTO_INCREMENT, - REG_SOURCEPATH VARCHAR (750) NOT NULL, - REG_TARGETPATH VARCHAR (750) NOT NULL, - REG_ASSOCIATION_TYPE VARCHAR (2000) NOT NULL, - REG_TENANT_ID INTEGER DEFAULT 0, - PRIMARY KEY (REG_ASSOCIATION_ID, REG_TENANT_ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS REG_SNAPSHOT ( - REG_SNAPSHOT_ID INTEGER NOT NULL AUTO_INCREMENT, - REG_PATH_ID INTEGER NOT NULL, - REG_RESOURCE_NAME VARCHAR(255), - REG_RESOURCE_VIDS LONGBLOB NOT NULL, - REG_TENANT_ID INTEGER DEFAULT 0, - CONSTRAINT PK_REG_SNAPSHOT PRIMARY KEY(REG_SNAPSHOT_ID, REG_TENANT_ID) -)ENGINE INNODB; - -CREATE INDEX REG_SNAPSHOT_IND_BY_PATH_ID_AND_RESOURCE_NAME USING HASH ON REG_SNAPSHOT(REG_PATH_ID, REG_RESOURCE_NAME, REG_TENANT_ID); - -ALTER TABLE REG_SNAPSHOT ADD CONSTRAINT REG_SNAPSHOT_FK_BY_PATH_ID FOREIGN KEY (REG_PATH_ID, REG_TENANT_ID) REFERENCES REG_PATH (REG_PATH_ID, REG_TENANT_ID); - - --- ################################ --- USER MANAGER TABLES --- ################################ - -CREATE TABLE UM_TENANT ( - UM_ID INTEGER NOT NULL AUTO_INCREMENT, - UM_DOMAIN_NAME VARCHAR(255) NOT NULL, - UM_EMAIL VARCHAR(255), - UM_ACTIVE BOOLEAN DEFAULT FALSE, - UM_CREATED_DATE TIMESTAMP NOT NULL, - UM_USER_CONFIG LONGBLOB, - PRIMARY KEY (UM_ID), - UNIQUE(UM_DOMAIN_NAME) -)ENGINE INNODB; - -CREATE TABLE UM_DOMAIN( - UM_DOMAIN_ID INTEGER NOT NULL AUTO_INCREMENT, - UM_DOMAIN_NAME VARCHAR(255), - UM_TENANT_ID INTEGER DEFAULT 0, - PRIMARY KEY (UM_DOMAIN_ID, UM_TENANT_ID) -)ENGINE INNODB; - -CREATE UNIQUE INDEX INDEX_UM_TENANT_UM_DOMAIN_NAME - ON UM_TENANT (UM_DOMAIN_NAME); - -CREATE TABLE UM_USER ( - UM_ID INTEGER NOT NULL AUTO_INCREMENT, - UM_USER_NAME VARCHAR(255) NOT NULL, - UM_USER_PASSWORD VARCHAR(255) NOT NULL, - UM_SALT_VALUE VARCHAR(31), - UM_REQUIRE_CHANGE BOOLEAN DEFAULT FALSE, - UM_CHANGED_TIME TIMESTAMP NOT NULL, - UM_TENANT_ID INTEGER DEFAULT 0, - PRIMARY KEY (UM_ID, UM_TENANT_ID), - UNIQUE(UM_USER_NAME, UM_TENANT_ID) -)ENGINE INNODB; - -CREATE TABLE UM_SYSTEM_USER ( - UM_ID INTEGER NOT NULL AUTO_INCREMENT, - UM_USER_NAME VARCHAR(255) NOT NULL, - UM_USER_PASSWORD VARCHAR(255) NOT NULL, - UM_SALT_VALUE VARCHAR(31), - UM_REQUIRE_CHANGE BOOLEAN DEFAULT FALSE, - UM_CHANGED_TIME TIMESTAMP NOT NULL, - UM_TENANT_ID INTEGER DEFAULT 0, - PRIMARY KEY (UM_ID, UM_TENANT_ID), - UNIQUE(UM_USER_NAME, UM_TENANT_ID) -)ENGINE INNODB; - -CREATE TABLE UM_ROLE ( - UM_ID INTEGER NOT NULL AUTO_INCREMENT, - UM_ROLE_NAME VARCHAR(255) NOT NULL, - UM_TENANT_ID INTEGER DEFAULT 0, - UM_SHARED_ROLE BOOLEAN DEFAULT FALSE, - PRIMARY KEY (UM_ID, UM_TENANT_ID), - UNIQUE(UM_ROLE_NAME, UM_TENANT_ID) -)ENGINE INNODB; - - -CREATE TABLE UM_MODULE( - UM_ID INTEGER NOT NULL AUTO_INCREMENT, - UM_MODULE_NAME VARCHAR(100), - UNIQUE(UM_MODULE_NAME), - PRIMARY KEY(UM_ID) -)ENGINE INNODB; - -CREATE TABLE UM_MODULE_ACTIONS( - UM_ACTION VARCHAR(255) NOT NULL, - UM_MODULE_ID INTEGER NOT NULL, - PRIMARY KEY(UM_ACTION, UM_MODULE_ID), - FOREIGN KEY (UM_MODULE_ID) REFERENCES UM_MODULE(UM_ID) ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE UM_PERMISSION ( - UM_ID INTEGER NOT NULL AUTO_INCREMENT, - UM_RESOURCE_ID VARCHAR(255) NOT NULL, - UM_ACTION VARCHAR(255) NOT NULL, - UM_TENANT_ID INTEGER DEFAULT 0, - UM_MODULE_ID INTEGER DEFAULT 0, - UNIQUE(UM_RESOURCE_ID,UM_ACTION, UM_TENANT_ID), - PRIMARY KEY (UM_ID, UM_TENANT_ID) -)ENGINE INNODB; - -CREATE INDEX INDEX_UM_PERMISSION_UM_RESOURCE_ID_UM_ACTION ON UM_PERMISSION (UM_RESOURCE_ID, UM_ACTION, UM_TENANT_ID); - -CREATE TABLE UM_ROLE_PERMISSION ( - UM_ID INTEGER NOT NULL AUTO_INCREMENT, - UM_PERMISSION_ID INTEGER NOT NULL, - UM_ROLE_NAME VARCHAR(255) NOT NULL, - UM_IS_ALLOWED SMALLINT NOT NULL, - UM_TENANT_ID INTEGER DEFAULT 0, - UM_DOMAIN_ID INTEGER, - UNIQUE (UM_PERMISSION_ID, UM_ROLE_NAME, UM_TENANT_ID, UM_DOMAIN_ID), - FOREIGN KEY (UM_PERMISSION_ID, UM_TENANT_ID) REFERENCES UM_PERMISSION(UM_ID, UM_TENANT_ID) ON DELETE CASCADE, - FOREIGN KEY (UM_DOMAIN_ID, UM_TENANT_ID) REFERENCES UM_DOMAIN(UM_DOMAIN_ID, UM_TENANT_ID) ON DELETE CASCADE, - PRIMARY KEY (UM_ID, UM_TENANT_ID) -)ENGINE INNODB; - --- REMOVED UNIQUE (UM_PERMISSION_ID, UM_ROLE_ID) -CREATE TABLE UM_USER_PERMISSION ( - UM_ID INTEGER NOT NULL AUTO_INCREMENT, - UM_PERMISSION_ID INTEGER NOT NULL, - UM_USER_NAME VARCHAR(255) NOT NULL, - UM_IS_ALLOWED SMALLINT NOT NULL, - UM_TENANT_ID INTEGER DEFAULT 0, - FOREIGN KEY (UM_PERMISSION_ID, UM_TENANT_ID) REFERENCES UM_PERMISSION(UM_ID, UM_TENANT_ID) ON DELETE CASCADE, - PRIMARY KEY (UM_ID, UM_TENANT_ID) -)ENGINE INNODB; - --- REMOVED UNIQUE (UM_PERMISSION_ID, UM_USER_ID) -CREATE TABLE UM_USER_ROLE ( - UM_ID INTEGER NOT NULL AUTO_INCREMENT, - UM_ROLE_ID INTEGER NOT NULL, - UM_USER_ID INTEGER NOT NULL, - UM_TENANT_ID INTEGER DEFAULT 0, - UNIQUE (UM_USER_ID, UM_ROLE_ID, UM_TENANT_ID), - FOREIGN KEY (UM_ROLE_ID, UM_TENANT_ID) REFERENCES UM_ROLE(UM_ID, UM_TENANT_ID), - FOREIGN KEY (UM_USER_ID, UM_TENANT_ID) REFERENCES UM_USER(UM_ID, UM_TENANT_ID), - PRIMARY KEY (UM_ID, UM_TENANT_ID) -)ENGINE INNODB; - -CREATE TABLE UM_SHARED_USER_ROLE( - UM_ROLE_ID INTEGER NOT NULL, - UM_USER_ID INTEGER NOT NULL, - UM_USER_TENANT_ID INTEGER NOT NULL, - UM_ROLE_TENANT_ID INTEGER NOT NULL, - UNIQUE(UM_USER_ID,UM_ROLE_ID,UM_USER_TENANT_ID, UM_ROLE_TENANT_ID), - FOREIGN KEY(UM_ROLE_ID,UM_ROLE_TENANT_ID) REFERENCES UM_ROLE(UM_ID,UM_TENANT_ID) ON DELETE CASCADE, - FOREIGN KEY(UM_USER_ID,UM_USER_TENANT_ID) REFERENCES UM_USER(UM_ID,UM_TENANT_ID) ON DELETE CASCADE -)ENGINE INNODB; - -CREATE TABLE UM_ACCOUNT_MAPPING( - UM_ID INTEGER NOT NULL AUTO_INCREMENT, - UM_USER_NAME VARCHAR(255) NOT NULL, - UM_TENANT_ID INTEGER NOT NULL, - UM_USER_STORE_DOMAIN VARCHAR(100), - UM_ACC_LINK_ID INTEGER NOT NULL, - UNIQUE(UM_USER_NAME, UM_TENANT_ID, UM_USER_STORE_DOMAIN, UM_ACC_LINK_ID), - FOREIGN KEY (UM_TENANT_ID) REFERENCES UM_TENANT(UM_ID) ON DELETE CASCADE, - PRIMARY KEY (UM_ID) -)ENGINE INNODB; - - -CREATE TABLE UM_USER_ATTRIBUTE ( - UM_ID INTEGER NOT NULL AUTO_INCREMENT, - UM_ATTR_NAME VARCHAR(255) NOT NULL, - UM_ATTR_VALUE VARCHAR(1024), - UM_PROFILE_ID VARCHAR(255), - UM_USER_ID INTEGER, - UM_TENANT_ID INTEGER DEFAULT 0, - FOREIGN KEY (UM_USER_ID, UM_TENANT_ID) REFERENCES UM_USER(UM_ID, UM_TENANT_ID), - PRIMARY KEY (UM_ID, UM_TENANT_ID) -)ENGINE INNODB; - -CREATE INDEX UM_USER_ID_INDEX ON UM_USER_ATTRIBUTE(UM_USER_ID); - -CREATE TABLE UM_DIALECT( - UM_ID INTEGER NOT NULL AUTO_INCREMENT, - UM_DIALECT_URI VARCHAR(255) NOT NULL, - UM_TENANT_ID INTEGER DEFAULT 0, - UNIQUE(UM_DIALECT_URI, UM_TENANT_ID), - PRIMARY KEY (UM_ID, UM_TENANT_ID) -)ENGINE INNODB; - -CREATE TABLE UM_CLAIM( - UM_ID INTEGER NOT NULL AUTO_INCREMENT, - UM_DIALECT_ID INTEGER NOT NULL, - UM_CLAIM_URI VARCHAR(255) NOT NULL, - UM_DISPLAY_TAG VARCHAR(255), - UM_DESCRIPTION VARCHAR(255), - UM_MAPPED_ATTRIBUTE_DOMAIN VARCHAR(255), - UM_MAPPED_ATTRIBUTE VARCHAR(255), - UM_REG_EX VARCHAR(255), - UM_SUPPORTED SMALLINT, - UM_REQUIRED SMALLINT, - UM_DISPLAY_ORDER INTEGER, - UM_CHECKED_ATTRIBUTE SMALLINT, - UM_READ_ONLY SMALLINT, - UM_TENANT_ID INTEGER DEFAULT 0, - UNIQUE(UM_DIALECT_ID, UM_CLAIM_URI, UM_TENANT_ID,UM_MAPPED_ATTRIBUTE_DOMAIN), - FOREIGN KEY(UM_DIALECT_ID, UM_TENANT_ID) REFERENCES UM_DIALECT(UM_ID, UM_TENANT_ID), - PRIMARY KEY (UM_ID, UM_TENANT_ID) -)ENGINE INNODB; - - -CREATE TABLE UM_PROFILE_CONFIG( - UM_ID INTEGER NOT NULL AUTO_INCREMENT, - UM_DIALECT_ID INTEGER NOT NULL, - UM_PROFILE_NAME VARCHAR(255), - UM_TENANT_ID INTEGER DEFAULT 0, - FOREIGN KEY(UM_DIALECT_ID, UM_TENANT_ID) REFERENCES UM_DIALECT(UM_ID, UM_TENANT_ID), - PRIMARY KEY (UM_ID, UM_TENANT_ID) -)ENGINE INNODB; - -CREATE TABLE IF NOT EXISTS UM_CLAIM_BEHAVIOR( - UM_ID INTEGER NOT NULL AUTO_INCREMENT, - UM_PROFILE_ID INTEGER, - UM_CLAIM_ID INTEGER, - UM_BEHAVIOUR SMALLINT, - UM_TENANT_ID INTEGER DEFAULT 0, - FOREIGN KEY(UM_PROFILE_ID, UM_TENANT_ID) REFERENCES UM_PROFILE_CONFIG(UM_ID,UM_TENANT_ID), - FOREIGN KEY(UM_CLAIM_ID, UM_TENANT_ID) REFERENCES UM_CLAIM(UM_ID,UM_TENANT_ID), - PRIMARY KEY(UM_ID, UM_TENANT_ID) -)ENGINE INNODB; - -CREATE TABLE UM_HYBRID_ROLE( - UM_ID INTEGER NOT NULL AUTO_INCREMENT, - UM_ROLE_NAME VARCHAR(255), - UM_TENANT_ID INTEGER DEFAULT 0, - PRIMARY KEY (UM_ID, UM_TENANT_ID) -)ENGINE INNODB; - -CREATE TABLE UM_HYBRID_USER_ROLE( - UM_ID INTEGER NOT NULL AUTO_INCREMENT, - UM_USER_NAME VARCHAR(255), - UM_ROLE_ID INTEGER NOT NULL, - UM_TENANT_ID INTEGER DEFAULT 0, - UM_DOMAIN_ID INTEGER, - UNIQUE (UM_USER_NAME, UM_ROLE_ID, UM_TENANT_ID, UM_DOMAIN_ID), - FOREIGN KEY (UM_ROLE_ID, UM_TENANT_ID) REFERENCES UM_HYBRID_ROLE(UM_ID, UM_TENANT_ID) ON DELETE CASCADE, - FOREIGN KEY (UM_DOMAIN_ID, UM_TENANT_ID) REFERENCES UM_DOMAIN(UM_DOMAIN_ID, UM_TENANT_ID) ON DELETE CASCADE, - PRIMARY KEY (UM_ID, UM_TENANT_ID) -)ENGINE INNODB; - -CREATE TABLE UM_SYSTEM_ROLE( - UM_ID INTEGER NOT NULL AUTO_INCREMENT, - UM_ROLE_NAME VARCHAR(255), - UM_TENANT_ID INTEGER DEFAULT 0, - PRIMARY KEY (UM_ID, UM_TENANT_ID) -)ENGINE INNODB; - -CREATE INDEX SYSTEM_ROLE_IND_BY_RN_TI ON UM_SYSTEM_ROLE(UM_ROLE_NAME, UM_TENANT_ID); - -CREATE TABLE UM_SYSTEM_USER_ROLE( - UM_ID INTEGER NOT NULL AUTO_INCREMENT, - UM_USER_NAME VARCHAR(255), - UM_ROLE_ID INTEGER NOT NULL, - UM_TENANT_ID INTEGER DEFAULT 0, - UNIQUE (UM_USER_NAME, UM_ROLE_ID, UM_TENANT_ID), - FOREIGN KEY (UM_ROLE_ID, UM_TENANT_ID) REFERENCES UM_SYSTEM_ROLE(UM_ID, UM_TENANT_ID), - PRIMARY KEY (UM_ID, UM_TENANT_ID) -)ENGINE INNODB; - - -CREATE TABLE UM_HYBRID_REMEMBER_ME( - UM_ID INTEGER NOT NULL AUTO_INCREMENT, - UM_USER_NAME VARCHAR(255) NOT NULL, - UM_COOKIE_VALUE VARCHAR(1024), - UM_CREATED_TIME TIMESTAMP, - UM_TENANT_ID INTEGER DEFAULT 0, - PRIMARY KEY (UM_ID, UM_TENANT_ID) -)ENGINE INNODB; diff --git a/docker-compose/apim-with-analytics/README.md b/docker-compose/apim-with-analytics/README.md index b49a3563..39aea250 100755 --- a/docker-compose/apim-with-analytics/README.md +++ b/docker-compose/apim-with-analytics/README.md @@ -30,7 +30,7 @@ Instead, extract the zip file and directly browse to `docker-apim-docker-compose/APIM-with-Analytics` folder. > If you want to try out an already released tag, after executing 2nd step, checkout the relevant tag, - i.e. for example: git checkout tags/v2.1.0.4 and continue below steps. + i.e. for example: git checkout tags/v2.5.0.1 and continue below steps. 3. Execute following Docker command to start the deployment. ``` diff --git a/dockerfiles/micro-gateway/Dockerfile b/dockerfiles/micro-gateway/Dockerfile deleted file mode 100644 index a4e4c6c1..00000000 --- a/dockerfiles/micro-gateway/Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# ------------------------------------------------------------------------ -# -# Copyright 2017 WSO2, Inc. (http://wso2.com) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License -# -# ------------------------------------------------------------------------ - -# set to latest Ubuntu LTS -FROM ubuntu:16.04 -MAINTAINER WSO2 Docker Maintainers "dev@wso2.org" - -# set user configurations -ARG USER=wso2carbon -ARG USER_ID=802 -ARG USER_GROUP=wso2 -ARG USER_GROUP_ID=802 -ARG USER_HOME=/home/${USER} -# set dependant files directory -ARG FILES=./files -# set jdk configurations -ARG JDK=jdk1.8.0* -ARG JAVA_HOME=${USER_HOME}/java -# set wso2 product configurations -ARG WSO2_SERVER=wso2am-micro-gw -ARG WSO2_SERVER_VERSION=2.5.0 -ARG WSO2_SERVER_DIST=${WSO2_SERVER}-${WSO2_SERVER_VERSION} -ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER}-${WSO2_SERVER_VERSION} - -# install required packages -RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \ - curl && \ - rm -rf /var/lib/apt/lists/* && \ - echo '[ ! -z "$TERM" -a -r /etc/motd ] && cat /etc/motd' \ - >> /etc/bash.bashrc \ - ; echo "\ - Welcome to WSO2 Docker resources.\n\ - The Docker container contains the WSO2 product with its latest updates, which are under the End User License Agreement (EULA) 2.0.\n\ - \n\ - Read more about EULA 2.0 (https://wso2.com/licenses/wso2-update/2.0).\n"\ - > /etc/motd - -# create a user group and a user -RUN groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} && \ - useradd --system --create-home --home-dir ${USER_HOME} --no-log-init -g ${USER_GROUP_ID} -u ${USER_ID} ${USER} - -# copy the jdk and wso2 product distributions to user's home directory and copy the mysql connector jar to server distribution -COPY --chown=wso2carbon:wso2 ${FILES}/${JDK} ${USER_HOME}/java/ -COPY --chown=wso2carbon:wso2 ${FILES}/${WSO2_SERVER_DIST} ${USER_HOME}/${WSO2_SERVER_DIST} -COPY --chown=wso2carbon:wso2 ${FILES}/init.sh ${USER_HOME}/ - -# set the user and work directory -USER ${USER_ID} -WORKDIR ${USER_HOME} - -# set environment variables -ENV JAVA_HOME=${JAVA_HOME} \ - PATH=$JAVA_HOME/bin:$PATH \ - WSO2_SERVER_HOME=${WSO2_SERVER_HOME} \ - WORKING_DIRECTORY=${USER_HOME} - -# expose ports -EXPOSE 8243 5672 - -ENTRYPOINT ${WORKING_DIRECTORY}/init.sh diff --git a/dockerfiles/micro-gateway/README.md b/dockerfiles/micro-gateway/README.md deleted file mode 100644 index a7eff983..00000000 --- a/dockerfiles/micro-gateway/README.md +++ /dev/null @@ -1,73 +0,0 @@ -# Dockerfile for WSO2 API Microgateway # -The section defines the step-by-step instructions to build the Docker image for WSO2 API Microgateway 2.5.0. - -## Prerequisites - -* [Docker](https://www.docker.com/get-docker) v17.09.0 or above - - -## How to build an image and run -##### 1. Checkout this repository into your local machine using the following git command. -``` -git clone https://github.com/wso2/docker-apim.git -``` - ->The local copy of the `dockerfile/microgateway` directory will be referred to as `AM_MICRO_GW_DOCKERFILE_HOME` from this point onwards. - -##### 2. Add JDK, WSO2 API Microgateway distributions and MySQL connector to `/files` -- Download [JDK 1.8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) -and extract that in `/files` folder. -- Download the WSO2 API Microgateway 2.5.0 distribution (https://wso2.com/api-management/api-microgateway/#download-micro-api-gateway) -and extract that in `/files` folder. -- Once both JDK and WSO2 API Microgateway distributions are extracted the folder structure should be as follows; - - ```bash - /files/jdk/ - /files/wso2am-micro-gw-2.5.0/ - ``` - ->Please refer to [WSO2 Update Manager documentation](https://docs.wso2.com/display/ADMIN44x/Updating+WSO2+Products) -in order to obtain latest bug fixes and updates for the product. - -##### 3. Build the Docker image. -- Navigate to `` directory.
- Execute `docker build` command as shown below. - + `docker build -t wso2am-micro-gw:2.5.0 .` - -##### 4. Running the Docker image. -- `docker run -it -p 8243:8243 wso2am-micro-gw:2.5.0` - - ->In here, refers to hostname or IP of the host machine on top of which containers are spawned. - - -## How to update configurations -Configurations would lie on the Docker host machine and they can be volume mounted to the container.
-As an example, steps required to change the port offset using `carbon.xml` is as follows. - -##### 1. Stop the API Microgateway container if it's already running. -In WSO2 API Microgateway 2.5.0 product distribution, `carbon.xml` configuration file
-can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
-referred to as `/carbon.xml` and change the offset value under ports to 1. - -##### 2. Grant read permission to `other` users for `/carbon.xml` -``` -chmod o+r /carbon.xml -``` - -##### 3. Run the image by mounting the file to container as follows. -``` -docker run \ --p 8244:8244 \ ---volume /carbon.xml:/carbon.xml \ -wso2am-micro-gw:2.5.0 -``` - ->In here, refers to /home/wso2carbon/wso2am-micro-gw-2.5.0/repository/conf folder of the container. - - -## Docker command usage references - -* [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) -* [Docker run command reference](https://docs.docker.com/engine/reference/run/) -* [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) diff --git a/dockerfiles/micro-gateway/files/init.sh b/dockerfiles/micro-gateway/files/init.sh deleted file mode 100755 index 30306d61..00000000 --- a/dockerfiles/micro-gateway/files/init.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh -# ------------------------------------------------------------------------ -# Copyright 2018 WSO2, Inc. (http://wso2.com) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License -# ------------------------------------------------------------------------ -set -e - -# custom WSO2 non-root user and group variables -user=wso2carbon -group=wso2 - -# file path variables -volumes=${WORKING_DIRECTORY}/volumes - -# capture the Docker container IP from the container's /etc/hosts file -docker_container_ip=$(awk 'END{print $1}' /etc/hosts) - -# check if the WSO2 non-root user has been created -! getent passwd ${user} >/dev/null 2>&1 && echo "WSO2 Docker non-root user does not exist" && exit 1 - -# check if the WSO2 non-root group has been created -! getent group ${group} >/dev/null 2>&1 && echo "WSO2 Docker non-root group does not exist" && exit 1 - -# check if the WSO2 non-root user home exists -test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 - -# check if the WSO2 product home exists -test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 - -# copy configuration changes and external libraries - -# check if any changed configuration files have been mounted -# if any file changes have been mounted, copy the WSO2 configuration files recursively -test -d ${volumes} && cp -r ${volumes}/* ${WSO2_SERVER_HOME}/ - -# make any runtime or node specific configuration changes -# for example, setting container IP in relevant configuration files - -# set the Docker container IP as the `localMemberHost` under axis2.xml clustering configurations (effective only when clustering is enabled) -sed -i "s##${docker_container_ip}<\/parameter>#" ${WSO2_SERVER_HOME}/repository/conf/axis2/axis2.xml - -# start the WSO2 Carbon server -sh ${WSO2_SERVER_HOME}/bin/wso2server.sh From da249d4f470e812009f69220048d1d2450d19ba8 Mon Sep 17 00:00:00 2001 From: Vimukthi Perera Date: Mon, 25 Jun 2018 12:02:44 +0530 Subject: [PATCH 05/13] Update README.md --- docker-compose/apim-is-as-km-with-analytics/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker-compose/apim-is-as-km-with-analytics/README.md b/docker-compose/apim-is-as-km-with-analytics/README.md index 2a2ca31f..1518b18b 100755 --- a/docker-compose/apim-is-as-km-with-analytics/README.md +++ b/docker-compose/apim-is-as-km-with-analytics/README.md @@ -5,8 +5,7 @@ * Install [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git), [Docker](https://www.docker.com/get-docker) and [Docker Compose](https://docs.docker.com/compose/install/#install-compose) in order to run the steps provided in following Quick start guide.

- * In order to run this Docker Compose setup, you will need an active [Free Trial Subscription](https://wso2.com/free-trial-subscription) - from WSO2 since the referring Docker images hosted at docker.wso2.com contains the latest updates and fixes for WSO2 API Manager
and + * In order to run this Docker Compose setup, you will need an active subscription from WSO2 since the referring Docker images hosted at docker.wso2.com contains the latest updates and fixes for WSO2 API Manager
and API Manager Analytics 2.5.0 and WSO2 Identity Server as KM 5.6.0. You can sign up for a Free Trial Subscription [here](https://wso2.com/free-trial-subscription).

* If you wish to run the Docker Compose setup using Docker images built locally, build Docker images using
[WSO2 API Manager Dockerfile](../../dockerfiles/apim/README.md), [API Manager Analytics Dockerfile](../../dockerfiles/apim-analytics/README.md) and [WSO2 Identity Server as KM Dockerfile](../../dockerfiles/is-as-km/README.md) and remove the `docker.wso2.com/` prefix From 6af205667816df3f35a122a0ea803c384b282a3a Mon Sep 17 00:00:00 2001 From: chirangaalwis Date: Wed, 27 Jun 2018 13:38:04 +0530 Subject: [PATCH 06/13] Refine Dockerfiles and fix DB issue in Docker Compose resources --- .../mysql/scripts/apim_mysql5.7.sql | 73 ++++++++++++- .../mysql/scripts/mb_store_mysql.sql | 101 ++++++++++++++++-- .../mysql/scripts/apim_mysql5.7.sql | 73 ++++++++++++- dockerfiles/apim-analytics/Dockerfile | 8 +- .../apim-analytics/{files => }/init.sh | 38 +++++-- dockerfiles/apim/Dockerfile | 9 +- dockerfiles/apim/files/init.sh | 54 ---------- dockerfiles/apim/init.sh | 92 ++++++++++++++++ 8 files changed, 371 insertions(+), 77 deletions(-) rename dockerfiles/apim-analytics/{files => }/init.sh (54%) delete mode 100755 dockerfiles/apim/files/init.sh create mode 100755 dockerfiles/apim/init.sh diff --git a/docker-compose/apim-is-as-km-with-analytics/mysql/scripts/apim_mysql5.7.sql b/docker-compose/apim-is-as-km-with-analytics/mysql/scripts/apim_mysql5.7.sql index c6b4bf44..2fbf2291 100644 --- a/docker-compose/apim-is-as-km-with-analytics/mysql/scripts/apim_mysql5.7.sql +++ b/docker-compose/apim-is-as-km-with-analytics/mysql/scripts/apim_mysql5.7.sql @@ -30,6 +30,7 @@ CREATE TABLE IF NOT EXISTS IDN_OAUTH_CONSUMER_APPS ( USER_ACCESS_TOKEN_EXPIRE_TIME BIGINT DEFAULT 3600000, APP_ACCESS_TOKEN_EXPIRE_TIME BIGINT DEFAULT 3600000, REFRESH_TOKEN_EXPIRE_TIME BIGINT DEFAULT 84600000, + ID_TOKEN_EXPIRE_TIME BIGINT DEFAULT 3600000, CONSTRAINT CONSUMER_KEY_CONSTRAINT UNIQUE (CONSUMER_KEY), PRIMARY KEY (ID) )ENGINE INNODB; @@ -98,6 +99,9 @@ CREATE INDEX IDX_TC ON IDN_OAUTH2_ACCESS_TOKEN(TIME_CREATED); CREATE INDEX IDX_ATH ON IDN_OAUTH2_ACCESS_TOKEN(ACCESS_TOKEN_HASH); +CREATE INDEX IDX_AT_TI_UD ON IDN_OAUTH2_ACCESS_TOKEN(AUTHZ_USER, TENANT_ID, TOKEN_STATE, USER_DOMAIN); + + CREATE TABLE IF NOT EXISTS IDN_OAUTH2_AUTHORIZATION_CODE ( CODE_ID VARCHAR (255), AUTHORIZATION_CODE VARCHAR(2048), @@ -121,6 +125,9 @@ CREATE TABLE IF NOT EXISTS IDN_OAUTH2_AUTHORIZATION_CODE ( CREATE INDEX IDX_AUTHORIZATION_CODE_HASH ON IDN_OAUTH2_AUTHORIZATION_CODE (AUTHORIZATION_CODE_HASH,CONSUMER_KEY_ID); +CREATE INDEX IDX_AUTHORIZATION_CODE_AU_TI ON IDN_OAUTH2_AUTHORIZATION_CODE (AUTHZ_USER,TENANT_ID, USER_DOMAIN, STATE); + + CREATE TABLE IF NOT EXISTS IDN_OAUTH2_ACCESS_TOKEN_SCOPE ( TOKEN_ID VARCHAR (255), TOKEN_SCOPE VARCHAR (60), @@ -141,7 +148,8 @@ CREATE TABLE IF NOT EXISTS IDN_OAUTH2_SCOPE ( CREATE TABLE IF NOT EXISTS IDN_OAUTH2_SCOPE_BINDING ( SCOPE_ID INTEGER NOT NULL, SCOPE_BINDING VARCHAR(255), - FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE(SCOPE_ID) ON DELETE CASCADE + FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE(SCOPE_ID) ON DELETE CASCADE, + PRIMARY KEY (SCOPE_ID, SCOPE_BINDING) )ENGINE INNODB; CREATE TABLE IF NOT EXISTS IDN_OAUTH2_RESOURCE_SCOPE ( @@ -161,6 +169,11 @@ CREATE TABLE IF NOT EXISTS IDN_SCIM_GROUP ( PRIMARY KEY (ID) )ENGINE INNODB; +CREATE INDEX IDX_IDN_SCIM_GROUP_TI_RN ON IDN_SCIM_GROUP (TENANT_ID, ROLE_NAME); + +CREATE INDEX IDX_IDN_SCIM_GROUP_TI_RN_AN ON IDN_SCIM_GROUP (TENANT_ID, ROLE_NAME, ATTR_NAME); + + CREATE TABLE IF NOT EXISTS IDN_OPENID_REMEMBER_ME ( USER_NAME VARCHAR(255) NOT NULL, TENANT_ID INTEGER DEFAULT 0, @@ -233,9 +246,27 @@ CREATE TABLE IF NOT EXISTS IDN_AUTH_SESSION_STORE ( SESSION_OBJECT BLOB, TIME_CREATED BIGINT, TENANT_ID INTEGER DEFAULT -1, + EXPIRY_TIME BIGINT, PRIMARY KEY (SESSION_ID, SESSION_TYPE, TIME_CREATED, OPERATION) )ENGINE INNODB; +CREATE INDEX IDX_IDN_AUTH_SESSION_STORE_TIME ON IDN_AUTH_SESSION_STORE (TIME_CREATED); + + +CREATE TABLE IF NOT EXISTS IDN_AUTH_TEMP_SESSION_STORE ( + SESSION_ID VARCHAR (100) NOT NULL, + SESSION_TYPE VARCHAR(100) NOT NULL, + OPERATION VARCHAR(10) NOT NULL, + SESSION_OBJECT BLOB, + TIME_CREATED BIGINT, + TENANT_ID INTEGER DEFAULT -1, + EXPIRY_TIME BIGINT, + PRIMARY KEY (SESSION_ID, SESSION_TYPE, TIME_CREATED, OPERATION) +)ENGINE INNODB; + +CREATE INDEX IDX_IDN_AUTH_TEMP_SESSION_STORE_TIME ON IDN_AUTH_TEMP_SESSION_STORE (TIME_CREATED); + + CREATE TABLE IF NOT EXISTS SP_APP ( ID INTEGER NOT NULL AUTO_INCREMENT, TENANT_ID INTEGER NOT NULL, @@ -307,6 +338,15 @@ CREATE TABLE IF NOT EXISTS SP_FEDERATED_IDP ( ALTER TABLE SP_FEDERATED_IDP ADD CONSTRAINT STEP_ID_CONSTRAINT FOREIGN KEY (ID) REFERENCES SP_AUTH_STEP (ID) ON DELETE CASCADE; +CREATE TABLE IF NOT EXISTS SP_CLAIM_DIALECT ( + ID INTEGER NOT NULL AUTO_INCREMENT, + TENANT_ID INTEGER NOT NULL, + SP_DIALECT VARCHAR (512) NOT NULL, + APP_ID INTEGER NOT NULL, + PRIMARY KEY (ID)); + +ALTER TABLE SP_CLAIM_DIALECT ADD CONSTRAINT DIALECTID_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; + CREATE TABLE IF NOT EXISTS SP_CLAIM_MAPPING ( ID INTEGER NOT NULL AUTO_INCREMENT, TENANT_ID INTEGER NOT NULL, @@ -934,6 +974,7 @@ CREATE TABLE IF NOT EXISTS AM_APPLICATION ( UPDATED_BY VARCHAR(100), UPDATED_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP, UUID VARCHAR(256), + TOKEN_TYPE VARCHAR(10), FOREIGN KEY(SUBSCRIBER_ID) REFERENCES AM_SUBSCRIBER(SUBSCRIBER_ID) ON UPDATE CASCADE ON DELETE RESTRICT, PRIMARY KEY(APPLICATION_ID), UNIQUE (NAME,SUBSCRIBER_ID), @@ -1097,7 +1138,8 @@ CREATE TABLE IF NOT EXISTS AM_API_SCOPES ( API_ID INTEGER NOT NULL, SCOPE_ID INTEGER NOT NULL, FOREIGN KEY (API_ID) REFERENCES AM_API (API_ID) ON DELETE CASCADE ON UPDATE CASCADE, - FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE (SCOPE_ID) ON DELETE CASCADE ON UPDATE CASCADE + FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE (SCOPE_ID) ON DELETE CASCADE ON UPDATE CASCADE, + PRIMARY KEY (API_ID, SCOPE_ID) )ENGINE = INNODB; CREATE TABLE IF NOT EXISTS AM_API_DEFAULT_VERSION ( @@ -1144,7 +1186,6 @@ INSERT INTO AM_ALERT_TYPES (ALERT_TYPE_NAME, STAKE_HOLDER) VALUES ('abnormalBack INSERT INTO AM_ALERT_TYPES (ALERT_TYPE_NAME, STAKE_HOLDER) VALUES ('abnormalRequestsPerMin', 'subscriber'); INSERT INTO AM_ALERT_TYPES (ALERT_TYPE_NAME, STAKE_HOLDER) VALUES ('RequestPatternChanged', 'subscriber'); INSERT INTO AM_ALERT_TYPES (ALERT_TYPE_NAME, STAKE_HOLDER) VALUES ('UnusualIPAccessAlert', 'subscriber'); -INSERT INTO AM_ALERT_TYPES (ALERT_TYPE_NAME, STAKE_HOLDER) VALUES ('AbnormalRefreshAlert', 'subscriber'); INSERT INTO AM_ALERT_TYPES (ALERT_TYPE_NAME, STAKE_HOLDER) VALUES ('FrequentTierHittingAlert', 'subscriber'); INSERT INTO AM_ALERT_TYPES (ALERT_TYPE_NAME, STAKE_HOLDER) VALUES ('AbnormalTierUsage', 'publisher'); INSERT INTO AM_ALERT_TYPES (ALERT_TYPE_NAME, STAKE_HOLDER) VALUES ('healthAvailabilityPerMin', 'publisher'); @@ -1351,6 +1392,32 @@ CREATE TABLE IF NOT EXISTS AM_API_LC_PUBLISH_EVENTS ( EVENT_TIME TIMESTAMP NOT NULL, PRIMARY KEY (ID) ) ENGINE=InnoDB; + +CREATE TABLE IF NOT EXISTS AM_APPLICATION_ATTRIBUTES ( + APPLICATION_ID int(11) NOT NULL, + NAME varchar(255) NOT NULL, + VALUE varchar(1024) NOT NULL, + TENANT_ID int(11) NOT NULL, + PRIMARY KEY (APPLICATION_ID,NAME), + FOREIGN KEY (APPLICATION_ID) REFERENCES AM_APPLICATION (APPLICATION_ID) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; + +CREATE TABLE IF NOT EXISTS AM_LABELS ( + LABEL_ID VARCHAR(50), + NAME VARCHAR(255), + DESCRIPTION VARCHAR(1024), + TENANT_DOMAIN VARCHAR(255), + UNIQUE (NAME,TENANT_DOMAIN), + PRIMARY KEY (LABEL_ID) +) ENGINE=InnoDB; + +CREATE TABLE IF NOT EXISTS AM_LABEL_URLS ( + LABEL_ID VARCHAR(50), + ACCESS_URL VARCHAR(255), + PRIMARY KEY (LABEL_ID,ACCESS_URL), + FOREIGN KEY (LABEL_ID) REFERENCES AM_LABELS(LABEL_ID) ON UPDATE CASCADE ON DELETE CASCADE +) ENGINE=InnoDB; + -- End of API-MGT Tables -- -- Performance indexes start-- diff --git a/docker-compose/apim-is-as-km-with-analytics/mysql/scripts/mb_store_mysql.sql b/docker-compose/apim-is-as-km-with-analytics/mysql/scripts/mb_store_mysql.sql index 9e4cba99..ece99a07 100644 --- a/docker-compose/apim-is-as-km-with-analytics/mysql/scripts/mb_store_mysql.sql +++ b/docker-compose/apim-is-as-km-with-analytics/mysql/scripts/mb_store_mysql.sql @@ -26,7 +26,7 @@ USE `mb_store_db`; CREATE TABLE IF NOT EXISTS MB_QUEUE_MAPPING ( QUEUE_ID INTEGER AUTO_INCREMENT, - QUEUE_NAME VARCHAR(512) NOT NULL, + QUEUE_NAME VARCHAR(512) UNIQUE NOT NULL, PRIMARY KEY (QUEUE_ID, QUEUE_NAME) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; @@ -53,24 +53,74 @@ CREATE TABLE IF NOT EXISTS MB_CONTENT ( CREATE TABLE IF NOT EXISTS MB_EXPIRATION_DATA ( MESSAGE_ID BIGINT UNIQUE, EXPIRATION_TIME BIGINT, + DLC_QUEUE_ID INTEGER NOT NULL, MESSAGE_DESTINATION VARCHAR(512) NOT NULL, FOREIGN KEY (MESSAGE_ID) REFERENCES MB_METADATA (MESSAGE_ID) + ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE IF NOT EXISTS MB_RETAINED_METADATA ( - TOPIC_ID INT, + TOPIC_ID INTEGER, TOPIC_NAME VARCHAR(512) NOT NULL, MESSAGE_ID BIGINT NOT NULL, MESSAGE_METADATA VARBINARY(65000) NOT NULL, PRIMARY KEY (TOPIC_ID) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE IF NOT EXISTS MB_DTX_XID ( + INTERNAL_XID BIGINT UNIQUE NOT NULL, + NODE_ID VARCHAR(512) NOT NULL, + FORMAT_CODE BIGINT NOT NULL, + GLOBAL_ID VARBINARY(260), -- AMQP-10 vbin8 type + BRANCH_ID VARBINARY(260), -- AMQP-10 vbin8 type + PRIMARY KEY (INTERNAL_XID, NODE_ID) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +CREATE TABLE IF NOT EXISTS MB_DTX_ENQUEUE_RECORD ( + INTERNAL_XID BIGINT NOT NULL, + MESSAGE_ID BIGINT NOT NULL, + MESSAGE_METADATA VARBINARY(65000) NOT NULL, + PRIMARY KEY (MESSAGE_ID), + FOREIGN KEY (INTERNAL_XID) REFERENCES MB_DTX_XID (INTERNAL_XID) + ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +CREATE TABLE IF NOT EXISTS MB_DTX_DEQUEUE_RECORD ( + INTERNAL_XID BIGINT NOT NULL, + MESSAGE_ID BIGINT NOT NULL, + QUEUE_NAME VARCHAR(512) NOT NULL, + MESSAGE_METADATA VARBINARY(65000) NOT NULL, + PRIMARY KEY (MESSAGE_ID), + FOREIGN KEY (INTERNAL_XID) REFERENCES MB_DTX_XID (INTERNAL_XID) + ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +CREATE TABLE IF NOT EXISTS MB_DTX_ENQUEUE_CONTENT ( + MESSAGE_ID BIGINT NOT NULL, + INTERNAL_XID BIGINT NOT NULL, + CONTENT_OFFSET INTEGER NOT NULL, + MESSAGE_CONTENT VARBINARY(65500) NOT NULL, + PRIMARY KEY (MESSAGE_ID, CONTENT_OFFSET), + FOREIGN KEY (MESSAGE_ID) REFERENCES MB_DTX_ENQUEUE_RECORD (MESSAGE_ID) + ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +CREATE TABLE IF NOT EXISTS MB_DTX_DEQUEUE_CONTENT ( + INTERNAL_XID BIGINT NOT NULL, + MESSAGE_ID BIGINT NOT NULL, + CONTENT_OFFSET INTEGER NOT NULL, + MESSAGE_CONTENT VARBINARY(65500) NOT NULL, + PRIMARY KEY (MESSAGE_ID, CONTENT_OFFSET), + FOREIGN KEY (MESSAGE_ID) REFERENCES MB_DTX_DEQUEUE_RECORD (MESSAGE_ID) + ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + -- End of Message Store Tables -- -- Start of Andes Context Store Tables -- - + CREATE TABLE IF NOT EXISTS MB_DURABLE_SUBSCRIPTION ( - SUBSCRIPTION_ID VARCHAR(512) NOT NULL, + SUBSCRIPTION_ID VARCHAR(512) NOT NULL, DESTINATION_IDENTIFIER VARCHAR(512) NOT NULL, SUBSCRIPTION_DATA VARCHAR(2048) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; @@ -104,8 +154,8 @@ CREATE TABLE IF NOT EXISTS MB_BINDING ( CREATE TABLE IF NOT EXISTS MB_QUEUE_COUNTER ( QUEUE_NAME VARCHAR(512) NOT NULL, - MESSAGE_COUNT BIGINT, - PRIMARY KEY (QUEUE_NAME) + MESSAGE_COUNT BIGINT, + PRIMARY KEY (QUEUE_NAME) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE IF NOT EXISTS MB_SLOT ( @@ -145,7 +195,7 @@ CREATE TABLE IF NOT EXISTS MB_QUEUE_TO_LAST_ASSIGNED_ID ( CREATE TABLE IF NOT EXISTS MB_MSG_STORE_STATUS ( NODE_ID VARCHAR(512) NOT NULL, - TIME_STAMP BIGINT, + TIME_STAMP BIGINT, PRIMARY KEY (NODE_ID, TIME_STAMP) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; @@ -156,4 +206,41 @@ CREATE TABLE IF NOT EXISTS MB_RETAINED_CONTENT ( PRIMARY KEY (MESSAGE_ID,CONTENT_OFFSET) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE IF NOT EXISTS MB_COORDINATOR_HEARTBEAT ( + ANCHOR INT NOT NULL, + NODE_ID VARCHAR(512) NOT NULL, + LAST_HEARTBEAT BIGINT NOT NULL, + THRIFT_HOST VARCHAR(512) NOT NULL, + THRIFT_PORT INT NOT NULL, + PRIMARY KEY (ANCHOR) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +CREATE TABLE IF NOT EXISTS MB_NODE_HEARTBEAT ( + NODE_ID VARCHAR(512) NOT NULL, + LAST_HEARTBEAT BIGINT NOT NULL, + IS_NEW_NODE TINYINT NOT NULL, + CLUSTER_AGENT_HOST VARCHAR(512) NOT NULL, + CLUSTER_AGENT_PORT INT NOT NULL, + PRIMARY KEY (NODE_ID) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +CREATE TABLE IF NOT EXISTS MB_MEMBERSHIP ( + EVENT_ID BIGINT NOT NULL AUTO_INCREMENT, + NODE_ID VARCHAR(512) NOT NULL, + CHANGE_TYPE tinyint(4) NOT NULL, + CHANGED_MEMBER_ID VARCHAR(512) NOT NULL, + PRIMARY KEY (EVENT_ID) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +CREATE TABLE IF NOT EXISTS MB_CLUSTER_EVENT ( + EVENT_ID BIGINT NOT NULL AUTO_INCREMENT, + ORIGINATED_NODE_ID VARCHAR(512) NOT NULL, + DESTINED_NODE_ID VARCHAR(512) NOT NULL, + EVENT_ARTIFACT VARCHAR(25) NOT NULL, + EVENT_TYPE VARCHAR(25) NOT NULL, + EVENT_DETAILS VARCHAR(1024) NOT NULL, + EVENT_DESCRIPTION VARCHAR(1024), + PRIMARY KEY (EVENT_ID) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + -- End of Andes Context Store Tables -- diff --git a/docker-compose/apim-with-analytics/mysql/scripts/apim_mysql5.7.sql b/docker-compose/apim-with-analytics/mysql/scripts/apim_mysql5.7.sql index c6b4bf44..2fbf2291 100644 --- a/docker-compose/apim-with-analytics/mysql/scripts/apim_mysql5.7.sql +++ b/docker-compose/apim-with-analytics/mysql/scripts/apim_mysql5.7.sql @@ -30,6 +30,7 @@ CREATE TABLE IF NOT EXISTS IDN_OAUTH_CONSUMER_APPS ( USER_ACCESS_TOKEN_EXPIRE_TIME BIGINT DEFAULT 3600000, APP_ACCESS_TOKEN_EXPIRE_TIME BIGINT DEFAULT 3600000, REFRESH_TOKEN_EXPIRE_TIME BIGINT DEFAULT 84600000, + ID_TOKEN_EXPIRE_TIME BIGINT DEFAULT 3600000, CONSTRAINT CONSUMER_KEY_CONSTRAINT UNIQUE (CONSUMER_KEY), PRIMARY KEY (ID) )ENGINE INNODB; @@ -98,6 +99,9 @@ CREATE INDEX IDX_TC ON IDN_OAUTH2_ACCESS_TOKEN(TIME_CREATED); CREATE INDEX IDX_ATH ON IDN_OAUTH2_ACCESS_TOKEN(ACCESS_TOKEN_HASH); +CREATE INDEX IDX_AT_TI_UD ON IDN_OAUTH2_ACCESS_TOKEN(AUTHZ_USER, TENANT_ID, TOKEN_STATE, USER_DOMAIN); + + CREATE TABLE IF NOT EXISTS IDN_OAUTH2_AUTHORIZATION_CODE ( CODE_ID VARCHAR (255), AUTHORIZATION_CODE VARCHAR(2048), @@ -121,6 +125,9 @@ CREATE TABLE IF NOT EXISTS IDN_OAUTH2_AUTHORIZATION_CODE ( CREATE INDEX IDX_AUTHORIZATION_CODE_HASH ON IDN_OAUTH2_AUTHORIZATION_CODE (AUTHORIZATION_CODE_HASH,CONSUMER_KEY_ID); +CREATE INDEX IDX_AUTHORIZATION_CODE_AU_TI ON IDN_OAUTH2_AUTHORIZATION_CODE (AUTHZ_USER,TENANT_ID, USER_DOMAIN, STATE); + + CREATE TABLE IF NOT EXISTS IDN_OAUTH2_ACCESS_TOKEN_SCOPE ( TOKEN_ID VARCHAR (255), TOKEN_SCOPE VARCHAR (60), @@ -141,7 +148,8 @@ CREATE TABLE IF NOT EXISTS IDN_OAUTH2_SCOPE ( CREATE TABLE IF NOT EXISTS IDN_OAUTH2_SCOPE_BINDING ( SCOPE_ID INTEGER NOT NULL, SCOPE_BINDING VARCHAR(255), - FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE(SCOPE_ID) ON DELETE CASCADE + FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE(SCOPE_ID) ON DELETE CASCADE, + PRIMARY KEY (SCOPE_ID, SCOPE_BINDING) )ENGINE INNODB; CREATE TABLE IF NOT EXISTS IDN_OAUTH2_RESOURCE_SCOPE ( @@ -161,6 +169,11 @@ CREATE TABLE IF NOT EXISTS IDN_SCIM_GROUP ( PRIMARY KEY (ID) )ENGINE INNODB; +CREATE INDEX IDX_IDN_SCIM_GROUP_TI_RN ON IDN_SCIM_GROUP (TENANT_ID, ROLE_NAME); + +CREATE INDEX IDX_IDN_SCIM_GROUP_TI_RN_AN ON IDN_SCIM_GROUP (TENANT_ID, ROLE_NAME, ATTR_NAME); + + CREATE TABLE IF NOT EXISTS IDN_OPENID_REMEMBER_ME ( USER_NAME VARCHAR(255) NOT NULL, TENANT_ID INTEGER DEFAULT 0, @@ -233,9 +246,27 @@ CREATE TABLE IF NOT EXISTS IDN_AUTH_SESSION_STORE ( SESSION_OBJECT BLOB, TIME_CREATED BIGINT, TENANT_ID INTEGER DEFAULT -1, + EXPIRY_TIME BIGINT, PRIMARY KEY (SESSION_ID, SESSION_TYPE, TIME_CREATED, OPERATION) )ENGINE INNODB; +CREATE INDEX IDX_IDN_AUTH_SESSION_STORE_TIME ON IDN_AUTH_SESSION_STORE (TIME_CREATED); + + +CREATE TABLE IF NOT EXISTS IDN_AUTH_TEMP_SESSION_STORE ( + SESSION_ID VARCHAR (100) NOT NULL, + SESSION_TYPE VARCHAR(100) NOT NULL, + OPERATION VARCHAR(10) NOT NULL, + SESSION_OBJECT BLOB, + TIME_CREATED BIGINT, + TENANT_ID INTEGER DEFAULT -1, + EXPIRY_TIME BIGINT, + PRIMARY KEY (SESSION_ID, SESSION_TYPE, TIME_CREATED, OPERATION) +)ENGINE INNODB; + +CREATE INDEX IDX_IDN_AUTH_TEMP_SESSION_STORE_TIME ON IDN_AUTH_TEMP_SESSION_STORE (TIME_CREATED); + + CREATE TABLE IF NOT EXISTS SP_APP ( ID INTEGER NOT NULL AUTO_INCREMENT, TENANT_ID INTEGER NOT NULL, @@ -307,6 +338,15 @@ CREATE TABLE IF NOT EXISTS SP_FEDERATED_IDP ( ALTER TABLE SP_FEDERATED_IDP ADD CONSTRAINT STEP_ID_CONSTRAINT FOREIGN KEY (ID) REFERENCES SP_AUTH_STEP (ID) ON DELETE CASCADE; +CREATE TABLE IF NOT EXISTS SP_CLAIM_DIALECT ( + ID INTEGER NOT NULL AUTO_INCREMENT, + TENANT_ID INTEGER NOT NULL, + SP_DIALECT VARCHAR (512) NOT NULL, + APP_ID INTEGER NOT NULL, + PRIMARY KEY (ID)); + +ALTER TABLE SP_CLAIM_DIALECT ADD CONSTRAINT DIALECTID_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; + CREATE TABLE IF NOT EXISTS SP_CLAIM_MAPPING ( ID INTEGER NOT NULL AUTO_INCREMENT, TENANT_ID INTEGER NOT NULL, @@ -934,6 +974,7 @@ CREATE TABLE IF NOT EXISTS AM_APPLICATION ( UPDATED_BY VARCHAR(100), UPDATED_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP, UUID VARCHAR(256), + TOKEN_TYPE VARCHAR(10), FOREIGN KEY(SUBSCRIBER_ID) REFERENCES AM_SUBSCRIBER(SUBSCRIBER_ID) ON UPDATE CASCADE ON DELETE RESTRICT, PRIMARY KEY(APPLICATION_ID), UNIQUE (NAME,SUBSCRIBER_ID), @@ -1097,7 +1138,8 @@ CREATE TABLE IF NOT EXISTS AM_API_SCOPES ( API_ID INTEGER NOT NULL, SCOPE_ID INTEGER NOT NULL, FOREIGN KEY (API_ID) REFERENCES AM_API (API_ID) ON DELETE CASCADE ON UPDATE CASCADE, - FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE (SCOPE_ID) ON DELETE CASCADE ON UPDATE CASCADE + FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE (SCOPE_ID) ON DELETE CASCADE ON UPDATE CASCADE, + PRIMARY KEY (API_ID, SCOPE_ID) )ENGINE = INNODB; CREATE TABLE IF NOT EXISTS AM_API_DEFAULT_VERSION ( @@ -1144,7 +1186,6 @@ INSERT INTO AM_ALERT_TYPES (ALERT_TYPE_NAME, STAKE_HOLDER) VALUES ('abnormalBack INSERT INTO AM_ALERT_TYPES (ALERT_TYPE_NAME, STAKE_HOLDER) VALUES ('abnormalRequestsPerMin', 'subscriber'); INSERT INTO AM_ALERT_TYPES (ALERT_TYPE_NAME, STAKE_HOLDER) VALUES ('RequestPatternChanged', 'subscriber'); INSERT INTO AM_ALERT_TYPES (ALERT_TYPE_NAME, STAKE_HOLDER) VALUES ('UnusualIPAccessAlert', 'subscriber'); -INSERT INTO AM_ALERT_TYPES (ALERT_TYPE_NAME, STAKE_HOLDER) VALUES ('AbnormalRefreshAlert', 'subscriber'); INSERT INTO AM_ALERT_TYPES (ALERT_TYPE_NAME, STAKE_HOLDER) VALUES ('FrequentTierHittingAlert', 'subscriber'); INSERT INTO AM_ALERT_TYPES (ALERT_TYPE_NAME, STAKE_HOLDER) VALUES ('AbnormalTierUsage', 'publisher'); INSERT INTO AM_ALERT_TYPES (ALERT_TYPE_NAME, STAKE_HOLDER) VALUES ('healthAvailabilityPerMin', 'publisher'); @@ -1351,6 +1392,32 @@ CREATE TABLE IF NOT EXISTS AM_API_LC_PUBLISH_EVENTS ( EVENT_TIME TIMESTAMP NOT NULL, PRIMARY KEY (ID) ) ENGINE=InnoDB; + +CREATE TABLE IF NOT EXISTS AM_APPLICATION_ATTRIBUTES ( + APPLICATION_ID int(11) NOT NULL, + NAME varchar(255) NOT NULL, + VALUE varchar(1024) NOT NULL, + TENANT_ID int(11) NOT NULL, + PRIMARY KEY (APPLICATION_ID,NAME), + FOREIGN KEY (APPLICATION_ID) REFERENCES AM_APPLICATION (APPLICATION_ID) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; + +CREATE TABLE IF NOT EXISTS AM_LABELS ( + LABEL_ID VARCHAR(50), + NAME VARCHAR(255), + DESCRIPTION VARCHAR(1024), + TENANT_DOMAIN VARCHAR(255), + UNIQUE (NAME,TENANT_DOMAIN), + PRIMARY KEY (LABEL_ID) +) ENGINE=InnoDB; + +CREATE TABLE IF NOT EXISTS AM_LABEL_URLS ( + LABEL_ID VARCHAR(50), + ACCESS_URL VARCHAR(255), + PRIMARY KEY (LABEL_ID,ACCESS_URL), + FOREIGN KEY (LABEL_ID) REFERENCES AM_LABELS(LABEL_ID) ON UPDATE CASCADE ON DELETE CASCADE +) ENGINE=InnoDB; + -- End of API-MGT Tables -- -- Performance indexes start-- diff --git a/dockerfiles/apim-analytics/Dockerfile b/dockerfiles/apim-analytics/Dockerfile index 6b66c9cb..0c8b477f 100644 --- a/dockerfiles/apim-analytics/Dockerfile +++ b/dockerfiles/apim-analytics/Dockerfile @@ -40,7 +40,8 @@ ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER}-${WSO2_SERVER_VERSION} # install required packages RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - curl && \ + curl \ + netcat && \ rm -rf /var/lib/apt/lists/* && \ echo '[ ! -z "$TERM" -a -r /etc/motd ] && cat /etc/motd' \ >> /etc/bash.bashrc \ @@ -58,8 +59,11 @@ RUN groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} && \ # copy the jdk and wso2 product distributions to user's home directory and copy the mysql connector jar to server distribution COPY --chown=wso2carbon:wso2 ${FILES}/${JDK} ${USER_HOME}/java/ COPY --chown=wso2carbon:wso2 ${FILES}/${WSO2_SERVER_DIST}/ ${USER_HOME}/${WSO2_SERVER_DIST}/ -COPY --chown=wso2carbon:wso2 ${FILES}/init.sh ${USER_HOME}/ +COPY --chown=wso2carbon:wso2 init.sh ${USER_HOME}/ COPY --chown=wso2carbon:wso2 ${FILES}/mysql-connector-java-*-bin.jar ${USER_HOME}/${WSO2_SERVER_DIST}/repository/components/lib/ +# set temporary location for artifacts to be persisted +COPY --chown=wso2carbon:wso2 ${FILES}/${WSO2_SERVER_DIST}/repository/conf/analytics ${USER_HOME}/wso2-tmp/analytics + # set the user and work directory USER ${USER_ID} WORKDIR ${USER_HOME} diff --git a/dockerfiles/apim-analytics/files/init.sh b/dockerfiles/apim-analytics/init.sh similarity index 54% rename from dockerfiles/apim-analytics/files/init.sh rename to dockerfiles/apim-analytics/init.sh index 30306d61..c2c93f80 100755 --- a/dockerfiles/apim-analytics/files/init.sh +++ b/dockerfiles/apim-analytics/init.sh @@ -16,28 +16,54 @@ # ------------------------------------------------------------------------ set -e +# product profile variable +wso2_server_profile=am-analytics + # custom WSO2 non-root user and group variables user=wso2carbon group=wso2 # file path variables volumes=${WORKING_DIRECTORY}/volumes +k8s_volumes=${WORKING_DIRECTORY}/kubernetes-volumes +temp_persisted_artifacts=${WORKING_DIRECTORY}/wso2-tmp/analytics +original_persisted_artifacts=${WSO2_SERVER_HOME}/repository/conf/analytics # capture the Docker container IP from the container's /etc/hosts file docker_container_ip=$(awk 'END{print $1}' /etc/hosts) -# check if the WSO2 non-root user has been created -! getent passwd ${user} >/dev/null 2>&1 && echo "WSO2 Docker non-root user does not exist" && exit 1 - -# check if the WSO2 non-root group has been created -! getent group ${group} >/dev/null 2>&1 && echo "WSO2 Docker non-root group does not exist" && exit 1 - # check if the WSO2 non-root user home exists test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 # check if the WSO2 product home exists test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 +# copy the backed up artifacts from ${HOME}/wso2-tmp/analytics +# copying the initial artifacts to ${HOME}/wso2-tmp/analytics was done in the Dockerfile +# this is to preserve the initial artifacts in a volume mount (the mounted directory can be empty initially) +# the artifacts will be copied to the /repository/conf/analytics location, +# before the server is started +if test -d ${temp_persisted_artifacts}; then + if [ -z "$(ls -A ${original_persisted_artifacts}/)" ]; then + # if no artifacts under /wso2/analytics/conf/analytics; copy them + echo "Copying shared server artifacts from temporary location to the original server home location..." + cp -R ${temp_persisted_artifacts}/* ${original_persisted_artifacts} + fi +fi + +# check if any changed configuration files have been mounted, using K8s ConfigMap volumes + +# since, K8s does not support building ConfigMaps recursively from a directory, each folder has been separately +# mounted in the form of a K8s ConfigMap volume +# copy the mounted configuration files (through ConfigMaps) to the product pack +if test -d ${k8s_volumes}/${wso2_server_profile}/conf; then + cp -RL ${k8s_volumes}/${wso2_server_profile}/conf/* ${WSO2_SERVER_HOME}/repository/conf +fi + +if test -d ${k8s_volumes}/${wso2_server_profile}/conf-datasources; then + cp -RL ${k8s_volumes}/${wso2_server_profile}/conf-datasources/* ${WSO2_SERVER_HOME}/repository/conf/datasources +fi + # copy configuration changes and external libraries # check if any changed configuration files have been mounted diff --git a/dockerfiles/apim/Dockerfile b/dockerfiles/apim/Dockerfile index cd90887f..2af59ab1 100644 --- a/dockerfiles/apim/Dockerfile +++ b/dockerfiles/apim/Dockerfile @@ -40,7 +40,8 @@ ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER}-${WSO2_SERVER_VERSION} # install required packages RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - curl && \ + curl \ + netcat && \ rm -rf /var/lib/apt/lists/* && \ echo '[ ! -z "$TERM" -a -r /etc/motd ] && cat /etc/motd' \ >> /etc/bash.bashrc \ @@ -58,8 +59,12 @@ RUN groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} && \ # copy the jdk and wso2 product distributions to user's home directory and copy the mysql connector jar to server distribution COPY --chown=wso2carbon:wso2 ${FILES}/${JDK} ${USER_HOME}/java/ COPY --chown=wso2carbon:wso2 ${FILES}/${WSO2_SERVER_DIST} ${USER_HOME}/${WSO2_SERVER_DIST} -COPY --chown=wso2carbon:wso2 ${FILES}/init.sh ${USER_HOME}/ +COPY --chown=wso2carbon:wso2 init.sh ${USER_HOME}/ COPY --chown=wso2carbon:wso2 ${FILES}/mysql-connector-java-*-bin.jar ${USER_HOME}/${WSO2_SERVER_DIST}/repository/components/lib/ +COPY --chown=wso2carbon:wso2 ${FILES}/dnsjava-*.jar ${USER_HOME}/${WSO2_SERVER_DIST}/repository/components/lib/ +COPY --chown=wso2carbon:wso2 ${FILES}/kubernetes-membership-scheme-*.jar ${USER_HOME}/${WSO2_SERVER_DIST}/repository/components/dropins/ +# set temporary location for shared artifacts +COPY --chown=wso2carbon:wso2 ${FILES}/${WSO2_SERVER_DIST}/repository/deployment/server ${USER_HOME}/wso2-tmp/server # set the user and work directory USER ${USER_ID} diff --git a/dockerfiles/apim/files/init.sh b/dockerfiles/apim/files/init.sh deleted file mode 100755 index 6d4dc535..00000000 --- a/dockerfiles/apim/files/init.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh -# ------------------------------------------------------------------------ -# Copyright 2018 WSO2, Inc. (http://wso2.com) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License -# ------------------------------------------------------------------------ -set -e - -# custom WSO2 non-root user and group variables -user=wso2carbon -group=wso2 - -# file path variables -volumes=${WORKING_DIRECTORY}/volumes - -# capture the Docker container IP from the container's /etc/hosts file -docker_container_ip=$(awk 'END{print $1}' /etc/hosts) - -# check if the WSO2 non-root user has been created -! getent passwd ${user} >/dev/null 2>&1 && echo "WSO2 Docker non-root user does not exist" && exit 1 - -# check if the WSO2 non-root group has been created -! getent group ${group} >/dev/null 2>&1 && echo "WSO2 Docker non-root group does not exist" && exit 1 - -# check if the WSO2 non-root user home exists -test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 - -# check if the WSO2 product home exists -test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 - -# copy configuration changes and external libraries - -# check if any changed configuration files have been mounted -# if any file changes have been mounted, copy the WSO2 configuration files recursively -test -d ${volumes}/ && cp -r ${volumes}/* ${WSO2_SERVER_HOME}/ - -# make any runtime or node specific configuration changes -# for example, setting container IP in relevant configuration files - -# set the Docker container IP as the `localMemberHost` under axis2.xml clustering configurations (effective only when clustering is enabled) -sed -i "s##${docker_container_ip}<\/parameter>#" ${WSO2_SERVER_HOME}/repository/conf/axis2/axis2.xml - -# start the WSO2 Carbon server -sh ${WSO2_SERVER_HOME}/bin/wso2server.sh diff --git a/dockerfiles/apim/init.sh b/dockerfiles/apim/init.sh new file mode 100755 index 00000000..9f6e39f2 --- /dev/null +++ b/dockerfiles/apim/init.sh @@ -0,0 +1,92 @@ +#!/bin/sh +# ------------------------------------------------------------------------ +# Copyright 2018 WSO2, Inc. (http://wso2.com) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License +# ------------------------------------------------------------------------ +set -e + +# product profile variable +wso2_server_profile=am + +# custom WSO2 non-root user and group variables +user=wso2carbon +group=wso2 + +# file path variables +volumes=${WORKING_DIRECTORY}/volumes +k8s_volumes=${WORKING_DIRECTORY}/kubernetes-volumes +temp_shared_artifacts=${WORKING_DIRECTORY}/wso2-tmp/server +original_shared_artifacts=${WSO2_SERVER_HOME}/repository/deployment/server + +# capture the Docker container IP from the container's /etc/hosts file +docker_container_ip=$(awk 'END{print $1}' /etc/hosts) + +# check if the WSO2 non-root user home exists +test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 + +# check if the WSO2 product home exists +test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 + +# copy the backed up artifacts from ${HOME}/wso2-tmp/server +# copying the initial artifacts to ${HOME}/wso2-tmp/server was done in the Dockerfile +# this is to preserve the initial artifacts in a volume mount (the mounted directory can be empty initially) +# the artifacts will be copied to the /repository/deployment/server location, +# before the server is started +if test -d ${temp_shared_artifacts}; then + if [ -z "$(ls -A ${original_shared_artifacts}/)" ]; then + # if no artifacts under /repository/deployment/server; copy them + echo "Copying shared server artifacts from temporary location to the original server home location..." + cp -R ${temp_shared_artifacts}/* ${original_shared_artifacts} + fi +fi + +# check if any changed configuration files have been mounted, using K8s ConfigMap volumes + +# since, K8s does not support building ConfigMaps recursively from a directory, each folder has been separately +# mounted in the form of a K8s ConfigMap volume +# copy the mounted configuration files (through ConfigMaps) to the product pack +if test -d ${k8s_volumes}/${wso2_server_profile}/bin; then + cp -RL ${k8s_volumes}/${wso2_server_profile}/bin/* ${WSO2_SERVER_HOME}/bin +fi + +if test -d ${k8s_volumes}/${wso2_server_profile}/conf; then + cp -RL ${k8s_volumes}/${wso2_server_profile}/conf/* ${WSO2_SERVER_HOME}/repository/conf +fi + +if test -d ${k8s_volumes}/${wso2_server_profile}/conf-axis2; then + cp -RL ${k8s_volumes}/${wso2_server_profile}/conf-axis2/* ${WSO2_SERVER_HOME}/repository/conf/axis2 +fi + +if test -d ${k8s_volumes}/${wso2_server_profile}/conf-datasources; then + cp -RL ${k8s_volumes}/${wso2_server_profile}/conf-datasources/* ${WSO2_SERVER_HOME}/repository/conf/datasources +fi + +if test -d ${k8s_volumes}/${wso2_server_profile}/conf-identity; then + cp -RL ${k8s_volumes}/${wso2_server_profile}/conf-identity/* ${WSO2_SERVER_HOME}/repository/conf/identity +fi + +# copy configuration changes and external libraries + +# check if any changed configuration files have been mounted +# if any file changes have been mounted, copy the WSO2 configuration files recursively +test -d ${volumes}/ && cp -r ${volumes}/* ${WSO2_SERVER_HOME}/ + +# make any runtime or node specific configuration changes +# for example, setting container IP in relevant configuration files + +# set the Docker container IP as the `localMemberHost` under axis2.xml clustering configurations (effective only when clustering is enabled) +sed -i "s##${docker_container_ip}<\/parameter>#" ${WSO2_SERVER_HOME}/repository/conf/axis2/axis2.xml + +# start the WSO2 Carbon server +sh ${WSO2_SERVER_HOME}/bin/wso2server.sh From 1f6c7a117efc16443dd176341bd3919929fd4096 Mon Sep 17 00:00:00 2001 From: chirangaalwis Date: Thu, 5 Jul 2018 12:12:04 +0530 Subject: [PATCH 07/13] Add files folders to v2.5.x branch --- .gitignore | 2 -- dockerfiles/apim-analytics/files/.gitkeep | 0 dockerfiles/apim/files/.gitkeep | 0 3 files changed, 2 deletions(-) create mode 100644 dockerfiles/apim-analytics/files/.gitkeep create mode 100644 dockerfiles/apim/files/.gitkeep diff --git a/.gitignore b/.gitignore index 2d277df6..35d17024 100644 --- a/.gitignore +++ b/.gitignore @@ -25,5 +25,3 @@ target/ wso2*/scripts notes.txt -**/files/* -!**/files/init.sh \ No newline at end of file diff --git a/dockerfiles/apim-analytics/files/.gitkeep b/dockerfiles/apim-analytics/files/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/dockerfiles/apim/files/.gitkeep b/dockerfiles/apim/files/.gitkeep new file mode 100644 index 00000000..e69de29b From 39810f80534649855406642f3ed7c21b5577cb99 Mon Sep 17 00:00:00 2001 From: chirangaalwis Date: Thu, 5 Jul 2018 12:13:54 +0530 Subject: [PATCH 08/13] Update .gitignore file --- .gitignore | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 35d17024..26d5cfaa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ + *.class # Mobile Tools for Java (J2ME) @@ -21,7 +22,4 @@ hs_err_pid* *.iml rat.txt -target/ -wso2*/scripts - -notes.txt +**/files/* From 2242302b9835e9a538508ee4cf4ef1c46b403c57 Mon Sep 17 00:00:00 2001 From: chirangaalwis Date: Thu, 5 Jul 2018 12:18:22 +0530 Subject: [PATCH 09/13] Add new line to .gitignore file --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 26d5cfaa..c05f4bc6 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ hs_err_pid* rat.txt **/files/* + From 0cae80b4c9ed486682db3bb89b62c820f4af064b Mon Sep 17 00:00:00 2001 From: chirangaalwis Date: Fri, 6 Jul 2018 15:56:45 +0530 Subject: [PATCH 10/13] Rename configuration mount folder in product containers --- .../apim-is-as-km-with-analytics/docker-compose.yml | 8 ++++---- docker-compose/apim-with-analytics/docker-compose.yml | 4 ++-- dockerfiles/apim-analytics/init.sh | 2 +- dockerfiles/apim/init.sh | 2 +- dockerfiles/is-as-km/Dockerfile | 2 +- dockerfiles/is-as-km/{files => }/init.sh | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) rename dockerfiles/is-as-km/{files => }/init.sh (98%) diff --git a/docker-compose/apim-is-as-km-with-analytics/docker-compose.yml b/docker-compose/apim-is-as-km-with-analytics/docker-compose.yml index 8e227bd5..926e07a7 100755 --- a/docker-compose/apim-is-as-km-with-analytics/docker-compose.yml +++ b/docker-compose/apim-is-as-km-with-analytics/docker-compose.yml @@ -29,13 +29,13 @@ services: mysql: condition: service_healthy volumes: - - ./apim-analytics:/home/wso2carbon/volumes + - ./apim-analytics:/home/wso2carbon/wso2-server-volume links: - mysql is-as-km: image: docker.wso2.com/wso2is-km:5.6.0 healthcheck: - test: ["CMD", "curl", "-k", "-f", "https://localhost:9443/carbon/admin/login.jsp"] + test: ["CMD", "curl", "-k", "-f", "https://localhost:9`443/carbon/admin/login.jsp"] interval: 10s timeout: 120s retries: 15 @@ -45,7 +45,7 @@ services: am-analytics: condition: service_healthy volumes: - - ./is-as-km:/home/wso2carbon/volumes + - ./is-as-km:/home/wso2carbon/wso2-server-volume ports: - "9765:9763" - "9445:9443" @@ -67,7 +67,7 @@ services: is-as-km: condition: service_healthy volumes: - - ./apim:/home/wso2carbon/volumes + - ./apim:/home/wso2carbon/wso2-server-volume ports: - "9763:9763" - "9443:9443" diff --git a/docker-compose/apim-with-analytics/docker-compose.yml b/docker-compose/apim-with-analytics/docker-compose.yml index 9783bb0b..193e4ce6 100755 --- a/docker-compose/apim-with-analytics/docker-compose.yml +++ b/docker-compose/apim-with-analytics/docker-compose.yml @@ -29,7 +29,7 @@ services: mysql: condition: service_healthy volumes: - - ./apim-analytics:/home/wso2carbon/volumes + - ./apim-analytics:/home/wso2carbon/wso2-server-volume links: - mysql api-manager: @@ -45,7 +45,7 @@ services: mysql: condition: service_healthy volumes: - - ./apim:/home/wso2carbon/volumes + - ./apim:/home/wso2carbon/wso2-server-volume ports: - "9763:9763" - "9443:9443" diff --git a/dockerfiles/apim-analytics/init.sh b/dockerfiles/apim-analytics/init.sh index c2c93f80..af095e0a 100755 --- a/dockerfiles/apim-analytics/init.sh +++ b/dockerfiles/apim-analytics/init.sh @@ -24,7 +24,7 @@ user=wso2carbon group=wso2 # file path variables -volumes=${WORKING_DIRECTORY}/volumes +volumes=${WORKING_DIRECTORY}/wso2-server-volume k8s_volumes=${WORKING_DIRECTORY}/kubernetes-volumes temp_persisted_artifacts=${WORKING_DIRECTORY}/wso2-tmp/analytics original_persisted_artifacts=${WSO2_SERVER_HOME}/repository/conf/analytics diff --git a/dockerfiles/apim/init.sh b/dockerfiles/apim/init.sh index 9f6e39f2..7dfae0c9 100755 --- a/dockerfiles/apim/init.sh +++ b/dockerfiles/apim/init.sh @@ -24,7 +24,7 @@ user=wso2carbon group=wso2 # file path variables -volumes=${WORKING_DIRECTORY}/volumes +volumes=${WORKING_DIRECTORY}/wso2-server-volume k8s_volumes=${WORKING_DIRECTORY}/kubernetes-volumes temp_shared_artifacts=${WORKING_DIRECTORY}/wso2-tmp/server original_shared_artifacts=${WSO2_SERVER_HOME}/repository/deployment/server diff --git a/dockerfiles/is-as-km/Dockerfile b/dockerfiles/is-as-km/Dockerfile index 7d133e04..63d47e4b 100644 --- a/dockerfiles/is-as-km/Dockerfile +++ b/dockerfiles/is-as-km/Dockerfile @@ -59,7 +59,7 @@ RUN groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} && \ COPY --chown=wso2carbon:wso2 ${FILES}/${JDK} ${USER_HOME}/java/ COPY --chown=wso2carbon:wso2 ${FILES}/${WSO2_SERVER_DIST} ${USER_HOME}/${WSO2_SERVER_DIST} COPY --chown=wso2carbon:wso2 ${FILES}/mysql-connector-java-*-bin.jar ${USER_HOME}/${WSO2_SERVER_DIST}/repository/components/lib/ -COPY --chown=wso2carbon:wso2 ${FILES}/init.sh ${USER_HOME}/ +COPY --chown=wso2carbon:wso2 init.sh ${USER_HOME}/ # set the user and work directory USER ${USER_ID} diff --git a/dockerfiles/is-as-km/files/init.sh b/dockerfiles/is-as-km/init.sh similarity index 98% rename from dockerfiles/is-as-km/files/init.sh rename to dockerfiles/is-as-km/init.sh index 30306d61..e8753e67 100755 --- a/dockerfiles/is-as-km/files/init.sh +++ b/dockerfiles/is-as-km/init.sh @@ -21,7 +21,7 @@ user=wso2carbon group=wso2 # file path variables -volumes=${WORKING_DIRECTORY}/volumes +volumes=${WORKING_DIRECTORY}/wso2-server-volume # capture the Docker container IP from the container's /etc/hosts file docker_container_ip=$(awk 'END{print $1}' /etc/hosts) From cbaf3fa3d09823810693b2d767c4948b021441a0 Mon Sep 17 00:00:00 2001 From: chirangaalwis Date: Fri, 6 Jul 2018 16:03:44 +0530 Subject: [PATCH 11/13] Remove unnecessary space --- docker-compose/apim-is-as-km-with-analytics/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose/apim-is-as-km-with-analytics/docker-compose.yml b/docker-compose/apim-is-as-km-with-analytics/docker-compose.yml index 926e07a7..6dd447f7 100755 --- a/docker-compose/apim-is-as-km-with-analytics/docker-compose.yml +++ b/docker-compose/apim-is-as-km-with-analytics/docker-compose.yml @@ -35,7 +35,7 @@ services: is-as-km: image: docker.wso2.com/wso2is-km:5.6.0 healthcheck: - test: ["CMD", "curl", "-k", "-f", "https://localhost:9`443/carbon/admin/login.jsp"] + test: ["CMD", "curl", "-k", "-f", "https://localhost:9443/carbon/admin/login.jsp"] interval: 10s timeout: 120s retries: 15 From a7628d0846f4fb670c97a36a13ce9f3cb9a53f6a Mon Sep 17 00:00:00 2001 From: chirangaalwis Date: Wed, 11 Jul 2018 18:32:16 +0530 Subject: [PATCH 12/13] Add files folder to IS-as-KM Docker image build --- .gitignore | 2 +- dockerfiles/is-as-km/files/.gitkeep | 0 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 dockerfiles/is-as-km/files/.gitkeep diff --git a/.gitignore b/.gitignore index c05f4bc6..c38bd395 100644 --- a/.gitignore +++ b/.gitignore @@ -22,5 +22,5 @@ hs_err_pid* *.iml rat.txt -**/files/* +#**/files/* diff --git a/dockerfiles/is-as-km/files/.gitkeep b/dockerfiles/is-as-km/files/.gitkeep new file mode 100644 index 00000000..e69de29b From bbcfc3bc22699f53fe705e432591476b828bac77 Mon Sep 17 00:00:00 2001 From: chirangaalwis Date: Wed, 11 Jul 2018 18:32:57 +0530 Subject: [PATCH 13/13] Update .gitignore file --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c38bd395..c05f4bc6 100644 --- a/.gitignore +++ b/.gitignore @@ -22,5 +22,5 @@ hs_err_pid* *.iml rat.txt -#**/files/* +**/files/*