πŸ•―οΈ Core Concepts
File System Layout

File System Layout

You do not have to use Ivy with the software update feature! Hence, you could just keep it inside a single x.y.z folder and git pull your changes.

Local Directory layout

πŸ“‚ ~/Documents
+--- πŸ“‚ ivy
     +--- πŸ“‚ 1.1.0
     |    +--- πŸ“‚ data
     |    +--- πŸ“‚ .venv
     |    +--- πŸ“‚ config
     |    |    +--- πŸ“„ config.json
     |    +--- πŸ“„ pyproject.toml
     |    +--- πŸ“„ cli.py
     +--- πŸ“‚ 1.1.1
     |    +--- πŸ“‚ data
     |    +--- πŸ“‚ .venv
     |    +--- πŸ“‚ config
     |    |    +--- πŸ“„ config.json
     |    +--- πŸ“„ pyproject.toml
     |    +--- πŸ“„ cli.py
     +--- πŸ“„ ivy-cli.sh

You can switch the name ivy to your DAS name in src/constants.py (the NAME constant), which will be used for all the paths described here.

The file ivy-cli.sh will point to the currently active version of the DAS. You have to write it once when setting up the node, but after that, the update procedure will switch this pointer when a new version is accepted. It looks like this:

#!/bin/bash
set -o errexit
 
~/Documents/ivy/x.y.z/.venv/bin/python ~/Documents/ivy/x.y.z/cli.py $*

Starting/Stopping Ivy Automatically

To make sure the automation starts up every time it is not running, add a crontab that starts it every minute:

* * * * * ~/Documents/ivy/ivy-cli.sh start

The ivy-cli.sh start command doesn't do anything when any automation version is already running.