Age | Commit message (Collapse) | Author |
|
* cc_snappy: remove deprecated module
* cloud_tests: remove cc_snappy tests (and references)
This module was deprecated in favor of cc_snap in cloud-init v.18.2
|
|
Here we replace uses of the pyyaml module directly with functions
provided by cloudinit.safeyaml. Also, change/move
cloudinit.util.yaml_dumps
to
cloudinit.safeyaml.dumps
LP: #1849640
|
|
This enables warnings produced by pylint for unused variables (W0612),
and fixes the existing errors.
|
|
Support installing and configuring snaps on ubuntu systems. Now,
cloud-config files can provide a list or dictionary of snap:assertions
which will be allow configuration of snapd on a system via 'snap ack'
calls. The snap:commands configuration option supports arbitrary system
commands intended to interact with snappy's cli. This allows users to run
arbitrary snappy commands to create users, download, install and
configure snap packages and snapd.
This branch also deprecates old snappy and snap_config modules leaving
warnings in documentation and runtime for consumers of these modules.
Deprecated snap* modules will be dropped in cloud-init v.18.2 release.
|
|
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
|
|
This will change all instances of LOG.warn to LOG.warning as warn
is now a deprecated method. It will also make sure any logging
uses lazy logging by passing string format arguments as function
parameters.
|
|
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.
|
|
Ubuntu Core images use the `snap create-user` to add users to an
Ubuntu Core system. Add support for creating snap users by adding
a key to the users dictionary.
users:
- name: bob
snapuser: bob@bobcom.io
Or via the 'snappy' dictionary:
snappy:
email: bob@bobcom.io
Users may also create a snap user without contacting the SSO by
providing a 'system-user' assertion by importing them into snapd.
Additionally, Ubuntu Core systems have a read-only /etc/passwd such that
the normal useradd/groupadd commands do not function without an additional
flag, '--extrausers', which redirects the pwd to /var/lib/extrausers.
Move the system_is_snappy() check from cc_snappy module to util for
re-use and then update the Distro class to append '--extrausers' if
the system is Ubuntu Core.
|
|
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
|
|
Some of these really won't work to well on non-supporting
distros so to avoid further user pain tag this with the
supported distros where they should work.
|
|
|
|
|
|
|
|
|
|
When a user provides authentication tokens, enable SSH unless SSH has
been explicitly disabled (LP: #1494816).
|
|
|
|
|
|
It was believed that to install a package with config the command was:
snappy install --config=config-file <package>
Instead, what was implemented in snappy was:
snappy install <package> [<config-file>]
This modifies cloud-init to invoke the latter and changes the tests
appropriately.
LP: #1438836
|
|
|
|
|
|
On fspath installs, look for .config files harder.
Given a file named:
pkg.namespace_0.version_arch.snap
We'll search for config files named:
pkg.namespace_0.version_arch.config
pkg.namespace.config
pkg.config
|
|
|
|
|
|
|
|
the input to 'snappy config <packagename>' is expected to have
config:
<packagename>:
content:
So here we pad that input correctly. Note, that a .config file
on disk is not modified.
Also, we change 'configs' to just be 'config', to be possibly compatible
with the a future 'snappy config /' that dumped:
config:
pkg1: data1
pkg2: data2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
snappy: disable by default
this does 2 things actually
a.) disables snappy by default, and adds checks to filesystem to enable it
b.) removes the 'render2env' that was mostly spike code.
|
|
|