Age | Commit message (Collapse) | Author |
|
Create a schema object for the chef module and validate this schema in the handle function of the module.
Some of the config keys description, so I tried looking at the code and chef documentation to provide an information to the user. However, I don't know if I have the best description for all fields. For example, for the key show_time I could not find an accurate description of what it did, so I used what was in our code base to infer what it should do.
LP: #1858888
|
|
This was brought up in review of #416.
Makes sense to remove the local copy of "is this executable file".
|
|
This was painful, but it finishes a TODO from cloudinit/subp.py.
It moves the following from util to subp:
ProcessExecutionError
subp
which
target_path
I moved subp_blob_in_tempfile into cc_chef, which is its only caller.
That saved us from having to deal with it using write_file
and temp_utils from subp (which does not import any cloudinit things now).
It is arguable that 'target_path' could be moved to a 'path_utils' or
something, but in order to use it from subp and also from utils,
we had to get it out of utils.
|
|
Co-authored-by: Daniel Watkins <oddbloke@ubuntu.com>
|
|
|
|
Commit 6797e822959b84c98cf73e02b2a6e3d6ab3fd4fe replaced
the LOG.warn calls that linters were warning about; this
also replaces calls that linters would not have recognised
(as `log` is generally a parameter in these scenarios).
LP: #1508442
|
|
Encrypted data bags require a secrets file to be present to
decrypt, and the location of the file must be configured the
Chef client configuration file, client.rb.
This update enables cloud-init's chef module to update that
setting in client.rb.
LP: #1817082
|
|
Most users of chef will want to pin the version that is installed.
Typically new versions of chef have to be evaluated for breakage etc.
This change proposes a new optional `omnibus_version` field to the chef
configuration. The changeset also adds documentation referencing the new
field.
LP: #1462693
|
|
During boot, the usage of /tmp is not safe. In systemd systems,
systemd-tmpfiles-clean may run at any point and clear out a temp file
while cloud-init is using it. The solution here is to use
/run/cloud-init/tmp.
LP: #1707222
|
|
- Updated to standard chef.io url
- Removed the port 4000, due to that has been deprecated
- Added Note about the run_list not being required
Signed-off-by: JJ Asghar <jj@chef.io>
|
|
Omnibus installation of chef was broken under python3.
LP: #1583837
|
|
This has been a recurring ask and we had initially just made the change to
the cloud-init 2.0 codebase. As the current thinking is we'll just
continue to enhance the current codebase, its desirable to relicense to
match what we'd intended as part of the 2.0 plan here.
- put a brief description of license in LICENSE file
- put full license versions in LICENSE-GPLv3 and LICENSE-Apache2.0
- simplify the per-file header to reference LICENSE
- tox: ignore H102 (Apache License Header check)
Add license header to files that ship.
Reformat headers, make sure everything has vi: at end of file.
Non-shipping files do not need the copyright header,
but at the moment tests/ have it.
|
|
This adds lots of config module documentation in a standard format.
It will greatly improve the content at readthedocs.
Additionally:
* Add a 'doc' env to tox.ini
* Changed default highlight language for sphinx conf from python to yaml
most examples in documentation are yaml configs
* Updated datasource examples to highlight sh code properly
|
|
Now, validation_key is always a path to a file, as it is in
chef's client.rb syntax.
validation_cert is always the *content* of that file that should
be written. However, if validation_cert is the string "system",
then we do not write that value, but rather assume the file exists.
LP: #1568940
|
|
|
|
Now, validation_key is always a path to a file, as it is in
chef's client.rb syntax.
validation_cert is always the *content* of that file that should
be written. However, if validation_cert is the string "system",
then we do not write that value, but rather assume the file exists.
LP: #1568940
|
|
Installation from gems was previously always broken. This
fixes the order or parameters calling install_chef_from_gems.
LP: #1553345
|
|
- Remove str() wrappers to second argument to write_files() where it is no
longer necessary.
Also: Fixed a couple of other octal literals which clearly weren't being
tested.
|
|
|
|
This is minor change which uses the new Chef (company) top
level domain for grabbing the Omnibus installation shell script.
|
|
|
|
|
|
|
|
|
|
For those who run chef in non-daemon mode, they would like to delete
the validation.pem file if chef finishes as expected to remove that file
from existing in an easy to read manner.
|
|
The keys 'server_url' and 'validation_name' were
previously mandatory, we should retain that behavior
for now.
|
|
|
|
Standardize on using the chef_cfg key 'exec' which can be used
when installing to tell the caller to run the chef client or can
also be used if the client is already installed and its requested
to be ran.
To retain existing behavior 'exec' does not by default assume to
be true, unless explicitly provided or a gems mode install is
requested.
|
|
|
|
|
|
When the template provides a path, make sure that before the
template is written that the path that is now in the template
has the associated directory created (if not already created).
|
|
|
|
|
|
|
|
|
|
Instead of only running the client when installed from gems, allow it
to be ran from other install modes as well (if configured) and allow the
arguments that are passed to the client when ran to be altered (if so
desired).
|
|
- Use the generated_by() utility function to
give the ruby template a better header comment
- Set special parameters after selecting the basic
chef parameters.
|
|
- Make a helper function to tell if already installed.
- Have the install routine not run chef after installed
but have it instead return a result to tell the caller
to run the chef program once completed.
|
|
|
|
Add the following adjustments to the chef template and module
- Make it so that the chef directories can be provided (defaults
to the existing directories)
- Make the params much more configurable, and if a parameter is
provided in the chef configuration it will override existing template
parameters.
- Make the template skip lines if the values are None in the configuration
so that template lines can be removed if/when this is desirable.
- Allow the firstboot json path to be configurable (defaults to the
existing location).
- Adds a basic set of tests to ensure that good things are happening.
|
|
|
|
Fixed all complaints from running "make pep8". Also version locked
pep8 in test-requirements.txt to ensure that pep8 requirements don't
change without an explicit commit.
|
|
UrlResponse
|
|
Thanks to Anatoliy Dobrosynets
|
|
1. Remove the usage of the path.join function
now that all code should be going through
the util file methods (and they can be
mocked out as needed).
2. Adjust all occurences of the above join
function to either not use it or replace
it with the standard os.path.join (which
can also be mocked out as needed)
3. Fix pylint from complaining about the
tests folder 'helpers.py' not being found
4. Add a pylintrc file that is used instead
of the options hidden in the 'run_pylint'
tool.
|
|
a. Instead of executing a bash string, write out a temporary file
and then just execute '/bin/sh' on that file with the right arguments instead.
2. Rename util.SilentTemporaryFile to util.ExtendedTemporaryFile and update the usages
of the previous name accordingly, this better reflects what this temp file is.
3. More teenie pep8 line length fixings
|
|
|
|
2. Fixing up more cloud.path.joins found to use the right ro/rw filename
|
|
|
|
some protection against module name collisions when importing.
|