Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Add bundle-config option for deploying bundles. #7825
Conversation
| + | ||
| + fieldCheck := configCheck.Applications[appName] | ||
| + | ||
| + if _, set := fieldCheck["charm"]; set { |
babbageclunk
Sep 5, 2017
Member
This stuff's kind of messy and a bit gross - it seems like there should be a cleaner way that doesn't require you to know the mapping between attrs and yaml keys and do all the map overlaying, but I can't see what it would be.
| @@ -444,7 +448,7 @@ var ( | ||
| // charmOnlyFlags and bundleOnlyFlags are used to validate flags based on | ||
| // whether we are deploying a charm or a bundle. | ||
| charmOnlyFlags = []string{"bind", "config", "constraints", "force", "n", "num-units", "series", "to", "resource"} | ||
| - bundleOnlyFlags = []string{} |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://ci.jujucharms.com/job/github-merge-juju |
jujubot
merged commit 244574b
into
juju:2.2
Sep 5, 2017
1 check passed
continuous-integration/jenkins/pr-merge
This commit looks good
Details
howbazaar
deleted the
howbazaar:2.2-bundle-config
branch
Sep 5, 2017
This was referenced Sep 8, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
howbazaar commentedSep 5, 2017
This branch adds a --bundle-config option for the deploy command that allows the user to specify a config YAML file that is used to augment the bundle before any validation is called.
This allows people to have a standard bundle defined for generic deployment and have custom configuration of that bundle handled in a different file. The new include-file and include-base64 values for options and annotations are also allowed in the bundle-config YAML.
The contents of the bundle-config file currently matches the applications component of a normal bundle. Any values specified in the bundle-config will override the bundle values. The exception to this is maps, where the values are augmented.
This branch also refactors a few of the deploy tests for better clarity, and also removes the special resources suite as it was rerunning all the standard deploy tests.
QA steps
Create a file called
metrics.yamland have this content:Now create another file called
config.yamlwith this contents:And create a file called
scrape-jobs.yamlin the same directory as theconfig.yaml.Wait for deploy, then check the scrape-jobs settings of the prometheus application.
$ juju config prometheus scrape-jobsDocumentation changes
Yes, documentation will need to be updated for bundle deploys.