Skip to content

Installation

Christophe Delaere edited this page Feb 13, 2019 · 2 revisions

To install the SAMADhi client,

  • checkout or untar the archive
  • create a .samadhi file in your home directory with the following content:
   { 
       "login":"xxxxxxxx",
       "password":"xxxxxxxx",
       "hostname":"myhost.com",
       "localpassword":"xxxxxxxx",
       "localhostname":"123.456.789.1",
       "database":"llbb"
   }

To install the SAMADhi database:

  • Checkout or untar the archive
  • Update user and password in SAMADhi/data/createUsers.sql
  • Remove redundant sql files in SAMADhi/data (upgrade.sql files should not harm but are not needed). SAMADhi.sql can also be replaced by a backup file. Note that sql files are executed in alphabetical order.
  • Initialize the mysql database either system-wise or as a docker container
chcon -Rt svirt_sandbox_file_t .
docker run --name samadhi-mysql -e MYSQL_ROOT_PASSWORD=mpp_mysql -e MYSQL_DATABASE=llbb -v $(pwd):/docker-entrypoint-initdb.d -d mysql:8.0.11 --default-authentication-plugin=mysql_native_password

To install the web interface,

  • Checkout or untar the archive
  • Update passwords in SAMADhi/html/conf.ini
  • Build the UI from the base SAMADhi directory: docker build -t samadhi-web .
  • Run it on port 3000 (for example) and connecting to the docker mysql image started above: docker run -d --name samadhi-frontend -v /home/docker-user/SAMADhi_data:/var/www/html/dashboard/data -p 3000:80 --link samadhi-mysql:mysql --rm samadhi-web

Data for the dashboard can be populated by a cron:

  • run the samadhi analysis script
  • scp *.json dockerhost:SAMADhi_data/ The typical scheme consist in running the script weekly, and monthly with DAS checks enabled.

Once installed, you should connect to the web interface with the adminUser account (default password: ihDAMAS) and change the password. More users can be added via the interface in the users administration tab.

Clone this wiki locally