Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
steering
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
steering
Commits
ed9c9196
Commit
ed9c9196
authored
2 years ago
by
Ernesto Rico Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
Replace README.rst with README.md
parent
0c884220
No related branches found
No related tags found
No related merge requests found
Pipeline
#2329
passed
2 years ago
Stage: build
Stage: deploy
Stage: release
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+113
-0
113 additions, 0 deletions
README.md
README.rst
+0
-97
0 additions, 97 deletions
README.rst
with
113 additions
and
97 deletions
README.md
0 → 100644
+
113
−
0
View file @
ed9c9196
# AURA Steering: Program Scheduler
AURA Steering is the scheduling module, where the actual program schedule of
the whole station is stored as well as all infos regarding single shows and
emissions.
It also acts as an OpenID Connect provider for
`dashboard`
and
`tank`
.
## Installation
Follow the instructions to deploy AURA Web from the
[
Docker Compose
Installation
](
https://docs.aura.radio/en/latest/administration/install-docker-compose.html
)
If you just want to try
`steering`
locally, use the provided compose setup and
be sure to add:
```
dotenv
AURA_PROTO=http
```
to the
`.env`
file.
A better development setup for
`steering`
, that pulls the docker images for
`dashboard`
and
`tank`
from Docker Hub, builds the image for
`steering`
locally
and exposes the ports can be achieved with
`docker-compose.steering.yml`
by
adding this lines to the end of the
`.env`
file:
```
dotenv
STEERING_VERSION=latest
COMPOSE_FILE=docker-compose.yml:docker-compose.steering.yml
```
## Testing
If you want to run the test suite, you can run
`pytest`
in the container:
```
shell
$
docker compose run steering pytest
```
## `venv`
**Warning:**
This is not the recommended way: it uses SQLite instead of
Postgres and will be deprecated soon
If you really don't want to use Docker, you can install
`steering`
using a
virtual environment.
Create and activate a virtual environment:
```
shell
$
python3.9
-m
venv venv
$
source
venv/bin/activate
```
Install the required dependencies:
```
shell
(
venv
)
$
pip
install
--upgrade
pip
(
venv
)
$
pip
install
-r
requirements.txt
```
Then, you can set up the database:
```
shell
(
venv
)
$
./manage.py migrate
```
And load the fixtures:
```
shell
(
venv
)
$
./manage.py loaddata fixtures/
*
/
*
.json
```
Or, if you prefer, you can just create a superuser after setting up the
database:
```
shell
(
venv
)
$
manage.py createsuperuser
```
The only required fixtures are the recurrence rules, these are needed to create
schedules:
```
shell
$
docker compose run django ./manage.py loaddata fixtures/program/rrule.json
```
Then, you can create a RSA Key and the clients for
`dashboard`
and
`tank`
:
```
shell
(
venv
)
$
./manage.py creatersakey
(
venv
)
$
./manage.py create_oidc_client dashboard public
-r
"id_token token"
-u
http://localhost:8080/oidc_callback.html
-u
http://localhost:8080/oidc_callback_silentRenew.html
-p
http://localhost:8080/
(
venv
)
$
./manage.py create_oidc_client tank confidential
-r
"code"
-u
http://localhost:8040/auth/oidc/callback
```
Finally, you can start the development server:
```
shell
(
venv
)
$
./manage.py runserver
```
## Data Model
A visualization of the data model can be generated using the
[
Graph Models
Django
Extensions
](
https://django-extensions.readthedocs.io/en/latest/graph_models.html
)
The following command will generate an image out of the models:
```
shell
(
venv
)
$
docker compose steering run ./manage.py graph_models
--pydot
-g
-o
steering_data_model.png program profile
```
This diff is collapsed.
Click to expand it.
README.rst
deleted
100644 → 0
+
0
−
97
View file @
0c884220
================================
AURA Steering: Program Scheduler
================================
AURA Steering is the scheduling module, where the actual program schedule of
the whole station is stored as well as all infos regarding single shows and
emissions.
It also acts as an OpenID Connect provider for ``dashboard`` and ``tank``.
Installation
------------
Follow the instructions to deploy AURA Web from the `Docker Compose
Installation`_.
If you just want to try ``steering`` locally, use the provided compose setup
and be sure to put::
AURA_PROTO=http
in the ``.env`` file.
A better development setup for ``steering``, that pulls the docker images for
``dashboard`` and ``tank`` from Docker Hub, builds the image for ``steering``
locally and exposes the ports can be achieved with the
``docker-compose.steering.yml`` by adding this lines to the end of the ``.env``
file::
STEERING_VERSION=latest
COMPOSE_FILE=docker-compose.yml:docker-compose.steering.yml
Testing
-------
If you want to run the test suite, you can run ``pytest`` in the container::
$ docker compose run steering pytest
venv
----
.. warning:: This is not the recommended way: it uses SQLite instead of Postgres and will be deprecated soon
If you really don't want to use Docker, you can install ``steering`` using a
virtual environment.
Create and activate a virtual environment::
$ python3.9 -m venv venv
$ source venv/bin/activate
Install the required dependencies::
(venv) $ pip install --upgrade pip
(venv) $ pip install -r requirements.txt
Then, you can setup the database::
(venv) $ ./manage.py migrate
And load the fixtures::
(venv) $ ./manage.py loaddata fixtures/*/*.json
Or, if you prefer, you can just create a super user after setting up the
database::
(venv) $ manage.py createsuperuser
The only required fixtures are the recurrence rules, these are needed to create
schedules::
$ docker compose run django ./manage.py loaddata fixtures/program/rrule.json
Then, you can create a RSA Key and the clients for ``dashboard`` and ``tank``::
(venv) $ ./manage.py creatersakey
(venv) $ ./manage.py create_oidc_client dashboard public -r "id_token token" -u http://localhost:8080/oidc_callback.html -u http://localhost:8080/oidc_callback_silentRenew.html -p http://localhost:8080/
(venv) $ ./manage.py create_oidc_client tank confidential -r "code" -u http://localhost:8040/auth/oidc/callback
Finally, you can start the development server::
(venv) $ ./manage.py runserver
Data Model
----------
A visualization of the data model can be generated using the `Graph Models
Django Extensions`_
The following command will generate an image out of the models::
(venv) $ docker compose steering run ./manage.py graph_models --pydot -g -o steering_data_model.png program profile
.. _Docker Compose Installation: https://docs.aura.radio/en/latest/administration/install-docker-compose.html
.. _Graph Models Django Extensions: https://django-extensions.readthedocs.io/en/latest/graph_models.html
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment