WIP (Work In Progress)
- Introduction
- Pre-requisites
- Usage
- Creating Appliances
- Service Containers
- Galaxy Configuration
- Docker Compose
A LAPPS/Galaxy Docker Appliance, or simply an appliance, is a network of Docker containers running a Galaxy instance configured with a selected set of LAPPS Grid web services. Where the web services are also running in one or more other Docker containers. Typically services are organized into Docker containers by family, that is one container for StanfordNLP service, another container for Lingpipe, one for a MASC Datasource and Solr instance etc.
The make-appliance
script expects the Tool Config Editor is installed and the tce
script used to launch the editor is available on the $PATH
. A pre-built binary distribution of the Tool Conf Editory is available here.
Groovy (2.4.x or later) is required to run the YamlBuilder.groovy
script that is used to generate the docker-compose.yml file.
$> ./make-appliance identifier module [module ...]
where the identifier
is just a prefix for names of Docker containers, and a module
is the name of the Docker containers to include in the appliance.
EXAMPLE
$> ./make-appliance gate masc oaqa
$> docker-compose up
Assembling an appliance requires three things.
- The Docker images. The specifications for several services are included here for reference and more will be added. However, images can be pulled from any repository, they do not need to be defined here.
- The Galaxy customizations. Galaxy's tool_conf.xml file will need to be updated and the tool XML wrappers and scripts need to be copied to Galaxy's
tool
directory. Note: tools are not installed from Galaxy's Tool Shed since the tools used in an appliance do not make sense outside the context of the appliance. That is, other users would not be able to install the tools and use them so it does not make sense to deploy them to a tool shed. - The
docker-compose.yml
file needed to wire everything together.
Some scripts and tools are provided to automate as much of the task as possible, but it is not too difficult to do everything by hand.
The web services running in the Docker containers should be SOAP services that support the LAPP Grid API. While not a hard requirement, it does make it easier to compose workflows in Galaxy if all service speak the same APIs and data formats. Implementing a LAPPS Grid service is beyond the scope of this document, but see this tutorial for information on writing a LAPPS Grid web service. The remainder of this document assumes the Service.war file containing a service named MyCustomService has already be created.
There are two ways to run a war file in a Docker container:
- Run the
lappsgrid/tomcat7
image directly and mount the directory containing the Service.war file as/var/lib/tomcat7/webapps
, or - Create a new Docker image based on
lappsgrid/tomcat7
, or any other Tomcat7 based container.
Create a new directory and copy the Service.war file. For this example it is assumed the Service.war file has been copied to /home/user/webapp
, but any local directory will do. The use the -v
option to mount this as a volume in the Docker image
$> docker run -d -p 8080:8080 -v /home/user/webapp:/var/lib/tomcat7/webapps
After Docker has started the container the service can be accessed at http://localhost:8080/Service/services/MyCustomService.
Tomcat will expand and run all .war file it finds in /var/lib/tomcat7/webapps
so if /home/user/webapp
contains more than one .war file Tomcat will run them all.
Create a Dockerfile based on the lappsgrid/tomcat7
image and copy the war file to /var/lib/tomcat7/webapps
.
FROM lappsgrid/tomcat7
COPY ./Service.war /var/lib/tomcat7/webapps
See here for more information on creating Docker images.
TODO
- Explain tool wrappers. See https://docs.galaxyproject.org/en/latest/dev/schema.html
- Script used to run the tool
- Updating the tool_conf.xml file.
TODO
- YamlBuilder.groovy