This API is implemented in order to integrate the MIP front-end with Galaxy through a RestAPI.
- Galaxy has to be installed (https://github.com/madgik/galaxy/tree/master/Docker_Build_Scripts).
- After installing Galaxy an API key should be created:
- Enter Galaxy from the browser.
- Select the "User" Drop Down menu, on the navigation bar.
- Select the "Preferences" option.
- Select the "Manage API Key" option.
- "Create a new key"
- Copy the key so we can use it in the next step.
Use the following command after changing the appropriate variables:
- "galaxyUrl" should be replaces by the url of the server that has Galaxy installed.
- "galaxyApiKey" should be replaced by the API key created in Galaxy.
- "galaxyReverseProxyPassword" has to be the same as the password given when installing Galaxy.
- "jwtSecret" has to be the same as in the HBPMedical/portal-backend.
- Change the tag name of the docker "galaxy_middleware_api" image to the version you want to install.
docker run -d -e jwtSecret='1234567890' -e jwtIssuer='mip.humanbrainproject.eu' -e galaxyURL='http://88.197.53.100:8090/' -e galaxyApiKey='1234541541351' -e galaxyReverseProxyUsername='admin' -e galaxyReverseProxyPassword='password' -p 8091:8080 hbpmip/galaxy_middleware_api:v0.3.1
If you want, you can save all the environmental variables and use the following instructions to deploy:
- You can follow this template to create the env.list file :
jwtSecret=theJwtSecret jwtIssuer=theJwtIssuer galaxyURL=YourGalaxyURL galaxyApiKey=YourGalaxyApiKey galaxyReverseProxyUsername=admin galaxyReverseProxyPassword=password
- Run the docker image:
docker run -d --env-file env.list -p 8091:8080 hbpmip/galaxy_middleware_api:v0.3.1
You can use the api from the following endpoint
http://localhost:PORT/Galaxy_Middleware_API-1.0.0-SNAPSHOT/api/getWorkflows
Generate a JWT token with HMAC512 security. Then update jwtToken variable in Postman and test the API calls.
If you want to create a new image of Galaxy_Middleware_API you can follow these instructions:
- In the project directory :
gradle clean
- In the project directory :
gradle war
- docker build -t hbpmip/galaxy_middleware_api .