Skip to content
Snippets Groups Projects
Commit c4523c24 authored by David Trattnig's avatar David Trattnig
Browse files

Merge branch 'lars-debian-deployment' into 'master'

docs: use local Debian packages for bare-metal deployment

See merge request aura/engine!6
parents 9afa33f0 2b6ebefd
No related branches found
No related tags found
1 merge request!6docs: use local Debian packages for bare-metal deployment
Pipeline #1162 passed
...@@ -24,9 +24,7 @@ Aura Engine runs on any modern Debian-based OS. It requires at least ...@@ -24,9 +24,7 @@ Aura Engine runs on any modern Debian-based OS. It requires at least
- [Python 3.8+](https://www.python.org/downloads/release/python-380/) - [Python 3.8+](https://www.python.org/downloads/release/python-380/)
- [`pip`](https://pip.pypa.io/en/stable/) - [`pip`](https://pip.pypa.io/en/stable/)
- [`git`](https://git-scm.com/) - [`git`](https://git-scm.com/)
- 'python3.8-venv' or [`virtualenv`](https://pypi.org/project/virtualenv/) - [PostgreSQL 13+](https://www.postgresql.org/)
- `python3-wheel`
- [PostgreSQL 12+](https://www.postgresql.org/)
**Setting up the project structure** **Setting up the project structure**
...@@ -46,24 +44,16 @@ If you are developing engine you also might want the projects `steering`, `dashb ...@@ -46,24 +44,16 @@ If you are developing engine you also might want the projects `steering`, `dashb
## Preparation ## Preparation
In case of an development environment, create a virtual environment for your Python dependencies: Install dependencies:
```shell
python3.8 -m venv python
```
No worries, the resulting `python` directory is excluded from the git respostory.
To activate that environment, run
```shell
source python/bin/activate
```
Then, install the required dependencies
```shell ```shell
pip install -r requirements.txt apt install \
python3-flask \
python3-flask-sqlalchemy \
python3-http-parser \
python3-psycopg2 \
python3-requests \
python3-sqlalchemy \
python3-validators
``` ```
Create your base configuration from the sample configuration Create your base configuration from the sample configuration
...@@ -80,8 +70,6 @@ cp config/sample-production.engine.ini config/engine.ini ...@@ -80,8 +70,6 @@ cp config/sample-production.engine.ini config/engine.ini
Engine requires a PorstgreSQL database to cache any programme info locally: Engine requires a PorstgreSQL database to cache any programme info locally:
```bash ```bash
# Additional Python packages for PostgreSQL
pip3 install -r contrib/postgresql-requirements.txt
# Create database and user (change password in script) # Create database and user (change password in script)
sudo -u postgres psql -f contrib/postgresql-create-database.sql sudo -u postgres psql -f contrib/postgresql-create-database.sql
``` ```
...@@ -106,13 +94,7 @@ Required modifications are: ...@@ -106,13 +94,7 @@ Required modifications are:
## Running Engine ## Running Engine
If you have defined a virtual env during the installation step you'll need to activate it first. You'll have to do so whenever you gonna start your development environment: There's a convencience script `run.sh` to get engine started
```shell
source python/bin/activate
```
There's a convenience script `run.sh` to get Engine components started.
```shell ```shell
engine$ ./run.sh engine$ ./run.sh
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment