Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Latest commit

 

History

History
1084 lines (783 loc) · 34.7 KB

File metadata and controls

1084 lines (783 loc) · 34.7 KB

kubernetes-demo-helm-kafka-postgresql

Synopsis

Bring up a reference implementation Senzing stack on Kubernetes using minikube, kubectl, and helm. A containerized Kafka and a PostgreSQL database are deployed as backing services for demonstration purposes.

Overview

These instructions illustrate a reference implementation of Senzing using PostgreSQL as the underlying database.

The instructions show how to set up a system that:

  1. Reads JSON lines from a file on the internet and sends each JSON line to a message queue using the Senzing stream-producer.
    1. In this implementation, the queue is Kafka.
  2. Reads messages from the queue and inserts into Senzing using the Senzing stream-loader.
    1. In this implementation, Senzing keeps its data in a PostgreSQL database.
  3. Reads information from Senzing using the Senzing API Server server.
  4. Views resolved entities in a web app.

The following diagram shows the relationship of the Helm charts, docker containers, and code in this Kubernetes demonstration.

Image of architecture

Contents

  1. Prerequisites
    1. Prerequisite software
    2. Clone repository
    3. Create demo directory
    4. Start minikube cluster
    5. View minikube cluster
    6. Set environment variables
    7. Identify Docker registry
    8. Create custom helm values files
    9. Create custom Kubernetes configuration files
    10. Save environment variables
    11. Create namespace
    12. Create persistent volume
    13. Add helm repositories
    14. Install Postgresql Helm chart
    15. Install pgAdmin Helm chart
    16. Initialize database
    17. Install Kafka Helm chart
    18. Install Kafka test client
  2. Demonstrate
    1. Install senzing-api-server Helm chart
    2. Install stream-producer Helm chart
    3. Install stream-loader Helm chart
    4. Install senzing-console Helm chart
    5. Install senzing-redoer Helm chart
    6. Install senzing-entity-search-web-app Helm chart
    7. Optional charts
      1. Install SwaggerUI Helm chart
      2. Install configurator Helm chart
    8. View data
      1. View Kafka
      2. View PostgreSQL
      3. View Senzing API Server
      4. View Senzing Entity Search WebApp
      5. View Senzing Console pod
      6. View SwaggerUI
      7. View Senzing Configurator
  3. Cleanup
    1. Delete everything in Kubernetes
    2. Delete minikube cluster
  4. Errors
  5. References

Preamble

At Senzing, we strive to create GitHub documentation in a "don't make me think" style. For the most part, instructions are copy and paste. Whenever thinking is needed, it's marked with a "thinking" icon 🤔. Whenever customization is needed, it's marked with a "pencil" icon ✏️. If the instructions are not clear, please let us know by opening a new Documentation issue describing where we can improve. Now on with the show...

Legend

  1. 🤔 - A "thinker" icon means that a little extra thinking may be required. Perhaps you'll need to make some choices. Perhaps it's an optional step.
  2. ✏️ - A "pencil" icon means that the instructions may need modification before performing.
  3. ⚠️ - A "warning" icon means that something tricky is happening, so pay attention.

Expectations

  • Space: This repository and demonstration require 20 GB free disk space.
  • Time: Budget 4 hours to get the demonstration up-and-running, depending on CPU and network speeds.
  • Background knowledge: This repository assumes a working knowledge of:

Related artifacts

  1. DockerHub
  2. Helm Charts

Prerequisites

Prerequisite software

  1. minikube
  2. kubectl
  3. Helm 3

Clone repository

The Git repository has files that will be used in the helm install --values parameter.

  1. Using these environment variable values:

    export GIT_ACCOUNT=senzing
    export GIT_REPOSITORY=kubernetes-demo
    export GIT_ACCOUNT_DIR=~/${GIT_ACCOUNT}.git
    export GIT_REPOSITORY_DIR="${GIT_ACCOUNT_DIR}/${GIT_REPOSITORY}"
    
  2. Follow steps in clone-repository to install the Git repository.

Create demo directory

  1. ✏️ Create a unique prefix. This will be used in a local directory name as well as a prefix to Kubernetes object.

    ⚠️ Because it's used in Kubernetes resource names, it must be all lowercase.

    Example:

    export DEMO_PREFIX=my
    
  2. Make a directory for the demo. Example:

    export SENZING_DEMO_DIR=~/senzing-kafka-postgresql-demo-${DEMO_PREFIX}
    mkdir -p ${SENZING_DEMO_DIR}
    

Start minikube cluster

Using Get Started with Bitnami Charts using Minikube as a guide, start a minikube cluster.

  1. Start cluster using minikube start. Example:

    minikube start --cpus 4 --memory 8192 --disk-size=50g
    

View minikube cluster

🤔 Optional: View the minikube cluster using the dashboard.

  1. Run command in a separate terminal using minikube dashboard. Example:

    minikube dashboard
    

Set environment variables

  1. Set environment variables listed in "Clone repository".

  2. Synthesize environment variables. Example:

    export DEMO_NAMESPACE=${DEMO_PREFIX}-namespace
    
  3. Retrieve docker image version numbers and set their environment variables. Example:

    curl -X GET \
        --output ${SENZING_DEMO_DIR}/docker-versions-stable.sh \
        https://raw.githubusercontent.com/Senzing/knowledge-base/main/lists/docker-versions-stable.sh
    source ${SENZING_DEMO_DIR}/docker-versions-stable.sh
    
  4. Retrieve Helm Chart version numbers and set their environment variables. Example:

    curl -X GET \
        --output ${SENZING_DEMO_DIR}/helm-versions-stable.sh \
        https://raw.githubusercontent.com/Senzing/knowledge-base/main/lists/helm-versions-stable.sh
    source ${SENZING_DEMO_DIR}/helm-versions-stable.sh
    
  5. 🤔 Optional: To use a license other than the Senzing complimentary 100K record license, the SENZING_LICENSE_BASE64_ENCODED environment variable needs to be set. Note: Modify the path to a file containing the Senzing license in Base64 format. Example:

    export SENZING_LICENSE_BASE64_ENCODED=$(cat /etc/opt/senzing/g2lic_base64.txt)
    
    echo ${SENZING_LICENSE_BASE64_ENCODED}

Identify Docker registry

🤔 There are 3 options when it comes to using a docker registry. Choose one:

  1. Use public registry
  2. Use private registry
  3. Use minikube registry

Use public registry

Method #1: Pulls docker images from public internet registry.

  1. Use the default public docker.io registry which pulls images from hub.docker.com. Example:

    export DOCKER_REGISTRY_URL=docker.io
    export DOCKER_REGISTRY_SECRET=${DOCKER_REGISTRY_URL}-secret
    

Use private registry

Method #2: Pulls docker images from a private registry.

  1. ✏️ Specify a private registry. Example:

    export DOCKER_REGISTRY_URL=my.example.com:5000
    export DOCKER_REGISTRY_SECRET=${DOCKER_REGISTRY_URL}-secret
    export SENZING_SUDO=sudo
    ${GIT_REPOSITORY_DIR}/bin/docker-pull-tag-and-push.sh docker-images-for-helm-kafka-postgresql
    

Use minikube registry

Method #3: Pulls docker images from minikube's registry.

  1. Use minikube's docker registry using minkube addons enable and minikube image load. Example:

    minikube addons enable registry
    export DOCKER_REGISTRY_URL=docker.io
    export DOCKER_REGISTRY_SECRET=${DOCKER_REGISTRY_URL}-secret
    ${GIT_REPOSITORY_DIR}/bin/populate-minikube-registry.sh docker-images-for-helm-kafka-postgresql
    

Create custom helm values files

For final customization of the Helm Charts, various files need to be created for use in the --values parameter of helm install.

🤔 In this step, Helm template files are populated with actual values. There are two methods of accomplishing this. Only one method needs to be performed.

  1. Method #1: Helm template files are instantiated with actual values into ${HELM_VALUES_DIR} directory by using make-helm-values-files.sh.

    export HELM_VALUES_DIR=${SENZING_DEMO_DIR}/helm-values
    ${GIT_REPOSITORY_DIR}/bin/make-helm-values-files.sh
    
  2. Method #2: Copy and manually modify files method. Example:

    export HELM_VALUES_DIR=${SENZING_DEMO_DIR}/helm-values
    mkdir -p ${HELM_VALUES_DIR}
    
    cp ${GIT_REPOSITORY_DIR}/helm-values-templates/* ${HELM_VALUES_DIR}
    

    ✏️ Edit files in ${HELM_VALUES_DIR} replacing the following variables with actual values.

    1. ${DEMO_PREFIX}
    2. ${DOCKER_REGISTRY_SECRET}
    3. ${DOCKER_REGISTRY_URL}
    4. ${SENZING_ACCEPT_EULA}
  3. 🤔 Optional: List newly generated files. Example:

    ls ${HELM_VALUES_DIR}
    

Create custom kubernetes configuration files

Create Kubernetes manifest files for use with kubectl create.

🤔 In this step, Kubernetes template files are populated with actual values. There are two methods of accomplishing this. Only one method needs to be performed.

  1. Method #1: Kubernetes manifest files are instantiated with actual values into {KUBERNETES_DIR} directory by using make-kubernetes-manifest-files.sh. Example:

    export KUBERNETES_DIR=${SENZING_DEMO_DIR}/kubernetes
    ${GIT_REPOSITORY_DIR}/bin/make-kubernetes-manifest-files.sh
    
  2. Method #2: Copy and manually modify files method. Example:

    export KUBERNETES_DIR=${SENZING_DEMO_DIR}/kubernetes
    mkdir -p ${KUBERNETES_DIR}
    
    cp ${GIT_REPOSITORY_DIR}/kubernetes-templates/* ${KUBERNETES_DIR}
    

    ✏️ Edit files in ${KUBERNETES_DIR} replacing the following variables with actual values.

    1. ${DEMO_NAMESPACE}

Save environment variables

Environment variables will be needed in new terminal windows using save-environment-variables.sh.

  1. Save environment variables into a file that can be sourced. Example:

    ${GIT_REPOSITORY_DIR}/bin/save-environment-variables.sh
    

Create namespace

A new Kubernetes namespace is created to isolate this demonstration from other applications running on Kubernetes.

  1. Create Kubernetes namespace using kubectl create. Example:

    kubectl create -f ${KUBERNETES_DIR}/namespace.yaml
    
  2. 🤔 Optional: Review namespaces using kubectl get. Example:

    kubectl get namespaces
    

Create persistent volume

🤔 Optional: These steps for creating Persistent Volumes (PV) and Persistent Volume Claims (PVC) are for a demonstration environment. They are not sufficient for a production environment. If PVs and PVCs already exist, this step may be skipped.

Note: Senzing does not require Persistent Volumes. The volumes being created are for the PostgreSQL backing service.

  1. Create persistent volumes using kubectl create. Example:

    kubectl create -f ${KUBERNETES_DIR}/persistent-volume-postgresql.yaml
    
  2. Create persistent volume claims using kubectl create. Example:

    kubectl create -f ${KUBERNETES_DIR}/persistent-volume-claim-postgresql.yaml
    
  3. 🤔 Optional: Review persistent volumes and claims using kubectl get. Example:

    kubectl get persistentvolumes \
      --namespace ${DEMO_NAMESPACE}
    
    kubectl get persistentvolumeClaims \
      --namespace ${DEMO_NAMESPACE}
    

Add Helm repositories

  1. Add Helm repositories using helm repo add. Example:

    helm repo add bitnami https://charts.bitnami.com/bitnami
    helm repo add runix   https://helm.runix.net
    helm repo add senzing https://hub.senzing.com/charts/
    
  2. Update repositories using helm repo update. Example:

    helm repo update
    
  3. 🤔 Optional: Review repositories using helm repo list. Example:

    helm repo list
    

Install Postgresql Helm chart

🤔 This step installs a PostgreSQL database container. It is not a production-ready database and is only used for demonstration purposes. The choice of database is a limiting factor in the speed at which Senzing can operate. This database choice is at least an order of magnitude slower than a well-tuned production database.

In a production environment, a separate PostgreSQL database would be provisioned and maintained. The ${SENZING_DEMO_DIR}/helm-values/*.yaml files would then be updated to have the SENZING_DATABASE_URL point to the production database.

For this demonstration, the bitnami/postgresql Helm Chart provisions an instance of the bitnami/postgresql Docker image.

  1. Create Configmap for pg_hba.conf using kubectl create. Example:

    kubectl create configmap ${DEMO_PREFIX}-pg-hba \
      --namespace ${DEMO_NAMESPACE} \
      --from-file=${KUBERNETES_DIR}/pg_hba.conf
    

    Note: pg_hba.conf will be stored in the PersistentVolumeClaim.

  2. Install bitnami/postgresql chart using helm install. Example:

    helm install \
      ${DEMO_PREFIX}-bitnami-postgresql \
      bitnami/postgresql \
      --namespace ${DEMO_NAMESPACE} \
      --values ${HELM_VALUES_DIR}/bitnami-postgresql.yaml \
      --version ${SENZING_HELM_VERSION_BITNAMI_POSTGRESQL:-""}
    
  3. Wait for pod to run using kubectl get. Example:

    kubectl get pods \
      --namespace ${DEMO_NAMESPACE} \
      --watch
    
  4. Example of pod running:

    NAME                                   READY   STATUS      RESTARTS   AGE
    my-bitnami-postgresql-6bf64cbbdf-25gtb  1/1     Running     0          10m

Install pgAdmin Helm Chart

pgAdmin is a web-based user interface for viewing the PostgreSQL database.

  1. Install runix/pgadmin4 chart using helm install. Example:

    helm install \
      ${DEMO_PREFIX}-pgadmin \
      runix/pgadmin4 \
      --namespace ${DEMO_NAMESPACE} \
      --values ${HELM_VALUES_DIR}/pgadmin.yaml \
      --version ${SENZING_HELM_VERSION_RUNIX_PGADMIN4:-""}
    
  2. To view PostgreSQL via pgAdmin, see View PostgreSQL.

Initialize database

senzing/init-postgresql is used to create Senzing tables in the database (i.e. the schema) and insert initial Senzing configuration.

  1. Install senzing/senzing-init-postgresql chart using helm install. Example:

    helm install \
      ${DEMO_PREFIX}-senzing-init-postgresql \
      senzing/senzing-init-postgresql \
      --namespace ${DEMO_NAMESPACE} \
      --values ${HELM_VALUES_DIR}/senzing-init-postgresql.yaml \
      --version ${SENZING_HELM_VERSION_SENZING_INIT_POSTGRESQL:-""}
    

Install Kafka Helm chart

The binami/kafka Helm Chart provisions an instance of the bitnami/kafka Docker image.

  1. Install bitnami/kafka chart using helm install. Example:

    helm install \
      ${DEMO_PREFIX}-bitnami-kafka \
      bitnami/kafka \
      --namespace ${DEMO_NAMESPACE} \
      --values ${HELM_VALUES_DIR}/bitnami-kafka.yaml \
      --version ${SENZING_HELM_VERSION_BITNAMI_KAFKA:-""}
    

Install Kafka test client

  1. Install Kafka test client app. Example:

    helm install \
      ${DEMO_PREFIX}-confluentinc-cp-kafka \
      senzing/confluentinc-cp-kafka \
      --namespace ${DEMO_NAMESPACE} \
      --values ${HELM_VALUES_DIR}/confluentinc-cp-kafka.yaml \
      --version ${SENZING_HELM_VERSION_SENZING_CONFLUENTINC_CP_KAFKA:-""}
    
  2. Wait for pods to run using kubectl get. Note: Kafka will crash and restart until Zookeeper is up and running. Example:

    kubectl get pods \
      --namespace ${DEMO_NAMESPACE} \
      --watch
    
  3. To view Kafka, see View Kafka.

Demonstrate

Now that all of the pre-requisites are in place, it's time to bring up a system that uses Senzing.

Install senzing-api-server Helm chart

The Senzing API server receives HTTP requests to read and modify Senzing data.

  1. Install senzing/senzing-api-server chart using helm install. Example:

    helm install \
      ${DEMO_PREFIX}-senzing-api-server \
      senzing/senzing-api-server \
      --namespace ${DEMO_NAMESPACE} \
      --values ${HELM_VALUES_DIR}/senzing-api-server-postgresql.yaml \
      --version ${SENZING_HELM_VERSION_SENZING_API_SERVER:-""}
    
  2. To view Senzing API server, see View Senzing API Server.

Install stream-producer Helm chart

The stream producer pulls JSON lines from a file and pushes them to a message queue.

  1. Install senzing/senzing-stream-producer chart using helm install. Example:

    helm install \
      ${DEMO_PREFIX}-senzing-stream-producer \
      senzing/senzing-stream-producer \
      --namespace ${DEMO_NAMESPACE} \
      --values ${HELM_VALUES_DIR}/senzing-stream-producer-kafka.yaml \
      --version ${SENZING_HELM_VERSION_SENZING_STREAM_PRODUCER:-""}
    

Install stream-loader Helm chart

The stream loader pulls messages from a message queue and sends them to Senzing.

  1. Install senzing/senzing-stream-loader chart using helm install. Example:

    helm install \
      ${DEMO_PREFIX}-senzing-stream-loader \
      senzing/senzing-stream-loader \
      --namespace ${DEMO_NAMESPACE} \
      --values ${HELM_VALUES_DIR}/senzing-stream-loader-kafka-postgresql.yaml \
      --version ${SENZING_HELM_VERSION_SENZING_STREAM_LOADER:-""}
    

Install senzing-console Helm chart

The senzing-console will be used later to inspect mounted volumes, debug issues, or run command-line tools.

  1. Install senzing/senzing-console chart using helm install. Example:

    helm install \
      ${DEMO_PREFIX}-senzing-console \
      senzing/senzing-console \
      --namespace ${DEMO_NAMESPACE} \
      --values ${HELM_VALUES_DIR}/senzing-console-postgresql.yaml \
      --version ${SENZING_HELM_VERSION_SENZING_CONSOLE:-""}
    
  2. To use senzing-console pod, see View Senzing Console pod.

Install senzing-redoer Helm chart

The redoer pulls Senzing redo records from the Senzing database and re-processes.

  1. Install senzing/senzing-redoer chart using helm install. Example:

    helm install \
      ${DEMO_PREFIX}-senzing-redoer \
      senzing/senzing-redoer \
      --namespace ${DEMO_NAMESPACE} \
      --values ${HELM_VALUES_DIR}/senzing-redoer-postgresql.yaml \
      --version ${SENZING_HELM_VERSION_SENZING_REDOER:-""}
    

Install senzing-entity-search-web-app Helm chart

The Senzing Entity Search WebApp is a light-weight WebApp demonstrating Senzing search capabilities.

  1. Install senzing/senzing-entity-search-web-app chart using helm install. Example:

    helm install \
      ${DEMO_PREFIX}-senzing-entity-search-web-app \
      senzing/senzing-entity-search-web-app \
      --namespace ${DEMO_NAMESPACE} \
      --values ${HELM_VALUES_DIR}/senzing-entity-search-web-app.yaml \
      --version ${SENZING_HELM_VERSION_SENZING_ENTITY_SEARCH_WEB_APP:-""}
    
  2. Wait for pods to run using kubectl get. Example:

    kubectl get pods \
      --namespace ${DEMO_NAMESPACE} \
      --watch
    
  3. To view Senzing Entity Search WebApp, see View Senzing Entity Search WebApp.

Optional charts

These charts are not necessary for the demonstration, but may be valuable in a production environment.

Install SwaggerUI Helm chart

The SwaggerUI is a micro-service for viewing the Senzing REST OpenAPI specification in a web browser.

  1. Install senzing/swaggerapi-swagger-ui chart using helm install. Example:

    helm install \
      ${DEMO_PREFIX}-swaggerapi-swagger-ui \
      senzing/swaggerapi-swagger-ui \
      --namespace ${DEMO_NAMESPACE} \
      --values ${HELM_VALUES_DIR}/swaggerapi-swagger-ui.yaml \
      --version ${SENZING_HELM_VERSION_SENZING_SWAGGERAPI_SWAGGER_UI:-""}
    
  2. To view SwaggerUI, see View SwaggerUI.

Install configurator Helm chart

The Senzing Configurator is a micro-service for changing Senzing configuration.

  1. Install senzing/senzing-configurator chart using helm install. Example:

    helm install \
      ${DEMO_PREFIX}-senzing-configurator \
      senzing/senzing-configurator \
      --namespace ${DEMO_NAMESPACE} \
      --values ${HELM_VALUES_DIR}/senzing-configurator-postgresql.yaml \
      --version ${SENZING_HELM_VERSION_SENZING_CONFIGURATOR:-""}
    
  2. To view Senzing Configurator, see View Senzing Configurator.

View data

  1. Because some of the Kubernetes Services use LoadBalancer, a minikube tunnel is needed for LoadBalancer access. Example:

    minikube tunnel
    
  2. ✏️ When using a separate terminal window in each of the examples below, set environment variables. Note: Replace ${DEMO_PREFIX} with the actual DEMO_PREFIX value. Example:

    source ~/senzing-kafka-postgresql-demo-${DEMO_PREFIX}/environment.sh
  3. Username and password for the following sites are the values seen in the corresponding "values" YAML file located in the helm-values-templates directory.

View Kafka

  1. In a separate terminal window, run the test client. Example:

    export KAFKA_TEST_POD_NAME=$(kubectl get pods \
      --namespace ${DEMO_NAMESPACE} \
      --output jsonpath="{.items[0].metadata.name}" \
      --selector "app.kubernetes.io/name=confluentinc-cp-kafka, \
                  app.kubernetes.io/instance=${DEMO_PREFIX}-confluentinc-cp-kafka" \
      )
    
    kubectl exec \
      -it \
      --namespace ${DEMO_NAMESPACE} \
      ${KAFKA_TEST_POD_NAME} -- /usr/bin/kafka-console-consumer \
        --bootstrap-server ${DEMO_PREFIX}-bitnami-kafka:9092 \
        --topic senzing-kafka-topic \
        --from-beginning

View PostgreSQL

pgAdmin is a web-based user interface for viewing the PostgreSQL database.

  1. In a separate terminal window, port forward to local machine using kubectl port-forward. Example:

    kubectl port-forward \
      --address 0.0.0.0 \
      --namespace ${DEMO_NAMESPACE} \
      svc/${DEMO_PREFIX}-pgadmin-pgadmin4 9171:80
    
  2. PostgreSQL will be viewable at localhost:9171.

    1. Login
      1. See ${SENZING_DEMO_DIR}/helm-values/pgpadmin.yaml for pgadmin email and password (env.email and env.password)
      2. Default: username: postgres password: postgres
    2. On left-hand navigation, select:
      1. Servers > senzing > databases > G2 > schemas > public > tables
    3. The records received from the queue can be viewed in the following Senzing tables:
      1. DSRC_RECORD
      2. OBS_ENT

View Senzing API Server

The Senzing API server receives HTTP requests to read and modify Senzing data.

  1. In a separate terminal window, port forward to local machine using kubectl port-forward. Example:

    kubectl port-forward \
      --address 0.0.0.0 \
      --namespace ${DEMO_NAMESPACE} \
      svc/${DEMO_PREFIX}-senzing-api-server 8250:80
    
  2. Make HTTP calls using curl. Example:

    export SENZING_API_SERVICE=http://localhost:8250
    
    curl -X GET ${SENZING_API_SERVICE}/heartbeat
    curl -X GET ${SENZING_API_SERVICE}/license
    curl -X GET ${SENZING_API_SERVICE}/entities/1
    

View Senzing Entity Search WebApp

The Senzing Entity Search WebApp is a light-weight WebApp demonstrating Senzing search capabilities.

  1. In a separate terminal window, port forward to local machine using kubectl port-forward. Example:

    kubectl port-forward \
      --address 0.0.0.0 \
      --namespace ${DEMO_NAMESPACE} \
      svc/${DEMO_PREFIX}-senzing-entity-search-web-app 8251:80
    
  2. Senzing Entity Search WebApp will be viewable at localhost:8251. The demonstration instructions will give a tour of the Senzing web app.

View Senzing Console pod

The senzing-console is used to inspect mounted volumes, debug issues, or run command-line tools.

  1. In a separate terminal window, log into Senzing Console pod using kubectl exec. Example:

    export CONSOLE_POD_NAME=$(kubectl get pods \
      --namespace ${DEMO_NAMESPACE} \
      --output jsonpath="{.items[0].metadata.name}" \
      --selector "app.kubernetes.io/name=senzing-console, \
                  app.kubernetes.io/instance=${DEMO_PREFIX}-senzing-console" \
      )
    
    kubectl exec -it --namespace ${DEMO_NAMESPACE} ${CONSOLE_POD_NAME} -- /bin/bash
    

View SwaggerUI

The SwaggerUI is a micro-service for viewing the Senzing REST OpenAPI specification in a web browser.

  1. In a separate terminal window, port forward to local machine using kubectl port-forward. Example:

    kubectl port-forward \
      --address 0.0.0.0 \
      --namespace ${DEMO_NAMESPACE} \
      svc/${DEMO_PREFIX}-swaggerapi-swagger-ui 9180:80
    

    Then visit http://localhost:9180.

View Senzing Configurator

The Senzing Configurator is a micro-service for changing Senzing configuration.

  1. If the Senzing configurator was deployed, in a separate terminal window port forward to local machine using kubectl port-forward. Example:

    kubectl port-forward \
      --address 0.0.0.0 \
      --namespace ${DEMO_NAMESPACE} \
      svc/${DEMO_PREFIX}-senzing-configurator 8253:80
    
  2. Make HTTP calls using curl. Example:

    export SENZING_API_SERVICE=http://localhost:8253
    
    curl -X GET ${SENZING_API_SERVICE}/datasources
    

Cleanup

The following commands remove the Senzing Demo application from Kubernetes.

Delete everything in Kubernetes

Delete Kubernetes artifacts using helm uninstall, helm repo remove, and kubectl delete.

  1. Example:

    helm uninstall --namespace ${DEMO_NAMESPACE} ${DEMO_PREFIX}-senzing-configurator
    helm uninstall --namespace ${DEMO_NAMESPACE} ${DEMO_PREFIX}-swaggerapi-swagger-ui
    helm uninstall --namespace ${DEMO_NAMESPACE} ${DEMO_PREFIX}-senzing-redoer
    helm uninstall --namespace ${DEMO_NAMESPACE} ${DEMO_PREFIX}-senzing-entity-search-web-app
    helm uninstall --namespace ${DEMO_NAMESPACE} ${DEMO_PREFIX}-senzing-api-server
    helm uninstall --namespace ${DEMO_NAMESPACE} ${DEMO_PREFIX}-senzing-stream-loader
    helm uninstall --namespace ${DEMO_NAMESPACE} ${DEMO_PREFIX}-senzing-init-postgresql
    helm uninstall --namespace ${DEMO_NAMESPACE} ${DEMO_PREFIX}-senzing-stream-producer
    helm uninstall --namespace ${DEMO_NAMESPACE} ${DEMO_PREFIX}-confluentinc-cp-kafka
    helm uninstall --namespace ${DEMO_NAMESPACE} ${DEMO_PREFIX}-bitnami-kafka
    helm uninstall --namespace ${DEMO_NAMESPACE} ${DEMO_PREFIX}-pgadmin
    helm uninstall --namespace ${DEMO_NAMESPACE} ${DEMO_PREFIX}-bitnami-postgresql
    helm uninstall --namespace ${DEMO_NAMESPACE} ${DEMO_PREFIX}-senzing-console
    helm repo remove senzing
    helm repo remove runix
    helm repo remove bitnami
    kubectl delete -f ${KUBERNETES_DIR}/persistent-volume-claim-postgresql.yaml
    kubectl delete -f ${KUBERNETES_DIR}/persistent-volume-postgresql.yaml
    kubectl delete -f ${KUBERNETES_DIR}/namespace.yaml
    

Delete minikube cluster

Delete minikube artifacts using minikube stop and minikube delete

  1. Example:

    minikube stop
    minikube delete
    

Errors

  1. See docs/errors.md.

References