Release procedure

From Aquarium-Control
Revision as of 20:59, 29 July 2025 by Uwe (talk | contribs)
Jump to navigation Jump to search

Execution environment

Create lock file

Create the path and the lockfile, e.g. sudo touch /var/local/aquarium-ctrl.pid, as per configuration file. Assign access rights using chmod o+rw filename so that non-root user (during testing) can use the resources as well.

Create log file

Create the path and the logfile sudo touch /var/log/aquarium.log. Assign access rights using chmod o+rw filename so that non-root user (during testing) can use the resources as well.

Create output files on RAM disk

Create the path and the output files e.g., sudo touch /var/local/aquarium-ctrl/aquarium-ctrl-ts as stated in the .toml configuration file(s). Make sure the path yields to the RAM-disk. Assign access rights using chmod o+rw * so that non-root user (during testing) can use the resources as well.

Unit-testing on development machine

Run the unit tests using cargo test and analyse the results. Currently there are more than 150 unit tests which run in multiple threads. Testing takes multiple minutes. If all tests pass, proceed to next step.

Update version identifier

In Cargo.toml, update the version string.

Update database

The update version information needs to be inserted into the version-table of the database together with the hash of the executable. You can obtain the hash by running aquarium_control -v.

When you edit the database with the mysql terminal client, you proceed as following:

  • Select the database using use aquarium;
  • Display the current version information using select * from version;
  • Insert the new version information using insert into version values (0, 3, 0); - adapt major, minor and build number accordingly.

Compilation for testing on target hardware and OS

Run cargo build

Unit-testing on target hardware and OS

Create message queues

Testing with simulator

Analyse terminal output

StartupTerminalOutput.png:1000px

Observe RAM consumption

Compilation for production on target hardware and OS

Run cargo build --features "target_hw" --release. If you utilise the Controllino to actuate the relays, run cargo build --features "target_hw, controllino_hw" --release.

Note: The build takes several minutes on a Raspberry Pi.

Transfer the binary from target/release to your desired installation location, e.g. /usr/local/bin/.

Update of production configuration file

The default storage location of the configuration file is /etc/aquarium_control/config/aquarium_control.toml. If other command line parameter is provided, the program will default to this file. Ensure this file is updated with all entries as required by the control application. If any section or field is missing, the control application will not start up.

Transfer of binary and update of startup script

Documentation of release in repository