mc_cloud / cloud registries & functions

mc_states.modules.mc_cloud.default_settings()

makina-states cloud global configuration options

pvdir
salt cloud providers directory
pfdir
salt cloud profile directory
bootsalt_branch
bootsalt branch to use (default: master or prod if prod)
bootsalt_args
makina-states bootsalt args in salt mode
keep_tmp
keep tmp files
ssh_gateway (all the gw params are opt.)
ssh gateway info
ssh_gateway_port
ssh gateway info
ssh_gateway_user
ssh gateway info
ssh_gateway_key
ssh gateway info
ssh_gateway_password
ssh gateway info
is

mapping with various informations

controller
is this minion a cloud controller
compute_node
is this minion a cloud compute node
vm
is this minion a cloud operating vm
mc_states.modules.mc_cloud.ext_pillar(id_, prefixed=True, ttl=32140800, *args, **kw)

Makina-states cloud extpillar

NOTE
This ext pillar is responsible for taking care of exposing other nodes configuration to a particular node if we have configured this via the expose/expose_limited settings
expose/exposed

list of vm or compute nodes which will have full access to the vm infos in via ext_pillar

  • expose mean give access to other vm conf
  • exposed mean take acces on other vm conf
expose_limited/exposed_limited

dict of vm or compute nodes which will have access to the vm infos via the ext_pillar Here sensitive info may be filtered, for now, nothing is implememted and we give full for now.

Levels are(only full is really implemented):

full
full access to conf
light
all conf but passwords or sensitive
network
network conf only

example of pilar conf settings in database.yaml:

cloud_vm_attrs:
myvm:
expose_limited:
other_vm0: full other_vm1: network other_vm2: password mynode: full
cloud_cn_attrs:
mynode:
expose_limited:
other_vm1: full other_vm2: network other_node: password

This can be accessed client side via mc_cloud.settings/expositions

salt-call mc_cloud.settings -> expositions / vms or cns
mc_states.modules.mc_cloud.extpillar_settings(id_=None, ttl=32140800, *args, **kw)

return the cloud global configuation

mc_states.modules.mc_cloud.gather_expositions(ttl=32140800)

Merge expositions amongst CN & VM settings as a vm can also be a compute node itself

mc_states.modules.mc_cloud.settings(ttl=60)

Global cloud configuration