mirror of
https://github.com/clearlinux/micro-config-drive.git
synced 2026-08-21 21:17:46 +00:00
191 lines
4.8 KiB
Groff
191 lines
4.8 KiB
Groff
.\" generated with Ronn/v0.7.3
|
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
|
.
|
|
.TH "MICRO\-CONFIG\-DRIVE" "1" "November 2018" "" ""
|
|
.
|
|
.SH "NAME"
|
|
\fBmicro\-config\-drive\fR \- Configure a cloud instance using config\-drive data
|
|
.
|
|
.SH "SYNOPSIS"
|
|
\fB/usr/bin/ucd\fR
|
|
.
|
|
.P
|
|
\fBucd\fR [OPTIONS\.\.\.]
|
|
.
|
|
.SH "DESCRIPTION"
|
|
\fBucd\fR runs at boot time with the purpose of configuring a cloud instance for use of the end user\.
|
|
.
|
|
.P
|
|
ucd can perform any of the following (optional) tasks:
|
|
.
|
|
.IP "\(bu" 4
|
|
create a default account with sudo privileges
|
|
.
|
|
.IP "\(bu" 4
|
|
lock root and default account, the only way to login is using ssh keys (security feature)
|
|
.
|
|
.IP "\(bu" 4
|
|
maintain the cloud instance in a right state (resize/fix partitions and filesystem)
|
|
.
|
|
.IP "\(bu" 4
|
|
get and process userdata and metadata from an attached config\-drive block device
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.P
|
|
Userdata formats supported:
|
|
.
|
|
.IP "\(bu" 4
|
|
\fBcloud\-config\fR: begins with \fB#cloud\-config\fR and is used to execute certain tasks in a human friendly format
|
|
.
|
|
.IP "\(bu" 4
|
|
\fBshell\-script\fR: begins with \fB#!\fR and is used to execute a shell script
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.P
|
|
Metadata formats supported:
|
|
.
|
|
.IP "\(bu" 4
|
|
\fBopenstack\fR
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.SH "OPENSTACK DATASOURCES"
|
|
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\.
|
|
.
|
|
.IP "\(bu" 4
|
|
\fBconfig\-drive\fR: is a disk formatted with vfat or iso9660 and have a label of config\-2
|
|
.
|
|
.IP "\(bu" 4
|
|
\fBmetadata service\fR: instances can access to it at http://169\.254\.169\.254 \fB[NOT SUPPORTED]\fR
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.P
|
|
more information about openstack datasources can be found in:
|
|
.
|
|
.IP "\(bu" 4
|
|
http://docs\.openstack\.org/user\-guide/cli_config_drive\.html
|
|
.
|
|
.IP "\(bu" 4
|
|
http://docs\.openstack\.org/admin\-guide/compute\-networking\-nova\.html#metadata\-service
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.SH "WORKFLOW"
|
|
.
|
|
.nf
|
|
|
|
`|` 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)
|
|
.
|
|
.fi
|
|
.
|
|
.SH "OPTIONS"
|
|
The following options are understood:
|
|
.
|
|
.TP
|
|
\fB\-h\fR, \fB\-\-help\fR:
|
|
.
|
|
.IP
|
|
Prints a help message\.
|
|
.
|
|
.TP
|
|
\fB\-u\fR FILE, \fB\-\-user\-data\-file\fR FILE:
|
|
.
|
|
.IP
|
|
Path to a cloud\-config user data file&\. If omitted, \fBucd\fR will attempt to fetch user\-data from the openstack link\-local connected data service URL\.
|
|
.
|
|
.TP
|
|
\fB\-\-openstack\-metadata\-file\fR FILE:
|
|
.
|
|
.IP
|
|
Path to an openstack metadata file\. more information: http://docs\.openstack\.org/user\-guide/cli_config_drive\.html#openstack\-metadata\-format
|
|
.
|
|
.TP
|
|
\fB\-\-openstack\-config\-drive\fR PATH:
|
|
.
|
|
.IP
|
|
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
|
|
.
|
|
.TP
|
|
\fB\-\-user\-data\fR:
|
|
.
|
|
.IP
|
|
Get and process user data from data sources\.
|
|
.
|
|
.TP
|
|
\fB\-\-user\-data\-once\fR:
|
|
.
|
|
.IP
|
|
Only on first boot get and process user data from data sources\. Note this option is ignored if \fB\-\-user\-data\fR is enabled\.
|
|
.
|
|
.TP
|
|
\fB\-\-metadata\fR:
|
|
.
|
|
.IP
|
|
Get and process metadata from data sources\.
|
|
.
|
|
.TP
|
|
\fB\-\-fix\-disk\fR:
|
|
.
|
|
.IP
|
|
Fix disk and filesystem if it is needed\.
|
|
.
|
|
.TP
|
|
\fB\-v\fR, \fB\-\-version\fR:
|
|
.
|
|
.IP
|
|
Prints version information\.
|
|
.
|
|
.TP
|
|
\fB\-\-first\-boot\-setup\fR:
|
|
.
|
|
.IP
|
|
Setup the instance in its first boot\. When first boot of the instance is detected, \fBucd\fR will perform the following tasks: create a default user account, create sudoers file for default user account, lock the root account\.
|
|
.
|
|
.SH "EXIT STATUS"
|
|
On success, 0 is returned, a non\-zero failure code otherwise\.
|
|
.
|
|
.SH "COPYRIGHT"
|
|
.
|
|
.IP "\(bu" 4
|
|
Copyright (C) 2017 Intel Corporation, License: CC\-BY\-SA\-3\.0
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.SH "SEE ALSO"
|
|
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:
|
|
.
|
|
.P
|
|
\fBhttps://cloudinit\.readthedocs\.org/en/latest/\fR
|
|
.
|
|
.P
|
|
The cloud\-config format that \fBucd\fR(1) supports is documented in \fBcloud\-config\fR(5)\. This lists the options that are supported, their structure and function\.
|
|
.
|
|
.SH "NOTES"
|
|
Creative Commons Attribution\-ShareAlike 3\.0 Unported
|
|
.
|
|
.IP "\(bu" 4
|
|
http://creativecommons\.org/licenses/by\-sa/3\.0/
|
|
.
|
|
.IP "" 0
|
|
|