Deploying Choreo Connect on Docker Compose With MWARE ESB as a Control Plane¶
Let's deploy an API on Choreo Connect, which running on Docker Compose, with MWARE ESB as the Control Plane.
Before you begin
-
Make sure you have installed Docker and Docker Compose on your machine.
-
Download the latest Choreo Connect release from https://wso2.com/choreo/choreo-connect/ and extract it to a folder of your choice. The extracted folder will be referred to as
CHOREO-CONNECT_HOME
here onwards. -
This guide assumes that you have already started the MWARE ESB instance. If not, download the latest release and follow the steps here.
Step 1 - Find the APIM IP Address¶
In order to tell Choreo Connect where ESB (APIM) is located, find out the IP that can be used to access the ESB instance. If you are trying out MWARE ESB locally, the private IP retrieved using hostname -I
or ipconfig
would do.
Step 2 - Update the Choreo Connect Configuration File¶
Open the <CHOREO-CONNECT_HOME>/docker-compose/choreo-connect/conf/config.toml
file in a text editor and update it as follows.
In the [controlPlane]
section,
- Set
enabled
to true. - Update
serviceURL
andbrokerConnectionParameters
with the IP of ESB. (Search forapim
and replace them with the IP. Alternatively, add an entry to the/etc/hosts
file as<ip-of-apim> apim
) - If you want to use a Gateway Environment other than the default, update
environmentLabels
with the name of the new Gateway Environment. If not, leave the value"Default"
as it is.
Example
[controlPlane]
enabled = true
serviceURL = "https://<apim-ip>:9443/"
username="admin"
password="$env{cp_admin_pwd}"
environmentLabels = ["Default"]
retryInterval = 5
skipSSLVerification=true
[controlPlane.brokerConnectionParameters]
eventListeningEndpoints = ["amqp://admin:$env{cp_admin_pwd}@<apim-ip>:5672?retries='10'&connectdelay='30'"]
reconnectInterval = 5000
reconnectRetryCount = 60
[controlPlane.httpClient]
requestTimeOut = 30
Tip
In ESB, a new Gateway Environment can be created from the Admin Portal (available at https:<apim-host>:<apim-port>/admin
) Gateways tab.
Step 3 - Start Choreo Connect¶
Now, let's start Choreo Connect. Navigate to <CHOREO-CONNECT_HOME>/docker-compose/choreo-connect
and execute the following command.
docker-compose up -d
Step 4 - Deploy the sample API via MWARE ESB¶
Follow the instructions in create and publish an API from ESB.
Top