-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #131 from ThilinaManamgoda/wso2-master
Merge 2.2.x branch to master branch
- Loading branch information
Showing
37 changed files
with
8,066 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,5 @@ target/ | |
wso2*/scripts | ||
|
||
notes.txt | ||
**/files/* | ||
**/files/* | ||
!**/files/init.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# 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. <br><br> | ||
* 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 <br>and | ||
API Manager Analytics 2.2.0 products. You can sign up for a Free Trial Subscription [here](https://wso2.com/free-trial-subscription). <br><br> | ||
* If you wish to run the Docker Compose setup using Docker images built locally, build Docker images using <br> [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`. <br> | ||
|
||
<br> | ||
|
||
## 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-<released-version-here>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 <br> | ||
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 <br> | ||
* Password: admin | ||
|
||
Please note that API Gateway will be available on following ports. | ||
``` | ||
https://localhost:8244 | ||
https://localhost:8243 | ||
https://localhost:8280 | ||
``` | ||
|
110 changes: 110 additions & 0 deletions
110
...teway-with-Analytics/apim-analytics/repository/conf/datasources/analytics-datasources.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
<datasources-configuration> | ||
|
||
<providers> | ||
<provider>org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader</provider> | ||
<!--<provider>org.wso2.carbon.datasource.reader.hadoop.HBaseDataSourceReader</provider>--> | ||
<!--<provider>org.wso2.carbon.datasource.reader.cassandra.CassandraDataSourceReader</provider>--> | ||
</providers> | ||
|
||
<datasources> | ||
|
||
<datasource> | ||
<name>WSO2_ANALYTICS_EVENT_STORE_DB</name> | ||
<description>The datasource used for analytics record store</description> | ||
<definition type="RDBMS"> | ||
<configuration> | ||
<url>jdbc:mysql://mysql:3306/stats_db?autoReconnect=true&relaxAutoCommit=true&useSSL=false</url> | ||
<username>root</username> | ||
<password>root</password> | ||
<driverClassName>com.mysql.jdbc.Driver</driverClassName> | ||
<maxActive>50</maxActive> | ||
<maxWait>60000</maxWait> | ||
<testOnBorrow>true</testOnBorrow> | ||
<validationQuery>SELECT 1</validationQuery> | ||
<validationInterval>30000</validationInterval> | ||
<defaultAutoCommit>false</defaultAutoCommit> | ||
<defaultTransactionIsolation>READ_COMMITTED</defaultTransactionIsolation> | ||
</configuration> | ||
</definition> | ||
</datasource> | ||
|
||
<datasource> | ||
<name>WSO2_ANALYTICS_PROCESSED_DATA_STORE_DB</name> | ||
<description>The datasource used for analytics record store</description> | ||
<definition type="RDBMS"> | ||
<configuration> | ||
<url>jdbc:mysql://mysql:3306/stats_db?autoReconnect=true&relaxAutoCommit=true&useSSL=false</url> | ||
<username>root</username> | ||
<password>root</password> | ||
<driverClassName>com.mysql.jdbc.Driver</driverClassName> | ||
<maxActive>50</maxActive> | ||
<maxWait>60000</maxWait> | ||
<testOnBorrow>true</testOnBorrow> | ||
<validationQuery>SELECT 1</validationQuery> | ||
<validationInterval>30000</validationInterval> | ||
<defaultAutoCommit>false</defaultAutoCommit> | ||
<defaultTransactionIsolation>READ_COMMITTED</defaultTransactionIsolation> | ||
</configuration> | ||
</definition> | ||
</datasource> | ||
|
||
<!-- Sample datasource implementation for HBase Analytics RecordStore--> | ||
<!--<datasource> | ||
<name>WSO2_ANALYTICS_RS_DB_HBASE</name> | ||
<description>The datasource used for analytics file system</description> | ||
<jndiConfig> | ||
<name>jdbc/WSO2HBaseDB</name> | ||
</jndiConfig> | ||
<definition type="HBASE"> | ||
<configuration> | ||
<property> | ||
<name>hbase.master</name> | ||
<value>localhost:60000</value> | ||
</property> | ||
<property> | ||
<name>fs.hdfs.impl</name> | ||
<value>org.apache.hadoop.hdfs.DistributedFileSystem</value> | ||
</property> | ||
<property> | ||
<name>fs.file.impl</name> | ||
<value>org.apache.hadoop.fs.LocalFileSystem</value> | ||
</property> | ||
</configuration> | ||
</definition> | ||
</datasource>--> | ||
|
||
<!-- Sample datasource implementation for Cassandra --> | ||
<!--<datasource> | ||
<name>WSO2_ANALYTICS_DS_CASSANDRA</name> | ||
<description>The Cassandra datasource used for analytics</description> | ||
<definition type="CASSANDRA"> | ||
<configuration> | ||
<contactPoints>localhost</contactPoints> | ||
<port>9042</port> | ||
<username>admin</username> | ||
<password>admin</password> | ||
<clusterName>cluster1</clusterName> | ||
<compression>NONE</compression> | ||
<poolingOptions> | ||
<coreConnectionsPerHost hostDistance="LOCAL">8</coreConnectionsPerHost> | ||
<maxSimultaneousRequestsPerHostThreshold hostDistance="LOCAL">1024</maxSimultaneousRequestsPerHostThreshold> | ||
</poolingOptions> | ||
<queryOptions> | ||
<fetchSize>5000</fetchSize> | ||
<consistencyLevel>ONE</consistencyLevel> | ||
<serialConsistencyLevel>SERIAL</serialConsistencyLevel> | ||
</queryOptions> | ||
<socketOptions> | ||
<keepAlive>false</keepAlive> | ||
<sendBufferSize>150000</sendBufferSize> | ||
<connectTimeoutMillis>12000</connectTimeoutMillis> | ||
<readTimeoutMillis>12000</readTimeoutMillis> | ||
</socketOptions> | ||
</configuration> | ||
</definition> | ||
</datasource>--> | ||
|
||
</datasources> | ||
|
||
</datasources-configuration> | ||
|
32 changes: 32 additions & 0 deletions
32
...rogateway-with-Analytics/apim-analytics/repository/conf/datasources/stats-datasources.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<datasources-configuration xmlns:svns="http://org.wso2.securevault/configuration"> | ||
|
||
<providers> | ||
<provider>org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader</provider> | ||
</providers> | ||
|
||
<datasources> | ||
<datasource> | ||
<name>WSO2AM_STATS_DB</name> | ||
<description>The datasource used for setting statistics to API Manager</description> | ||
<jndiConfig> | ||
<name>jdbc/WSO2AM_STATS_DB</name> | ||
</jndiConfig> | ||
<definition type="RDBMS"> | ||
<configuration> | ||
<url>jdbc:mysql://mysql:3306/stats_db?autoReconnect=true&relaxAutoCommit=true&useSSL=false</url> | ||
<username>root</username> | ||
<password>root</password> | ||
<driverClassName>com.mysql.jdbc.Driver</driverClassName> | ||
<maxActive>50</maxActive> | ||
<maxWait>60000</maxWait> | ||
<testOnBorrow>true</testOnBorrow> | ||
<validationQuery>SELECT 1</validationQuery> | ||
<validationInterval>30000</validationInterval> | ||
<defaultAutoCommit>false</defaultAutoCommit> | ||
</configuration> | ||
</definition> | ||
</datasource> | ||
|
||
</datasources> | ||
|
||
</datasources-configuration> |
Oops, something went wrong.