8000 GitHub - dockstore/dockstore at 0.1.0
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

dockstore/dockstore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

dockstore

The Dockstore brings together tools in Docker images with CWL-based descriptors. We hope to use this project as motivation to create a GA4GH API standard for container registries and intend on making Dockstore fully compliant.

For a live demo see https://dockstore.org

This repo is the web service for the Dockstore. The usage of this is to enumerate the docker containers (from quay.io and hopefully docker hub) and the workflows (from github) that are available to users of Dockstore.org.

For the related web UI see the dockstore-ui project.

Usage

Building

If you maven build in the root directory this will build not only the web service but the client tool:

mvn clean install

Build Docker Version

docker build -t dockstore:1.0.0 .

Running Via Docker

Probably the best way to run this since it includes a bundled postgres. Keep in mind once you terminate the Docker container any state in the DB is lost.

  1. Fill in the template dockstore.yml and stash it somewhere outside the git repo (like ~/.dockstore)
  2. Start with docker run -it -v ~/.dockstore/dockstore.yml:/dockstore.yml -e POSTGRES_PASSWORD=iAMs00perSecrEET -e POSTGRES_USER=webservice -p 8080:8080 dockstore:1.0.0

Running Locally

You can also run it on your local computer but will need to setup postgres separately.

  1. Fill in the template dockstore.yml and stash it somewhere outside the git repo (like ~/.dockstore)
  2. Start with java -jar dockstore-webservice/target/dockstore-webservice-*.jar server ~/.dockstore/dockstore.yml

View Swagger UI

  1. Browse to http://localhost:8080/static/swagger-ui/index.html

Demo Integration with Github.com

  1. Setup a new OAuth application at Register a new OAuth application
  2. Browse to http://localhost:8080/integration.github.com
  3. Authorize via github.com using the provided link
  4. Browse to http://localhost:8080/github.repo to list repos along with their collab.json (if they exist)

Demo Integration with Quay.io

  1. Setup an application as described in Creating a new Application
  2. Browse to http://localhost:8080/integration.quay.io
  3. Authorize via quay.io using the provided link
  4. Browse to http://localhost:8080/container to list repos that we have tokens for at quay.io

Webservice Demo

  1. First add all your organizations/namespaces you are associated to on Quay.io to the constructor of dockstore/dockstore-webservice/src/main/java/io/dockstore/webservice/resources/DockerRepoResource.java. See next section for details. The webservice will now only use user's Quay username as namespace. This means that you will see only your own Quay repositories.
  2. Build the project and run the webservice. NOTE: The webservice will grab and use the IP of the server running the API. For example, if running on a docker container with IP 172.17.0.24, the API will use this for the curl commands and request URLs.
  3. Add your Github token. Follow the the steps above to get your Github token. This will create a user with the same username.
  4. Add your Quay token. It will automatically be assigned to the user created with Github if the username is the same. If not, you need to user /token/assignEndUser to associate it with the user.
  5. To load all your containers from Quay, use /container/refresh to load them in the database for viewing. This needs to be done automatically once the Quay token is set.
  6. Now you can see and list your containers. Note that listing Github repos do not return anything because it does not return a valid json.

Coding Standards

Please refer to SeqWare's Coding Standards.

Dockstore Java Client

Some background on the client:

Dockstore Command Line

The dockstore command line should be installed in a location in your path.

/dockstore-client/bin/dockstore

You then need to setup a ~/.dockstore/config file with the following contents:

token: <dockstore_token_from_web_app>
server-url: http://www.dockstore.org:8080

If you are working with a custom-built or updated dockstore client you will need to update the jar in: ~/.dockstore/config/self-installs.

Swagger Java Client

Background:

  • Client library generated by the swagger code generator
  • Is generated based on the webservice's swagger UI spec
  • Used by the Dockstore CLI to make http requests to the dockstore
  • If you changed/added some endpoints that the CLI uses, you will need to regenerate the swagger client.

To regenerate the swagger client:

  1. Have the dockstore webservice running
  2. Pull the code from their repo and cd to the directory. Build using mvn package
  3. Run java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i http://localhost:8080/swagger.json -l java -o <output directory> --library jersey2. The output directory is where you have dockstore/swagger-java-client/.
  4. NOTE: Rengenerating the swagger client will probably generate an incorrect pom file. Use git checkout on the pom file to undo the changes to it.

TODO

  1. items from Brian 2. you need better directions for filling in the yml settings file
  2. you need to document the config file
  3. you need to document the release process, how to update the jar the dockstore command line downloads
0