Hello everybody,
Chef integration into Foreman is going forward.
We are currently trying to design how should recipes and roles (the
run_list) should be managed by Foreman.
Obsviously the design of chef-server vs puppet ENC is quite differente and
force us to rethink how Foreman should associate cookbooks to a node.
For what I see, problems are :
- How to map current foreman objects (env, classes, hostgroups, smart
variables, global parameters, etc …) to chef objects (env, recipes (easy
one), roles, data bags) - As foreman can't be used directly with chef-client (as puppet does with
ENC) : how do we sync state between Foreman and Chef-Server.
For the second part, we may have 2 proposal for now and are looking for new
ideas and remarks.
-
We could have a one way sync Foreman => Chef-server. We could configure
nodes (add recipes, roles, etc) and when saving the host on Foreman, it
sends node's modifications on chef-server.
** Advantages :
=> Foreman remains source of truth
=> easier to implement as it keep some internal logic that is already
implemented
=> support and node definition complexity can be improved over time
** Drawbacks :
=> Users can't change anymore node state from knife or chef-webui -
We could consider chef-server as source of truth for configuration
management. Basicaly Foreman doesn't store the node state in DB.
It would use chef-server like knife does. When he needs to display a node
information he would do basicaly the same call as "knife node show" and
when he needs to edit it, a 'knife node edit". We may envisage a local
cache to minimize perf problems. This cache could be invalidated by a knife
plugin when node edited directly from knife.
** Advantages :
=> We don't break chef-server management with knife CLI
=> We have are sure to be consistent with chef-server about node state.
** Drawbacks :
=> Poor performances when displaying / editing nodes as we need to wait
for chef-server API
=> Harder to implement (I think ?)
The goal would be note to re-implement the whole chef-server logic on
Foreman.
I hope I didn't forget anything.
Any idea how this should be handled ?
Regards,
Romain / fitzdsl