.\" $OpenBSD: mdoc.template,v 1.15 2014/03/31 00:09:54 dlg Exp $ .\" .\" Copyright (c) 2017 Reyk Floeter .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .Dd $Mdocdate$ .Dt CLOUD-AGENT 8 .Os .Sh NAME .Nm cloud-agent .Nd cloud provisioning for OpenBSD VMs .Sh SYNOPSIS .Nm cloud-agent .Op Fl nuv .Op Fl c Ar cloud Ns Op , Ns Ar cloud Ns ... .Op Fl p Ar length .Op Fl r Ar rootdisk .Op Fl t Ar timeout .Op Fl U Ar username .Ar interface .Sh DESCRIPTION The .Nm program manages the OpenBSD provisioning and VM interaction in cloud environments. .Pp The options are as follows: .Bl -tag -width Ds .It Fl c Ar cloud Ns Op , Ns Ar cloud Ns ... Probe a list of cloud stacks for provisioning in the specified order. If this option is not specified, .Nm tries to detect the environment and possible cloud stacks automatically. Supported .Ar cloud stacks are: .Pp .Bl -tag -width opennebula -offset indent -compact .It Ic azure Microsoft Azure .It Ic cloudinit Generic cloud-init .It Ic ec2 Amazon AWS EC2 .It Ic opennebula OpenNebula .It Ic openstack OpenStack .El .It Fl p Ar length Generate and set a random password for the default user. The password will be written in its plain form into the .Pa ~/.ssh/authorized_keys file. This allows to use the .Xr doas 1 command to gain root privileges. The minimum .Ar length is 8 characters and the default is an empty password. .It Fl n Do not configure the system and skip the provisioning step. .It Fl t Ar timeout Change the HTTP timeout. The default is 3 seconds. .It Fl U Ar username Change the default user. The default is .Dq ec2-user on AWS, .Dq azure-user on Azure, and .Dq puffy everywhere else. The default user is used when it is not obtained from the cloud configuration. Using .Dq root is supported, but not recommended. .It Fl r Ar rootdisk Automatically grow the last .Ox FFS partition of the root disk to use all the available space. .It Fl u Deprovision and unconfigure the system. This deletes keys, passwords, and logs files without asking for permission. .It Fl v Produce more verbose output. .El .Pp Enable .Nm in the .Xr hostname.if 5 of the VM's primary networking interface and automatically the last partition of the root disk: .Bd -literal -offset indent # cat /etc/hostname.hvn0 dhcp !/usr/local/libexec/cloud-agent -r sd0 "\e$if" .Ed .Sh FILES .Bl -tag -width "/usr/local/libexec/cloud-agentX" -compact .It Pa ~/.ssh/authorized_keys The location of the agent-configured SSH public keys and optional password. .It Pa /usr/local/libexec/cloud-agent The agent itself. .It Pa /usr/local/bin/cms The CMS binary that is used to decrypt messages from the Azure fabric. .It Pa /var/db/cloud-instance The instance ID as reported by the cloud. .Nm reprovisions the system when the value has changed. .El .Sh SEE ALSO .Xr meta-data 8 , .Xr vmd 8 .Sh AUTHORS .An Reyk Floeter Aq Mt reyk@openbsd.org .\" .Sh CAVEATS .\" .Sh BUGS