Giter Site home page Giter Site logo

kubernetes's Introduction

Pelias Kubernetes Configuration

This repository contains Kubernetes configuration files to create a production ready instance of Pelias.

This configuration is meant to be run on Kubernetes using real hardware or full sized virtual machines in the cloud. Technically it could work on a personal computer with minikube but it would require a machine with lots of RAM: 24GB or more.

Note: These are very early stage, and are being rapidly changed and improved. We welcome feedback from anyone who has used them.

Setup

First, set up a Kubernetes cluster however works best for you. A popular choice is to use kops on AWS. The Getting Started on AWS Guide is a good starting point.

Sizing the Kubernetes cluster

A working Pelias cluster contains the following services:

  • Pelias API (requires about 256MB of RAM) (required)
  • Libpostal Service (requirs about 2GB of RAM) (required)
  • Placeholder Service (Requires 512MB of RAM) (strongly recommended)
  • Point in Polygon (PIP) Service (Requires 6GB of RAM) (required for reverse geocoding)
  • Interpolation Service (requires ~2GB of RAM)

Some of the following importers will additionally have to be run to initially populate data

  • Who's on First (requires about 1GB of RAM)
  • OpenStreetMap (requires between 0.25GB and 6GB of RAM depending on import size)
  • OpenAddresses (requires 1GB of RAM)
  • Geonames (requires ~0.5GB of RAM)
  • Polylines (requires 1GB of RAM)

Finally, the importers require the PIP service to be running

Use thedata sources documentation to decide which importers to be run.

Importers can be run in any order, in parallel or one at a time.

This means around 10GB of RAM is required to bring up all the services, and up to another 15GB of RAM is needed to run all the importers at once. 2 instances with 8GB of RAM each is a good starting point just for the services.

If using kops, it defaults to t2.small instances, which are far too small (they only have 2GB of ram).

You can edit the instance types using kops edit ig nodes before starting your cluster. m4.large is a good choice to start.

Elasticsearch

Elasticsearch is used as the primary datastore for Pelias data. As a powerful database with built in scalability and replication abilities, it is not currently well suited for running in Kubernetes.

Instead, it's preferable to create "regular" instances in your cloud provider or on your own hardware. To help with this, the elasticsearch/ directory in this repository contains tools for setting up a production ready, Pelias compatible Elasticsearch cluster. It uses Terraform and Packer to do this. See the directory README for more details.

debuging 'init containers'

sometimes an 'init container' fails to start, you can view the init logs:

# kubectl logs {{pod_name}} -c {{init_container_name}}
kubectl logs geonames-import-4vgq3 -c geonames-download

opening a bash prompt in a running container

it can be useful to open a shell inside a running container for debugging:

# kubectl exec -it {{pod_name}} -- {{command}}
kubectl exec -it pelias-pip-3625698757-dtzmd -- /bin/bash

kubernetes's People

Contributors

orangejulius avatar missinglink avatar

Watchers

James Cloos avatar Luís Alves 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.