Skip to content
GitHub no longer supports this web browser. Learn more about the browsers we support.
Imports Bitergia identities exported in JSON format
Go TSQL Shell Makefile
Branch: master
Clone or download
Cannot retrieve the latest commit at this time.
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
Makefile
README.md
find.sh
for_each_go_file.sh
import-sh-json.go
mariadb_drop.sh
mariadb_init.sh
mariadb_local_docker.sh
mariadb_reinit.sh
mariadb_root_shell.sh
mariadb_sortinghat_shell.sh
structure.sql

README.md

import-sh-json

Import Bitergia identity export JSONs.

Usage

  • Start local MariaDB server via: PASS=rootpwd ./mariadb_local_docker.sh.
  • Connect to local MariaDB server via: USR=root PASS=rootpwd ./mariadb_root_shell.sh to test database connection.
  • Initialize SortingHat user & database: USR=root PASS=rootpwd SH_USR=shusername SH_PASS=shpwd SH_DB=shdb [FULL=1] ./mariadb_init.sh.
  • If FULL=1 is specified, SortingHat database will be created from gitignored populated sortinghat.sql file instead of an empty structure file structure.sql.
  • To drop SortingHat database & user (just an util script): USR=root PASS=rootpwd SH_USR=shusername SH_DB=shdb ./mariadb_init.sh.
  • Connect to SortingHat database via: SH_USR=shusername SH_PASS=shpwd SH_DB=shdb ./mariadb_sortinghat_shell.sh to test SortingHat database connection.
  • To import data form Bitergia exported JSON files do: [REPLACE=1] [COMPARE=1] [DEBUG=1] SH_USR=shusername SH_PASS=shpwd SH_DB=shdb SH_PORT=13306 ./import-sh-json file1.json file2.json ...
  • If you specify REPLACE=1 it will overwrite data on conflicts. Otherwise it will not add data if there is a conflict.
  • If you specify COMPARE=1 it will check if exacty the same data already exists before attempting to ad or replace records.
  • Typical usage inside MariaDB K8s pods with all env defined by pod: REPLACE=1 COMPARE=1 ./import-sh-json cloudfoundry_sh.json oci_sh.json onap_sh.json opnfv_sh.json yoctoproject_sh.json.
You can’t perform that action at this time.