Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start moving away from search queries to static config items for cookbooks #22

Open
wants to merge 12 commits into
base: stable/sap/3.0
Choose a base branch
from

Conversation

vuntz added 11 commits March 27, 2017 14:30
The goal of this is to allow barclamps to export the relevant config
bits to data bag items, so that nodes that are either not part of this
proposal but need config from that barclamp or nodes that require info
about other nodes in this proposal, can simply load the data bag item.

We also cache the config to avoid loading it multiple times per run.

This will help reduce the amount of search queries that are done from
the clients to the chef server.

(cherry picked from commit 7857fc8)
There are more uses of search queries for the provisioner-server node,
but let's ignore that for now.

(cherry picked from commit 8d9265f)
This will be used when we need to load the config from the rails app (to
avoid looking at proposals).

(cherry picked from commit be281af)
When no instance is specified and we can't detect which one to use, then
try with "default", and if that doesn't work, find the first instance
that has an applied proposal for this barclamp.

This makes it possible to do something like Config.load("openstack",
"nova") without having to care what's the instance of the applied nova
proposal -- which is okay because there's only one applied proposal for
that barclamp.

(cherry picked from commit b6405c3)
(cherry picked from commit 2e65b51)
On installation, the data bag configuration is created before the admin
server gets allocated an IP address. So we need to deal with the case
where the node may not have an admin network in the code.

This also means we will need to regenerate the data bag configuration at
some point; this will be done in the install script, after we move the
admin server to hardware-installing.

(cherry picked from commit 3963959)
This allows us to use attr_accessor.

(cherry picked from commit e38e302)
This will be used when updating barclamps to forcefully regenerate the
configs, in order to avoid the need of reapplying a barclamp to get the
matching data bag item.

(cherry picked from commit 8a4fc7e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants