Skip to content

Instantly share code, notes, and snippets.

@mikehale
Created August 7, 2014 14:15
Show Gist options
  • Save mikehale/2ba8fa1e0ea2b2aebf45 to your computer and use it in GitHub Desktop.
Save mikehale/2ba8fa1e0ea2b2aebf45 to your computer and use it in GitHub Desktop.
Commented cloud.cfg
$ cat cloud-init_0.7.5/etc/cloud/cloud.cfg
# The top level settings are used as module
# and system configuration.
# A set of users which may be applied and/or used by various modules
# when a 'default' entry is found it will reference the 'default_user'
# from the distro configuration specified below
users:
- default
# If this is set, 'root' will not be able to ssh in and they
# will get a message to login instead as the above $user (ubuntu)
disable_root: true
# This will cause the set+update hostname module to not operate (if true)
preserve_hostname: false
# Example datasource config
# datasource:
# Ec2:
# metadata_urls: [ 'blah.com' ]
# timeout: 5 # (defaults to 50 seconds)
# max_wait: 10 # (defaults to 120 seconds)
# The modules that run in the 'init' stage (this should happen as soon as / is mounted and networking is online)
cloud_init_modules:
# updates the location of sem dirs/files
- migrator
# ?
- seed_random
# run a command in a shell
- bootcmd
# write files to disk
- write-files
# resize partitions
- growpart
# other resize stuff
- resizefs
# calls hostname foo
- set_hostname
# writes /etc/hostname
- update_hostname
# update /etc/hosts from a template
- update_etc_hosts
# allow trusted ca-certs to be updated at boot
- ca-certs
# configure rsyslog
- rsyslog
# setup users and groups
- users-groups
# re-generate server keys, setup authorized keys for users. openssh-server should create keys on startup
# lucid needs a manual: dpkg-reconfigure openssh-server
- ssh
# The modules that run in the 'config' stage (this should happen as soon as filesystem is ready and rsyslog is started)
cloud_config_modules:
# Emit the cloud config ready event
# this can be used by upstart jobs for 'start on cloud-config'.
- emit_upstart
# partition and format disks
- disk_setup
# mount file systems
- mounts
# run ssh-import-id (imports public keys from a keyserver and append them to authorized_keys) for configured users
- ssh-import-id
# set default locale
- locale
# set passwords for configured users
- set-passwords
# run debconf-set-selections for grub-pc specicially updating install devices
- grub-dpkg
# set the value for apt Acquire::http::Pipeline-Depth
- apt-pipelining
# set apt sources, import apt gpg keys, set apt proxy
- apt-configure
# apt-get update && apt-get upgrade && reboot (if required)
- package-update-upgrade-install
# configure landscape
- landscape
# set timezone
- timezone
# configure and run puppet
- puppet
# configure and run chef
- chef
# configure and run salt
- salt-minion
# configure and run mcollective
- mcollective
# add a route to disable ec2 metadata
- disable-ec2-metadata
# single commands to run
- runcmd
# configure and launch byobu (frontend for screen/tmux)
- byobu
# The modules that run in the 'final' stage (approximately rc.local time)
cloud_final_modules:
# fetch and run rightscale style key=value data as scripts
- rightscale_userdata
# run scripts provided by the vendor?
- scripts-vendor
# call run-parts on cloud/{,instances/*/}scripts/per-once/*
- scripts-per-once
# call run-parts on cloud/{,instances/*/}scripts/per-boot/*
- scripts-per-boot
# call run-parts on cloud/{,instances/*/}scripts/per-instance/*
- scripts-per-instance
# call run-parts on cloud/instances/*/scripts/ (populated by userdata)
- scripts-user
# print authorized keys fingerprints per user to console
- ssh-authkey-fingerprints
# print ssh host key fingerprints to the console
- keys-to-console
# send an http request to a url with instance data
- phone-home
# log a final message with cloud-init version, uptime, and data source
- final-message
# cleanly poweroff or halt the system with configurable delays after boot finishes
- power-state-change
# System and/or distro specific settings
# (not accessible to handlers/transforms)
system_info:
# This will affect which distro class gets used
distro: ubuntu
# Default user name + that default users groups (if added/used)
default_user:
name: ubuntu
lock_passwd: True
gecos: Ubuntu
groups: [adm, audio, cdrom, dialout, dip, floppy, netdev, plugdev, sudo, video]
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
shell: /bin/bash
# Other config here will be given to the distro class and/or path classes
paths:
cloud_dir: /var/lib/cloud/
templates_dir: /etc/cloud/templates/
upstart_dir: /etc/init/
package_mirrors:
- arches: [i386, amd64]
failsafe:
primary: http://archive.ubuntu.com/ubuntu
security: http://security.ubuntu.com/ubuntu
search:
primary:
- http://%(ec2_region)s.ec2.archive.ubuntu.com/ubuntu/
- http://%(availability_zone)s.clouds.archive.ubuntu.com/ubuntu/
security: []
- arches: [armhf, armel, default]
failsafe:
primary: http://ports.ubuntu.com/ubuntu-ports
security: http://ports.ubuntu.com/ubuntu-ports
ssh_svcname: ssh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment