charm layers hooks/install, how are they "merged"?

fengxia fxia1 at lenovo.com
Fri Aug 11 02:02:39 UTC 2017


Hi Juju,

I'm building a charm by including two layers in layer.yaml:

includes:
   - 'layer:basic'
   - 'layer:pylxca'

Pylxca is a library I packaged into a "layer" format for reuse.

Both layers have a folder called "hooks", and each has a hook called 
"install". The curious result is that after `charm build`, the pylxca's 
install hook is the one in dist.

So my question now is, if I want to use layers, and each layer defines 
its own hooks so to help its implementation, how does `charm build` 
handle them? Are they merged? From this test, only the last one will 
survive. If so, does it mean only one layer can define hooks?


-- 
Feng xia
Engineer
Lenovo USA

Phone: 5088011794
fxia1 at lenovo.com
  	
Lenovo.com
Twitter | Facebook | Instagram | Blogs | Forums




More information about the Juju mailing list