Skip to content

Commit

Permalink
Merge pull request #125 from RockefellerArchiveCenter/v1.1
Browse files Browse the repository at this point in the history
v1.1
  • Loading branch information
helrond authored May 5, 2020
2 parents 9ff2db0 + 057080a commit 77cc45e
Show file tree
Hide file tree
Showing 21 changed files with 2,671 additions and 389 deletions.
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
ignore = E501
exclude = .git,__pycache__,*/migrations,fixtures,apps.py
16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
repos:
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.5
hooks:
- id: autopep8
args:
- --in-place
- --aggressive
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks:
- id: flake8
- repo: git://github.com/doublify/pre-commit-isort
rev: v4.3.0
hooks:
- id: isort
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,9 @@ Or, if you want to remove all data

$ docker-compose down -v

The first time you start zodiac, a set of Applications and Services will be created. You can recreate this default set of services and applications by removing all data as described above, and then running `docker-compose up`.

These Applications and Services will be sequenced in the order illustrated in this diagram:

![Application and service sequence diagram](service_sequence.png)
The first time you start zodiac, a set of Applications, Services, Users and Tasks will be created. You can recreate this default application state at any time by running a custom Django management command and passing the `--reset` flag:

$ python manage.py setup_services --reset

## Usage

Expand All @@ -47,6 +44,13 @@ Services provide small and clearly-defined functionality, which are called via R
### Message Queue
zodiac includes a messaging layer to queue and process tasks. It does this via [Celery](https://github.com/celery/celery/) and [Celery Beat](https://github.com/celery/django-celery-beat), which are installed as daemons in the Docker container and run on startup. To process queued callbacks, you will need to add a periodic task using the Django Admin interface. Task results are available in the user interface.

### Default Users
When you first spin Zodiac up, a number of users will be created as follows:
- A system administrator (in Django terms, a superuser), identified by the username `admin` and password `adminpass`
- Two system users, for applications which authorized to deliver data to specific services. These are:
- Zorya, a system which creates packages from digitized and legacy born-digital content, identified by the username `zorya` and API key `zoryakey`.
- Aurora, a system which creates packages from born-digital content, identified by the username `aurora` and the API key `aurorakey`.


## License

Expand Down
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Apply database migrations
../wait-for-it.sh db:5432 -- echo "Apply database migrations"
python manage.py makemigrations && python manage.py migrate
python manage.py migrate

if [ ! -f zodiac/config.py ]; then
echo "Creating config file"
Expand All @@ -11,7 +11,7 @@ python manage.py makemigrations && python manage.py migrate

# Create initial organizations and users
echo "Setting up applications and services"
python manage.py shell < ../setup_services.py
python manage.py setup_services

echo "Starting celery using supervisor"
supervisord -c /etc/supervisord.conf
Expand Down
Binary file removed service_sequence.png
Binary file not shown.
243 changes: 0 additions & 243 deletions setup_services.py

This file was deleted.

Loading

0 comments on commit 77cc45e

Please sign in to comment.