README.md 1.98 KB
Newer Older
MAISSIAT's avatar
MAISSIAT committed
1
# Earth Observation dataflow UI
BODERE's avatar
BODERE committed
2

MAISSIAT's avatar
MAISSIAT committed
3
Web UI for monitoring and administering the eo-dataflow manager
CHARLES's avatar
CHARLES committed
4

MAISSIAT's avatar
MAISSIAT committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# docker
## Build image
```
docker build -t eo-dataflow-ui:#1 .

with #1 version of docker image
```
## Run
```
docker run -p #1:8080 -e LOGTOFILE=#2 -e MANAGEMENT_DSN=#3 -e BROKER_DSN=#4 -v #5:/opt/logs eo-dataflow-ui:#6

with :
#1 published port number (no default)
#2 write uwsgi log to file YES or NO (default NO : write in sdtout)
#3 URL of rabbitMQ management (default https://rabbitmq-management-val.ifremer.fr:15672)
#4 URL of rabbitMQ for queue (default amqp://cersat-downloader-ui:Bruce and the Spatules@rabbitmq-cluster-val.ifremer.fr:5672/cersat-downloader)
#5 uwsgi log file mapping directory (in case LOGTOFILE=YES default /opt/logs in container)
#6 version of docker image
```
## Stop
```
stop conainer:
    docker container stop eo-dataflow-ui
stop and suppress container:  
    docker container rm -f eo-dataflow-ui
```

CHARLES's avatar
CHARLES committed
32
33
34
35
36
37
38
39
40
# Installation

## Conda

```
# Create conda env
conda env create -f environment.yaml

# Activate created env
MAISSIAT's avatar
MAISSIAT committed
41
conda activate eo-dataflow-ui
CHARLES's avatar
CHARLES committed
42

MAISSIAT's avatar
MAISSIAT committed
43
# Install the eo-dataflow-ui
CHARLES's avatar
CHARLES committed
44
45
46
./setup.py install
```

BODERE's avatar
BODERE committed
47
48
49
50
51
52
53
## Configuration
```
# Session database
django-admin migrate --settings conf.settings --pythonpath .
``` 
## Settings / run

MAISSIAT's avatar
MAISSIAT committed
54
set the MANAGEMENT_DSN and BROKER_DSN environment variables
BODERE's avatar
BODERE committed
55
56
57
58
59
60
61
62
63
64
```
vi conf/settings.py
vi conf/celery_cfg.json

vi conf/nginx.conf
vi conf/uwsgi.ini

conf/run
```

CHARLES's avatar
CHARLES committed
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Development

## Tooling

```
# Install developer tools
pip install -r requirements-dev.txt
```

### Linter

Using command-line:
```bash
# Run linter against current codebase
pylint -j8 --errors-only --output-format=colorized lib/
# The --errors-only flag only shows the errors

# Detect more issues:
pylint -j8 lib/
```

There are also plugins for many editors and IDEs.

### Code formatting

The code has been automatically formatted to follow PEP8 standard.
```bash
# Format every python source file in lib/ folder
autopep8 --in-place --recursive -j8 lib/
```

There are also plugins for many editors and IDEs.