Skip to content

Instantly share code, notes, and snippets.

@earnubs
Created February 2, 2017 09:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save earnubs/16f00e7f384d6cf5ae577c7dd32a3ed1 to your computer and use it in GitHub Desktop.
Save earnubs/16f00e7f384d6cf5ae577c7dd32a3ed1 to your computer and use it in GitHub Desktop.
vila@saw:~/u1/ols-vms/exp/doc 0 :) $ ./ols-vms2 help
Available Topics:
vm
==
vm.setup_scripts: A list of scripts to be executed on the guest to finalize the setup.
The scripts are executed over ssh, in the user home directory.
Scripts can use config options from their vm, they will be expanded before
upload.
vm.setup.digest.options: A list of options that are used to define a vm.
The values for these options are hashed to produce 'vm.setup.digest'.
vm.config_dir: The directory where files specific to a vm are stored.
This includes the user-data and meta-data files used at install time (for
reference and easier debug) as well as the optional ssh server keys.
By default this is {vm.vms_dir}/{vm.name}. You can put it somewhere else by
redefining it as long as it ends up being unique for the vm.
{vm.vms_dir}/{vm.release}/{vm.name} may better suit your taste for example.
vm.disk_size: The disk image size in bytes.
Optional suffixes "k" or "K" (kilobyte, 1024) "M" (megabyte, 1024k) "G"
(gigabyte, 1024M) and T (terabyte, 1024G) are supported.
vm.update: Whether or not the vm should be updated.
Both apt-get update and apt-get dist-upgrade are called if this option is set.
vm.release: The ubuntu release name.
vm.architecture: The vm architecture (cpu model).
vm.final_message: The cloud-init final message, a release-specific message is used if
none is provided to address compatibility with Ubuntu precise.
vm.class: The virtual machine technology to use.
The following values are supported:
ephemeral-lxc - Linux container ephemeral virtual machine
ephemeral-lxd - Linux container ephemeral virtual machine
libvirt - Kernel-based virtual machine
lxc - Linux container virtual machine
lxd - Lxd virtual machine
nova - Openstack Nova instance
vm.uploaded_scripts.guest_dir: Where {vm.uploaded_scripts} are uploaded on the guest.
vm.password: The {vm.user} user password.
This is rarely needed as ssh access is setup with keys.
vm.locale: The locale to use.
vm.published_as: The name used to publish the stopped vm snapshot as an image.
vm.meta_data: The meta data for cloud-init to put in the seed.
vm.name: The vm name, used as a prefix for related files.
vm.poweroff: Whether or not the vm should stop at the end of the installation.
vm.fqdn: The fully qualified domain name for the vm.
vm.packages: A list of package names to be installed.
If the package name starts with '@', it is interpreted as a file name
and its content, one package by line, is inserted in the list.
vm.user: The user in the vm.
vm.uploaded_scripts: A list of scripts to be uploaded to the guest.
Scripts can use config options from their vm, they will be expanded before
upload. All scripts are uploaded into {vm.uploaded_scripts.guest_dir} under
their base name.
vm.ram_size: The ram size in megabytes.
vm.cpus: The number of cpus.
vm.setup.digest: A digest of all option values defining the vm.
This is produced by ols-vms itself and should not be set manually.
vm.vms_dir: Where vm related config files are stored.
This includes user-data and meta-data for cloud-init and ssh server keys.
This directory must exist.
Each vm get a specific directory (automatically created) there based on its
name.
vm.manage_etc_hosts: Whether cloud-init should manage /etc/hosts or not.
This is rarely needed but can be set to 'localhost' to avoid conflicts with
other packages willing to modify /etc/hosts (puppet is a known case).
vm.ubuntu_script: The path to a script executed as ubuntu at the end of cloud-init setup.
This script is excuted after {vm.root_script}.
vm.root_script: The path to a script executed as root at the end of cloud-init setup.
This script is executed before {vm.ubuntu_script}.
nova
====
nova.net_id: The network id for the vm.
nova.tenant_name: The Open Stack tenant name.
This is generally set via OS_TENANT_NAME, sourced from a novarc file
(~/.novarc, ~/.canonistack/novarc).
nova.cloud_init_timeout: Max time for cloud-init to finish (in seconds).
nova.password: The Open Stack password.
This is generally set via OS_PASSWORD, sourced from a novarc file
(~/.novarc, ~/.canonistack/novarc).
nova.region_name: The Open Stack region name.
This is generally set via OS_REGION_NAME, sourced from a novarc file
(~/.novarc, ~/.canonistack/novarc).
nova.username: The Open Stack user name.
This is generally set via OS_USERNAME, sourced from a novarc file
(~/.novarc, ~/.canonistack/novarc).
nova.boot_timeout: Max time to boot a nova instance (in seconds).
nova.setup.digest.options: A list of nova related options that are used to define a vm.
The values for these options are hashed to produce 'vm.setup.digest'.
nova.setup_ip_timeouts: A timeouts tuple to use when waiting for nova to setup an IP.
(first, up_to, retries):
- first: seconds to wait after the first attempt
- up_to: seconds after which to give up
- retries: how many attempts after the first try
nova.auth_url: The Open Stack keystone url.
This is generally set via OS_AUTH_URL, sourced from a novarc file
(~/.novarc, ~/.canonistack/novarc).
nova.image: The glance image to boot from.
nova.setup_ssh_timeouts: A timeouts tuple to use when waiting for nova to setup ssh.
(first, up_to, retries):
- first: seconds to wait after the first attempt
- up_to: seconds after which to give up
- retries: how many attempts after the first try
nova.flavors: A list of flavors for all supported clouds.
The first known one is used.
lxd
===
lxd.setup_ssh_timeouts: A timeouts tuple to use when waiting for lxd to setup ssh.
(first, up_to, retries):
- first: seconds to wait after the first attempt
- up_to: seconds after which to give up
- retries: how many attempts after the first try
lxd.setup.digest.options: A list of lxd related options that are used to define a vm.
The values for these options are hashed to produce 'vm.setup.digest'.
lxd.user_mounts: A list of (host, vm) paths to be mounted inside the vm.
'host' paths can start with '~' which will be expanded to the user home
directory.
Relative 'host' paths are from the current directory.
'vm' paths must be absolute.
The host paths will be available at the vm paths with the user uid/gid.
Note: This requires /etc/subuid and /etc/subgid to contain a 'root:<id>:1' line
with id being the correct user (and group) id (i.e. the user running the
'setup' command).
lxd.nesting: How many level of nesting containers should be allowed for the vm.
This is used to configure the container for allowing nesting containers and
check that the /etc/subuid and /etc/subgid files provision enough ids for the
nested containers.
'0' means no nested containers.
Note that an unprivileged container can create nested privileged containers
which cannot compromise the host.
lxd.profiles: The profile names to apply to the container.
If empty, lxd will use the default one.
Beware of not using cloud-init in the profiles as this would conflict with
ols-vms itself.
lxd.image: The lxd image to boot from.
lxd.setup_ip_timeouts: A timeouts tuple to use when waiting for lxd to set an IP.
(first, up_to, retries):
- first: seconds to wait after the first attempt
- up_to: seconds after which to give up
- retries: how many attempts after the first try
lxd.cloud_init_timeouts: A timeouts tuple to use when waiting for cloud-init completion.
(first, up_to, retries):
- first: seconds to wait after the first attempt
- up_to: seconds after which to give up
- retries: how many attempts after the first try
apt
===
apt.setup.digest.options: A list of apt related options that are used to define a vm.
The values for these options are hashed to produce 'vm.setup.digest'.
apt.sources: A list of apt sources entries to be added to the default ones.
Cloud-init already setup /etc/apt/sources.list with appropriate entries. Only
additional entries need to be specified here.
apt.proxy: A local proxy for apt to avoid repeated .deb downloads.
Example:
apt.proxy = http://192.168.0.42:3142
apt.update.timeouts: apt-get update timeouts in seconds.
When apt-get update fails on hash sum mismatches, retry after the specified
timeouts. More values mean more retries.
apt.options: apt-get install options.
ssh
===
ssh.options: A list of ssh options to be used when connecting to the guest via ssh.
ssh.key: The ssh key path used to access the guest.
'ssh.authorized_keys' is expected to contain the .pub companion.
ssh.authorized_keys: A list of paths to public ssh keys to be authorized for the default user.
The content of the paths will be added to the authorized_keys file for the
default user.
ssh.setup.digest.options: A list of ssh related options that are used to define a vm.
The values for these options are hashed to produce 'vm.setup.digest'.
ssh.server_keys: A list of paths to server ssh keys.
Both public and private keys can be provided. Accepted server ssh key types are
rsa, dsa and ecdsa. The file names should match <type>.*[.pub].
logging
=======
logging.level: Logging level (same as python).
launchpad
=========
launchpad.login: The launchpad login used for launchpad ssh access from the guest.
This defaults to bzr lp-login or $USER if the former is not set.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment