Services related to Digital Preservation for University of Leeds DLIP project.
There are a number of entry points (ie runnable) projects and various shared projects these applications use.
- Storage.API - wrapper on top of underlying Fedora storage.
- Preservation.API - higher level Preservation API consuming Storage API.
- DigitalPreservation.UI - user interface for interacting with above services.
- DigitalPreservation.Core - various common helper functions.
- Storage.Client - HTTP client for Storage API.
- Preservation.Client - HTTP client for Preservation API.
Projects written in .net8 using libraries including:
- Serilog - structured logging framework.
- Mediatr - mediator implementation for in-proc messaging.
- XUnit - automated test framework.
Each entry point has a Dockerfile. There is a docker compose file available for ease of running services. Rename .env.dist to .env as a starting point for configuration.
# build images
docker compose build
# run images
docker compose upFor local development docker-compose.local.yml can be used to run any dependencies (e.g. Postgres)
docker compose -f docker-compose.local.yml upYou also need to read Fedora's PostgreSQL database through the bastion host; this should use port 5435
Migrations can be added by running the following:
cd src/DigitalPreservation
dotnet ef migrations add "<migration-name>" -p Preservation.API -o Data/MigrationsGithub actions are used for deployments.
The overall process is:
dotnet testto confirm build + tests passing- build and push Docker images to ECR, tagged with current branch/sha1
- push to environment, which consists of:
- pulling docker image from ECR
- retag image with environment-specific tag and push to ECR (images deployed with mutable tags)
- restart ECS service to pull down latest image
Builds kicked off by:
- Create PR (non-draft) - push to
development- Push can be avoided if PR has "no-deploy" label
- Push to
main- push todevelopmentandproduction - Create version tag - push to
production - Manual running action
Note
Only development environment currently exists. Builds will need expanded when we have further environments.