| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Otherwise, this is results in some weird contention with systemd
default service and cloud-init.service doesn't start at random
intervals on Photon OS.
|
|
|
|
|
|
|
| |
This commit adds Rocky Linux, AlmaLinux, CloudLinux, EuroLinux, Miracle
Linux, and Virtuozzo to the is_rhel list. Recent downstream patch from
Red Hat causes issues with RHEL derivatives with the cloud.cfg template,
which leads to derivatives having to make small changes to bring back
expected functionality.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cc_ntp: add support for BSDs
*BSDs have ntpd installed in base the base system
This PR extends cc_ntp to add support for ntpd,
openntpd, and chrony on the FreeBSD, and OpenBSD.
To make tests pass, we ensure that we are mocking functions,
not entire classes.
Co-authored-by: Ryan Harper <rharper@woxford.com>
Co-authored-by: James Falcon <james.falcon@canonical.com>
Sponsored by: FreeBSD Foundation
LP: #1990041
|
|
|
|
| |
Also add schema entries for the base config modules lists that can be
overridden with user data.
|
|
|
|
|
|
|
|
|
| |
We have a couple of bugs where centos does not have the default user as rhel.
This PR makes sure the configuration is exactly the same.
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
RHBZ: 2115565
RHBZ: 2115576
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Wireguard module provides a dynamic interface for
configuring Wireguard (as a peer or server).
This module takes care of:
- writing interface configuration files
- enabling and starting interfaces
- installing wireguard-tools package
- loading wireguard kernel module
- executing readiness probes
The idea behind readiness probes is to ensure
Wireguard connectivity before continuing the cloud-init
process. This could be useful if you need access to
specific services like an internal APT Repository Server
(e.g Landscape) to install/update packages.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The intended purpose of this commit is to augment cloud-init's
configuration capabilities during boot. This allows users
to run ansible playbooks against the local node as part of
the boot order. Current Ansible workflows on nodes booted
by cloud-init requires waiting for the booted node before
running the playbook against the online node from the external
control node. In the current state this could potentially
be automated to using phone-home or runcmd modules, however
neither of these options provides an obvious solution for
integration and both require an external service to operate.
This module enables users to seamlessly integrate cloud-init
and Ansible auto-configuration during boot using ansible-pull,
a less common mode of operation that differs from the normal
mode of operation by installing Ansible locally and running a
playbook pulled from a VCS repository.
Expected future work in this module includes an option to
configure management nodes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support overriding network activators in cloud.cfg system_info
on disk.
Default cloud-init activators are used either during hot-plug or
for datasources that are detected during init-network stage when
basic networking has already been setup by the OS.a
Activators are discovered in the following priority order and
determined based on the presence of related network tools:
system_info:
network:
activators: [eni, netplan, network-manager, networkd]
On some systems where multiple network config tools are installed
it is necessary to override the priority order of detection to ensure
one activator is chosen over the other. This is done by providing
the a custom cloud config snippet in a /etc/cloud/cloud.cfg.d/*cfg.
Surface configured Distro.network_activator from system_info
so that the hotplug hook has visibility to the configured
distribution network activator during interface bring_up and
tear_down.
Add typing hints to net.activators search_activator and
select_activator functions.
LP: #1958377
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New top-level "autoinstall" key can be provided in #cloud-config
user-data to support both Ubuntu live-server(subiquity) and
live-desktop(ubuntu-desktop_installer).
When "autoinstall" config directive is present:
- validate minimal schema is supported (mandatory version key)
- warn and skip autoinstall configuration if no autoinstaller snap
is present on the system
The live-desktop and live-server installer both provide deep
validation of autoinstall config schema so cloud-init does not have
to.
Minimally we want to error loudly and set cloud-init status to
'error' state by raising a hard SchemaValidationError when
autoinstall config is inoperable.
This additional config schema validation is necessary because
current schema validation errors are only emitted as warnings which
can be easily disregarded.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cloud-init clean command provides a run-parts /etc/cloud/clean.d
directory to allow third party apps to deliver supplemental cleanup
scripts to aid in golden image creation.
Any executable scripts in /etc/cloud/clean.d will be run in
lexicographical order via subp.runparts.
This aids customers creating golden images, where the typical process
an image creator performs is to reset cloud-init on that system so
the next boot of this cloned image will be treated as first-boot and
perform all early system configuration.
|
|
|
|
|
|
|
|
|
|
| |
User feedback on the initial OpenMandriva support patch was that
it works great, but it's too easy to mistype the overly long
username.
Shorten it to omv -- this is also consistent with what we do
on PinePhone.
Signed-off-by: Bernhard Rosenkränzer <bero@lindev.ch>
|
|
|
| |
Signed-off-by: Bernhard Rosenkränzer <bero@lindev.ch>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is adapted from Neal Gompa's PR:
https://github.com/canonical/cloud-init/pull/1435
The only difference is that we are not modifying renderers.py (thus
modifying the priority of all distros), but just tweaking cloud.cfg to
apply this change to Fedora and RHEL. Other distros can optionally
add themselves afterwards.
net: Prefer Netplan and NetworkManager renderers by default
NetworkManager is used by default on a variety of Linux distributions,
and exists as a cross-distribution network management service.
Additionally, add information about the NetworkManager renderer to
the cloud-init documentation.
Because Netplan can be explicitly used to manage NetworkManager,
it needs to be preferred before NetworkManager.
This change is a follow-up to #1224, which added the native
NetworkManager renderer.
This patch has been deployed on Fedora's cloud-init package throughout
the development of Fedora Linux 36 to verify that it works.
This should also make it tremendously easier for Linux distributions
to use cloud-init because now a standard configuration is supported
by default.
Signed-off-by: Neal Gompa <ngompa13@gmail.com>
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So far RHEL had its own custom .service and cloud.cfg files,
that diverged from upstream. We always replaced the generated files
with the ones we had.
This caused only confusion and made it harder to rebase and backport
patches targeting these files.
At the same time, we are going to delete our custom downstream-only files
and use the ones generated by .tmpl.
The mapping is:
config/cloud.cfg.tmpl -> rhel/cloud.cfg
systemd/* -> rhel/systemd/*
Such rhel-specific files are open and available in the Centos repo:
https://gitlab.com/redhat/centos-stream/src/cloud-init
With this commit, we are also introducing modules in cloud.cfg that
were not in the default rhel cfg file, even though they should already
have been there with previous rebases and releases.
Anyways such modules support rhel as distro, and
therefore should cause no harm.
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
RHBZ: 2082071
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
upstream cloud-init not longer publishes to distribution
versions which support upstart.
Trusty has not been receiving cloud-init updates since
0.7.5 and Xenial stopped getting updates as version 21.1.
Even though Ubuntu Xenial's default init system is systemd
there was still an option for folks to launch amd maintain
images which relied on upstart. Now that Xenial no longer has
updates from upstream cloud-init we can drop all upstart
support.
Old Fedora and RHEL releases which use upstart are also not
receiving cloud-init updates from tip of main.
|
|
|
|
|
|
|
|
|
| |
* cc_emit_upstart (removal)
* cc_fan
* cc_final_message
* cc_foo
* cc_growpart
* cc_grub_dpkg
* cc_install_hotplug
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a new module to allow setting keyboard layout,
for use-cases in which cloud-init is used to configure
OS images meant for physical computers instead
of the cloud.
This initial release only implements support
for Linux distributions that allow layout to be
set through systemd's localectl.
LP: #1951593
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This commit removes automatically installing udev rules for hotplug
and adds a module to install them instead.
Automatically including the udev rules and checking if hotplug was
enabled consumed too many resources in certain circumstances. Moving the
rules to a module ensures we don't spend extra extra cycles on hotplug
if hotplug functionality isn't desired.
LP: #1946003
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The main idea is to introduce a second module that takes care of
writing files, but in the 'final' stage.
While the introduction of a second module would allow for choosing
the appropriate place withing the order of modules (and stages),
there is no addition top-level directive being added to the cloud
configuration schema. Instead, 'write-files' schema is being extended
to include a 'defer' attribute used only by the 'write-deffered-files'
modules.
The new module 'write-deferred-files' reuses as much as
possible of the 'write-files' functionality.
|
|
|
| |
openEuler Homepage: https://www.openeuler.org/en/
|
|
|
| |
https://www.cloudlinux.com/
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently cloud-init generates fallback network config on various
scenarios.
For example:
1. When no DS found
2. There is no 'network' info given in DS metadata.
3. If a DS gives a network config once and upon reboot if DS doesn't
give any network info, previously set network data will be
overridden.
A newly introduced key in cloud.cfg.tmpl can be used to control this
behavior on PhotonOS.
Also, if OS comes with a set of default network files(configs), like in
PhotonOS, cloud-init should not overwrite them by default.
This change also includes some nitpicking changes of reorganizing few
config variables.
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
|
|
|
| |
Virtuozzo Linux is a distro based off of CentOS 8, similar to Alma Linux and Rocky Linux.
|
|
|
|
|
|
|
|
| |
Minor fixes in networkd renderer & fixed corresponding tests
Removed datasource_list for Photon from cloud.cfg.tmpl & added a comment
in cloud.cfg.tmpl about not to use multiline array for datasource_list.
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
|
|
|
|
|
| |
Also added a new (currently experimental) systemd-networkd renderer,
and includes a small refactor to cc_resolv_conf.py to support the
resolved.conf used by systemd-resolved.
|
|
|
|
|
|
|
| |
- Mostly based on FreeBSD, the main exception is that
`find_devs_with_on_freebsd` does not work.
- Since we cannot get the CDROM or the partition labels,
`find_devs_with_on_dragonflybsd()` has a more naive approach and
returns all the block devices.
|
|
|
|
| |
Rocky Linux is a RHEL-compatible distribution so all changes that have
been made should be trivial.
|
|
|
| |
AlmaLinux OS is RHEL-compatible so all the changes needed are trivial.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reliable Scalable Cluster Technology (RSCT) is a set of software
components that together provide a comprehensive clustering
environment(RAS features) for IBM PowerVM based virtual machines. RSCT
includes the Resource Monitoring and Control (RMC) subsystem. RMC is a
generalized framework used for managing, monitoring, and manipulating
resources. RMC runs as a daemon process on individual machines and needs
creation of unique node id and restarts during VM boot.
LP: #1895979
Co-authored-by: Scott Moser <smoser@brickies.net>
|
|
|
|
|
|
|
|
| |
Add new module cc_apk_configure for creating Alpine /etc/apk/repositories file.
Modify cc_ca_certs, cc_ntp, cc_power_state_change, and cc_resolv_conf for Alpine.
Add Alpine template files for Chrony and Busybox NTP support.
Add Alpine template file for /etc/hosts.
|
|
|
|
| |
* Add update_etc_hosts as default module on *BSD
* Set preference of IPv6 over IPv4 in FreeBSD /etc/hosts
|
|
|
|
| |
On a system with a non-utf8 default locale, the logger will silently
not log anything if the message contains an unsupported character.
|
|
|
|
|
| |
These config management things work on BSD, they also claim to work on all distros, so enabling them!
LP: #1880279
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Focal and later, Ubuntu will prioritize netplan renderer over eni,
even if ifupdown and netplan are both installed.
ENI on Focal and later is considered an unsupported configuration so
cloud-init should generally prefer netplan. On many cloud images,
the /etc/network/interfaces config file does not include the dir
/etc/network/interfaces.d thereby ignoring cloud-init's
/etc/network/interfaces.d/50-cloud-init.cfg file.
LP: #1867029
|
|
|
|
|
| |
- tested on OpenBSD 6.6
- tested on OpenStack without config drive, and NoCloud with ISO config
drive
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for the NetBSD Operating System.
Features in this branch:
* Add BSD distro parent class from which NetBSD and FreeBSD can
specialize
* Add *bsd util functions to cloudinit.net and cloudinit.net.bsd_utils
* subclass cloudinit.distro.freebsd.Distro from bsd.Distro
* Add new cloudinit.distro.netbsd and cloudinit.net.renderer for
netbsd
* Add lru_cached util.is_NetBSD functions
* Add NetBSD detection for ConfigDrive and NoCloud datasources
This branch has been tested with:
- NoCloud and OpenStack (with and without config-drive)
- NetBSD 8.1. and 9.0
- FreeBSD 11.2 and 12.1
- Python 3.7 only, because of the dependency oncrypt.METHOD_BLOWFISH.
This version is available in NetBSD 7, 8 and 9 anyway
|
| |
|
|
|
|
|
|
|
|
| |
cloud-init has moved to cc_snap module and a top-level
config key 'snap'. cc_snap_config was deprecated in
cloud-init version 18.2
Co-authored-by: Daniel Watkins <daniel@daniel-watkins.co.uk>
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
Update README to specify that only files with the '.cfg' extension are
read in this folder.
LP: #1855006
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Detect Arch Linux and set variant accordingly in `system_info()`
- Allow setting render-cloudcfg variant parameter to 'arch'
- Adjust some basic settings for Arch Linux in the cloud.cfg.tmpl
The template might need some additional Arch-specific tweaks in the
future, but at least for now the generated config works and contains
the most relevant modules.
Also:
- Sort distro variant lists when adding Arch
- Add debian to known variants in render-cloudcfg
|
|
|
|
|
|
|
| |
blkid is a Linux-only command. With this patch, cloud-init uses another
approach to find the data source on FreeBSD.
LP: #1645824
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ubuntu_drivers config module enables usage of the 'ubuntu-drivers'
command. At this point it only serves as a way of installing NVIDIA
drivers for general purpose graphics processing unit (GPGPU)
functionality.
Also, a small usability improvement to get_cfg_by_path to allow it to
take a string for the key path
"toplevel/second/mykey"
in addition to the original:
("toplevel", "second", "mykey")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Infrastructure is now set up for Ubuntu to handle Amazon instances
hitting a ports archive at:
- http://%(ec2_region)s.ec2.ports.ubuntu.com/ubuntu-ports/
And additionally, generic mirrors at
*.clouds.ports.ubuntu.com/ubuntu-ports
The change here will utilize those mirrors for the arm64, armel and
armhf arches.
We've decided to limit the auto-selection of those
mirrors to arm, where we know a use case. That way new instances
of ppc64el or other arches will not select them. Such a behavior change
could be problematic for a user in a firewalled environment.
LP: #1805854
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes redhat's default behavior to remove the ssh keys on
new instance (ssh_deletekeys will now be at its default true value).
On redhat systems, cloud-init.service has both:
Wants=sshd-keygen.service
Before=sshd-keygen.serviceh
Which is why 'ssh_genkeytypes' is set to None
(yaml '~' == yaml null == python none).
I've changed that to be null as it seems more clear and we do not
use the tilda anywhere else in configs.
LP: #1781094
rhbz: https://bugzilla.redhat.com/show_bug.cgi?id=1598832
|