Skip to content

Latest commit

 

History

History
105 lines (81 loc) · 3.28 KB

local-dev-readme.adoc

File metadata and controls

105 lines (81 loc) · 3.28 KB

Pre-Release Local Development Setup

1. Prerequisites

2. Basic Setup

This is the basic setup required to run the VDI stack locally.

2.1. Setup

  1. Clone the VDI Service Repo

  2. cd into the cloned repo directory

  3. Copy the example.min.env file to a new file named simply .env

  4. Configure the .env file, filling in at minimum:

    • AUTH_SECRET_KEY: Must be a valid value.

    • ADMIN_AUTH_TOKEN: May be any value, just can’t be blank.

    • LDAP_SERVER: Must be a valid value (or comma separated list of values)

    • USER_DB_USER: Your user db username

    • USER_DB_PASS: Your user db password

    • Find and replace all instances of someDBUser with your app db username

    • Find and replace all instances of someDBPass with your app db password

  5. Optionally run make build to build the stack components, if this step is skipped, the latest image versions from Jenkins will be used.

2.2. Run the Stack

  1. Start a sshuttle tunnel to a VEuPathDB server

  2. Run make up to start up the VDI service

  3. Check the VDI service logs by running make log-service to ensure the service starts up successfully. The service will be available when the logs a bunch of debug lines about the worker pools starting up.

    An example of such a log line:

    2023-09-28 12:59:03.225 (wid:soft-delete-workers-10) [rid:init0] DEBUG org.veupathdb.vdi.lib.common.async.WorkerPool - worker pool soft-delete-workers starting worker 10

The VDI service should now be available at http://localhost:8080

2.3. Stop the Stack

  1. cd into the VDI service directory

  2. Run make stop

Note

This leaves the state of the containers and volumes on your device. To reclaim the space used by these pieces, follow the steps in Section 2.4.

2.4. Cleanup

To destroy the state of the VDI stack and reclaim all resources it used, follow these steps.

  1. cd into the VDI service directory

  2. Run make down

3. Plugin Developer

This setup is for plugin developers to be able to work on and test VDI plugins against a running VDI stack.

3.1. Initial Setup

  1. Follow the steps in Section 2.1

  2. Clone the target plugin(s). (These plugins should not be cloned into the VDI service directory)

  3. For each of the target cloned plugins:

    1. cd into the plugin directory

    2. Run make build to build the plugin image

3.2. Run the Stack

  1. Follow the steps in Section 2.2

3.3. Testing Plugin Changes

Once you have made your changes to the plugin scripts, follow these steps to be able to test your changes in the VDI stack.

  1. Rebuild the plugin

    1. From the plugin directory, run make build

  2. If the VDI stack is already running:

    1. Shut down the VDI stack by following the steps in Section 2.3

    2. Restart the stack by performing the following:

      1. cd into the VDI service directory

      2. Run make stop

      3. Run make start

  3. Else, if the VDI stack was already shut down

    1. Follow the steps in Section 2.2