Skip to content

Commit

Permalink
Merge pull request #37 from wso2/2.1.x
Browse files Browse the repository at this point in the history
API Manager 2.1.0 docker deployment patterns
  • Loading branch information
prasa7 authored Mar 14, 2017
2 parents c060fcd + e8d6c41 commit 0e09f71
Show file tree
Hide file tree
Showing 547 changed files with 6,099 additions and 51,182 deletions.
Empty file modified docker-compose/artifacts/analyticsdb.sql
100644 → 100755
Empty file.
218 changes: 145 additions & 73 deletions docker-compose/artifacts/apimdb.sql
100644 → 100755

Large diffs are not rendered by default.

Empty file modified docker-compose/artifacts/mysql-connector-java-5.1.34-bin.jar
100644 → 100755
Empty file.
Empty file modified docker-compose/artifacts/svnkit-all-1.8.7.wso2v1.jar
100644 → 100755
Empty file.
Empty file modified docker-compose/artifacts/trilead-ssh2-1.0.0-build215.jar
100644 → 100755
Empty file.
70 changes: 70 additions & 0 deletions docker-compose/pattern-0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
### This repository contains API Manager 2.1.0 distributed deployment with Docker compose

![alt tag](https://github.com/wso2/docker-apim/blob/2.1.x/docker-compose/patterns/design/am-2.1.0-pattern-0.jpeg)

## Pre-requisites

* Docker
* Docker compose

#### Docker installation for linux
```
wget -qO- https://get.docker.com/ | sh
```

#### Docker installation for Mac

https://docs.docker.com/docker-for-mac/

#### Docker installation for Windows

https://docs.docker.com/docker-for-windows/

#### Docker Compose Installation

https://docs.docker.com/compose/install/


#### How to run

```docker login docker.wso2.com ```

```docker-compose pull```

```docker-compose up --build -d ```

This will deploy the following,

* Mysql server (container) with apimdb, userdb, regdb
* APIM Container
* Nginx Load Balancer container and points the APIM components through the load balancer.


#### How to test

Add the following entries to the /etc/hosts
```
127.0.0.1 api-manager
```
If you are using docker machine, please use the docker machine IP instead of the local maGchine IP.

#### How to access the environment

Publisher

```
https://api-manager/publisher
```

Store

```
https://api-manager/store/
```


Gateway Manager

```
https://api-manager/carbon/
```
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
FROM docker.wso2.com/wso2am:2.0.0
FROM docker.wso2.com/wso2am:2.1.0

COPY pattern-9/store/carbon/ /mnt/wso2-artifacts
COPY pattern-0/api-manager/carbon/ /mnt/wso2-artifacts

COPY artifacts/mysql-connector-java-5.1.34-bin.jar /mnt/wso2-artifacts/repository/components/lib/

USER root
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@
<Name>Production and Sandbox</Name>
<Description>This is a hybrid gateway that handles both production and sandbox token traffic.</Description>
<!-- Server URL of the API gateway -->
<ServerURL>https://localhost:${mgt.transport.https.port}${carbon.context}services/</ServerURL>
<ServerURL>https://api-manager:${mgt.transport.https.port}${carbon.context}services/</ServerURL>
<!-- Admin username for the API gateway. -->
<Username>${admin.username}</Username>
<!-- Admin password for the API gateway.-->
<Password>${admin.password}</Password>
<!-- Endpoint URLs for the APIs hosted in this API gateway.-->
<GatewayEndpoint>http://${carbon.local.ip}:${http.nio.port},https://${carbon.local.ip}:${https.nio.port}</GatewayEndpoint>
<GatewayEndpoint>http://api-manager:${http.nio.port},https://api-manager:${https.nio.port}</GatewayEndpoint>
</Environment>
</Environments>
</APIGateway>
Expand Down Expand Up @@ -136,20 +136,20 @@
Ex - Multiple Receiver Groups with two receivers each
{tcp://localhost:7612/,tcp://localhost:7613},{tcp://localhost:7712/,tcp://localhost:7713/} -->
<DASServerURL>tcp://analytics:7612</DASServerURL>
<DASAuthServerURL>ssl://analytics:7712</DASAuthServerURL>
<DASServerURL>{tcp://localhost:7612}</DASServerURL>
<!--DASAuthServerURL>{ssl://localhost:7712}</DASAuthServerURL-->
<!-- Administrator username to login to the remote DAS server. -->
<DASUsername>admin</DASUsername>
<DASUsername>${admin.username}</DASUsername>
<!-- Administrator password to login to the remote DAS server. -->
<DASPassword>admin</DASPassword>
<DASPassword>${admin.password}</DASPassword>

<!-- For APIM implemented Statistic client for RDBMS -->
<StatsProviderImpl>org.wso2.carbon.apimgt.usage.client.impl.APIUsageStatisticsRdbmsClientImpl</StatsProviderImpl>

<!-- DAS REST API configuration -->
<DASRestApiURL>https://analytics:9444</DASRestApiURL>
<DASRestApiUsername>admin</DASRestApiUsername>
<DASRestApiPassword>admin</DASRestApiPassword>
<DASRestApiURL>https://localhost:9444</DASRestApiURL>
<DASRestApiUsername>${admin.username}</DASRestApiUsername>
<DASRestApiPassword>${admin.password}</DASRestApiPassword>

<!-- Below property is used to skip trying to connect to event receiver nodes when publishing events even if
the stats enabled flag is set to true. -->
Expand Down Expand Up @@ -202,7 +202,7 @@
-->
<APIKeyValidator>
<!-- Server URL of the API key manager -->
<ServerURL>https://keymanager-tm:9443/services/</ServerURL>
<ServerURL>https://localhost:${mgt.transport.https.port}${carbon.context}services/</ServerURL>

<!-- Admin username for API key manager. -->
<Username>${admin.username}</Username>
Expand All @@ -216,7 +216,7 @@
-If you need to start two API Manager instances in the same machine, you need to give different ports to "ThriftServerPort" value in two nodes.
-ThriftServerHost - Allows to configure a hostname for the thrift server. It uses the carbon hostname by default.
-The Gateway uses this parameter to connect to the key validation thrift service. -->
<KeyValidatorClientType>WSClient</KeyValidatorClientType>
<KeyValidatorClientType>ThriftClient</KeyValidatorClientType>
<ThriftClientConnectionTimeOut>10000</ThriftClientConnectionTimeOut>
<!--ThriftClientPort>10397</ThriftClientPort-->

Expand All @@ -236,7 +236,7 @@
<!-- Uncomment this section only if you are going to have an instance other than KeyValidator as your KeyManager.
Unless a ThirdParty KeyManager is used, you don't need to configure this section. -->
<!--APIKeyManager>
<KeyManagerClientImpl>org.wso2.carbon.apimgt.keymgt.AMDefaultKeyManagerImpl</KeyManagerClientImpl>
<KeyManagerClientImpl>org.wso2.carbon.apimgt.impl.AMDefaultKeyManagerImpl</KeyManagerClientImpl>
<Configuration>
<ServerURL>https://localhost:${mgt.transport.https.port}${carbon.context}services/</ServerURL>
<Username>${admin.username}</Username>
Expand Down Expand Up @@ -284,10 +284,10 @@
<!--This property is used to indicate how we do user name comparision for token generation https://wso2.org/jira/browse/APIMANAGER-2225-->
<CompareCaseInsensitively>true</CompareCaseInsensitively>
<DisplayURL>false</DisplayURL>
<URL>https://localhost:${mgt.transport.https.port}/store</URL>
<URL>https://api-manager/store</URL>

<!-- Server URL of the API Store. -->
<ServerURL>https://localhost:${mgt.transport.https.port}${carbon.context}services/</ServerURL>
<ServerURL>https://api-manager:${mgt.transport.https.port}${carbon.context}services/</ServerURL>
<!-- Admin username for API Store. -->
<Username>${admin.username}</Username>

Expand Down Expand Up @@ -317,7 +317,7 @@

<APIPublisher>
<DisplayURL>false</DisplayURL>
<URL>https://localhost:${mgt.transport.https.port}/publisher</URL>
<URL>https://api-manager/publisher</URL>
<!-- This parameter specifies enabling the capability of setting API documentation level granular visibility levels.
By default any document associate with an API will have the same permissions set as the API.With enabling below
property,it will show two additional permission levels as visible only to all registered users in a particular
Expand Down Expand Up @@ -458,9 +458,119 @@
<HTTPMethods>GET,HEAD</HTTPMethods>
</WhiteListedURI>
</WhiteListedURIs>
<ETagSkipList>
<ETagSkipURI>
<URI>/api/am/store/{version}/apis</URI>
<HTTPMethods>GET</HTTPMethods>
</ETagSkipURI>
<ETagSkipURI>
<URI>/api/am/store/{version}/apis/generate-sdk</URI>
<HTTPMethods>POST</HTTPMethods>
</ETagSkipURI>
<ETagSkipURI>
<URI>/api/am/store/{version}/apis/{apiId}/documents</URI>
<HTTPMethods>GET</HTTPMethods>
</ETagSkipURI>
<ETagSkipURI>
<URI>/api/am/store/{version}/applications</URI>
<HTTPMethods>GET</HTTPMethods>
</ETagSkipURI>
<ETagSkipURI>
<URI>/api/am/store/{version}/applications/generate-keys</URI>
<HTTPMethods>POST</HTTPMethods>
</ETagSkipURI>
<ETagSkipURI>
<URI>/api/am/store/{version}/subscriptions</URI>
<HTTPMethods>GET,POST</HTTPMethods>
</ETagSkipURI>
<ETagSkipURI>
<URI>/api/am/store/{version}/tags</URI>
<HTTPMethods>GET</HTTPMethods>
</ETagSkipURI>
<ETagSkipURI>
<URI>/api/am/store/{version}/tiers/{tierLevel}</URI>
<HTTPMethods>GET</HTTPMethods>
</ETagSkipURI>
<ETagSkipURI>
<URI>/api/am/store/{version}/tiers/{tierLevel}/{tierName}</URI>
<HTTPMethods>GET</HTTPMethods>
</ETagSkipURI>
<ETagSkipURI>
<URI>/api/am/publisher/{version}/apis</URI>
<HTTPMethods>GET,POST</HTTPMethods>
</ETagSkipURI>
<ETagSkipURI>
<URI>/api/am/publisher/{version}/apis/{apiId}</URI>
<HTTPMethods>GET,DELETE,PUT</HTTPMethods>
</ETagSkipURI>
<ETagSkipURI>
<URI>/api/am/publisher/{version}/apis/{apiId}/swagger</URI>
<HTTPMethods>GET,PUT</HTTPMethods>
</ETagSkipURI>
<ETagSkipURI>
<URI>/api/am/publisher/{version}/apis/{apiId}/thumbnail</URI>
<HTTPMethods>GET,POST</HTTPMethods>
</ETagSkipURI>
<ETagSkipURI>
<URI>/api/am/publisher/{version}/apis/{apiId}/change-lifecycle</URI>
<HTTPMethods>POST</HTTPMethods>
</ETagSkipURI>
<ETagSkipURI>
<URI>/api/am/publisher/{version}/apis/{apiId}/copy-api</URI>
<HTTPMethods>POST</HTTPMethods>
</ETagSkipURI>
<ETagSkipURI>
<URI>/api/am/publisher/{version}/applications/{applicationId}</URI>
<HTTPMethods>GET</HTTPMethods>
</ETagSkipURI>
<ETagSkipURI>
<URI>/api/am/publisher/{version}/apis/{apiId}/documents</URI>
<HTTPMethods>GET,POST</HTTPMethods>
</ETagSkipURI>
<ETagSkipURI>
<URI>/api/am/publisher/{version}/apis/{apiId}/documents/{documentId}/content</URI>
<HTTPMethods>GET,POST</HTTPMethods>
</ETagSkipURI>
<ETagSkipURI>
<URI>/api/am/publisher/{version}/apis/{apiId}/documents/{documentId}</URI>
<HTTPMethods>GET,PUT,DELETE</HTTPMethods>
</ETagSkipURI>
<ETagSkipURI>
<URI>/api/am/publisher/{version}/environments</URI>
<HTTPMethods>GET</HTTPMethods>
</ETagSkipURI>
<ETagSkipURI>
<URI>/api/am/publisher/{version}/subscriptions</URI>
<HTTPMethods>GET</HTTPMethods>
</ETagSkipURI>
<ETagSkipURI>
<URI>/api/am/publisher/{version}/subscriptions/block-subscription</URI>
<HTTPMethods>POST</HTTPMethods>
</ETagSkipURI>
<ETagSkipURI>
<URI>/api/am/publisher/{version}/subscriptions/{subscriptionId}</URI>
<HTTPMethods>GET</HTTPMethods>
</ETagSkipURI>
<ETagSkipURI>
<URI>/api/am/publisher/{version}/subscriptions/unblock-subscription</URI>
<HTTPMethods>POST</HTTPMethods>
</ETagSkipURI>
<ETagSkipURI>
<URI>/api/am/publisher/{version}/tiers/{tierLevel}</URI>
<HTTPMethods>GET,POST</HTTPMethods>
</ETagSkipURI>
<ETagSkipURI>
<URI>/api/am/publisher/{version}/tiers/{tierLevel}/{tierName}</URI>
<HTTPMethods>GET,PUT,DELETE</HTTPMethods>
</ETagSkipURI>
<ETagSkipURI>
<URI>/api/am/publisher/{version}/tiers/update-permission</URI>
<HTTPMethods>POST</HTTPMethods>
</ETagSkipURI>
</ETagSkipList>
</RESTAPI>
<ThrottlingConfigurations>
<EnableAdvanceThrottling>false</EnableAdvanceThrottling>
<EnableAdvanceThrottling>true</EnableAdvanceThrottling>
<DataPublisher>
<Enabled>true</Enabled>
<Type>Binary</Type>
Expand Down Expand Up @@ -540,4 +650,29 @@
<EnableQueryParamConditions>false</EnableQueryParamConditions>
</ThrottlingConfigurations>

<WorkflowConfigurations>
<Enabled>false</Enabled>
<ServerUrl>https://localhost:9445/bpmn</ServerUrl>
<ServerUser>${admin.username}</ServerUser>
<ServerPassword>${admin.password}</ServerPassword>
<WorkflowCallbackAPI>https://localhost:${mgt.transport.https.port}/api/am/publisher/v0.10/workflows/update-workflow-status</WorkflowCallbackAPI>
<TokenEndPoint>https://localhost:${https.nio.port}/token</TokenEndPoint>
<DCREndPoint>https://localhost:${mgt.transport.https.port}/client-registration/v0.10/register</DCREndPoint>
<DCREndPointUser>${admin.username}</DCREndPointUser>
<DCREndPointPassword>${admin.password}</DCREndPointPassword>
</WorkflowConfigurations>

<SwaggerCodegen>
<ClientGeneration>
<GroupId>org.wso2</GroupId>
<ArtifactId>org.wso2.client.</ArtifactId>
<ModelPackage>org.wso2.client.model.</ModelPackage>
<ApiPackage>org.wso2.client.api.</ApiPackage>
<!-- Configure supported languages/Frameworks as comma separated values,
Supported Languages/Frameworks : android, java, scala, csharp, cpp, dart, flash, go, groovy, javascript, jmeter,
nodejs, perl, php, python, ruby, swift, clojure, aspNet5, asyncScala, spring, csharpDotNet2, haskell-->
<SupportedLanguages>java,android</SupportedLanguages>
</ClientGeneration>
</SwaggerCodegen>

</APIManager>
17 changes: 11 additions & 6 deletions ...er/carbon/repository/conf/axis2/axis2.xml → ...er/carbon/repository/conf/axis2/axis2.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
<parameter name="ModulesDirectory">axis2modules</parameter>

<!-- User agent and the server details to be used in the http communication -->
<parameter name="userAgent" locked="true">WSO2 AM 2.0.0</parameter>
<parameter name="server" locked="true">WSO2 AM 2.0.0</parameter>
<parameter name="userAgent" locked="true">WSO2 AM 2.1.0</parameter>
<parameter name="server" locked="true">WSO2 AM 2.1.0</parameter>

<!-- During a fault, stacktrace can be sent with the fault message. The following flag -->
<!-- will control that behaviour -->
Expand Down Expand Up @@ -596,6 +596,11 @@
<!-- This parameter has been added to overcome problems encounted in SOAP action parameter -->
<!--<parameter name="OmitSOAP12Action">true</parameter>-->
<!--</transportSender>-->
<transportSender name="ws" class="org.wso2.carbon.websocket.transport.WebsocketTransportSender">
<parameter name="ws.outflow.dispatch.sequence" locked="false">outflowDispatchSeq</parameter>
<parameter name="ws.outflow.dispatch.fault.sequence" locked="false">outflowFaultSeq</parameter>
</transportSender>

<!--<transportSender name="https"-->
<!--class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">-->
<!--<parameter name="PROTOCOL">HTTP/1.1</parameter>-->
Expand Down Expand Up @@ -628,7 +633,7 @@
getting this node to join the cluster.
-->
<clustering class="org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent"
enable="true">
enable="false">

<!--
This parameter indicates whether the cluster has to be automatically initalized
Expand All @@ -650,7 +655,7 @@
is deemed to have left the cluster, it will be detected by the Group Membership
Service (GMS) using a TCP ping mechanism.
-->
<parameter name="membershipScheme">wka</parameter>
<parameter name="membershipScheme">multicast</parameter>
<!--<parameter name="licenseKey">xxx</parameter>-->
<!--<parameter name="mgtCenterURL">http://localhost:8081/mancenter/</parameter>-->

Expand Down Expand Up @@ -679,7 +684,7 @@
-->
<!-- The host name or IP address of this member -->

<parameter name="localMemberHost">gateway-worker</parameter>
<parameter name="localMemberHost">api-manager</parameter>

<!--
The bind adress of this member. The difference between localMemberHost & localMemberBindAddress
Expand Down Expand Up @@ -720,7 +725,7 @@
-->
<members>
<member>
<hostName>gateway-manager</hostName>
<hostName>api-manager</hostName>
<port>4000</port>
</member>
</members>
Expand Down
Loading

0 comments on commit 0e09f71

Please sign in to comment.