Slide 1

Slide 1 text

Alessandro Parma Luca Pasquali GeoSolutions Deploying and operating GeoServer: a DevOps perspective

Slide 2

Slide 2 text

Introduction

Slide 3

Slide 3 text

GeoSolutions Enterprise Support Services Deployment Subscription Professional Training Customized Solutions GeoNode • Offices in Italy & US, Global Clients/Team • 40+ collaborators, 30+ Engineers • Our products • Our Offer

Slide 4

Slide 4 text

Affiliations We strongly support Open Source, it Is in our core We actively participate in OGC working groups and get funded to advance new open standards We support standards critical to GEOINT

Slide 5

Slide 5 text

What is GeoServer? (really??)

Slide 6

Slide 6 text

What is GeoServer? • GeoSpatial enterprise gateway • Manage and Disseminate of raster and vector data • Standards compliant • OGC WCS 1.0, 1.1.1 (RI), 2.0 • OGC WFS 1.0, 1.1 (RI), 2.0 • OGC WMS 1.1.1, 1.3.0 • OGC WPS 1.0.0 • OGC CSW 2.0.1 (ebRIM) • Google Earth/Maps support • KML, GeoSearch, etc..

Slide 7

Slide 7 text

What is GeoServer? GeoServer WFS WMS PostGIS Oracle H2 DB2 SQL Server GeoPacka ge MySql Spatialite Elastic MongoDB Shapefile ---------- ---------- --------- ---------- ---------- ---------- --------- ---------- ---------- ---------- --------- ---------- WFS PNG, GIF JPEG TIFF, GeoTIFF SVG, PDF KML/KMZ Shapefile GML2 GML3 GeoRSS GeoJSON CSV/XLS GeoPackage Raw vector data Servers Styled maps DBMS Vector files WCS GeoTIFF WMS ArcGrid Img+world Mosaic MrSID JPEG 2000 ECW,Pyramid, Oracle GeoRaster, PostGis Raster files Raw raster data GeoTIFF ArcGrid GTopo30 Img+World WMTS, TMS KML superoverlays Google maps tiles OGC tiles OSGEO tiles KML WPS CSW ESRI REST

Slide 8

Slide 8 text

Applications deployment

Slide 9

Slide 9 text

App. Execution Technologies • How things changed over time • Bare Metal (non virtualized) Buy or Rent the HW and install everything from scratch. Single Tenant • Virtual Machines Spin up a virtual server along with others running on an existing, virtualized server. Looks like a dedicated machine • Containers Run a single (?) application alongside others on an existing environment T I M E

Slide 10

Slide 10 text

Bare Metal (no virt.) • Pros • Fast (no virt. layer) • Single tenant -> Secure • No “noisy neighbour” effect -> more stability • Cons • Limited flexibility & scalability • billing, re-installs • Dimensioning is hard -> over-provision • More work for Operations

Slide 11

Slide 11 text

Virtual Machines • Pros • Flexibility (Start, Stop, Snapshot, Template) • Fragmentation and resource usage • Reduces costs • Cons • Virtualization layer overhead • Noisy neighbour effect • Single failure impacts many services

Slide 12

Slide 12 text

What is a Container • What is a container then? • Type of virtualization that happens at the operating system level • Applications can run in an isolated user spaces called “Containers” • Implemented at the kernel level, multiple containers share the same Kernel

Slide 13

Slide 13 text

Containers vs VMs ● How does it compare to VMs?

Slide 14

Slide 14 text

Containers • Pros • Application is bundled with dependencies • Shared Kernel (lower resource) • Easy installation and migration • High density with isolation • Startup time • Cons • Steep learning curve • Existing apps must be “containerized” first • Shared Kernel (security?)

Slide 15

Slide 15 text

Kubernetes

Slide 16

Slide 16 text

● Platform to manage containers and services ● Originally Developed by Google based on their experience with Borg ● Manage a set of nodes to provide you with a platform to run the containers ● Helps you manage and scale your applications What is Kubernetes

Slide 17

Slide 17 text

Why is it relevant? ● Traditional deployments ● No resource boundaries → some applications starve for resources ● Can’t easily reallocate resources after the initial setup ● Virtual Machines ● Multiple VMs on the same server → better resource utilization ● Better isolation ● Each VM has a copy of the OS

Slide 18

Slide 18 text

Why is it relevant? ● Containers ● shared kernel with isolated userspace ● each container has its own filesystem, a share of CPU cores ● decoupled from they underlying infrastructure → portable across distributions and cloud providers ● …

Slide 19

Slide 19 text

Why is it relevant? ● … ● fast image creation and easy rollback compared to VMs → Good fit for frequent deployments and CI/CD ● separation of concerns between Devs and Ops ● consistency across development in multiple environments

Slide 20

Slide 20 text

Why Kubernetes?

Slide 21

Slide 21 text

Why Kubernetes? ● Manage the containers that run your applications in production with no downtime ● Takes care of running your application containers on a distributed system ● Scaling application and the nodes cluster and failover

Slide 22

Slide 22 text

● Also ● Service discovery and load balancing ● Storage Abstraction mount storage of choice) ● Auto rollouts and rollbacks. You describe the desired state for your containers ● Self Healing with restart failing containers, and probes, .. ● Secrets management. Externalize sensitive and env. specific info Why Kubernetes?

Slide 23

Slide 23 text

How does it compare to.. ● There are other orchestrators and tools available to manage containers ● Docker Compose ● allows you to define services as collections but that is pretty much it ● Docker Swarm ● gives you to work on a distributed environment ● services definition and commands are somewhat similar to compose ● not as sophisticated (and complex! as K8s)

Slide 24

Slide 24 text

Containerize GeoServer ● Need a docker image ● Use the ones available! ● GeoSolutions here, sources here ● Official Image available check blogpost here ● Ready to use ● Based on Tomcat images ● Configurable

Slide 25

Slide 25 text

Example K8s deployment

Slide 26

Slide 26 text

Helm • Package Manager for Kubernetes • Use “recipes” available online • Deployment unit is called a Chart • Charts can easily be published, versioned and shared • Provide templating for your Manifests • GeoSolutions Chart implementation available for preview: https://github.com/geosolutions-it/charts

Slide 27

Slide 27 text

Resources ● What is Kubernetes ● Borg: The Predecessor to Kubernetes ● Containerization ● What is a Container ● Docker Compose ● Docker Swarm ● Rancher

Slide 28

Slide 28 text

Best Practices

Slide 29

Slide 29 text

Best Practices … • Start simple • Set up a local environment (Minikube) • Use available Images and Charts, don’t reinvent the wheel • Use managed K8s • Plan ahead • Design your infrastructure before moving on with deployment • Clustering Strategies, Storage Classes , Volumes sizing • Implement a Logging and a monitoring solution

Slide 30

Slide 30 text

… Best Practices • Choose the right nodes • No need for tons of RAM • Compute optimized node perform better (~4 CPUs/instance)

Slide 31

Slide 31 text

Storage Classes

Slide 32

Slide 32 text

Choose Storage - Block Storage • Local or Block Storage • Local • Non Shared • Can fail • Low latency • Good fit for temporary storing Logs and Audits • Cached Tiles?

Slide 33

Slide 33 text

Choose Storage - File Share • File Share • File Storage ~ NFS • Shared (locally) • Scales well • Typical use case is GeoServer datadirs • Spatial Data • Cached tiles?

Slide 34

Slide 34 text

Choose Storage - Blob Storage • Blob Storage • Max scalability • Elastic • Cheap • High Latency • Shared • Robust • Cached Tiles?

Slide 35

Slide 35 text

Use Cases

Slide 36

Slide 36 text

EO Data Dissemination ● Earth Observation ● Meteorological and Oceanographic data ● Continuous data ingestion flordata ● TBs of data growing over time. Raster and Vector ●

Slide 37

Slide 37 text

EO Data Dissemination

Slide 38

Slide 38 text

Observability and Debugging

Slide 39

Slide 39 text

Monitoring and Logging • Can be tricky in Containerized environments! • Dynamic and distributed • Instances are spinning up and down • distributed across multiple nodes • Hard to identify problems • What can we do?

Slide 40

Slide 40 text

Centralize and Aggregate • Centralize and Aggregate • Single central location • Easy to navigate and filter • New nodes can spawn but also go away • You’ll need “shippers” to collect and send out logs to the central service

Slide 41

Slide 41 text

Collect Metrics • Collect Metrics • Resp Time, • Throughput, • Uptime, • Error Rate • ...

Slide 42

Slide 42 text

Auditing • GeoServer can produce audit files for you • Monitoring extension • Tracks requests made to GeoServer • Collect and ingest them to create pretty Dashboards

Slide 43

Slide 43 text

Auditing • Audit Event

Slide 44

Slide 44 text

Analyze performance of your Cluster

Slide 45

Slide 45 text

Analyze performance of your Cluster

Slide 46

Slide 46 text

Pointers • GeoSolutions Website https://geosolutionsgroup.com/ • GeoServer on Kubernetes https://www.geosolutionsgroup.com/blog/devops-k8 s/ • A DevOps perspective on GeoServer https://www.geosolutionsgroup.com/blog/devops-geoser ver-monitoring-metering/ • Cloud Optimized GeoTiffs https://www.cogeo.org/ https://docs.geoserver.org/latest/en/user/community /cog/index.html • Helm https://helm.sh/

Slide 47

Slide 47 text