Git Product home page Git Product logo

map-service's Introduction

map-service

This repo provides a scaffold for defining a map service in a Kubernetes or Docker environment. It is not a complete project as it lacks security controls, scaling procedures and others.

It uses Postgres, QGIS-server and Mapproxy.


Docker

Docker folder

  • docker-compose.yaml - defines the services
  • .env file - defines useful env variables
  • files folder - contains resources for the initialization of the project

Deploying:

Docker$ docker-compose up

Upload geographical data to Postgres. You can find them at Europe Maps:

Docker$ osm2pgsql -c -U db-user -d db-data -W -P 30432 -H localhost romania-latest.osm 

Re-deploy so that mapproxy can generate a default configuration ( this is step is not needed if you provide the configuration by mounting it in the container):

Docker$ docker-compose down && docker-compose up -d

You can now access the map( you can use QGIS Destkop ):


K8s

!! You need to configure a NFS server. This is not covered !!

Create a namespace:

$ kubectl create namespace gis

Create a storage-class:

k8s/storage $ kubectl apply -f qgis-static-storage.yaml 
storageclass.storage.k8s.io/qgis-static-storage created

Create a pv:

k8s/storage $ kubectl  apply -f postgres-qgis-data.yaml 
persistentvolume/postgres-qgis-data created

Create a secret for the postgres and postgres connections:

k8s/database$ kubectl -n gis apply -f secret-config.yaml 
secret/postgres-secret created

Create postgres statefulset and service:

k8s/database$ kubectl -n gis apply -f postgres.yaml 
statefulset.apps/postgres-primary created
service/postgres-primary created

Populate database:

k8s/database$ osm2pgsql -c -U db-user -d db-data -W -P 31432 -H worker-01 romania-latest.osm

Deploy qgis:

k8s/qgis$ kubectl -n gis apply -f qgis.yaml
deployment.apps/qgis created
service/qgis-service created

Deploy mapproxy:

k8s/mapproxy$ kubectl -n gis apply -f mapproxy.yaml 
deployment.apps/mapproxy created
service/mapproxy-service created

You can now access the map( you can use QGIS Destkop ):

map-service's People

Contributors

flobinsa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.