This document describes how to connect to the Senzing Yum repo, how to install and use Senzing from an rpm package, and how to migrate from Senzing from the tgz to Senzing installed using the repo/rpm.
Run this command to connect yum to the Senzing yum repo
sudo yum -y install https://senzing-production-yum.s3.amazonaws.com/senzingrepo-1.0.0-1.x86_64.rpm
This will connect your Yum instance to the Senzing repo. If you would later like to disconnect run this
sudo yum -y remove senzingrepo
Run these commands to connect apt to the Senzing apt repo
- (prerequisite) Install apt-transport-https: sudo apt install apt-transport-https
- wget https://senzing-production-apt.s3.amazonaws.com/senzingrepo_1.0.0-1_amd64.deb
- sudo apt install ./senzingrepo_1.0.0-1_amd64.deb
- sudo apt update
This will connect your apt instance to the Senzing repo. If you would later like to disconnect run this
sudo apt remove senzingrepo
After connecting to a Senzing repo, installing Senzing is as easy as
sudo yum -y install senzingapi
sudo apt install senzingapi
This will install the latest version of the Senzing API. You will need to accept the EULA while installing Senzing. If you would like to automate EULA acceptance, set this environment variable before running the above command.
To use Senzing, you must now first create a project. You can do this with the G2CreateProject.py script
python3 /opt/senzing/g2/python/G2CreateProject.py <project_folder>
~/senzing is the default project location if no project folder is specified. The project folder must not already exists and it will be created as part of project creation. Creating a project will give you an independent instance of Senzing that can by upgraded (or not) separately from a subsequently install Senzing version.
Once the project a created, it can be used in the same way as you have always used Senzing. Most files can be found in familiar locations within the project folder.
Updating projects in future versions of Senzing
When you install a new version of Senzing, your project is not automatically updated. There are two steps to update a project.
- Run the G2UpdateProject.py script: python3 /opt/senzing/g2/python/G2UpdateProject.py <project_folder>
- This will update the files in your project folder from the installed Senzing. Your configuration files in <project_folder>/etc will not be touched.
- Check https://senzing.com/releases/#api-releases for any additional instructions to upgrade to a specific release.
- If you are upgrading multiple versions, check the above link for every version between your previous version of Senzing and the new version.
Changes from previous Senzing version
There are a few differences when using Senzing installed from a package vs previous versions distributed as a tgz.
- The requirement to create a project as described above
- setupEnv now resides in the project folder root
- License files must now be placed in the <project_folder>/etc folder instead of the /opt/senzing/g2/data folder. The license file must still be named g2.lic
- Database schema and upgrade sql files are now located in <project_folder>/resources/schema
- Configuration and ini files are now located in <project_folder>/etc
- The embedded Senzing sqlite database is now located in <project_folder>/var/sqlite
Other than above, the experience of using Senzing should be unchanged.
Migrating from Senzing distributed as a tgz
When migrating from a tgz install, before installing the package, you must backup your Senzing deployment
Then, install the rpm package and create a project as described above. Once project is created, you will need to move any custom changes from your old config files to the config files in the project. These changes should be migrated to a project, not to the installed Senzing. Any changes to the installed Senzing will be a part of any project created from then on.
Here are a list of common changes to consider migrating. (from https://senzing.zendesk.com/hc/en-us/articles/115001672534-Upgrading-to-a-New-Release)
- If you are migrating to a new release of Senzing, check the release notes for any version specific upgrade steps. Make sure to check all the versions between from the current Senzing version up to and including the new Senzing version.
- If you have a license file move it from the backup to the new deployment
mv /opt/senzing/g2_backup/data/g2.lic <project_folder>/etc
- If you modified G2Project.ini or G2Module.ini make the same changes to the new files
- It's recommended to compare the old and new and not move them, there might be changes to these files between releases
- Changes to these files are usually different database connections strings if you have modified these to point to a different database or increasing the number of threads the engine is using
- If you created your own directories and projects under /opt/senzing/g2/python/demo copy those over
cp -r /opt/senzing/g2_backup/python/demo/<your_dirs_here> <project_folder>/python/demo
- If you created any other files or backups - for example g2config.json configuration files ensure you copy those over too
- If Senzing has supplied a custom g2config.json file or you have modified your g2config.json file yourself copy this too - if you're unsure please check with us. Modifications are usually made with the G2ConfigTool.py
cp /opt/senzing/g2_backup/python/g2config.json <project_folder>/etc
- Check <project_folder>/resources/schema for schema update files for your database. These are named g2core-schema-xxx-upgrade-y.y-to-z.z.sql where xxx is the supported database name and y.y and z.z indicate the progression of releases, e.g. 1.4-to-1.5.
- If there is an upgrade schema script review it with your DBA and apply the changes depending on your database environment and best practices. If you have any questions about the schema changes please contact us
- Don't forget to source the setupEnv file to configure your environment.
Run a test load of the sample data to test the new deployment. This simulates a load but doesn't load any data.
python3 G2Loader.py -T
Once successfully deployed you can archive or delete the /opt/senzing/g2_backup directory once you are satisfied you no longer need it's contents.
Note: If you were using the embedded sqlite database with G2, the prior version database files are located in /opt/senzing/g2_backup/sqldb if you'd like to keep them.
Where did that file move to?
Previously, the Senzing API for Linux was distributed as a tgz. With rpm packages we have made some changes to better conform with Linux standards. All the files are still exist, they just may be in new locations. Below are the new locations for files you may be looking for. The new installed locations are included here for completeness as you should be using a project. See 'Using Senzing' above on how to do that.
New installed location
New project location
|G2Project.ini, G2Module.ini, g2config.json||/opt/senzing/g2/python||/etc/opt/senzing/||<project_root>/etc|
|Other config files (custom*.txt, cfgVariant.json, defaultGNRCP.config, stb.config)||/opt/senzing/g2/data||/etc/opt/senzing||<project_root>/etc|
|License file (copied by user)||/opt/senzing/g2/data||/etc/opt/senzing (copied by user)||<project_root>/etc (copied by user)|
|DB schema create and upgrade files (g2core-schema-*-create.sql, g2core-schema-*-upgrade-1.9-to-1.10.sql, etc)||/opt/senzing/g2/data||/opt/senzing/g2/resources/schema||<project_root>/resources/schema|
|Embedded sqlite database (G2C.db)||/opt/senzing/g2/sqldb||/var/opt/senzing/sqlite/||<project_root>/var/sqlite/|