Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Deployment

...

Python is generally not a compiled language, however we wish to create a portable binary file for use on our Linux servers. To accomplish this, we use the tool pyinstaller.

Compile the iktool as follows:Required only at the first time the virtual env is created

  1. Create a directory for your virtual environment

  2. Create a virtual environment and activate it (only need to create it the first time you compile)
    virtualenv -p python3 ~/virtualenv/iktool

  3. Activate the virtual environment
    source ~/virtualenv/iktool/bin/activate

  4. Install the dependencies from requirements.txt in
    pip3 install -r ~/<your_path>/indeni-knowledge/scripts/iktool.deploy as follows pip3 install -r /requirements.txt(again, only necessary the first time you compile)

  5. Install pyinstaller with the command
    pip3 install pyinstaller
    (Only necessary on first compilation)Compile the iktool with the command pyinstaller

  6. deactivate

iktool compilation

  1. source ~/virtualenv/iktool/bin/activate

  2. Compile
    pyinstaller ~/indeni-knowledge/scripts/iktool.deploy/iktool.py -F
    This will create a single executable file stored in the folder dist/Run this binary, if Compiled file is located in /Users/<username>/dist/iktool

Run iktool --help.
If the usage is printed, the compilation was successful.

...

Examples

  1. Config file (for running workflow/block on real device)

...