This repository was archived by the owner on Jul 6, 2022. It is now read-only.
forked from digitalearthafrica/config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFLEXIGROBOTS-SETUP.txt
65 lines (45 loc) · 2.05 KB
/
FLEXIGROBOTS-SETUP.txt
1
2
3
4
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
First of all:
$ mkdir odc && cd odc
$ git clone git@github.com:FlexiGroBots-H2020/cube-in-a-box.git
$ git clone git@github.com:FlexiGroBots-H2020/datacube-ows.git
$ git clone git@github.com:FlexiGroBots-H2020/datacube-wps.git
$ git clone git@github.com:FlexiGroBots-H2020/datacube-config.git
$ git clone git@github.com:FlexiGroBots-H2020/datacube-sandbox-notebooks.git
Create the folder where to store the containers' data
$ mkdir /data
1. Build cube-in-a-box image
$ cd cube-in-a-box
$ docker build . --tag opendatacube/cube-in-a-box
2. Create odcnet network
$ docker network create odcnet
3. Registration of EO data products definitions and indexation of Sentinel 2 data products
$ cd datacube-config
$ docker-compose -f docker-compose.products.yaml up -d
$ docker exec -it products-tester bash
# datacube -v system init
# dc-sync-products /conf/products_prod.csv
# stac-to-dc --bbox='-10,41,-9,42' --catalog-href='https://earth-search.aws.element84.com/v0/' --collections='sentinel-s2-l2a-cogs' --datetime='2021-01-01/2022-01-31'
# exit
4. Expose ODC EO data products via OGC Services
$ cd datacube-config
$ docker-compose -f docker-compose.ows.yaml up -d
$ docker exec -it ows bash
# datacube-ows-update --schema --role postgres
# datacube-ows-update --views
# datacube-ows-update
# exit
Stop and relaunch again the container so it is aware of the changes in the database
5. Deploy Jupyter Hub and sample notebooks
$ cd datacube-config
$ docker-compose -f docker-compose.jupyter.yaml up -d
6. Deploy Explorer
$ cd datacube-config
$ docker-compose -f docker-compose.explorer.yaml up -d
$ docker exec -it explorer bash
# cubedash-gen --init --all
# cubedash-run
# exit
7. Create cron task for daily update of the datacube contents
$ sudo crontab -e
Manually add the following line in the editor (every day, at 23:00, it will execute script update-datacube-products.sh):
00 23 * * * sudo /home/maesbri/Documents/development/atos/flexigrobots/opendatacube/datacube-config/update-datacube-products.sh >> /tmp/update-datacube-products.log 2>&1