Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove mysql reporting #332

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 2 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,12 @@ table of contents
2. [installing mediamicroservices](https://github.com/mediamicroservices/mm#installing-mediamicroservices)
3. [configuring mediamicroservices](https://github.com/mediamicroservices/mm#configuring-mediamicroservices)
1. [variable explanations](https://github.com/mediamicroservices/mm#variable-explanations)
3. [Database Instructions](#database-instructions)
1. [Database Configuration](#database-configuration)
2. [Database Backup](#database-backup)
4. [mediamicroservices functions and instructions for use](https://github.com/mediamicroservices/mm#mediamicroservices-functions-and-instructions-for-use)
3. [mediamicroservices functions and instructions for use](https://github.com/mediamicroservices/mm#mediamicroservices-functions-and-instructions-for-use)
* [aipupgrade](https://github.com/mediamicroservices/mm#aipupgrade)
* [barcodeinterpret](https://github.com/mediamicroservices/mm#barcodeinterpret)
* [blackatends](https://github.com/mediamicroservices/mm#blackatends)
* [checksum2filemaker](https://github.com/mediamicroservices/mm#checksum2filemaker)
* [checksumpackage](https://github.com/mediamicroservices/mm#checksumpackage)
* [createpremisdb](#createpremisdb)
* [finishpackage](https://github.com/mediamicroservices/mm#finishpackage)
* [fix_left2stereo](https://github.com/mediamicroservices/mm#fix_left2stereo)
* [fix_rewrap](https://github.com/mediamicroservices/mm#fix_rewrap)
Expand Down Expand Up @@ -198,49 +194,11 @@ this variable stores the name of the FileMaker database that is used in checksum
**21. VOLADJUST**
This variable must be set to yes (Y) or no (N). If set to yes, volume will be run through a volume adjustment filter and adjusted accordingly during transcoding.

**22. PREMIS_DB**
This variable must be set to yes (Y) or no (N). If set to yes, database reporting for mm will be enabled.

**23. SQL_ERROR_EMAIL_TO**
This can be set to include an email address to receive error reports for database insertion.

**24. PREMIS_PROFILE**
Enter the login path information for the database here. (Use the output supplied by the createpremisdb script, or create your own using mysql_config_editor).
** PREMIS_NAME**
Enter the name of the database used for mm reporting.
**26 PERCEPTUAL_HASH**
Set this to 1 (on) to enable the creation of perceptual hashes during the ingestfile process
**27. Quit**
**22. Quit**
if editing in the terminal, use this option to leave the configuration file editor.

***

## Database Instructions

Media Microservices can be integrated with a database for the capture of a variety of preservation metadata generated through the mm workflow. Currently the MM Database supports PREMIS event information, fixity information, perceptual hashes for video files, mediainfo output and ingest logs.

### Database specific scripts
* createpremisdb
* dbbackup
* makefingerprint
* searchfingerprint
* updatingplist

### Database Configuration

To configure the database, run the command `createpremisdb -c` on your __host__ computer and follow the prompts. This will set up the database as well as facilitate user creation. To create users without creating a new database, use the command `createpremisdb -u`. At the end of user creation, the script will supply a command to create a log-in profile for the database. It should look something like this: `mysql_config_editor set --login-path=your_user_config --host=xx.xx.xxx.xxx --user=your_user --password`. Run this command on your __user__ computer and enter the password for the user you created when prompted. This will create the SQL log-in profile that you will use when configuring the microservices. NOTE: When supplying the suggested command, the script does its best to auto-fill the host IP address. You may wish to verify that this is the correct IP.

To finalize the database setup, run `mmconfig` (GUI mode) or `mmconfig -t` (CLI) and select 'Y' in the PREMIS Database logging section, (or set to Y if using CLI). Enter the database name and log-in profile you have created to finalize DB connectivity. Additional database options (such as fingerprint generation) can be set at this time.

![Database GUI Example](https://github.com/mediamicroservices/mm/blob/master/Resources/mmgui_dbsetup.png)

### Database Backup
MM includes a script for database backup. This can be either run manually or set up as an automated process. After configuring the backup script, running `dbbackup` will create a zipped backup in the chosen location. To automate this process use Brew Services. Typing `brew services start mm` will cause the db to be backed up automatically using the included plist file. By default, backups will occur daily at 2:00 AM.

To configure database backup use the command `dbbackup -e`. This will open the config file in a terminal editor. Set the necessary variables to your desired values.

***

## mediamicroservices functions and instructions for use

For all microservices, the structure of the command looks like this:
Expand Down Expand Up @@ -275,18 +233,6 @@ To view the specific ffmpeg encoding options for each file, view the sourcecode
* Another option is to use -c in conjunction with -u, which will create new checksums and version the previous ones if the check is unsuccessful, meaning your checksums have changed. Type `checksumpackage -cu [input]` for this option.
* Finally, use -v as an option if you want to fully verify checksums. If no checksums exist, the script will create the initial ones. Verification will version existing checksums by adding the date they were created to the filename and create new ones, and log the difference to a checksumprocess log, which will be placed in the metadata directory of the package. To use -v, type `checksumpackage -v [input]`.

#### createmmdb
* createmmdb configures a database, users and login profiles. Your command will look like this 'Usage: -c (create database) -u (create user) -h (help)'.

#### createpremisdb
* createpremisdb will create a database for the logging of microservices information as well as facilitate user creation. For more information on use, see the [database configuration](#configuring-premisfixity-logging-database) section of this readme.
* commands are `createpremisdb -c` for database creation and `createpremisdb -u` for user creation.

#### dbbackup
* Creates backups of selected database. Allows a user specified number of backups to be saved. Script can be run manually or set up as a recurring task using the `brew services start mm` command.

* Usage: -e edit configurations, -c create login credentials for backup -h help

#### finishpackage
* finishpackage is a combination of the microservices makelossless, makebroadcast, makeyoutube, makemetadata, and checksumpackage. The purpose is to losslessly transcode, create access copies, and create metadata and directory structure information for a file or package input. To use finishpackage, type finishpackage and drag your input into the command line: `finishpackage [input]`. finish package is typically used in conjunction with restructureForCompliance.

Expand Down
100 changes: 0 additions & 100 deletions Resources/dbinfo.md

This file was deleted.

9 changes: 1 addition & 8 deletions checksumpackage
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ while [ "${*}" != "" ] ; do
fi
#perform checking and verification
if [ "${CHECK}" = "Y" ] ; then
_report_to_db
if [ -s "${PACKAGE}/${OUTDIR}/${DFXMLNAME}" ] ; then
_check_dfxml "${PACKAGE}"
if [ "${CHECKERR}" != "0" ] ; then
Expand Down Expand Up @@ -182,11 +181,8 @@ while [ "${*}" != "" ] ; do
else
xmlstarlet sel -T -t -m "/dfxml/fileobject" -v "hashdigest" -o " " -v "filename" -n "${PACKAGE}/${OUTDIR}/${DFXMLNAME}" > "${PACKAGE}/${OUTDIR}/${CHECKSUMNAME}"
fi
db_source="${PACKAGE}/${OUTDIR}/${CHECKSUMNAME}"
db_fixity=$(cat "${PACKAGE}/${OUTDIR}/${CHECKSUMNAME}")
_report_to_db

echo "$(_get_iso8601): $(basename "${0}"):${VERSION}: ${CHECKSUMNAME} is generated" >> "${PACKAGE}/${OUTDIR}/${CHECKSUMPROCESSLOG}"
event_outcome="Fixity Creation"

if [ "${UPDATE}" = "Y" ] ; then
exit
Expand Down Expand Up @@ -233,9 +229,6 @@ while [ "${*}" != "" ] ; do
else
_report -dt "ERROR: ${0} requires directories as input and ${PACKAGE} is not a directory."
fi
_eventoutcome_update
_report_fixity_db
_db_email_delivery "${SQL_ERROR_EMAIL_TO}"
_log -e
shift
done
1 change: 0 additions & 1 deletion ingestfile
Original file line number Diff line number Diff line change
Expand Up @@ -731,4 +731,3 @@ fi

# clean up queue
[ "${PRIORITY}" == "put in queue" ] && _remove_mediaid_from_queue
_report_to_db
1 change: 0 additions & 1 deletion makederiv
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ while [[ "${@}" != "" ]] ; do
INGESTLOG="${INPUT}/metadata/submissionDocumentation/logs/capture.log"
_report -wt "The capture.log is found in the ./metadata/submissionDocumentation/logs/ directory. Using that for now but consider moving it to ./metadata/logs/"
fi
_report_to_db

# get information on the input
_get_height "${SOURCEFILE}"
Expand Down
1 change: 0 additions & 1 deletion makeframes
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ while [ "${*}" != "" ] ; do
_find_input "${INPUT}"

MEDIAID=$(basename "${INPUT}" | cut -d. -f1)
_report_to_db

# encoding options
_get_codectagstring "${SOURCEFILE}"
Expand Down
2 changes: 0 additions & 2 deletions makegifsummary
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ while [ "${*}" != "" ] ; do
fi
fi

_report_to_db

# encoding options
_get_codectagstring "${SOURCEFILE}"
_get_dar "${SOURCEFILE}"
Expand Down
59 changes: 0 additions & 59 deletions mmconfig
Original file line number Diff line number Diff line change
Expand Up @@ -107,42 +107,10 @@ export MAIN_DIALOG=$(cat << MAINFORM
</vbox>
$(funcEntry DVDLABELPREFIX "Please enter the prefix you would like added to the filename in makedvd. You may leave this blank:" "80")
</hbox>
<hbox space-expand="true">
<text>
<label>Please choose Y or N to enable database logging:</label>
</text>
<vbox>
<radiobutton>
<action>if true enable:PREMIS_PROFILE</action>
<action>if true enable:PREMIS_NAME</action>
<label>"Y"</label>
<variable>PREMIS_DB</variable>
</radiobutton>
<radiobutton active="true">
<action>if true disable:PREMIS_PROFILE</action>
<action>if true disable:PREMIS_NAME</action>
<label>"N"</label>
<variable export="false">PREMIS_DBN</variable>
</radiobutton>
</vbox>
$(funcEntry PREMIS_PROFILE "Enter the name of the database profile:" "60")
$(funcEntry PREMIS_NAME "Enter the name of the database:" "60")
</hbox>
<hbox>
<checkbox>
<label>Auto update MySQL .plist?</label>
<variable>PREMIS_PLIST</variable>
</checkbox>
<checkbox>
<label>Generate video fingerprint?</label>
<variable>PERCEPTUAL_HASH</variable>
</checkbox>
</hbox>
</frame>
<frame Email Settings>
<hbox homogeneous="true">
$(funcEntry EMAIL_FROM "Please enter the email account that notifications will be sent from:" "80")
$(funcEntry SQL_ERROR_EMAIL_TO "Please the email account for the delivery of SQL Error Reports:" "80")
</hbox>
<hbox homogeneous="true">
$(funcEntry MAKEBROADCAST_DELIVERY_EMAIL_TO "Please enter the email account (or multiple accounts separated by a comma) makebroadcast notifications will be delivered to:" "80")
Expand Down Expand Up @@ -181,21 +149,6 @@ elif [[ "${EXIT}" = "OK" ]] ; then
else
VOLADJUST="N"
fi
if [[ "${PREMIS_DB}" = "true" ]] ; then
PREMIS_DB="Y"
else
PREMIS_DB="N"
fi
if [[ "${PREMIS_PLIST}" = "true" ]] ; then
PREMIS_PLIST="1"
else
PREMIS_PLIST="0"
fi
if [[ "${PERCEPTUAL_HASH}" = "true" ]] ; then
PERCEPTUAL_HASH="1"
else
PERCEPTUAL_HASH="0"
fi
#echo "${VOLADJUST}" | sed 's:true:Y:g;s:false:N:g'
echo " OUTDIR_INGESTFILE = ${OUTDIR_INGESTFILE}"
echo " OUTDIR_INGESTXDCAM = ${OUTDIR_INGESTXDCAM}"
Expand All @@ -217,13 +170,7 @@ elif [[ "${EXIT}" = "OK" ]] ; then
echo " MAKEYOUTUBE_DELIVERY_EMAIL_TO = ${MAKEYOUTUBE_DELIVERY_EMAIL_TO}"
echo " MAKEBROADCAST_DELIVERY_EMAIL_TO = ${MAKEBROADCAST_DELIVERY_EMAIL_TO}"
echo " FILE_MAKER_DB = ${FILE_MAKER_DB}"
echo " SQL_ERROR_EMAIL_TO = ${SQL_ERROR_EMAIL_TO}"
echo " VOLADJUST = ${VOLADJUST}"
echo " PREMIS_DB = ${PREMIS_DB}"
echo " PREMIS_PROFILE = ${PREMIS_PROFILE}"
echo " PREMIS_NAME = ${PREMIS_NAME}"
echo " PREMIS_PLIST = ${PREMIS_PLIST}"
echo " PERCEPTUAL_HASH = ${PERCEPTUAL_HASH}"
{
echo "OUTDIR_INGESTFILE=\"${OUTDIR_INGESTFILE}\""
echo "OUTDIR_INGESTXDCAM=\"${OUTDIR_INGESTXDCAM}\""
Expand All @@ -245,12 +192,6 @@ elif [[ "${EXIT}" = "OK" ]] ; then
echo "MAKEYOUTUBE_DELIVERY_EMAIL_TO=\"${MAKEYOUTUBE_DELIVERY_EMAIL_TO}\""
echo "MAKEBROADCAST_DELIVERY_EMAIL_TO=\"${MAKEBROADCAST_DELIVERY_EMAIL_TO}\""
echo "FILE_MAKER_DB=\"${FILE_MAKER_DB}\""
echo "SQL_ERROR_EMAIL_TO=\"${SQL_ERROR_EMAIL_TO}\""
echo "VOLADJUST=\"${VOLADJUST}\""
echo "PREMIS_DB=\"${PREMIS_DB}\""
echo "PREMIS_PROFILE=\"${PREMIS_PROFILE}\""
echo "PREMIS_NAME=\"${PREMIS_NAME}\""
echo "PREMIS_PLIST=\"${PREMIS_PLIST}\""
echo "PERCEPTUAL_HASH=\"${PERCEPTUAL_HASH}\""
} > "${MM_CONFIG_FILE}"
fi
Loading