Skip to content

Commit

Permalink
enhance docker installation docs (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmacata authored Sep 2, 2023
1 parent 9d10fd2 commit 2b1eb40
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 9 deletions.
34 changes: 27 additions & 7 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Requirements: docker and docker-compose
To build and deploy actinia, run

```
git clone https://github.com/mundialis/actinia_core.git
cd actinia_core
git clone https://github.com/actinia-org/actinia-core.git
cd actinia-core
docker-compose -f docker/docker-compose.yml up
```
Now you have a running actinia instance locally! Check with
Expand All @@ -21,6 +21,26 @@ curl http://127.0.0.1:8088/api/v3/version

On startup, some GRASS GIS locations are created by default but they are still empty. How to get some geodata to start processing, see in [Testing GRASS GIS inside a container](#grass-gis) below.


<a id="latest-grass-gis></a>
## Installation with most recent GRASS GIS version

The actinia Dockerimage is based on the latest stable releasebranch of GRASS GIS. To use actinia with the latest GRASS GIS development version, do the following:
* Change GRASS GIS dockerimage version in the [Dockerfile](actinia-core-alpine/Dockerfile) on top.
Change the line
`FROM osgeo/grass-gis:releasebranch_8_3-alpine as grass` to
`FROM osgeo/grass-gis:main-alpine as grass`
* build the image locally. You can use the existing docker-compose file for this. Outcomment the used actinia image and incomment the build section in the [docker-compose.yml](docker-compose.yml)
```
actinia:
# image: mundialis/actinia-core:4.10.0
build:
context: ..
dockerfile: docker/actinia-core-alpine/Dockerfile
```
and run `docker-compose -f docker/docker-compose.yml up`


<a id="startup-errors"></a>
# How to fix common startup errors
* if a redis db is running locally this will fail. Run and try again:
Expand All @@ -37,11 +57,11 @@ sudo sysctl -w vm.max_map_count=262144
<a id="local-dev-setup"></a>
# Local dev-setup with docker

If desired, you can also directly start here without installing actinia first. You only need to have cloned and checked out the actinia_core repository.
If desired, you can also directly start here without installing actinia first. You only need to have cloned and checked out the actinia-core repository.

If you use [vscode](https://code.visualstudio.com/), open actinia_core as a workspace. This can be done by eg. typing `code $PATH_TO_MY_ACTINIA_CORE_CHECKOUT` in a terminal. Then press `F5` and after a few seconds, a browser window should be opened pointing to the version endpoint. For debugging tips, [read the docs](https://code.visualstudio.com/Docs/editor/debugging#_debug-actions).
If you use [vscode](https://code.visualstudio.com/), open actinia-core as a workspace. This can be done by eg. typing `code $PATH_TO_MY_ACTINIA_CORE_CHECKOUT` in a terminal. Then press `F5` and after a few seconds, a browser window should be opened pointing to the version endpoint. For debugging tips, [read the docs](https://code.visualstudio.com/Docs/editor/debugging#_debug-actions).

__If not stated otherwise, you need to be in folder `actinia_core/docker`__
__If not stated otherwise, you need to be in folder `actinia-core/docker`__

To overwrite default config and uninstall actinia-core to use local source code, build a Dockerimage with the docker-compose-dev.yml file:
```
Expand All @@ -66,7 +86,7 @@ To test your local changes, you best use the Test Dockerimage:
# changing directory is necessary to have the correct build context
(cd .. && docker build -f docker/actinia-core-tests/Dockerfile -t actinia-test .)
```
To dive deeper into testing + development, see the [test README](https://github.com/mundialis/actinia_core/blob/main/tests/README.md)
To dive deeper into testing + development, see the [test README](https://github.com/actinia-org/actinia-core/blob/main/tests/README.md)

To lint your local changes, run
```
Expand Down Expand Up @@ -128,7 +148,7 @@ If you want to download the data not from inside the container but from your nor
<a id="production-deployment"></a>
# Production and Cloud deployment

To run actinia_core in production systems, best with multiple actinia_core instances, find more detailed information in the dedicated [actinia-docker](https://github.com/mundialis/actinia-docker) repository.
To run actinia-core in production systems, best with multiple actinia-core instances, find more detailed information in the dedicated [actinia-docker](https://github.com/actinia-org/actinia-docker) repository.


# Building the API documentation
Expand Down
5 changes: 4 additions & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ version: "3"
services:

actinia:
image: mundialis/actinia-core:4.9.1
image: mundialis/actinia-core:4.10.0
# build:
# context: ..
# dockerfile: docker/actinia-core-alpine/Dockerfile
volumes:
- ./actinia-core-data/grassdb:/actinia_core/grassdb:Z
- ./actinia-core-data/userdata:/actinia_core/userdata
Expand Down
6 changes: 5 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Deploy
## Local setup
* cd to actinia-core/docs folder
* run the command `mkdocs serve`

## Deploy to https://actinia-org.github.io/actinia-core
* cd to actinia_core/docs/ folder
* run the command `mkdocs gh-deploy`
24 changes: 24 additions & 0 deletions docs/docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
Installation
============

Installation with docker
------------------------

Requirements: docker and docker-compose

To build and deploy actinia, run

```
git clone https://github.com/mundialis/actinia-core.git
cd actinia-core
docker-compose -f docker/docker-compose.yml up
```
Now you have a running actinia instance locally! Check with
```
curl http://127.0.0.1:8088/api/v3/version
```

* For how to add data to this setup, how to run actinia locally with most recent GRASS GIS or how to fix common startup errors, see more details in [docker README](https://github.com/actinia-org/actinia-core/blob/main/docker/README.md).



Local installation
------------------

A local installation requires a full GRASS GIS installation. Make sure
all requirements are fulfilled to compile GRASS GIS from the git
repository.
Expand Down

0 comments on commit 2b1eb40

Please sign in to comment.