INTER-API Installation Guide
INTER-API is distributed as a Docker Image which is available in the Inter-IoT Docker registry. A deployment script is provided in api_manager and commons repository for deploying the INTER-API using the Docker Compose tool.
Prerequisites
Prerequisites for the INTER-API installation are:
- Docker and Docker Compose
- Access to the api_manager repository
- Access to the commons repository
- Access to the Inter-IoT Docker registry
docker.inter-iot.eu
Installation
The api_manager repository provides individual installation of INTER-API.
The commons repository provides installing INTER-API together with the INTER-FW and Identity Server
Installing INTER-API Individually
Clone the api manager directory and checkout docker-apim branch and navigate to individualApimDeployment directory.
git clone https://git.inter-iot.eu/Inter-IoT/api_manager.git
cd api_manager/IndividualApimDeployment/
Run the docker-compose script.
docker-compose up -d mysql
Wait for 10 seconds for mysql to start and then run the WSO2 API Manager with this command.
docker-compose up -d
You have just installed the API Manager with MySQL Individually.
Installing INTER-API together with other Framework components
When installing the INTER-API together with other frameworks download the docker-compose script from the git repository.
git clone https://git.inter-iot.eu/Inter-IoT/commons.git
cd commons/interfw/
sh generateConf.sh
The docker-compose is ready to go, but when running the script for the first time it is recommended to run mysql container first, for it to initialize the state of the database and create the databases, and then run all the other containers. Execute the following commands from the docker-compose root file.
docker-compose up -d mysql
And after a couple of seconds you can go on and execute
docker compose up -d
The rest of the containers will start and on first start WSO2 API Manager will import all the APIS declared in the
conf/wso2am/InterAPIs directory. For every next run the latter command will be sufficient.
Configuration
1. Service ports
Configuration of ports for INTER-API and other Framework components can be done within the docker-compose.yml file,
where ports: tag defines the inside and outside ports for specific service.
2. Live container
To configure any files in live Docker container you can enter it with:
docker exec -it <container-name> bash
and do all the configuration necessary in the live container and then exit it.