Skip to content

Latest commit

 

History

History
278 lines (195 loc) · 7.87 KB

docker-compose-demo-tips.md

File metadata and controls

278 lines (195 loc) · 7.87 KB

docker-compose-demo tips

The following is a list of tips when using docker-compose-demo.

Contents

  1. Db2
  2. Jupyter Notebooks
  3. Kafka
    1. View Kafdrop
    2. Send messages to Kafka topic
    3. Read messages from Kafka topic
    4. Kafka references
  4. MySQL
    1. View MySQL
    2. View records in PostgreSQL
  5. MS SQL
    1. View MS SQL
    2. View records in MS SQL
  6. PostgreSQL
    1. View PostgreSQL
    2. View records in PostgreSQL
  7. RabbitMQ
  8. Senzing API server
    1. Senzing API server via web browser
    2. Senzing API server via curl
    3. Senzing API server via Swagger editor
  9. Senzing Configurator
  10. Senzing Entity Search WebApp
    1. View Senzing Entity Search WebApp
    2. Senzing Entity Search WebApp demo
  11. Senzing license
    1. Request Senzing license
    2. Install Senzing license
    3. Updating G2Module.ini
  12. Senzing X-Term
  13. SQLite
    1. View SQLite
    2. View records in SQLite

Db2

Jupyter Notebooks

Jupyter Notebooks references

  1. github.com/Senzing/docker-jupyter

Kafka

View Kafdrop

  1. Kafdrop is viewable at localhost:9179.

  2. References:

    1. Kafdrop - An Open-Source Kafka Web UI
    2. GitHub

Send messages to Kafka topic

  1. Enter "senzing-kafka" container. Example:

    sudo docker exec -it senzing-kafka /bin/bash
  2. Inside "senzing-kafka" container, run kafka-local-producer.sh. Example:

    /opt/bitnami/kafka/bin/kafka-console-producer.sh \
      --broker-list localhost:9092 \
      --topic senzing-kafka-topic
  3. Enter lines of JSON. Each line is a Kafka message.

Read messages from Kafka topic

  1. Enter "senzing-kafka" container. Example:

    sudo docker exec -it senzing-kafka /bin/bash
  2. Inside "senzing-kafka" container, run kafka-local-consumer.sh. Example:

    /opt/bitnami/kafka/bin/kafka-console-consumer.sh \
      --bootstrap-server localhost:9092 \
      --topic senzing-kafka-topic \
      --from-beginning

Kafka references

  1. Quickstart

MySQL

View MySQL

  1. MySQL is viewable at localhost:9173.
    1. Defaults: username: g2 password: g2

View records in MySQL

  1. On left-hand navigation, select "G2" database to explore.
  2. The records received from the queue can be viewed in the following Senzing tables:
    1. G2 > DSRC_RECORD
    2. G2 > OBS_ENT

MS SQL

View MS SQL

  1. MSSQL is viewable at localhost:9177.
    1. System: MS SQL (beta)
    2. Server: senzing-mysql
    3. Username: sa
    4. Password: Passw0rd
    5. Database: G2

View records in MS SQL

  1. The records received from the queue can be viewed in the following Senzing tables:
    1. DSRC_RECORD
    2. OBS_ENT

PostgreSQL

View PostgreSQL

  1. PostgreSQL is viewable at localhost:9171.
    1. Defaults: username: postgres password: postgres

View records in PostgreSQL

  1. On left-hand navigation, select "G2" database to explore.
  2. The records received from the queue can be viewed in the following Senzing tables:
    1. G2 > DSRC_RECORD
    2. G2 > OBS_ENT

RabbitMQ

Senzing API server

The Senzing REST API server supports the Senzing REST API.

Senzing API server via web browser

  1. From a web browser. Examples:
    1. localhost:8250/heartbeat
    2. localhost:8250/license
    3. localhost:8250/entities/1

Senzing API server via curl

  1. From curl. Examples:

    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

Senzing API server via Swagger editor

  1. From OpenApi "Swagger" editor.

Senzing API server references

  1. github.com/Senzing/senzing-api-server

Senzing Configurator

Senzing Configurator references

  1. github.com/Senzing/configurator

Senzing Entity Search WebApp

View Senzing Entity Search WebApp

  1. Senzing Entity Search WebApp is viewable at localhost:8251.
    1. Example entity: localhost:8251/entity/1.

Senzing Entity Search WebApp demo

  1. The demonstration instructions will give a tour of the Senzing web app.

Senzing Entity Search WebApp references

  1. github.com/Senzing/entity-search-web-app

Senzing license

Request Senzing license

  1. If working with more than 10,000 records, obtain a Senzing license.

Install Senzing license

  1. ✏️ Identify location of g2.lic on local workstation. Example:

    export G2_LICENSE_PATH=/path/to/local/g2.lic
  2. Copy license to volume. Note, the license file must be named g2.lic Example:

    sudo cp ${G2_LICENSE_PATH} ${SENZING_ETC_DIR}/g2.lic
  3. ⚠️ Restart the entire stack or individual contatiners that instantiate Senzing engine objects, e.g. stream-loader, redoer, API server. The license file is referenced at engine initialization and isn't dynamically read when a license file is first deployed or updated.

Updating G2Module.ini

When running Senzing inside Docker containers, configuration files must contain paths that are relative to inside the docker container. That includes the PIPELINE.LICENSEFILE path. From the perspective of inside the Docker container, the g2.lic will be located at /etc/opt/senzing/g2.lic.

  1. Edit G2Module.ini. Example:

    vi ${SENZING_ETC_DIR}/G2Module.ini
  2. Contents of G2Module.ini. Notice the value of LICENSEFILE. Example:

    [PIPELINE]
     CONFIGPATH   = /etc/opt/senzing
     LICENSEFILE  = /etc/opt/senzing/g2.lic
     RESOURCEPATH = /opt/senzing/g2/resources
     SUPPORTPATH  = /opt/senzing/data
    
    [SQL]
     CONNECTION = postgresql://username:password@10.1.1.100:5432:G2/

Senzing X-Term

SQLite

View SQLite

  1. SQLite is viewable at localhost:9174.

View records in SQLite

  1. The records received from the queue can be viewed in the following Senzing tables:
    1. G2 > DSRC_RECORD
    2. G2 > OBS_ENT