问题
How many juju charms hooks files are there ? what are they important ?
Can anyone please explain about how the juju charms hooks files working ?
what are the orders to be executed ?
Explain about life-cycle about juju charms hooks ?
回答1:
Hooks are simple scripts called during the lifecycle of a service. They are triggered either by commands run (like "deploy") or events (like a relation with another service going down).
All hooks are optional, but they are the points where you take control of what the charm actually needs to do.
To me it seems strange that a complete lifecycle graph is not available, so I created one below from what I understand:
Note that this is gathered by just reading the docs, it might not correspond 100% with how the actual code is run.
来源:https://stackoverflow.com/questions/25157039/explain-about-how-the-juju-charms-hooks-files-working-life-cycle