summaryrefslogtreecommitdiff
path: root/config
Commit message (Collapse)AuthorAgeFilesLines
* add OpenCloudOS and TencentOS support (#1964)wynnfeng2023-02-181-4/+4
|
* Add mount_default_fields for PhotonOS. (#1952)Shreenidhi Shedi2023-01-121-2/+4
| | | | | 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.
* Append derivatives to is_rhel list in cloud.cfg.tmpl (#1887)Louis Abel2022-12-021-9/+9
| | | | | | | 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.
* add mariner support (#1780)Minghe Ren2022-11-071-3/+19
|
* cc_ntp: add support for BSDs (#1759)Mina Galić2022-10-141-2/+0
| | | | | | | | | | | | | | | | | 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
* Create reference documentation for base configJames Falcon2022-10-071-1/+2
| | | | Also add schema entries for the base config modules lists that can be overridden with user data.
* cloud.cfg.tmpl: make sure "centos" settings are identical to "rhel" (#1639)Emanuele Giuseppe Esposito2022-09-071-14/+15
| | | | | | | | | 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
* config: Add wireguard config module (#1570)Fabian Lichtenegger-Lukas2022-08-091-0/+3
| | | | | | | | | | | | | | | | | 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.
* Add Ansible Config Module (#1579)Brett Holman2022-08-051-0/+1
| | | | | | | | | | | | | | | | | | | | | 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.
* network: add system_info network activator cloud.cfg overrides (#1619)Chad Smith2022-07-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* cc_ubuntu_autoinstall: support live-installer autoinstall configChad Smith2022-07-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | 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.
* clean: allow third party cleanup scripts in /etc/cloud/clean.d (#1581)Chad Smith2022-07-151-0/+18
| | | | | | | | | | | | | 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.
* Rename the openmandriva user to omv (#1575)Bernhard Rosenkraenzer2022-07-131-0/+4
| | | | | | | | | | 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>
* Add support for OpenMandriva (https://openmandriva.org/) (#1520)Bernhard Rosenkraenzer2022-06-171-5/+10
| | | Signed-off-by: Bernhard Rosenkränzer <bero@lindev.ch>
* Use Network-Manager and Netplan as default renderers for RHEL and Fedora (#1465)Emanuele Giuseppe Esposito2022-05-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Align rhel custom files with upstream (#1431)Emanuele Giuseppe Esposito2022-05-181-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* upstart: drop vestigial support for upstart (#1421)Chad Smith2022-05-091-3/+0
| | | | | | | | | | | | | | | | 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.
* schema: add json defs for modules e-install (SC-651) (#1366)James Falcon2022-04-051-1/+0
| | | | | | | | | * cc_emit_upstart (removal) * cc_fan * cc_final_message * cc_foo * cc_growpart * cc_grub_dpkg * cc_install_hotplug
* Add support for gentoo templates and cloud.cfg (#1179)vteratipally2022-01-201-2/+6
|
* Add new config module to set keyboard layout (#1176)maxnet2022-01-121-0/+1
| | | | | | | | | | | | 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
* Add miraclelinux support (#1128)Haruki TSURUMOTO2021-12-071-3/+3
|
* Add "install hotplug" module (SC-476) (#1069)James Falcon2021-10-271-0/+1
| | | | | | | | | | | 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
* Add module 'write-files-deferred' executed in stage 'final' (#916)Lucendio2021-10-251-0/+1
| | | | | | | | | | | | | | 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.
* Support openEuler OS (#1012)zhuzaifangxuele2021-09-131-3/+3
| | | openEuler Homepage: https://www.openeuler.org/en/
* Add CloudLinux OS support (#1003)Alexandr Kravchenko2021-09-011-3/+3
| | | https://www.cloudlinux.com/
* Add support for EuroLinux 7 && EuroLinux 8 (#957)Aleksander Baranowski2021-08-051-6/+6
|
* Add ability to manage fallback network config on PhotonOS (#941)sshedi2021-07-231-2/+8
| | | | | | | | | | | | | | | | | | | | | | 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>
* Add VZLinux support (#951)eb30952021-07-211-3/+3
| | | Virtuozzo Linux is a distro based off of CentOS 8, similar to Alma Linux and Rocky Linux.
* Removed distro specific network code from Photon (#929)sshedi2021-06-281-10/+2
| | | | | | | | 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>
* Add support for VMware PhotonOS (#909)sshedi2021-06-181-5/+47
| | | | | 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.
* add DragonFlyBSD support (#904)Gonéri Le Bouder2021-06-141-4/+18
| | | | | | | - 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.
* Add Rocky Linux support to cloud-init (#906)Louis Abel2021-05-251-3/+4
| | | | Rocky Linux is a RHEL-compatible distribution so all changes that have been made should be trivial.
* Add AlmaLinux OS support (#872)Andrew Lukoshko2021-05-071-3/+3
| | | AlmaLinux OS is RHEL-compatible so all the changes needed are trivial.
* Add config modules for controlling IBM PowerVM RMC. (#584)Aman3062020-10-281-0/+2
| | | | | | | | | | | | | 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 Alpine Linux support. (#535)dermotbradley2020-08-191-3/+18
| | | | | | | | 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 (#479)Adam Dobrawy2020-07-071-1/+1
| | | | * Add update_etc_hosts as default module on *BSD * Set preference of IPv6 over IPv4 in FreeBSD /etc/hosts
* Default to UTF-8 in /var/log/cloud-init.log (#427)James Falcon2020-06-121-1/+1
| | | | On a system with a non-utf8 default locale, the logger will silently not log anything if the message contains an unsupported character.
* enable Puppet, Chef mcollective in default config (#385)Mina Galić (deprecated: Igor Galić)2020-05-271-2/+0
| | | | | These config management things work on BSD, they also claim to work on all distros, so enabling them! LP: #1880279
* net: ubuntu focal prioritize netplan over eni even if both present (#267)Chad Smith2020-03-301-0/+3
| | | | | | | | | | | | 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
* add Openbsd support (#147)Gonéri Le Bouder2020-03-261-4/+12
| | | | | - tested on OpenBSD 6.6 - tested on OpenStack without config drive, and NoCloud with ISO config drive
* Add Netbsd support (#62)Gonéri Le Bouder2020-03-121-7/+23
| | | | | | | | | | | | | | | | | | | | | 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
* Add support for the amazon variant in cloud.cfg.tmpl (#119)Frederick Lefebvre2019-12-201-3/+19
|
* modules: drop cc_snap_config config module (#134)Chad Smith2019-12-201-1/+0
| | | | | | | | 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 (#127)Daniel Watkins2019-12-191-3/+0
| | | | | | * 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
* config/cloud.cfg.d: update READMEJoshua Powers2019-12-131-2/+2
| | | | | | | Update README to specify that only files with the '.cfg' extension are read in this folder. LP: #1855006
* Add support for Arch Linux in render-cloudcfgConrad Hoffmann2019-10-011-2/+4
| | | | | | | | | | | | | |  - 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
* freebsd: NoCloud data source supportGonéri Le Bouder2019-05-241-2/+2
| | | | | | | blkid is a Linux-only command. With this patch, cloud-init uses another approach to find the data source on FreeBSD. LP: #1645824
* Add ubuntu_drivers config moduleDaniel Watkins2019-03-191-0/+3
| | | | | | | | | | | | | 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")
* config: On ubuntu select cloud archive mirrors for armel, armhf, arm64.Scott Moser2018-12-041-1/+11
| | | | | | | | | | | | | | | | | | | 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
* redhat: remove ssh keys on new instance.Scott Moser2018-08-061-2/+0
| | | | | | | | | | | | | | | | | | 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