You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+36-1Lines changed: 36 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -346,4 +346,39 @@ To build the `sphinx` documentation locally, use:
346
346
347
347
```shell
348
348
docker run -v $(pwd):/opt/dev -w /opt/dev computationalplantscience/plantit sphinx-build -b html docs docs_output
349
-
```
349
+
```
350
+
351
+
### Testing DIRT migrations
352
+
353
+
The DIRT migration feature allows users of the original [DIRT](http://dirt.cyverse.org/) web application to migrate their data to `plantit`. To test this feature, you will need to have access to the DIRT server and database. The following environment variables must be set:
354
+
355
+
-`DIRT_MIGRATION_DATA_DIR`: the directory on the DIRT server where DIRT data is stored
356
+
-`DIRT_MIGRATION_HOST`: the hostname of the DIRT server
357
+
-`DIRT_MIGRATION_PORT`: the SSH port of the DIRT server
358
+
-`DIRT_MIGRATION_USERNAME`: the SSH username for the DIRT server
359
+
-`DIRT_MIGRATION_DB_HOST`: the hostname of the DIRT database server
360
+
-`DIRT_MIGRATION_DB_PORT`: the port of the DIRT database server
361
+
-`DIRT_MIGRATION_DB_USER`: the username of the DIRT database user
362
+
-`DIRT_MIGRATION_DB_DATABASE`: the name of the DIRT database
363
+
-`DIRT_MIGRATION_DB_PASSWORD`: the DIRT database password
364
+
365
+
An SSH tunnel must also be opened to the DIRT server, as the database is not open to external connections. For instance, to open a tunnel from port 5678 on the DIRT server to port 3306 on a development machine:
366
+
367
+
```shell
368
+
ssh -L 3306:localhost:3306 -p 5678 <your cyverse username>@<DIRT server IP or FQDN>
369
+
```
370
+
371
+
On some Linux systems it may be necessary to:
372
+
- substitute the loopback IP address `127.0.0.1` for `localhost`
373
+
374
+
Be sure to set `DIRT_MIGRATION_DB_HOST=host.docker.internal` to point the Docker containers to the host's loopback/localhost address.
375
+
376
+
Some extra configuration is necessary for Linux systems to allow containers to access services running on the local host. The `docker-compose.dev.yml` configuration file configures the `plantit`, `celery`, and `celerye` containers with the `extra_hosts` option:
377
+
378
+
```yaml
379
+
extra_hosts:
380
+
- "host.docker.internal:host-gateway"
381
+
```
382
+
383
+
This is only necessary on Linux systems. On Mac and Windows, the `host.docker.internal` hostname is automatically configured. See [this post](https://stackoverflow.com/a/43541732/6514033) for more information.
0 commit comments