micro-config-drive(1) – Configure a cloud instance using config-drive data
ucd runs at boot time with the purpose of configuring a cloud
instance for use of the end user.
ucd can perform any of the following (optional) tasks:
create a default account with sudo privileges
lock root and default account, the only way to login is using ssh keys (security feature)
maintain the cloud instance in a right state (resize/fix partitions and filesystem)
get and process userdata and metadata from an attached config-drive block device
Userdata formats supported:
cloud-config: begins with
#cloud-configand is used to execute certain tasks in a human friendly format
shell-script: begins with
#!and is used to execute a shell script
Metadata formats supported:
Datasources are used to retrive instance-specific data in order to configure a new cloud instance. Openstack attaches two datasources to the cloud instance when it boots.
config-drive: is a disk formatted with vfat or iso9660 and have a label of config-2
metadata service: instances can access to it at http://169.254.169.254
more information about openstack datasources can be found in:
`|` Parse options `|` Init openstack datasource `|->` if config-drive is found then define it as datasource otherwise exit `|` Start openstack datasource `|->` Get userdata and metadata from datasource `|` Run async tasks `|->` resize disk `|->` resize filesystem `|` If a datasource was found `|->` if VM first boot was detected `| |->` Run async tasks `| | |->` lock root account `| | |->` Create sudoers file for default user account `| |->` Create default user account `|->` Process openstack metadata `|->` Process openstack userdata `|` Join async tasks `|` Finish openstack datasource (free resources)
The following options are understood:
Prints a help message.
Path to a cloud-config user data file&. If omitted,
ucdwill attempt to fetch user-data from the openstack link-local connected data service URL.
Path to an openstack metadata file. more information: http://docs.openstack.org/user-guide/cli_config_drive.html#openstack-metadata-format
Path to openstack config drive (iso9660 or vfat filesystem), it will be used to process metadata and userdata. more information: http://docs.openstack.org/user-guide/cli_config_drive.html#configuration-drive-contents
Get and process user data from data sources.
Only on first boot get and process user data from data sources. Note this option is ignored if
Get and process metadata from data sources.
Fix disk and filesystem if it is needed.
Prints version information.
Setup the instance in its first boot. When first boot of the instance is detected,
ucdwill perform the following tasks: create a default user account, create sudoers file for default user account, lock the root account.
On success, 0 is returned, a non-zero failure code otherwise.
Copyright (C) 2017 Intel Corporation, License: CC-BY-SA-3.0
This project is a limited-functionality implementation of the cloud-init specification. The full documentation of the generic implementation is available online and can be referenced here: