Migrate from System Monitor to Fridge#

OrangeQS Juice renamed the system_monitor service and Python package to fridge. Your existing installation continues to work after you upgrade: every renamed item has a backward-compatible fallback, and each fallback logs a deprecation warning. You do not have to act immediately, but plan to migrate soon, since a future release will remove the fallbacks.

Complete the migration#

Each step below stops one deprecation warning. Do the steps that apply to your setup, then restart.

1. Rename your service entry and InfluxDB bucket in orchestration.toml#

# Before
[services.system-monitor]
entrypoint = "orangeqs.juice.system_monitor._service:SystemMonitorService"

[influxdb2.buckets.system_monitor]
name = "system_monitor"

# After
[services.fridge]
entrypoint = "orangeqs.juice.fridge._service:FridgeService"

[influxdb2.buckets.service-fridge]
name = "service-fridge"

(If your service entry already uses a different name, rename it to fridge and update entrypoint the same way.)

The service-fridge bucket is new: sudo juice install (step 5) creates it, but does not move data out of the old system_monitor bucket. New readings go to service-fridge; your existing history stays in system_monitor unless you export and re-import it yourself with InfluxDB’s own tools.

2. Rename your configuration files#

Find these files in your lab repository’s config folder, or in /etc/juice/config, and rename each one you find:

mv system-monitor.toml fridge.toml
mv mock-system-monitor.toml mock-fridge.toml
mv system-monitor-dashboard.toml fridge-monitor-dashboard.toml

3. If you maintain a custom hardware backend using init_module#

Skip this step if you use the built-in mock backend. It only applies if you wrote your own init_module script: the entrypoint script that runs inside the service’s kernel and constructs your backend object.

FridgeService finds your backend by looking, by name, for a variable in that kernel namespace. Your script must bind that variable as fridge, not system_monitor:

# Before, in your init_module script
system_monitor = MyFridgeApp(...)

# After
fridge = MyFridgeApp(...)

Also update any imports:

# Before
from orangeqs.juice.system_monitor import ...

# After
from orangeqs.juice.fridge import ...

Consider replacing init_module with the application_class method instead: see Writing a Custom Fridge Backend.

4. Remove the service-name override, if you added one#

After step 1, delete this line from fridge-monitor-dashboard.toml if it’s there:

# Before
service_name = "system-monitor"

# After
# (delete the line: "fridge" is now the default)

5. Apply your changes#

sudo juice install --restart

Background: what still works automatically#

This section is informational: read it if you want to understand the fallbacks, not to complete the migration.

  • Python imports and entrypoint strings. The orangeqs.juice.system_monitor package still exists, as a thin alias package. Your orchestration.toml file can still use the entry entrypoint = "orangeqs.juice.system_monitor._service:SystemMonitorService". This fallback does not currently log a warning; a later release will add one back before the fallback itself is removed.

  • Configuration file names. fridge, mock-fridge.toml, and fridge-monitor-dashboard.toml look for the old file name if they cannot find the new one. For example, the system can still read an existing system-monitor.toml file. This fallback logs a DeprecationWarning.

  • Custom init_module scripts. The task handlers in FridgeService look for a fridge variable in the kernel namespace. If your init_module script still binds a system_monitor variable instead, the task handlers use that variable. This fallback logs a DeprecationWarning.

  • Dashboard service name. fridge-monitor-dashboard.toml::service_name defaults to "fridge". If it’s read from a not-yet-renamed system-monitor-dashboard.toml that doesn’t set it explicitly, it falls back to "system-monitor" instead, so it keeps addressing a service entry you haven’t renamed in orchestration.toml. This fallback logs a DeprecationWarning. It stops applying as soon as you rename the file to fridge-monitor-dashboard.toml (step 2) - do that only after renaming your service entry (step 1), or set service_name explicitly first.

A DeprecationWarning message, where noted above, tells you what to change. The system sends this message through Python’s warnings module and through your service’s logger.