Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

Installation Instructions for TriaClick Freeware Demo v4.0.0

19th of February 2019

Welcome to a fully functional and working freeware demo version of TriaClick, these are step by step instructions on how to install and test TriaClick on Oracle Virtual Box machine. There is a YouTube screen capture demo that accompanies the written code in testing files.

Feel free to skip any of the following steps depending on your existing hardware/software infrastructure. Nevertheless make sure you read setup instructions for ClickHouse and MariaDB in order to prepare these DBMS to run TriaClick.

Wish you a happy path testing and a pleasant experience with TriaClick

Athanassios I. Hatzis, PhD
Founder of HEALIS.EU

End User License Agreement (EULA) for TriaClick

Please read TriaClick EULA agreement carefully before completing the installation process and using TriaClick Software. It provides a license to use TriaClick Software and contains warranty information and liability disclaimers.

Installation Summary

  • Step1. Install Linux Ubuntu
  • Step2. Install ClickHouse DBMS
  • Step3. Install MariaDB DBMS
  • Step4. ClickHouse SetUp for TriaClick
  • Step5. MariaDB SetUp for TriaClick
  • Step6. Python3 SetUp for TriaClick
  • Step7. Install TriaClick Binary Modules
  • Step8. Run TriaClick Tests

Step 1 Install Ubuntu

(I) Install Latest Version of VirtualBox on your platform

  1. Download VirtualBox (6.0.4)
  2. Download VirtualBox Extension Pack
    • Open Oracle VM and install the Extension Pack
    • Go to File/Preferences (Ctrl+G)/Extensions and verify that Oracle VBox Extension Pack is installed successfully

(II) - Install Linux Ubuntu (64bit) via Vagrant

My preferred distribution for Linux Ubuntu is Linux Mint. Use Vagrant Cloud to download a recently created Virtual Box. Here is a quick quide using the easiest method which is installing Vagrant first on Windows 10 or on Linux Ubuntu platform.

Case A - Vagrant on Windows

  1. Download and install Git for Windows. During installation steps, select below settings

    • “Use Git from the command line and also from 3rd-party software
    • “Checkout as-is, commit Unix-style line endings”
  2. Download and install Vagrant for Windows 64-bit version

  3. Open Git Bash and enter the command

    • vagrant version
    • Installed Version: 2.2.3
    • Latest Version: 2.2.3

Case B - Vagrant on Linux Ubuntu

  1. Download Vagrant for Debian 64-bit
  2. Install Vagrant on your Linux Ubuntu platform
    • sudo dpkg -i vagrant_2.2.3_x86_64.deb
    • vagrant --version
    • Vagrant 2.2.3

(III) Install Linux Mint 19.1 Cinnamon (Tessa) Virtual Box

  1. vagrant box add mrlesmithjr/linuxmint19-desktop
    • Estimated time about 30minutes, 2GB file, Rate 1.2 MB/sec
    • box: Successfully added box 'mrlesmithjr/linuxmint19-desktop' (v1549636294) for 'virtualbox'!
    • vagrant box list
    • mrlesmithjr/linuxmint19-desktop (virtualbox, 1549636294)
  2. vagrant init mrlesmithjr/linuxmint19-desktop
    • A Vagrantfile has been placed in this directory. vagrant up your first virtual environment!
  3. vagrant up
    • Bringing machine 'default' up with 'virtualbox' provider...
    • ==> default: Importing base box 'mrlesmithjr/linuxmint19-desktop'...
    • For the problem of Linux Mint/Cinnamon running in software rendering mode read this post
  4. Linux Mint and Ubuntu Versions
    • lsb_release -a Description: Linux Mint 19.1 Tessa
    • cat /etc/upstream-release/lsb-release Ubuntu 18.04 LTS (bionic)

Step 2. Install ClickHouse DBMS

  1. Add the Yandex repository in /etc/apt/sources.list or in a separate /etc/apt/sources.list.d/clickhouse.list file:
    • sudo nano /etc/apt/sources.list
    • deb http://repo.yandex.ru/clickhouse/deb/stable/ main/
    • sudo apt-get install dirmngr
    • sudo apt-key adv --keyserver keyserver.ubuntu.com --recv E0C56BD4
    • sudo apt-get update
  2. Install clickhouse-client and clickhouse-server
    • sudo apt-get install clickhouse-client clickhouse-server
  3. Start the server
    • sudo service clickhouse-server start
  4. Verify that the server is running
    • sudo service clickhouse-server status
      • clickhouse-server.service - ClickHouse Server (analytic DBMS for big data)
      • Loaded: loaded (/etc/systemd/system/clickhouse-server.service; enabled; vendor preset: enabled)
      • Active: active (running) since Fri 2019-02-15 08:38:20 GMT; 5s ago
  5. Verify that the client can run
    • clickhouse-client
      • ClickHouse client version 19.3.3.
      • Connecting to localhost:9000 as user default.
  6. Location of Configuration files
    • /etc/clickhouse-server
    • /etc/clickhouse-client
    • /etc/init.d/clickhouse-server
  7. Location of ClickHouse Logs
    • /var/log/clickhouse-server
    • sudo journalctl -u clickhouse-server
  8. Location of Data files
    • /var/lib/clickhouse
  9. Location of demo user files
    • /var/lib/clickhouse/user_files/demo

Step 3. Install MariaDB DBMS

  1. Install MariaDB 10.1 on Ubuntu 18.04
    • sudo apt install mariadb-server
  2. Verify that the server is running
    • sudo service mysql status
      • mariadb.service - MariaDB 10.1.38 database server
      • Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
      • Active: active (running) since Fri 2019-02-15 09:31:54 GMT; 2min 39s ago

Step 4. ClickHouse SetUp for TRIADB

  1. Add vagrant user to clickhouse group
    • sudo usermod -a -G clickhouse vagrant
  2. Change permissions of ClickHouse data folder for group users
    • sudo chmod -R g+rwx /var/lib/clickhouse/
  3. Usage Recommendations
    • echo 0 | sudo tee /proc/sys/vm/overcommit_memory
    • echo 'never' | sudo tee /sys/kernel/mm/transparent_hugepage/enabled
    • move your Linux Ubuntu VirtualBox on SSD
  4. Download demo user data from Yandex Public Shared folder (ZIP Archive 145MB)
  5. Extract zip file under /var/lib/clickhouse/user_files
    • unzip triaclick_demo_data.zip -d /var/lib/clickhouse/user_files/
  6. Create (default) Database for the demo database user, display databases
    • clickhouse-client --query="CREATE DATABASE DemoDB"
    • clickhouse-client --query="SHOW DATABASES"
  7. Backup Configuration Files
    • sudo mv /etc/clickhouse-server/config.xml /etc/clickhouse-server/config_old.xml
    • sudo mv /etc/clickhouse-server/users.xml /etc/clickhouse-server/users_old.xml
  8. Download New Configuration Files from my Yandex Public Shared folder
  9. Extract config files under /etc/clickhouse-server
    • unzip triaclick_config.zip -d /etc/clickhouse-server
  10. Restart ClickHouse Server
    • sudo service clickhouse-server restart
  11. ClickHouse Client login as user demo on database DemoDB
    • clickhouse-client -u demo --password demo -d DemoDB
  12. ClickHouse System Settings explicitly defined in the config or explicitly changed
    • SELECT name, value FROM system.settings WHERE changed

Step 5. MariaDB SetUp for TRIADB

  1. Login to mysql command shell as root
    • sudo mysql
  2. Add demo user with password demo with the following SQL command
    • GRANT ALL PRIVILEGES ON *.* TO 'demo'@'localhost' IDENTIFIED BY 'demo';
  3. Login to mysql command shell as user demo
    • sudo mysql -u demo -p
  4. Add a NEW databbase TRIADB
    • CREATE DATABASE DemoDB;
    • USE DemoDB;
    • CREATE TABLE Test (id int DEFAULT NULL);

Step 6. Python SetUp for TRIADB

  1. Create new link for Python3

    • sudo rm /usr/bin/python
    • cd /usr/bin
    • sudo ln -s python3.6 python
    • python -V
      • Python 3.6.7
  2. Install pip

    • sudo apt install python-pip
  3. Create Python Virtual Environment

    • sudo apt install python3-venv
    • python -m venv triadbenv
  4. Add the following line to .bashrc

    • source ./triadbenv/bin/activate
    • optional: change terminal/preferences/colours to Black on white for better visibility of iPython, jupyter console.
  5. optional: install geany lightweight GUI text editor for python source files

    • sudo apt install geany
  6. Install Extra Python3.6 libraries

    • sudo apt install python3-tk
    • sudo apt install python3-dev
    • sudo apt-get install python3.6-dev (requirement for psutil)
  7. Update pip and setuptools

    • pip install pip --upgrade
    • pip install setuptools --upgrade
  8. Install TRIADB Python Dependencies

    • pip install ipython
    • pip install jupyter
    • pip install pony
    • pip install pymysql
    • pip install pandas
    • pip install petl
    • pip install psutil
    • pip install clickhouse-driver

Step 7. Install TriaClick Binary Modules

Python binaries are distributed from HEALIS.EU
Unauthorized copying or distribution of these files, via any medium is strictly prohibited
(C) 2017-2019 HEALIS.EU, - All rights reserved
Written by Athanassios I. Hatzis hatzis@healis.eu

Step 8. Run TriaClick Tests

  • cd ~/triadbenv/lib/python3.6/site-packages/triaclick/test_release/
  • Open test_dmf_rebuild.py with a text/code editor e.g.
    • geany test_dmf_rebuild.py
  • Start jupyter console or ipython e.g.
    • jupyter console
  • Select all the content of the file and paste to the console
    • Your first output is an overview of TriaClick systems
  • Then add data resources and data models to TriaClick
    • Open and run in that order:
    • SPC_ALL_ETL.py
    • Physician_ETL.py
  • Finaly test associative filtering operations
    • Open and run in any order
    • _SPC_ALL_ASET_demo.py
    • _Physician_ASET_demo.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.