Skip to content
Platform > Dynamic Components

Dynamic Components Configuration

The properties on this page control where the components file lives, how often it is reloaded, and how transient components are created. All are set in a properties file, such as config/local.properties, and read at startup.

Overview

Component management works with no configuration: AmiCore generates data/ami.components on first boot and polls it every 5 seconds. The properties below override the file location, the poll interval, the directories a component may run in, and the transient-component settings.

The components file

ami.components.file

Default:
ami.components.file=data/ami.components

Description:
  • Path to the components file, relative to the AmiCore process working directory or absolute.
  • Persists runtime add and remove operations, so the estate returns as configured after a restart.
  • Maintained automatically as components are added and removed at runtime.

Note

The ami.components property, which once listed the component set at startup, is deprecated and is not present in the shipped defaults.properties. data/ami.components is the record.

Reload polling

ami.components.check.config.file.changes.period.ms

Default:
ami.components.check.config.file.changes.period.ms=5000

Description:
  • How often, in milliseconds, AmiCore polls the components file for changes and reloads any additions or removals.
  • This key is absent from the shipped defaults.properties, where the other properties on this page appear. The 5000 ms value is a built-in fallback, so searching the shipped configuration for the key finds nothing. Set it explicitly to change the interval.
  • Set to 0 to disable polling. With polling disabled, the components file is read only at startup, so an edit is not applied until the next restart. The file-monitor component is not started at all.
  • Read once at startup. A change to this value takes effect on the next start.

Restricting component directories

ami.component.allowed.dirs

Default:
ami.component.allowed.dirs=

Description:
  • A comma-separated list of directories within which a component's working directory (pwd) must reside.
  • A component whose working directory falls outside the list is rejected before it starts.
  • When unset, no directory restriction is applied.

Transient components

The following properties apply to transient components, the short-lived copies described in How it works.

ami.transient.components.dir

Default:
ami.transient.components.dir=./transient_components

Description:
  • The directory under which transient component copies are created.

ami.transient.components.retention

Default:
ami.transient.components.retention=10

Description:
  • The number of previous transient-component runs to keep as archives.
  • Set to 0 to delete a previous run without archiving it.

ami.transient.server.port.range

Default:
ami.transient.server.port.range=10000-15000

Description:
  • The range of ports from which a transient component takes unused ports for its own listeners.
  • Format is <start>-<end>, and the start must be less than the end.

What this does not support

The components file cannot override these properties for one component: it carries only name;type;pwd. Per-component settings, such as ports for a second component of the same type, are set in that component's own root.properties. See Managing components.