|
|
All guardian code is archived in individual git repositories for each node. The code is committed to the archive every time a node is restarted, or when the LOAD button is pressed.
|
|
|
Guardian has the ability to archive all user code into git code archives. This is a good way to track exactly what code was loaded and running at any point in time. When setup, each guardian node will commit it's user code into a system-specific git repository every time the node is restarted or when the LOAD button is pressed. A `guardutil` interface allows for easy access to the archives.
|
|
|
|
|
|
The `guardutil archive-clone` command can be used to clone the code repositories, to inspect the guardian user code that was running at any point in time.
|
|
|
## setup
|
|
|
|
|
|
If no directory is provided a gui interface will be displayed for visual inspection of each commit in the repository. If a directory is provided the full archive will be cloned:
|
|
|
The only thing you need to do to start using guardian code archives is to set aside a directory for the archives, and then communicate it to guardian via the `GUARD_ARCHIVE_ROOT` environment variable:
|
|
|
```shell
|
|
|
GUARD_ARCHIVE_ROOT=/path/to/guardian/archive
|
|
|
```
|
|
|
If that variable is defined then the archives will be created and used. Each individual node archive will show up as a sub-directory of the root, i.e. the archive of the FOO system ("guardian FOO") will show up in archive root at /path/to/guardian/archive/FOO.
|
|
|
|
|
|
## archive viewing
|
|
|
|
|
|
The `guardutil archive-clone` command can be used to clone the code repositories, to inspect the guardian user code that was running at any point in time. It uses the same GUARDIAN_ARCHIVE_ROOT environment variable to find the appropriate archive path.
|
|
|
|
|
|
If no directory is provided a gui interface will be displayed for visual inspection of each commit in the repository (actually just [gitk](https://git-scm.com/docs/gitk)). If a directory path argument is provided the full archive will be cloned in that directory:
|
|
|
```shell
|
|
|
jameson.rollins@opsportal:~ 0$ guardutil archive-clone ISC_LOCK tmp/
|
|
|
jameson.rollins@opsportal:~ 0$ cd tmp/ISC_LOCK/
|
... | ... | |