3

I am planning to use WSO2 API Manager for a client...Planning to use the API Manager Docker image for hosting it.. But it looks like to use API Manager docker image ,I need to have paid subscription once the trial period ends.. https://wso2.com/api-management/install/docker/get-started/ ..the link says " In order to use WSO2 product Docker images, you need an active WSO2 subscription."

Is it like that? Cant i have the image running in the client premises without any subscription?

Janier
  • 3,982
  • 9
  • 43
  • 96
  • Any answers from the WSO2 team? – Janier Mar 11 '19 at 17:25
  • I guess you will receive same the reply which i wrote as they already provide a how-to instructions to build the docker image, so no point in allowing users to access a pre-built images without subscription – Mostafa Hussein Mar 12 '19 at 06:04

2 Answers2

5

You can build it yourself using their official dockerfiles which hosted on github and then push it to your own registry.

The rest of the dockerfiles for other WSO2 Products can be found under the same github account.

The following steps are describing How to build an image and run WSO2 API Manager, taken from this README.md file.

  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 dockerfiles/ubuntu/apim directory will be referred to as AM_DOCKERFILE_HOME from this point onwards.

  1. Add WSO2 API Manager distribution and MySQL connector to <AM_DOCKERFILE_HOME>/files.

    • Download WSO2 API Manager v2.6.0 distribution and extract it to <AM_DOCKERFILE_HOME>/files.
    • Download MySQL Connector/J and copy that to <AM_DOCKERFILE_HOME>/files.
    • Once all of these are in place, it should look as follows:

    <AM_DOCKERFILE_HOME>/files/wso2am-2.6.0/
    <AM_DOCKERFILE_HOME>/files/mysql-connector-java-<version>-bin.jar
    

    Please refer to WSO2 Update Manager documentation in order to obtain latest bug fixes and updates for the product.

  2. Build the Docker image.

    • Navigate to <AM_DOCKERFILE_HOME> directory.
      Execute docker build command as shown below.
    • docker build -t wso2am:2.6.0 .
  3. Running the Docker image.

    • docker run -it -p 9443:9443 wso2am:2.6.0

      Here, only port 9443 (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.

  4. Accessing management console.

    • To access the management console, use the docker host IP and port 9443.
    • https://<DOCKER_HOST>:9443/carbon

    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 Manager container if it's already running. In WSO2 API Manager 2.6.0 product distribution, carbon.xml configuration file
    can be found at <DISTRIBUTION_HOME>/repository/conf. Copy the file to some suitable location of the host machine, referred to as <SOURCE_CONFIGS>/carbon.xml and change the offset value under ports to 1.

  2. Grant read permission to other users for <SOURCE_CONFIGS>/carbon.xml

    chmod o+r <SOURCE_CONFIGS>/carbon.xml
    
  3. Run the image by mounting the file to container as follows.

    docker run \
    -p 9444:9444 \
    --volume <SOURCE_CONFIGS>/carbon.xml:<TARGET_CONFIGS>/carbon.xml \
    wso2am:2.6.0
    

    In here, refers to /home/wso2carbon/wso2am-2.6.0/repository/conf folder of the container.

As explained above these steps for ubuntu, for other distributions you can check the following directory and then read the README.md file inside

Mostafa Hussein
  • 11,063
  • 3
  • 36
  • 61
1

You can build the docker images yourself. Follow the instructions given at https://github.com/wso2/docker-apim/tree/master/dockerfiles/ubuntu/apim#how-to-build-an-image-and-run.

Thes caveat is that you will not be getting any bug fixes if you do not have a subscription.