Wednesday, August 2, 2017

How to run WSO2 API Manager with MSSQL using docker

First you need to install docker on you local machine.

Then run following to install mssql docker image in your local machine. You can follow this article[ ] for more information.

docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=Password#123' -p 1433:1433 -d microsoft/mssql-server-linux

Then type following and verify your instance is up and running>>docker ps

CONTAINER ID        IMAGE                          COMMAND                  CREATED             STATUS              PORTS                                      NAMES03ebf2498a20        microsoft/mssql-server-linux   "/bin/sh -c /opt/mssq"   23 minutes ago      Up 23 minutes>1433/tcp    

docker exec -it /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Password#123

Download and copy the sqljdbc4 Microsoft SQL JDBC driver file to the WSO2 product's /repository/components/lib/ directory

Edit the default datasource configuration in the /repository/conf/datasources/m aster-datasources.xml file as shown below.


            <description>The datasource used for API Manager database</description>
            <definition type="RDBMS">
              <validationQuery>SELECT 1</validationQuery>

Now start server with following command.
sh -Dsetup