Skip to content

Commit

Permalink
feat: Provide MapServer deployement capabilities (fixed #50)
Browse files Browse the repository at this point in the history
  • Loading branch information
Christophe Nouguier committed May 2, 2019
1 parent a743164 commit 9c108bc
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 22 deletions.
6 changes: 3 additions & 3 deletions deploy/mapserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ version: '3.5'

services:
mapserver:
image: ${MAPSERVER_IMAGE}:${MAPSERVER_TAG}
image: ${MAPSERVER_IMAGE:-locahost:5000/mapserver}:${MAPSERVER_TAG:-7.2}
volumes:
- ./../configs/mapserver:/etc/mapserver
- ${MAPSERVER_DATA_PATH}:/mnt/data
- ${MAPSERVER_DATA_PATH:-/mnt/data0/mapserver_data}:/mnt/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80"]
interval: 30s
Expand All @@ -20,7 +20,7 @@ services:
- "traefik.frontend.entryPoints=http,https"
- "traefik.frontend.rule=Host:mapserver.${SUBDOMAIN}"
- "traefik.port=80"
replicas: ${MAPSERVER_REPLICAS}
replicas: ${MAPSERVER_REPLICAS:-1}
update_config:
delay: 1m
placement:
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/kargo-principle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/assets/kargo-principle.xml

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion docs/guides/understanding-kargo.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,13 @@ A **stack** of interrelated services that can be orchestrated and scaled togethe

## Service

A **service** is an application to be deployed over the Swarm cluster. **Kargo** provides the default settings for deploying the following applications:
A **service** is an application to be deployed over the Swarm cluster. **Kargo** provides the default settings for deploying the following services/applications:

* [k2]([https://github.com/kalisio/k2)
* [kano](https://github.com/kalisio/kano)
* [GeoServer](http://geoserver.org/)
* [MapProxy](https://mapproxy.org/)
* [MapServer](https://https://mapserver.org)
* [maputnik](https://maputnik.github.io/)
* [MongoDB](https://www.mongodb.com/fr)
* [PostGis](https://postgis.net/)
Expand All @@ -67,6 +70,7 @@ By default, most of the images of the services are pulled from the [Docker Hub](

* GeoServer
* MapProxy
* MapServer
* maputnik
* The Weacast loaders

54 changes: 38 additions & 16 deletions docs/reference/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ For each stack, there must be such an entry:

## Services configuration

### K2

| Variable | Description |
| --- | --- |
| `K2_IMAGE` | The image to be used. Default value is `kalisio/kano` |
| `K2_TAG` | The version to be used. Default value is `latest` |
| `K2_DATA_PATH` | The path to the data. Default value is `/mnt/data0/k2_data` |
| `K2_REPLICAS` | The number of replicas. Default value is `1` |

### Kano

| Variable | Description |
Expand All @@ -42,7 +51,7 @@ For each stack, there must be such an entry:
| `GEOSERVER_IMAGE` | The image to be used. Default value is `localhost:5000/geoserver` |
| `GEOSERVER_TAG` | The version to be used. Default value is `2.12.1` |
| `GEOSERVER_PLUGINS` | The plugins to be included. Default value is `"css grib netcdf pyramid vectortiles gdal ogr-wfs printing importer control-flow"` |
| `GEOSERVER_DATA_PATH` | The path to the mount volume where to store the data. Default value is `/mnt/data0/geoserver_data` |
| `GEOSERVER_DATA_PATH` | The path to the data. Default value is `/mnt/data0/geoserver_data` |
| `GEOSERVER_REPLICAS` | The number of replicas. Default value is `1` |

::: warning
Expand All @@ -55,30 +64,43 @@ The **GeoServer** service is preconfigured to use a local image that must be bui
| --- | --- |
| `MAPPROXY_IMAGE` | The image to be used. Default value is `localhost:5000/mapproxy` |
| `MAPPROXY_TAG` | The version to be used. Default value is `2.12.1` |
| `MAPPROXY_DATA_PATH` | The path to the mount volume where to store the data. Default value is `/mnt/data0/mapproxy_data` |
| `MAPPROXY_CACHE_PATH` | The path to the mount volume where to cache the data. Default value is `/mnt/data0/mapproxy_cache` |
| `MAPPROXY_DATA_PATH` | The path to the data. Default value is `/mnt/data0/mapproxy_data` |
| `MAPPROXY_CACHE_PATH` | The path to the cache. Default value is `/mnt/data0/mapproxy_cache` |
| `MAPPROXY_REPLICAS` | The number of replicas. Default value is `1` |

::: warning
The **MapProxy** service is preconfigured to use a local image that must be built using the [build-service.sh](./cli.md#build-service) command.
:::

## MongoDB
### MapServer

| Variable | Description |
| --- | --- |
| `MAPSERVER_IMAGE` | The image to be used. Default value is `localhost:5000/mapserver` |
| `MAPSERVER_TAG` | The version to be used. Default value is `7.2` |
| `MAPSERVER_DATA_PATH` | The path to the data. Default value is `/mnt/data0/mapserver_data` |
| `MAPSERVER_REPLICAS` | The number of replicas. Default value is `1` |

::: warning
The **MapServer** service is preconfigured to use a local image that must be built using the [build-service.sh](./cli.md#build-service) command.
:::

### MongoDB

| Variable | Description |
| --- | --- |
| `MONGO_IMAGE` | The image to be used. Default value is `mongo` |
| `MONGO_TAG` | The version to be used. Default value is `3.6.5` |

## OpenAQ
### OpenAQ

| Variable | Description |
| --- | --- |
| `OPENAQ_IMAGE` | The image to be used. Default value is `kalisio/k-openaq` |
| `OPENAQ_TAG` | The version to be used. Default value is `latest` |
| `OPENAQ_DB_URL` | The database URL where to write the data. Default value is `$DB_URL` |

## PostGis
### PostGis

| Variable | Description |
| --- | --- |
Expand All @@ -87,54 +109,54 @@ The **MapProxy** service is preconfigured to use a local image that must be buil
| `POSTGRES_USER` | The POSTGRES user. Default value is `postgres` |
| `POSTGRES_PASSWORD` | The POSTGRES user's password. Default value is `postgres` |

## Seeder
### Seeder

| Variable | Description |
| --- | --- |
| `SEEDER_IMAGE` | The image to be used. Default value is `kalisio/k-seeder` |
| `SEEDER_TAG` | The version to be used. Default value is `latest` |

## Teleray
### Teleray

| Variable | Description |
| --- | --- |
| `TELERAY_IMAGE` | The image to be used. Default value is `kalisio/k-teleray` |
| `TELERAY_TAG` | The version to be used. Default value is `0.1.0` |
| `TELERAY_S3_BUCKET` | The S3 bucket where to store the data. Default value is `kargo` |

## Thredds
### Thredds

| Variable | Description |
| --- | --- |
| `THREDDS_IMAGE` | The image to be used. Default value is `unidata/thredds-docker` |
| `THREDDS_TAG` | The version to be used. Default value is `4.6.11` |
| `THREDDS_DATA_PATH` | The path to the mount volume where to store the data. Default value is `/mnt/data0/thredds_data` |
| `THREDDS_DATA_PATH` | The path to the data. Default value is `/mnt/data0/thredds_data` |
| `THREDDS_CACHE_PATH` | The path to the mount volume where to cache the data. Default value is `/mnt/data0/thredds_cache` |
| `THREDDS_REPLICAS` | The number of replicas. Default value is `1` |
| `THREDDS_XMX_SIZE` | JVM Max Heap Size (xmx). Default value is `4G`. |
| `THREDDS_XMS_SIZE` | JVM Min Heap Size (xms). Default value is `4G`. |

## TileServer GL
### TileServer GL

| Variable | Description |
| --- | --- |
| `TILESERVERGL_IMAGE` | The image to be used. Default value is `klokantech/tileserver-gl` |
| `TILESERVERGL_TAG` | The version to be used. Default value is `v2.3.1` |
| `TILESERVERGL_DATA_PATH` | The path to the mount volume where to store the data. Default value is `/mnt/data0/tileservergl_data` |
| `TILESERVERGL_DATA_PATH` | The path to the data. Default value is `/mnt/data0/tileservergl_data` |
| `TILESERVERGL_REPLICAS` | The number of replicas. Default value is `1` |

## Vigicrues
### Vigicrues

| Variable | Description |
| --- | --- |
| `VIGICRUES_IMAGE` | The image to be used. Default value is `kalisio/k-vigicrues` |
| `VIGICRUES_STATIONS_TAG` | The version of the image to be used for scraping the stations. Default value is `0.1.0` |
| `VIGICRUES_SECTIONS_TAG` | The version of the image to be used for scraping the sections. Default value is `0.1.0` |
| `VIGICRUES_OBSERVATIONS_TAG` | The version of the image to be used for scraping the observations. Default value is `0.1.0` |
| `VIGICRUES_DATA_PATH` | The path to the mount volume where to store the data. Default value is `/mnt/data0/vigicrues_data` |
| `VIGICRUES_DATA_PATH` | The path to the data. Default value is `/mnt/data0/vigicrues_data` |
| `VIGICRUES_DB_URL` | The database URL where to write the data. Default value is `$DB_URL` |

## Weacast
### Weacast

| Variable | Description |
| --- | --- |
Expand All @@ -146,7 +168,7 @@ The **MapProxy** service is preconfigured to use a local image that must be buil
| `WEACAST_DEBUG` | Enable the debug mode. Default value is `` |
| `WEACAST_REPLICAS` | The number of replicas. Default value is `1` |

## Weacast-loaders
### Weacast-loaders

| Variable | Description |
| --- | --- |
Expand Down

0 comments on commit 9c108bc

Please sign in to comment.