Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rockefellerarchivecenter/fornax
A microservice to create Archivematica-compliant Submission Information Packages
https://github.com/rockefellerarchivecenter/fornax
archivematica django django-rest-framework microservice project-electron
Last synced: 1 day ago
JSON representation
A microservice to create Archivematica-compliant Submission Information Packages
- Host: GitHub
- URL: https://github.com/rockefellerarchivecenter/fornax
- Owner: RockefellerArchiveCenter
- License: mit
- Created: 2018-04-12T02:20:52.000Z (over 6 years ago)
- Default Branch: base
- Last Pushed: 2024-11-14T21:41:04.000Z (1 day ago)
- Last Synced: 2024-11-14T22:28:55.340Z (1 day ago)
- Topics: archivematica, django, django-rest-framework, microservice, project-electron
- Language: Python
- Size: 80.3 MB
- Stars: 1
- Watchers: 8
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fornax
A microservice to create Archivematica-compliant Submission Information Packages (SIPs).
fornax is part of [Project Electron](https://github.com/RockefellerArchiveCenter/project_electron), an initiative to build sustainable, open and user-centered infrastructure for the archival management of digital records at the [Rockefeller Archive Center](http://rockarch.org/).
## Setup
Install [git](https://git-scm.com/) and clone the repository
$ git clone [email protected]:RockefellerArchiveCenter/fornax.git
Install [Docker](https://store.docker.com/search?type=edition&offering=community) and run docker-compose from the root directory
$ cd fornax
$ docker-compose upOnce the application starts successfully, you should be able to access the application in your browser at `http://localhost:8003`
When you're done, shut down docker-compose
$ docker-compose down
Or, if you want to remove all data
$ docker-compose down -v
### Configuration
You will need to edit configuration values in `fornax/config.py` to point to your instance of Archivematica.
## Services
fornax has six services, all of which are exposed via HTTP endpoints (see [Routes](#routes) section below):
* Store SIPs - Creates a SIP object.
* SIP Assembly - This is the main service for this application, and consists of the following steps:
* Moving the SIP to the processing directory (SIPS are validated before and after moving).
* Restructuring the SIP for Archivematica compliance by:
* Moving objects in the `data` directory to `data/objects`.
* Adding an empty `logs` directory.
* Adding a `metadata` directory containing a `submissionDocumentation` subdirectory.
* Creating `rights.csv` and adding it to the `metadata` directory.
* Creating submission documentation and adding to the `metadata/submissionDocumentation` subdirectory.
* Adding an identifier to `bag-info.txt` using the `Internal-Sender-Identifier` field.
* Adding a `processingMCP.xml` file which sets processing configurations for Archivematica.
* Updating bag manifests to account for restructuring and changes to files.
* Delivering the SIP to the Archivematica Transfer Source (SIPS are validated before and after moving).
* Create Transfer - starts and approves the next assembled transfer in Archivematica.
* Remove Completed Transfers/Ingests - hides completed transfers or ingests in the Archivematica Dashboard to avoid performance issues.
* Cleanup - removes files from the destination directory.
* Request Cleanup - sends a POST request to another service requesting cleanup of the source directory. fornax only has read access for this directory.For an example of the data fornax expects to receive (both bags and JSON), see the `fixtures/` directory
### Routes
| Method | URL | Parameters | Response | Behavior |
|--------|-----|---|---|---|
|GET|/sips| |200|Returns a list of SIPs|
|GET|/sips/{id}| |200|Returns data about an individual SIP|
|POST|/sips||200|Creates a SIP object from an transfer in Aurora.|
|POST|/assemble||200|Runs the SIPAssembly routine.|
|POST|/start||200|Starts and approves the next transfer in Archivematica.|
|POST|/remove-transfers||200|Hides transfers in the Archivematica Dashboard.|
|POST|/remove-ingests||200|Hides ingests in the Archivematica Dashboard.|
|POST|/cleanup||200|Removes files from destination directory.|
|POST|/request-cleanup||200|Notifies another service that processing is complete.|
|GET|/status||200|Return the status of the microservice|
|GET|/schema.json||200|Returns the OpenAPI schema for this application|## Archivematica Integration Testing
When migrating Archivematica, it is necessary to test that Fornax can start transfers as expected. To run these integration tests, target the Python environment for this application and pass the `tag` flag to the tests management command: `env/bin/python manage.py test --tag=integration`.Running these tests will start a small package in all configured origins. This package will be set to not store the AIP or the DIP, but some manual cleanup will be required.
## Development
This repository contains a configuration file for git [pre-commit](https://pre-commit.com/) hooks which help ensure that code is linted before it is checked into version control. It is strongly recommended that you install these hooks locally by installing pre-commit and running `pre-commit install`.## License
This code is released under an [MIT License](LICENSE).