/apix-docker-test

Provides Docker images and orchestration for various Fedora API-X components.

Primary LanguageShell

Summary

Provides Docker images and orchestration for various Fedora API-X components.

Individual READMEs linked below contain example usage for common docker tasks, like obtaining a command shell in a container or setting the container up for remote debugging. The docker-compose file is intended to orchestrate these containers using a single command.

Requirements

See this page for more information on getting started with Docker for your platform.

To verify you have the Docker platform installed correctly (or to check and see if you have Docker already installed), you should obtain a command shell and run:

  1. docker -v
  2. docker-compose -v

If either of these commands fail to print out version information, then you'll need to troubleshoot your installation before moving forward.

Getting Started

To bring up this environment, you need to:

  1. Install Docker and verify the installation (above)
  2. Clone this repository
  3. cd into the repository directory
  4. docker-machine users only: set the APIX_HOST and APIX_BASEURI environment variable. Substitute the name of your docker machine for the default machine if necessary:
    • docker-machine ip default (ensure the output is an IP address, and not an error message)
    • echo "APIX_HOST=`docker-machine ip default`" > apix.env
    • echo "APIX_BASEURI=http://`docker-machine ip default`/fcrepo/rest" >> apix.env
  5. Invoke docker-compose up -d

Depending on the speed of your platform, it may take a bit for the containers to download and to start. Keep that in mind when you are verifying that the environment started up. The containers should only be downloaded once. Subsequent invocation of docker-compose should be faster, since the images will not need to be downloaded.

Note: To destroy the environment, run docker-compose down. To stop the environment, run docker-compose stop.

Verification

Note that if you are using Docker Toolbox for Mac, you will need to find the IP address of your Docker Machine (try docker-machine ip default), and use that IP address anywhere you see localhost in the following instructions.

Once you can verify that the environment is up and working, move on to some of the sample API-X exercises.

Image descriptions

This repository provides Dockerfiles for the following images:

A base image, built from Ubuntu 16.04 (for various reasons, but mainly because Karaf 4.0.6+ requires glibc, and cannot use musl), containing a Java 8 build environment with Maven.

Extends the build image, and provides a default-configured Fedora 4.6.0 runtime.

Extends the build image, and provides a Karaf container running version 4.0.6. Provides a base image for containers that need a Karaf runtime.

Provides a triplestore index, useful for demonstrating the contents of the Fedora repository. Extends the build image.

Ad-hoc repository services provided by Amherst College. Extends the karaf image, and provides a Karaf container with the Amherst features already installed and running.

The core API-X image. Extends the karaf image, and provides a Karaf container with API-X features already installed and running.

Ancillary (i.e. not considered "core") API-X image that keeps the demonstration triplestore up-to-date.