~avishai-ish-shalom/cloud-init/chef

« back to all changes in this revision

Viewing changes to doc/examples/cloud-config.txt

  • Committer: Avishai Ish-Shalom
  • Date: 2011-09-08 22:39:28 UTC
  • mfrom: (390.1.52 chef.fixes)
  • Revision ID: avishai.ish-shalom@mail.huji.ac.il-20110908223928-74by62gszzin4lkk
Merged main branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
111
111
#   written to /etc/fstab.
112
112
# - '/dev' can be ommitted for device names that begin with: xvd, sd, hd, vd
113
113
# - if an entry does not have all 6 fields, they will be filled in
114
 
#   from the following: [ None, None, "auto", "defaults,nobootwait", "0", "2" ]
 
114
#   with values from 'mount_default_fields' below.
115
115
#
116
116
# Note, that you should set 'nobootwait' (see man fstab) for volumes that may
117
117
# not be attached at instance boot (or reboot)
122
122
 - [ xvdh, /opt/data, "auto", "defaults,nobootwait", "0", "0" ]
123
123
 - [ dd, /dev/zero ]
124
124
 
 
125
# mount_default_fields
 
126
# These values are used to fill in any entries in 'mounts' that are not
 
127
# complete.  This must be an array, and must have 7 fields.
 
128
mount_default_fields: [ None, None, "auto", "defaults,nobootwait", "0", "2" ]
 
129
 
125
130
# add each entry to ~/.ssh/authorized_keys for the configured user
126
131
ssh_authorized_keys:
127
132
  - ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAGEA3FSyQwBI6Z+nCSjUUk8EEAnnkhXlukKoUPND/RRClWz2s5TCzIkd3Ou5+Cyz71X0XmazM3l5WgeErvtIwQMyT1KjNoMhoJMrJnWqQPOt5Q8zWd9qG7PBl9+eiH5qV7NZ mykey@host
130
135
# Send pre-generated ssh private keys to the server
131
136
# If these are present, they will be written to /etc/ssh and
132
137
# new random keys will not be generated
 
138
#  in addition to 'rsa' and 'dsa' as shown below, 'ecdsa' is also supported
133
139
ssh_keys:
134
140
  rsa_private: |
135
141
    -----BEGIN RSA PRIVATE KEY-----
255
261
        debconf debconf/frontend seen false
256
262
 
257
263
# manage byobu defaults
258
 
# byobu_by_default: ('user'|'system')
259
 
#   'user' will set byobu 'launch-by-default' for the default user
260
 
#   'system' will enable launch-by-default for for all users
 
264
# byobu_by_default:
 
265
#   'user' or 'enable-user': set byobu 'launch-by-default' for the default user
 
266
#   'system' or 'enable-system' or 'enable':
 
267
#      enable 'launch-by-default' for all users, do not modify default user
 
268
#   'disable': disable both default user and system
 
269
#   'disable-system': disable system
 
270
#   'disable-user': disable for default user
 
271
#   not-set: no changes made
261
272
byobu_by_default: system
262
273
 
263
274
# disable ssh access as root.
266
277
# default: true
267
278
disable_root: false
268
279
 
 
280
# disable_root_opts: the value of this variable will prefix the
 
281
# respective key in /root/.ssh/authorized_keys if disable_root is true
 
282
# see 'man authorized_keys' for more information on what you can do here
 
283
#
 
284
# The string '$USER' will be replaced with the username of the default user
 
285
#
 
286
# disable_root_opts: no-port-forwarding,no-agent-forwarding,no-X11-forwarding,command="echo 'Please login as the user \"$USER\" rather than the user \"root\".';echo;sleep 10"
 
287
 
 
288
 
269
289
# set the locale to a given locale
270
290
# default: en_US.UTF-8
271
291
locale: en_US.UTF-8
292
312
# set to 'False' to disable
293
313
resize_rootfs: True
294
314
 
295
 
# if hostname is set, cloud-init will set the system hostname 
296
 
# appropriately to its value
297
 
# if not set, it will set hostname from the cloud metadata
298
 
# default: None
 
315
## hostname and /etc/hosts management
 
316
# cloud-init will do its best to set up a sane hostname and corresponding
 
317
# entries in /etc/hosts.
 
318
#
 
319
# if you do nothing, you should get the system generally correctly
 
320
# configured.
 
321
#  * /etc/hostname (and thus `hostname` output) set with hostname (not fqdn)
 
322
#  * an entry in /etc/hosts for both hostname and fqdn
 
323
#    that are obtained from the metadata service
 
324
#  * On each boot, the above will again be set
 
325
#  * cloud-init generally "owns" the 127.0.1.1 entry.  The
 
326
#    rest of the file will not be modified
 
327
#
 
328
# You can change the above behavior with the following config variables:
 
329
#  Remember that these can be set in cloud-config via user-data,
 
330
#  /etc/cloud/cloud.cfg or any file in /etc/cloud/cloud.cfg.d/
 
331
#
 
332
# hostname:
 
333
#   this option will be used wherever the 'hostname' is needed
 
334
#   simply substitute it in the description above.
 
335
#   ** If you wish to set your hostname, set it here **
 
336
#   default: 'hostname' as returned by the metadata service
 
337
#       on EC2, the hostname portion of 'local-hostname' is used
 
338
#       which is something like 'ip-10-244-170-199'
 
339
#
 
340
# fqdn:
 
341
#   this option will be used wherever 'fqdn' is needed.
 
342
#   simply substitue it in the description above.
 
343
#   default: fqdn as returned by the metadata service.  on EC2 'hostname'
 
344
#       is used, so this is like: ip-10-244-170-199.ec2.internal
 
345
 
346
# manage_etc_hosts:
 
347
#   default: false
 
348
#   Setting this config variable to 'true' will mean that on every
 
349
#   boot, /etc/hosts will be re-written from /etc/cloud/templates/hosts.tmpl
 
350
#   The strings '$hostname' and '$fqdn' are replaced in the template
 
351
#   with the appropriate values.
 
352
#
 
353
# preserve_hostname:
 
354
#   default: False
 
355
#   If this option is set to True, then /etc/hostname will never updated
 
356
#   The default behavior is to update it if it has not been modified by
 
357
#   the user.
299
358
 
300
359
# final_message
301
360
# default: cloud-init boot finished at $TIMESTAMP. Up $UPTIME seconds
333
392
#
334
393
phone_home:
335
394
 url: http://my.example.com/$INSTANCE_ID/
336
 
 post: [ pub_key_dsa, pub_key_rsa, instance_id ]
 
395
 post: [ pub_key_dsa, pub_key_rsa, pub_key_ecdsa, instance_id ]
337
396
 
338
397
# timezone: set the timezone for this instance
339
398
# the value of 'timezone' must exist in /usr/share/zoneinfo
404
463
# default is False
405
464
manual_cache_clean: False
406
465
 
407
 
# if you wish to have /etc/hosts written from /etc/cloud/templates/hosts.tmpl
408
 
# on a per-always basis (to account for ebs stop/start), then set
409
 
# manage_etc_hosts to True. The default is 'False'
410
 
manage_etc_hosts: False
 
466
# When cloud-init is finished running including having run 
 
467
# cloud_init_modules, then it will run this command.  The default
 
468
# is to emit an upstart signal as shown below.  If the value is a
 
469
# list, it will be passed to Popen.  If it is a string, it will be
 
470
# invoked through 'sh -c'.
 
471
 
472
# default value:
 
473
# cc_ready_cmd: [ initctl, emit, cloud-config, CLOUD_CFG=/var/lib/instance//cloud-config.txt ]
 
474
# example:
 
475
# cc_ready_cmd: [ sh, -c, 'echo HI MOM > /tmp/file' ]
 
476