Skip to content

Latest commit

 

History

History
266 lines (191 loc) · 8.84 KB

Installation.md

File metadata and controls

266 lines (191 loc) · 8.84 KB

◀️ | ▶️

DemoSystem Installation

DemoSystem prerequisites

Operating system

DemoSystem can be run on Linux, Windows or MacOS operating systems.

Compatibility libraries

In case of 64 bit Linux operating system, 32 bit compatibility libraries might need to be installed. For example:

  • lib32z1 on Ubuntu
  • zlib.i686 on Fedora

✅ Note:

Our test runs on 'fresh' installation of openSuse 12.3 worked without need for any additional packages.

Kdb+ studio

Instructions in Lessons relay on checking data or status of kdb+ processes, therefore, IDE for kdb+ is required (e.g. http://code.kx.com/wiki/StudioForKdb+). Connection might need to be established from localhost (e.g. when both kdb+ studio and enterprise-components are deployed locally) or over TCP (e.g. enterprise-components on workstation, kdb+ studio on user’s desktop).

Kdb+

DemoSystem package does not contain q binaries. There are following two options for the deployment:

  1. Install q binaries in the bin/q/ subdirectory [Recommended]

    It is recommended to install q binary into bin/q/ subdirectory. In this case bin directory will contain entire software set required to run the system. It will be independent from other installations on the same server. Each ec-based system running on the same machine will have own, independent version of q.

  2. Use q that is already installed on the system

    Second option is to use q that is already installed on the system and available on the PATH. QHOME and PATH environmental variables have to be adjusted accordingly in env.sh (env.bat on Windows) file for each Lesson.

❗ Note:

Kdb+ binaries can be downloaded from:

DemoSystem installation

  1. Download and unpack package ec_vX.X.X_DemoSystem_Linux32bit_Lessons_X-X.tgz

    > tar zxvf ec_vX.X.X_DemoSystem_Linux32bit_Lessons_X-X.tgz

    On Windows download and unpack the package ec_vX.X.X_DemoSystem_Win32_Lessons_X-X.zip

    > unzip ec_vX.X.X_DemoSystem_Windows32bit_Lessons_X-X.zip
  2. [Optional step] Download FREE 32bit KDB+ or LICENSED 64bit KDB+ matching the operating system and unpack the package.

    On Linux download and unpack the package linux.zip into DemoSystem/bin/q/ subdirectory.

    > cd DemoSystem
    DemoSystem> unzip linux.zip -d bin

    On Windows download and unpack the package windows.zip into DemoSystem/bin/q/ subdirectory.

    > cd DemoSystem
    DemoSystem> unzip windows.zip -d bin

    ❗ Note:

    Downloaded q package normally contains q/ subdirectory. The result of unpacking should be as follows:

    DemoSystem> ls bin/q/
      l32/
      q.q
      q.k
      README.md
      README.txt
      [...]

    On Windows, use the dir command.

    ❗ Note:

    Alternatively use own, pre-installed q executable that is available on the PATH with QHOME pointing to q installation location.

  3. Create link to configuration for LessonXX

    > cd DemoSystem
    DemoSystem> ln -s bin/ec/tutorial/LessonXX/etc

    The corresponding commands for Windows are

    > cd DemoSystem
    DemoSystem> mklink /J etc bin\ec\tutorial\Lesson01\etc
  4. Check if etc folder is linked to correct Lesson

    DemoSystem> ls -l etc
      etc -> bin/ec/tutorial/LessonXX/etc

    Use the dir command on Windows.

  5. After installation DemoSystem directory should contain bin directory and etc symbolic link

    DemoSystem> ls -l
      bin
      etc -> bin/ec/tutorial/LessonXX/etc/
      Installation.md
      README.md
      Troubleshooting_linux.md
      Troubleshooting_windows.md

Troubleshooting

Common installation problems with solutions for linux and for windows.

DemoSystem startup

  1. Source environment

    DemoSystem> source etc/env.sh

    On Windows one needs to run

    DemoSystem> etc\env.bat
  2. Start all components in the system (restart command is used just in case the system was already running)

    DemoSystem> yak restart \*
      Stopping components...
        core.gen                      	Skipped
        core.tick                     	Skipped
        core.rdb                      	Skipped
      Starting components...
        core.gen                      	OK
        core.tick                     	OK
        core.rdb                      	OK
  3. Check if all components are running

    DemoSystem> yak info \*
      uid                pid   port  status      started             stopped            
      ----------------------------------------------------------------------------------
      core.gen           11235 17009 RUNNING     2014.05.08 07:36:18                    
      core.rdb           11247 17011 RUNNING     2014.05.08 07:36:19                    
      core.tick          11241 17010 RUNNING     2014.05.08 07:36:18                    
  4. Check if data and log directories were created

    DemoSystem> ls -l
      bin
      data
      etc -> bin/ec/tutorial/LessonXX/etc/
      log
      readme.txt
      troubleshooting.txt

    On Windows, use the dir command.

Changing DemoSystem Lesson

Folder structure for data and log directories remains the same for all Lessons, therefore it is enough to change configuration pointer (symbolic link) to change the Lesson.

If you would like to start with fresh set of data and log directories - these can be removed while the system is stopped.

❗ Note:

Make sure that system is really stopped before deleting these directories, otherwise yak will lose its connection details resulting in error described in Issue 4.

  1. Stop the system

    DemoSystem> yak stop \*
      Stopping components...
        core.gen                        OK
        core.tick                       OK
        core.rdb                        OK
  2. Remove link to configuration for LessonXX

    DemoSystem> ls -l etc
      etc -> bin/ec/tutorial/LessonXX/etc/
    DemoSystem> rm etc

    On Windows, do

    DemoSystem> rmdir etc
  3. Create link to configuration for LessonYY

    DemoSystem> ln -s bin/ec/tutorial/LessonYY/etc
    DemoSystem> ls -l etc
      etc -> bin/ec/tutorial/LessonYY/etc/

    On Windows:

    DemoSystem> mklink /J etc bin\ec\tutorial\LessonYY\etc
  4. Start the system again

    DemoSystem> yak start \*
      Starting components...
        core.gen                        OK
        core.tick                       OK
        core.rdb                        OK

◀️ | ▶️