Skip to content

Commit

Permalink
documentation on testing (#407)
Browse files Browse the repository at this point in the history
  • Loading branch information
robkooper authored Sep 11, 2023
1 parent f286139 commit 2d8b929
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Extractors can now specify an extractor_key and an owner (email address) when sending a
registration or heartbeat to Clowder that will restrict use of that extractor to them.
- Added a dropdown menu to select all spaces, your spaces and also the spaces you have access to. [#374](https://github.com/clowder-framework/clowder/issues/374)
- Documentation on how to do easy testing of pull requests

## Fixed
- Updated lastModifiesDate when updating file or metadata to a dataset, added lastModified to UI [386](https://github.com/clowder-framework/clowder/issues/386)
Expand Down
82 changes: 82 additions & 0 deletions TESTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Testing Clowder PR

Download the [docker-compose.yml](https://raw.githubusercontent.com/clowder-framework/clowder/develop/docker-compose.yml) file in a new folder. Next create a .env file with the following data:

```ini
COMPOSE_PROJECT_NAME=clowder
TRAEFIK_HOST=Host:yourmachine.ncsa.illinois.edu;
TRAEFIK_HTTP_PORT=80
TRAEFIK_HTTPS_PORT=443
TRAEFIK_HTTPS_OPTIONS=TLS
TRAEFIK_ACME_ENABLE=true
TRAEFIK_ACME_EMAIL[email protected]
TRAEFIK_HTTP_REDIRECT=Redirect.EntryPoint:https
CLOWDER_SSL=true
CLOWDER_ADMINS[email protected]
```

Next create a docker-compose.override.yml file:

```yaml
version: '3.5'

services:
# point to the PR image (in this case PR-404)
clowder:
image: ghcr.io/clowder-framework/clowder:PR-404

# add any more extractors if you want
# extract preview image
imagepreview:
image: clowder/extractors-image-preview:latest
restart: unless-stopped
networks:
- clowder
depends_on:
rabbitmq:
condition: service_started
environment:
- RABBITMQ_URI=${RABBITMQ_URI:-amqp://guest:guest@rabbitmq/%2F}

# extract image metadata
imagemetadata:
image: clowder/extractors-image-metadata:latest
restart: unless-stopped
networks:
- clowder
depends_on:
rabbitmq:
condition: service_started
environment:
- RABBITMQ_URI=${RABBITMQ_URI:-amqp://guest:guest@rabbitmq/%2F}

# digest
digest:
image: clowder/extractors-digest:latest
restart: unless-stopped
networks:
- clowder
depends_on:
rabbitmq:
condition: service_started
environment:
- RABBITMQ_URI=${RABBITMQ_URI:-amqp://guest:guest@rabbitmq/%2F}
```
It is best practice to start with a `docker-compose pull` to make sure you have all the latest versions of the containers, followed by a `docker-compose up -d`. This will start all containers. You should be able to go to https://yourmachine.ncsa.illinois.edu.

If this is the first time running the stack (or if you removed the mongo database), you will need to create the initial user again:

```bash
docker run --rm -it \
--network clowder_clowder \
-e "FIRSTNAME=Admin" \
-e "LASTNAME=User" \
-e "ADMIN=true" \
-e "PASSWORD=areallygoodpassword" \
-e "[email protected]" \
-e "MONGO_URI=mongodb://mongo:27017/clowder" \
clowder/mongo-init
```


0 comments on commit 2d8b929

Please sign in to comment.