Skip to content

senzing-garage/docker-yum

Repository files navigation

docker-yum

If you are beginning your journey with Senzing, please start with Senzing Quick Start guides.

You are in the Senzing Garage where projects are "tinkered" on. Although this GitHub repository may help you understand an approach to using Senzing, it's not considered to be "production ready" and is not considered to be part of the Senzing product. Heck, it may not even be appropriate for your application of Senzing!

Synopsis

A docker wrapper around the yum command.

Overview

This repository creates a Docker wrapper over the yum command. It can be used to download and extract RPMs. The default behavior is to install the latest senzingapi packages.

Contents

  1. Expectations
  2. Demonstrate using Docker
    1. EULA
    2. Docker volumes
    3. Run Docker container
  3. Examples
    1. Examples of Docker
    2. Configuration
  4. References

Legend

  1. 🤔 - A "thinker" icon means that a little extra thinking may be required. Perhaps there are some choices to be made. 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 6 GB free disk space.
  • Time: Budget 10 minutes to get the demonstration up-and-running, depending on CPU and network speeds.
  • Background knowledge: This repository assumes a working knowledge of:

Demonstrate using Docker

EULA

To use the Senzing code, you must agree to the End User License Agreement (EULA).

  1. ⚠️ This step is intentionally tricky and not simply copy/paste. This ensures that you make a conscious effort to accept the EULA. Example:

    export SENZING_ACCEPT_EULA="<the value from this link>"
  2. Construct parameter for docker run. Example:

    export SENZING_ACCEPT_EULA_PARAMETER="--env SENZING_ACCEPT_EULA=${SENZING_ACCEPT_EULA}"

Docker volumes

Senzing follows the Linux File Hierarchy Standard. The Senzing RPM installs 2 packages: senzingapi, senzingdata. senzingapi is installed into /opt/senzing/g2 and senzingdata is installed into /opt/senzing/data inside the Docker container. Environment variables will be used in --volume options to externalize the installations.

  1. ✏️ Specify the directory where to install Senzing. Example:

    export SENZING_VOLUME=/opt/my-senzing
    1. ⚠️ macOS - File sharing must be enabled for SENZING_VOLUME.
    2. ⚠️ Windows - File sharing must be enabled for SENZING_VOLUME.
  2. Identify directories for data and g2. Example:

    export SENZING_DATA_DIR=${SENZING_VOLUME}/data
    export SENZING_G2_DIR=${SENZING_VOLUME}/g2

Run Docker container

Although the Docker run command looks complex, it accounts for all of the optional variations described above. Unset environment variables have no effect on the docker run command and may be removed or remain.

  1. Run Docker container. Example:

    sudo docker run \
      --rm \
      --volume ${SENZING_DATA_DIR}:/opt/senzing/data \
      --volume ${SENZING_G2_DIR}:/opt/senzing/g2 \
      ${SENZING_ACCEPT_EULA_PARAMETER} \
      senzing/yum
  2. When complete, Senzing is installed in the SENZING_G2_DIR and SENZING_DATA_DIR directories.

  3. For more examples of use, see Examples of Docker.

Examples

Examples of Docker

The following examples require initialization described in Demonstrate using Docker.

Manually accept EULA

By not setting SENZING_ACCEPT_EULA_PARAMETER, the containerized yum install will prompt for manual EULA acceptance.

  1. Run Docker container. Example:

    sudo docker run \
      --interactive \
      --rm \
      --tty \
      --volume ${SENZING_DATA_DIR}:/opt/senzing/data \
      --volume ${SENZING_G2_DIR}:/opt/senzing/g2 \
      senzing/yum

Install local RPMs

senzing/yum can be used to install local RPM files.

  1. To download Senzing RPM files, see github.com/Senzing/docker-yumdownloader.

  2. ✏️ Set additional environment variables. Identify directory containing RPM files and the exact names of RPM files. Example:

    export SENZING_RPM_DIR=~/Downloads
    export SENZING_API_RPM_FILENAME=senzingapi-nn.nn.nn.x86_64.rpm
    export SENZING_DATA_RPM_FILENAME=senzingdata-v1-nn.nn.nn.x86_64.rpm
  3. Run the Docker container. Example:

    sudo docker run \
      --rm \
      --volume ${SENZING_DATA_DIR}:/opt/senzing/data \
      --volume ${SENZING_G2_DIR}:/opt/senzing/g2 \
      --volume ${SENZING_RPM_DIR}:/data \
      ${SENZING_ACCEPT_EULA_PARAMETER} \
      senzing/yum -y localinstall \
        /data/${SENZING_DATA_RPM_FILENAME} \
        /data/${SENZING_API_RPM_FILENAME}

Configuration

Configuration values specified by environment variable or command line parameter.

References