How to redeploy¶
Because the osquery charm is stateless, redeploying it is straightforward: remove the application and deploy it again against the same principal. The agent re-enrolls with the osquery controller once its configuration is reapplied.
Capture the current configuration¶
Before removing the application, capture its configuration so you can reapply it:
juju config osquery > osquery-config-backup.yaml
Remove the existing application¶
Remove the osquery subordinate. This leaves the principal application untouched:
juju remove-application osquery
Deploy and integrate again¶
Deploy the charm again and integrate it with the same principal application:
juju deploy osquery
juju integrate <principal-application> osquery
Reapply the configuration¶
Reapply the configuration you captured earlier, including the controller settings, enrollment secret, and TLS certificates. See the advanced tutorial for the full set of options.
Confirm that the charm settles into an active state:
juju status --watch 2s