Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README #385

Merged
merged 3 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
152 changes: 10 additions & 142 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,148 +1,16 @@
The "demo" compose file describes an early system meant to demonstrate some new technologies and services in PASS.
# PASS Docker ![PASS Docker](https://github.com/eclipse-pass/pass-docker/actions/workflows/pass-acceptance-tests.yml/badge.svg?branch=main)

## Running:
PASS Docker is a developer-focused PASS runtime, which provides the PASS project and all of its dependent services using
[Docker Compose](https://docs.docker.com/compose/). PASS Docker provides Docker images that can be used for running PASS
in different environments including a local test instance and production.

Docker compose works as normal, but for the demo you need to specify both correct `yml` file and env file.
A full list of all the Eclipse PASS projects can be found in the PASS Main repository [README](https://github.com/eclipse-pass/main).

### Run With No Deposit Services
In order to run a local instance **_without_** deposit-service, ftp, and dspace, you can run:
```
docker compose -f docker-compose.yml -f eclipse-pass.local.yml up -d --no-build --quiet-pull --pull always
```
# Guides

In order to stop a local instance, you can run:
```
docker compose -p pass-docker down -v
```
Note the `-v` to remove the volumes, **this is critical** so on subsequent starts, user data is not duplicated.
* [PASS Docker](https://docs.eclipse-pass.org/developer-documentation/pass-docker)
* [PASS Documentation](https://docs.eclipse-pass.org/)

### Run With Deposit Services and DSpace
In order to run a local instance **_with_** deposit-service, ftp, dspace, you can run:
```
docker compose -p pass-docker -f docker-compose.yml -f eclipse-pass.local.yml -f docker-compose-deposit.yml -f docker-compose-dspace.yml up -d --no-build --quiet-pull --pull always
```

Run the following to create a test admin user in dspace:
```
docker compose -p pass-docker -f dspace-cli.yml run --rm dspace-cli create-administrator -e [email protected] -f admin -l user -p admin -c en
```

Run the following to load sample data into dspace:
```
docker compose -p pass-docker -f dspace-cli.yml -f dspace-cli.ingest.yml run --rm dspace-cli
```

### Run With Deposit Services and InvenioRDM
In order to run a local instance **_with_** deposit-service, ftp, InvenioRDM, you can run:

Refer to [invenio-rdm/README](./invenio-rdm/README.md) to ensure the prerequisites are met before running the commands below.

First, start the local test InvenioRDM by running the following command in the `invenio-rdm` directory:

```console
./build.sh
./start.sh
```

After the InvenioRDM service is up and running, run the following commands in the `pass-docker` directory:

```console
docker compose -p pass-docker -f docker-compose.yml -f eclipse-pass.local.yml -f docker-compose-deposit.yml -f docker-compose-deposit-invenio-rdm.yml up -d --no-build --quiet-pull --pull always
```

## Services:

### `idp`

This service runs a Shibboleth Identity Provider using an image from [https://spaces.at.internet2.edu/display/ITAP/InCommon+Trusted+Access+Platform+Release].
Configuration files in the image are overridden on startup by using files in `idp/`.

Environment variables:
* `IDP_HOST=http://localhost:9080`
* `SP_LOGIN=http://localhost:8080/login/saml2/sso/pass`

Separately there is a non-container environment variable `IDP_INTERNAL_PORT` which is used to set the internal port on the IDP container which 9080 maps to.
The default is 8080. This can be used to make 9080 support https by setting it to 4443 in the docker compose environment. One way to do this is by adding
`IDP_INTERNAL_PORT=4443` to the docker compose command. Note that `-e` should not be used because it is for container environment variables.

This service is intended for testing only.

### `ldap`

This service runs the 389 Directory Server which is a LDAP server. It is used by the IDP as a source of information on users.
The users in ` ldap/pass.ldif` are loaded on startup.

This service is intended for testing only.

### [`pass-core`](https://github.com/eclipse-pass/pass-core)

Repository: https://github.com/eclipse-pass/pass-core
Package: https://github.com/orgs/eclipse-pass/packages/container/package/pass-core-main

Presents a JSON:API window to the backend from behind the authentication layer. Swagger is not yet hooked up so is unreachable. Provides data and web APIs to the application.

Support SAML and HTTP basic authentication.

Environment variables:

* `PASS_CORE_BASE_URL=http://localhost:8080` : Used when generating JSON API relationship links. Needs to be absolute and must change to match deployment environment
* `PASS_CORE_POSTGRES_PORT=5432`
* `PASS_CORE__USER=backend`
* `PASS_CORE_PASSWORD=backend`
* `PASS_CORE_APP_LOCATION=http://pass-ui:81/app/` : Resource location of pass ui resources
* `PASS_CORE_APP_CSP=default-src 'self';` : Content Security Policy header value
* `PASS_CORE_IDP_METADATA=http://idp:8080/idp/shibboleth` : Resource location of IDP metadata
* `PASS_CORE_SP_ID=https://sp.pass/shibboleth` : Identifier of pass-core as an SP
* `PASS_CORE_SP_KEY=file:///path/key` : Resource location of SP key
* `PASS_CORE_SP_CERT=file:///path/cert` : Resource location of SP certificate
* `PASS_CORE_LOGOUT_SUCCESS=/app/` : Location user is redirected after logout
* `PASS_CORE_LOGOUT_DELETE_COOKIES="JSESSIONID /,shib_idp_session /idp"` : Cookies to delete on logout, "name path" separated by commas.
* `POSTGRES_USER=postgres`
* `POSTGRES_PASSWORD=postgres`
* `JDBC_DATABASE_URL=jdbc:postgresql://postgres:5432/pass`
* `JDBC_DATABASE_USERNAME=pass`
* `JDBC_DATABASE_PASSWORD=moo`

### `postgres`

Pretty much an out-of-the-box PostgreSQL server. Only interacts with the [`pass-core`](https://github.com/eclipse-pass/pass-core) service.

### [`pass-ui`](https://github.com/eclipse-pass/pass-ui)

Repository: https://github.com/eclipse-pass/pass-ui
Package: https://github.com/orgs/eclipse-pass/packages/container/package/pass-ui

User interface for the PASS application. Currently does not handle environment variables nicely - they are baked into images at build time due. The environment variables in the demo environment should not need to be adjusted between different deployment environments.

Environment variables:

* `PASS_UI_PORT=81`
* `PASS_API_NAMESPACE=data`
* `PASS_UI_ROOT_URL=/app`
* `STATIC_CONFIG_URL=/app/config.json`
* `DOI_SERVICE_URL=/doiservice/journal`
* `MANUSCRIPT_SERVICE_LOOKUP_URL=/downloadservice/lookup`
* `MANUSCRIPT_SERVICE_DOWNLOAD_URL=/downloadservice/download`
* `POLICY_SERVICE_POLICY_ENDPOINT=/policyservice/policies`
* `POLICY_SERVICE_REPOSITORY_ENDPOINT=/policyservice/repositories`
* `SCHEMA_SERVICE_URL=/schemaservice`
* `USER_SERVICE_URL=/pass-user-service/whoami`


### `loader`

A basic Docker image where we can run a `curl` command to bootstrap the environment with data from `demo_data.json`

## Running Acceptance Tests

Repository: https://github.com/eclipse-pass/pass-acceptance-testing

There is a small set of end-to-end smoke tests that we can run against this environment for some validation of changes. These tests run automatically for new PRs that are opened against `main`, but can also be run locally. In order to do this, you'll first need to clone the repository with the tests.

Once you have the repository, wait for the Docker Compose environment to start up and initialize then run the tests directly. From the `pass-acceptance-testing` local repo, run:

``` sh
yarn # Installs project dependencies
yarn run test # Runs tests
```
# License

PASS Docker is Open Source software released under the [Apache 2.0 license](LICENSE).
37 changes: 0 additions & 37 deletions invenio-rdm/README.md

This file was deleted.

Loading