Event > List of events > Lifecycle events >
This document describes the
install event is emitted once per unit at the beginning of a charm’s lifecycle. Associated callbacks should be used to perform one-time initial setup operations and prepare the unit to execute the application. Depending on the charm, this may include installing packages, configuring the underlying machine or provisioning cloud-specific resources.
Therefore, ways to cause
install to occur are:
|Scenario||Example Command||Resulting Events|
- Typically, operations performed on
installshould also be considered for
- In some cases,
config-changedcan be used instead of
upgrade-charmbecause it is guaranteed to fire after both.
Observing this event in Ops
ops, you can observe this event like you would any other:
# in MyCharm.__init__ self.framework.observe(self.on.install, self._on_install)
install event object does not expose any specific attributes.
Last updated 5 months ago.