Sign inSign up

dandiarchive/dandiarchive-girder

By dandiarchive

•Updated over 5 years ago

Girder portion of the dandiarchive setup

Image
0

10K+

dandiarchive/dandiarchive-girder repository overview

⁠dandiarchive CircleCI

Infrastructure and code for the DANDI Archive.

Folders in this repo:

  • ansible: Ansible code for deploying girder-dandi-archive.
  • docker: Docker files for building and deploying the application in Docker.
  • girder-dandi-archive: A Girder plugin which adds the custom endpoints for the DANDI Archive.
  • test: End-to-end tests for the entire application.
  • web: The web application front-end, based on Vue.js.

⁠Developing Locally

⁠Server
⁠Install
  1. Ensure MongoDB is running locally.

  2. Create a python3 virtual environment:

    mkvirtualenv dandiarchive --python=python3
    
  3. Install (in editable mode) the DANDI Archive plugin to Girder:

    cd girder-dandi-archive
    pip install -e .
    girder build
    
⁠Run
girder serve

The Girder server will run at http://localhost:8080/.

⁠Initial Bootstrapping
  1. Create an admin user, using Girder's web client:

    • Visit http://localhost:8080/#?dialog=register.
    • The first user created automatically becomes the admin user.
  2. Create a filesystem assetstore:

    • Visit http://localhost:8080/#assetstores.
⁠Test
# within "girder-dandi-archive"
pip install -r requirements-dev.txt
tox
⁠Web App
⁠Install
cd web
yarn install
⁠Run

Ensure the server is running locally (see above), then:

# within "web"
yarn run serve

The web app will be served at http://localhost:8085/.

⁠Test
# within "web"
yarn run lint
⁠End-to-End Testing

See test/README.md for end-to-end testing instructions.

⁠Docker

Currently there is a docker-compose file which gets the necessary infrastructure up and running for dandiarchive.

In order to get up and running:

cd docker
docker-compose build
docker-compose up

This will spin up 4 containers:

  1. MongoDB
  2. Girder
  3. Vue Web Client
  4. Provision

Provision container creates a Girder admin user, creates a filesystem assetstore and set necessary CORS settings. Credentials are username: admin, password: letmein.

When the provision container finishes, it will exit. The other three containers will remain running.

After docker-compose up succeeds and the provision container finishes, you should have:

  1. Girder up and running on port 8080
  2. Web client up and running on port 8085
  3. MongoDB container up and running, and only visible to the other docker containers

⁠Publish

Functionality for dandi-publish is currently provided by a separate application. For local installations, you will need to install and run that application separately. You will also need an API key from dandi-publish, which can be generated by following the API Authentication instructions⁠ in the publish README. Then, configure the following setting variables in girder:

dandi.publish_api_url = http://localhost:12345/
dandi.publish_api_key = your_api_key

This can be done easily using the PUT /system/setting endpoint on the swagger page. Replace 12345 with whatever port dandi-publish is running on.

NOTE: dandi.publish_api_url must include a trailing forward slash (/) for the URL to be parsed properly by Django.

Tag summary

Content type

Image

Digest

Size

540.1 MB

Last updated

over 5 years ago

docker pull dandiarchive/dandiarchive-girder