Coder Social home page Coder Social logo

senzing / docker-g2command Goto Github PK

View Code? Open in Web Editor NEW
0.0 8.0 0.0 197 KB

:no_entry: [DEPRECATED] Please use https://github.com/Senzing/g2command instead.

License: Apache License 2.0

Dockerfile 16.62% Makefile 64.60% Shell 6.33% Python 12.44%
archived deprecated obsolete

docker-g2command's Introduction

docker-g2command

โ›” Deprecated

Deprecated in favor of senzing/g2configtool.

No Maintenance Intended

Overview

This Dockerfile is a wrapper over Senzing's G2Command.py.

Related artifacts

  1. DockerHub

Contents

  1. Expectations
    1. Space
    2. Time
    3. Background knowledge
  2. Demonstrate using Docker
    1. Initialize Senzing
    2. Configuration
    3. Volumes
    4. Docker network
    5. Docker user
    6. Database support
    7. Run docker container
  3. Develop
    1. Prerequisite software
    2. Clone repository
    3. Build docker image for development
  4. Examples
  5. Errors
  6. References

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 6 GB free disk space.

Time

Budget 40 minutes to get the demonstration up-and-running, depending on CPU and network speeds.

Background knowledge

This repository assumes a working knowledge of:

  1. Docker

Demonstrate using Docker

Initialize Senzing

  1. If Senzing has not been initialized, visit "How to initialize Senzing with Docker".

Configuration

Configuration values specified by environment variable or command line parameter.

Volumes

  1. โœ๏ธ Specify the directory containing the Senzing installation. Use the same SENZING_VOLUME value used when performing "How to initialize Senzing with Docker". Example:

    export SENZING_VOLUME=/opt/my-senzing
    1. Here's a simple test to see if SENZING_VOLUME is correct. The following commands should return file contents. Example:

      cat ${SENZING_VOLUME}/g2/g2BuildVersion.json
      cat ${SENZING_VOLUME}/data/3.0.0/libpostal/data_version
    2. โš ๏ธ macOS - File sharing must be enabled for SENZING_VOLUME.

    3. โš ๏ธ Windows - File sharing must be enabled for SENZING_VOLUME.

  2. Identify the data_version, etc, g2, and var directories. Example:

    export SENZING_DATA_VERSION_DIR=${SENZING_VOLUME}/data/3.0.0
    export SENZING_ETC_DIR=${SENZING_VOLUME}/etc
    export SENZING_G2_DIR=${SENZING_VOLUME}/g2
    export SENZING_VAR_DIR=${SENZING_VOLUME}/var

Docker network

๐Ÿค” Optional: Use if docker container is part of a docker network.

  1. List docker networks. Example:

    sudo docker network ls
  2. โœ๏ธ Specify docker network. Choose value from NAME column of docker network ls. Example:

    export SENZING_NETWORK=*nameofthe_network*
  3. Construct parameter for docker run. Example:

    export SENZING_NETWORK_PARAMETER="--net ${SENZING_NETWORK}"

Docker user

๐Ÿค” Optional: The docker container runs as "USER 1001". Use if a different userid (UID) is required.

  1. โœ๏ธ Manually identify user. User "0" is root. Example:

    export SENZING_RUNAS_USER="0"

    Another option, use current user. Example:

    export SENZING_RUNAS_USER=$(id -u)
  2. Construct parameter for docker run. Example:

    export SENZING_RUNAS_USER_PARAMETER="--user ${SENZING_RUNAS_USER}"

Database support

๐Ÿค” Optional: Some database need additional support. For other databases, these steps may be skipped.

  1. Db2: See Support Db2 instructions to set SENZING_OPT_IBM_DIR_PARAMETER.
  2. MS SQL: See Support MS SQL instructions to set SENZING_OPT_MICROSOFT_DIR_PARAMETER.

Run docker container

  1. Run docker container. Example:

    sudo docker run \
      --interactive \
      --rm \
      --tty \
      --volume ${SENZING_DATA_VERSION_DIR}:/opt/senzing/data \
      --volume ${SENZING_ETC_DIR}:/etc/opt/senzing \
      --volume ${SENZING_G2_DIR}:/opt/senzing/g2 \
      --volume ${SENZING_VAR_DIR}:/var/opt/senzing \
      ${SENZING_RUNAS_USER_PARAMETER} \
      ${SENZING_NETWORK_PARAMETER} \
      ${SENZING_OPT_IBM_DIR_PARAMETER} \
      ${SENZING_OPT_MICROSOFT_DIR_PARAMETER} \
      senzing/g2command

Develop

Prerequisite software

The following software programs need to be installed:

  1. git
  2. make
  3. docker

Clone repository

For more information on environment variables, see Environment Variables.

  1. Set these environment variable values:

    export GIT_ACCOUNT=senzing
    export GIT_REPOSITORY=docker-g2command
    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.

Build docker image for development

  1. Option #1: Using docker command and GitHub.

    sudo docker build --tag senzing/g2command https://github.com/senzing/docker-g2command.git#main
  2. Option #2: Using docker command and local repository.

    cd ${GIT_REPOSITORY_DIR}
    sudo docker build --tag senzing/g2command .
  3. Option #3: Using make command.

    cd ${GIT_REPOSITORY_DIR}
    sudo make docker-build

    Note: sudo make docker-build-development-cache can be used to create cached docker layers.

Examples

Errors

  1. See docs/errors.md.

References

docker-g2command's People

Contributors

docktermj avatar sammacy avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-g2command's Issues

Refactor to template

See Senzing/template-repository#12

Tasks

โ˜‘๏ธ Check History. In pull request, add issue number. In issue, add Pull Requests
โ˜‘๏ธ Update CHANGELOG.md
โ˜‘๏ธ Update to Dockerfile version 1.3.0
โ˜‘๏ธ Update to PULL_REQUEST_TEMPLATE.md
โ˜‘๏ธ Compare to docker-template
โ˜‘๏ธ Pull into master
โ˜‘๏ธ Close GitHub issue

Legend

๐Ÿ”ฒ Not done
โ˜‘๏ธ Done

Support for MSSQL

See Senzing/docker-compose-demo#35

Tasks

โ˜‘๏ธ Check History. Add issue number in comment (e.g. #5)
โ˜‘๏ธ Update CHANGELOG.md
โ˜‘๏ธ Compare to docker-template
โ˜‘๏ธ Pull into master
โ˜‘๏ธ After DockerHub creates image, tag it
โ˜‘๏ธ Create GitHub release
โ˜‘๏ธ Close GitHub issue

Legend

๐Ÿ”ฒ Not done
โ˜‘๏ธ Done

Update to senzing/template-python:1.2.0

See Senzing/template-python#14

Tasks

๐Ÿ”ฒ Update README.md
๐Ÿ”ฒ Update Preamble "Documentation issue" URL
โ˜‘๏ธ Add .github/ISSUE_TEMPLATE/documentation_request.md
โ˜‘๏ธ Delete .github/README_TEMPLATE
โ˜‘๏ธ Add docs/README.md
โ˜‘๏ธ Add docs/errors.md

Legend

๐Ÿ”ฒ Not done
โ˜‘๏ธ Done

Move to RPM-based Senzing installation

Is your feature request related to a problem? Please describe.
Currently the senzing/senzing-base image runs with an /opt/senzing directory created by untar-ungzip of Senzing_API.tgz.

Describe the solution you'd like
Installation for senzing/senzing-base is now an RPM-based installation. Make appropriate changes to support RPM-based installation.
See Senzing/docker-senzing-base#33

Become a non-root container

Is your feature request related to a problem? Please describe.
Currently the senzing/senzing-base image runs as root user. This is considered to be a security exposure.

Describe the solution you'd like
Make senzing/senzing-base a non-root container.
See Senzing/docker-senzing-base#30

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.