cloud-agent/agent/cloud-agent.8

133 lines
3.5 KiB
Groff
Raw Normal View History

2017-06-29 12:20:23 +00:00
.\" $OpenBSD: mdoc.template,v 1.15 2014/03/31 00:09:54 dlg Exp $
.\"
2019-06-11 10:29:08 +00:00
.\" Copyright (c) 2017, 2018, 2019 Reyk Floeter <reyk@openbsd.org>
2017-06-29 12:20:23 +00:00
.\"
.\" 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
2017-06-30 08:44:47 +00:00
.Nd cloud provisioning for OpenBSD VMs
2017-06-29 12:20:23 +00:00
.Sh SYNOPSIS
.Nm cloud-agent
.Op Fl nuv
.Op Fl c Ar cloud Ns Op , Ns Ar cloud Ns ...
.Op Fl p Ar length
2019-06-01 21:41:32 +00:00
.Op Fl r Ar rootdisk
2018-08-15 10:27:19 +00:00
.Op Fl t Ar timeout
.Op Fl U Ar username
2017-06-29 12:20:23 +00:00
.Ar interface
.Sh DESCRIPTION
The
.Nm
program manages the OpenBSD provisioning and VM interaction in cloud
environments.
2017-06-29 12:20:23 +00:00
.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.
2017-06-29 12:20:23 +00:00
.It Fl n
Do not configure the system and skip the provisioning step.
2018-08-15 10:27:19 +00:00
.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.
2019-06-01 21:41:32 +00:00
.It Fl r Ar rootdisk
Automatically grow the last
.Ox
FFS partition of the root disk to use all the available space.
2017-06-29 12:20:23 +00:00
.It Fl u
2017-06-30 08:44:47 +00:00
Deprovision and unconfigure the system.
2017-06-29 12:20:23 +00:00
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
2019-06-01 21:41:32 +00:00
of the VM's primary networking interface and automatically the last
partition of the root disk:
2017-06-29 12:20:23 +00:00
.Bd -literal -offset indent
# cat /etc/hostname.hvn0
dhcp
2019-06-01 21:41:32 +00:00
!/usr/local/libexec/cloud-agent -r sd0 "\e$if"
2017-06-29 12:20:23 +00:00
.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.
2017-06-29 12:20:23 +00:00
.It Pa /usr/local/libexec/cloud-agent
The agent itself.
.It Pa /usr/local/bin/cms
2017-06-30 08:44:47 +00:00
The CMS binary that is used to decrypt messages from the Azure fabric.
2017-06-30 19:48:08 +00:00
.It Pa /var/db/cloud-instance
The instance ID as reported by the cloud.
.Nm
reprovisions the system when the value has changed.
2017-06-29 12:20:23 +00:00
.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