Building the API Manager
1. Clone the git repository for building docker image.
git clone https://git.inter-iot.eu/Inter-IoT/api_manager.git
cd api_manager/BuildingApimImage/
2. Download and extract files for docer build.
Download WSO2AM and MySQL Connector with running a script.
sudo sh DownloadBuildFiles.sh
Then, download the JDK 1.8
and it must be extracted into files directory and the file should be named by default jdk1.8.0_*, where * represents the version of the JDK.
The structure should look like this:
files
├── wso2am-2.2.0
├── jdk1.8.0*
└── mysql-connector-java-*-bin.jar
3. Build the docker image.
Run this command from the directory, where the Dockerfile is located.
docker build -t wso2am:2.2.0 .
You have now just built your clean docker API Manager image.
4. Running the new image with other Framework components.
Clone the docker-compose directory from commons.
git clone https://git.inter-iot.eu/Inter-IoT/commons.git
cd commons/interfw
sh generateConf.sh
Open the docker-compose script and edit the line from:
FROM
image: docker.inter-iot.eu/wso2am:v1.0.0
TO
image: wso2am:2.2.0
Save the file and run the docker-compose commands with 10 second break for MySQL database to import all the databases and tables.
docker-compose up -d mysql
docker-compose up