Instruction to compile TMCDB:

PREREQUISITES:

ACS 2015.8
 -codegen
 -cdb-rdb (these two have been integrated into standard ACS starting release 2015.8 and don't need
           compilation by the user)

MySQL server (version 5.1 and above)
 -create database "monitoring"  
 -create user ASTRI with pwd: ASTRIteam2014
 -grant ALL to ASTRI
(this has already been created in the 'slntmcdb' machine @Serra La Nave)

At the moment of writing (Dec 2016) database machine, database name, user and pwd are hardcoded
in the class MySQLDAOImpl.java in the directory TMCDB_WITH_MySQLDAO/DAO/src/alma/archive/tmcdb/MySQLDAO
If you want to compile and run the TMCDB on a new machine, edit the class MySQLDAOImpl.java and add the configuration needed
then comment out the others, e.g.: 
	static final String DB_URL = "jdbc:mysql://192.168.100.121:3306/monitoring";
	//192.168.100.121 == slntmcdb
	static final String USER = "ASTRI";
	static final String PASS = "ASTRIteam2014";

In the next release, a configuration file and a mechanism to select the proper configuration based on the IP
of the machine in use will be added.

COMPILATION:

- get from the git repository ICD/ARCHIVE/Database and compile and install it: this install DDL in $ACSDATA/condif/DDL.
  Before doing it copy the original DDL in $ACSDATA/config/DDL.orig and create a new DDL directory with writing privileges

- get from the git and build (make build) ASTRI/Archive/TMCDB.

- get and compile ASTRI/DHS/TMCDB_MySQL.

-in TMCDB_WITH_MySQLDAO, compile and install in sequence:
 Database 
 Persistence
 DAO
 or try a 'make build'. If successful, you are done. (ignore MDGuiApi failure)

Now you have a monitoring TMCDB component installed. 
To use it, be sure you have all the device components you need as well as a CDB tree with monitor collector,
monitor controller and blobber.









