Skip to content

Latest commit

 

History

History
91 lines (59 loc) · 3.18 KB

File metadata and controls

91 lines (59 loc) · 3.18 KB

Overview

This sample provides a GeoServer instance with the plugin for SAP HANA Connectivity. Geoserver exposes in a variety of formats spatial data hosted in SAP HANA.

The docker image used is available here.

Prerequisites

  • SAP BTP, Kyma runtime instance
  • kubectl configured to use the KUBECONFIG file downloaded from the Kyma runtime.
  • A HANA Cloud instance

Deployment method

You could either deploy geoserver manually or using the provided helm chart

Deploy the app manually

  1. Create a new geo Namespace:
kubectl create namespace geo
  1. Apply the PersistentVolumeClaim:
kubectl apply -f ./k8s/geoserver-storage.yaml -n geo

This filesystem will be mounted as the data directory, and will contain configuration files including credentials and connection details.

  1. Apply the Deployment:

Optionaly, you could edit geoserver-deployments to customize the service URL.

kubectl apply -f ./k8s/geoserver-deployment.yaml -n geo
  1. Verify that the Pod ad service is up and running:
kubectl get pods,svc -n geo

The expected result shows that the Pod for the geoserver Deployment is running:

% kubectl get pods,svc -n geo
NAME                             READY   STATUS    RESTARTS   AGE
pod/geoserver-7b5f774c78-lh72w   2/2     Running   0          5h9m

NAME                TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
service/geoserver   ClusterIP   100.67.44.241   <none>        8080/TCP   5h9m

Initial Configuration

Now you could open a web browser to the url https://<virtual host>.<cluster address> where

  • <virtual host> is geoserver or the value set in the section service.host of the deployment yaml file
  • <cluster address> is the cluster id and domain name of the kyma console. For instance c-a1b2c3.kyma.shoot.live.k8s-hana.ondemand.com

If you have a web browser opened to the kyma dashboard, you could navigate in the namespace, then in the service section. screenshot

This should take you to the root of the web server. screenshot

Just click on /geoserver to enter the webapp!

Remember, the default credentials are admin/geoserver, and you should change them right away !

Before adding connections to SAP HANA, you must create a default workspace. screenshot

And make sure you tick the option Default Workspace screenshot

Since the jdbc drivers are pre-installed in the docker image, you can directly define connections to SAP HANA, you could either follow instructions from:

Run the Docker image locally

To run the Docker image locally, run this command:

mkdir /tmp/geoserver_data
docker run -d -it -p 8080:8080/tcp -v /tmp/geoserver_data:/geoserver/data_dir remiremi/geoserver4hana