The current latest version of the cloud-init upstream
document URL has changed. Added the latest known good
version for the URL.
Change-Id: Ia2d48bea644a4d78fdf79792451a2f1d4c389f96
Signed-off-by: Adrian Vladu <avladu@cloudbasesolutions.com>
Check if the configuration value of bsdtar_path does exist as a path
before trying to execute the binary.
Updated the tutorial reference of bsdtar to FreeBSD instead of Ubuntu.
Change-Id: Ieba5da2f330aa11c40cce6c2ae9de40155f33b07
Python 3.6/3.7 are no longer supported for the latest releasese of
the OpenStack packages like oslo or coverage, thus switching to the Zed
OpenStack release gates, which have support for 3.8/3.9/3.10 Python
versions.
For gates to pass, the docs required a defined language to be set ("en"),
while the crypto unit tests required a method signature fix when running
on Python 3.9/3.10.
The version test__check_latest_version* unit tests started failing
in a transient pattern because of the
pbr.version.VersionInfo().release_string() throwing the following error:
"NotImplementedError: cannot instantiate 'WindowsPath' on your system".
This required to have the cloudbaseinit.version.get_version mocked for a
reliable unit test run on Linux.
Change-Id: I4748d1258c072c377825474e1116347b0a085c56
Allows giving an instance an individual cloud username, e.g. for license servers, while still retrieving SSH public keys for that user from OpenStack.
Change-Id: I078380ef8f74b30105fd44378045df8b1260acbc
Add support for the Packet features:
* phone home - after provisioning is ready, an empty HTTP POST request
is performed to the phone_home_url
* post user password - a random password is generated for the default
user, the password gets encrypted using the encryption public SSH key
and posted to the phone_home_url
Change-Id: Ib3e405b6b5bb4ca65d047c756513b9d6f87cf6de
Add support for NoCloud metadata provider, where the metadata
is provided on a config-drive (vfat or iso9660) with the label
cidata or CIDATA.
The folder structure for NoCloud is:
* /user-data
* /meta-data
The user-data and meta-data files respect the EC2 metadata
service format.
Supported features for the NoCloud metadata service:
* instance id
* hostname
* plublic keys
* static network configuration (Debian format)
* user data
More information:
cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html
Change-Id: Ib434cf2b2b21bf9faa58e05ba40eb0135385c9ea
Implements: blueprint nocloud-metadata-support
Add cloudbaseinit.metadata.services.gceservice.GCEService that
supports Google Cloud Engine.
Supported features for the metadata service:
* instance id
* hostname
* userdata
* ssh keys
Change-Id: I9e5e2cbcaa0953fc0c0ae8117e258713ac6443b7
On Py27, the yaml module implementation uses a normal dictionary for
implementation, resulting in arbitrary order for the parsed yaml.
If the config option cloud_config_plugins is not set or empty, fallback
to the default order defined in the factory.
Config option `cloud_config_plugins` is now used for filtering the cloud
config plugins to be executed, which was the original intended behaviour.
Change-Id: I59ea56e473ab343a826ff8c38787cb7f11cebd27
VMwareGuestInfoService is a metadata service which uses VMware's
rpctool to extract guest metadata and userdata configured for machines
running on VMware hypervisors.
The implementation is similar to:
https://github.com/vmware/cloud-init-vmware-guestinfo
Supported features for the metadata service:
* instance id
* hostname
* admin username
* admin password
* public SSH keys
* userdata
Configuration options:
```ini
[vmwarequestinfo]
vmware_rpctool_path=%ProgramFiles%/VMware/VMware Tools/rpctool.exe
```
The VMware RPC tool used to query the instance metadata and userdata
needs to be present at the config option path.
Both json and yaml are supported as metadata formats.
The metadata / userdata can be encoded in base64, gzip or gzip+base64.
Example metadata in yaml format:
```yaml
instance-id: cloud-vm
local-hostname: cloud-vm
admin-username: cloud-username
admin-password: Passw0rd
public-keys-data: |
ssh-key 1
ssh-key 2
```
This metadata content needs to be sent as string in the guestinfo
dictionary, thus needs to be converted to base64 (it is recommended to
gzip it too).
To convert to gzip+base64 format:
```bash
cat metadata.yml | gzip.exe -9 | base64.exe -w0
```
Co-Authored-By: Rui Lopes <rgl@ruilopes.com>
Change-Id: I6a8430e87ee03d2e8fdd2685b05e60c5c0ffb5be
Added runcmd, ntp and cloud-config execution / reboot
details.
Updated the name of the EmptyMetadataService from "EMPTY" to
the correct one and added notes regarding plugins re-execution
and idempotency.
Change-Id: I8e53fc1ca3e9a96c0e56b250f9714e2f719366b0
Add support for cloud-config users and groups creation.
For Windows, the following format is supported:
groups:
- windows-group: [user1, user2]
- cloud-users
users:
-
name: brian
gecos: 'Brian Cohen'
primary_group: Users
groups: cloud-users
passwd: StrongPassw0rd
inactive: False
expiredate: 2020-10-01
ssh_authorized_keys:
- first key
- second key
The passwords for Windows users are required to be in
plain text. On *nix systems, the passwords are hashed.
If the password is not present, a random password will
be set.
Fixes: https://github.com/cloudbase/cloudbase-init/issues/26
Change-Id: I035f92849a59a8370df30a6de41f66f5fb2300af
The empty metadata service can be used to run plugins that do not
rely on metadata service information, like setting NTP, MTU,
extending volumes, local scripts execution, licensing, etc.
It can be used also as a fallback metadata service, in case no other
previous metadata service could be loaded.
EmptyMetadataService does not support the following plugins:
* cloudbaseinit.plugins.windows.createuser.CreateUserPlugin
* cloudbaseinit.plugins.common.setuserpassword.SetUserPasswordPlugin
* cloudbaseinit.plugins.common.sshpublickeys.SetUserSSHPublicKeysPlugin
* cloudbaseinit.plugins.windows.winrmcertificateauth.ConfigWinRMCertificateAuthPlugin
If any of the plugins defined above are executed,
they will fail with exception NotExistingMetadataException. The reason
for the hardcoded failure is that these plugins rely on metadata to execute
correctly. If metadata like username or password is not provided,
these plugins can lock or misconfigure the user, leading to unwanted problems.
Implements: blueprint empty-metadata-provider
Change-Id: I5fb88a07bf72321d0f66b16d151bf6059b448580
The following documentation parts were updated:
* copyright years
* stable installer urls were added
* PowerShell userdata header added (#ps1)
* Userdata types fixed
* Updated all the services config options
* Removed deprecated options for services
* Added Packet metadata service
* Added Azure metadata service
* Replaced return code with exit code in tutorial
(return code is not correct)
* Updated all the plugins config options
* Added all the undocumented plugins
* Added retry_count / retry_count_interval info
for all http based services
Change-Id: I6fdbdcaf45dec841e4080028d7d90cbbf6a6cb75
Changed docs theme to a better, mobile friendly one:
https://github.com/readthedocs/sphinx_rtd_theme
The duplicate labels were removed, as the sphinx extension
sphinx.ext.autosectionlabel requires unique titles (labels).
Change-Id: Ife17206c3b2370250388692a9330585f5193e450
Previously, the docs version was hardcoded to 1.0,
which was incorrect.
Now the version and release field will show the
actual cloudbase-init package version.
Example: 0.9.11 or 0.9.12
Change-Id: Ide4ed289029e25c39c07fec53086ff8868ce4063
Replace build-sphinx job with tox-docs (using template
build-openstack-docs-pti) job as best practice for building docs.
Update tox.ini for this and remove now obsolete section from setup.cfg.
Fix doc building: Remove option from doc/source/conf.py for an unused
directory.
The tox.ini file already contains python3 for releasenotes, update the
job now to do this as well.
Change-Id: I7552c802a99f0338ff6a5a3bba1f24902c55bed4
This change will include an automatically generated list of
config options in the cloudbase-init docs.
It's useful as some config options are not currently mentioned in
the docs and it's also nice to be able to have a quick overview
of all available options without having to go through the code.
You can also send links to certain config options or groups.
Note that long config opt lines are not wrapped and look quite bad,
especially with the current theme (may consider switching to some
other theme, maybe the "alabaster" one included by default by
sphinx). Still better than not having this at all though.
We're also adding the zuul jobs that validate release notes and
docs, required for testing this patch.
Change-Id: Ibaff3a91e7f1345aaaac0c29b995e7c25b9e4669
Set the “plugins=cloudbaseinit.plugins.windows.setuserpassword.
SetUserPasswordPlugin” field in the configuration file as
suggested by cloudbase-init/doc/plugins.rst,but it can not take effect.
In fact it should be set to
“plugins=cloudbaseinit.plugins.common.setuserpassword.SetUserPasswordPlugin”,
this is the error described in cloudbase-init/doc/plugins.rst,
cause inconvenient to use
Change-Id: Iad2f98799684fe92992fbbce7f6632138d6fba5d
Closes-bug: #1747874
We forced the user_data starts with #cloud-config.
But the example missed this part.
Change-Id: Iba1bb7315305bdb269f3abfac11b6fc0ba1d67fe
Signed-off-by: Chen Hanxiao <chenhx@certusnet.com.cn>
Document plugins, metadata services, configuration file,
how the project is supposed to work and some user related usecases.
Change-Id: I184a9409a9e9173c346f0ab149cb7d78ed87e0b3
Platform specific requirements can not be included in requirements.txt
Includes also:
* testr configuration file
* PEP8 fixes
* Unit test fixes for passing OpenStack Jenkins checks
Change-Id: I6f3f367f3316e0b506bb62e66d7671f9e52c72b5
Closes-Bug: #1376816