[ubuntu-cloud] RFC: server-lucid-ec2-config: user-data configuration file

Mathias Gug mathiaz at ubuntu.com
Mon Dec 21 15:06:57 GMT 2009


Hi,

I'd like to request your feedback on the configuration file syntax and features
used by UEC/EC2 instances during their first boot.

As part of the Boot-time configuration for UEC/EC2 images specification [1] a
configuration file can be passed to instances as user-data to customize some
part of the instance without writing and maintaining custom scripts.

[1]: https://blueprints.launchpad.net/ubuntu/+spec/server-lucid-ec2-config

The goal is to support most common operations done on instance boot as well as
supporting bootstrapping the instance to be part of an existing configuration
management infrastructure.

It currently supports:
 * apt configuration
 * package installation

Other requested features are:
 * runurl support - http://alestic.com/2009/08/runurl
 * ssh host keys setup

Should these be included as well?

I've attached an example of configuration file and would like to get feedback
on the format as well as ideas for other features, either on the wiki page [2]
or in this thread.

[2]: https://wiki.ubuntu.com/ServerLucidCloudConfig

Thanks,

-- 
Mathias Gug
Ubuntu Developer  http://www.ubuntu.com
-------------- next part --------------
# Update apt database on first boot
# (ie run apt-get update)
#
# Default: true
#
apt_update: false

# Upgrade the instance on first boot
# (ie run apt-get upgrade)
#
# Default: false
#
apt_upgrade: true

# Add apt repositories
#
# Default: none
#
apt_sources:

 # PPA shortcut:
 #  * Setup correct apt sources.list line
 #  * Import the signing key from LP
 #
 #  See https://help.launchpad.net/Packaging/PPA for more information
 #
 - source: "ppa:user/ppa"    # Quote the string

 # Custom apt repository:
 #  * Creates a file in /etc/apt/sources.list.d/ for the sources list entry
 #  * [optional] Import the apt signing key from the keyserver 
 #  * Defaults:
 #    + keyserver: keyserver.ubuntu.com
 #    + filename: 00-boot-sources.list
 #
 #    See sources.list man page for more information about the format
 #
 - source: "deb http://archive.example.org lucid main restricted" # Quote the string
   keyid: 12345678 # GPG key ID published on a key server
   keyserver: keyserver.example.org
   filename: 01-mirror-example.org.list

 # Custom apt repository:
 #  * The apt signing key can also be specified 
 #    by providing a pgp public key block
 #  
 #  The apt repository will be added to the default sources.list file:
 #  /etc/apt/sources.list.d/00-boot-sources.list
 #
 - source: "deb http://mirror.example.net/karmic/ ./" # Quote the string
   key: | # The value needs to start with -----BEGIN PGP PUBLIC KEY BLOCK-----
      -----BEGIN PGP PUBLIC KEY BLOCK-----
      Version: SKS 1.0.10

      mI0ESXTsSQEEALuhrVwNsLIzCoaVRnrBIYraSUYCJatFcuvnhi7Q++kBBxx32JE487QgzmZc
      ElIiiPxz/nRZO8rkbHjzu05Yx61AoZVByiztP0MFH15ijGocqlR9/R6BMm26bdKK22F7lTRi
      lRxXxOsL2GPk5gQ1QtDXwPkHvAhjxGydV/Pcf81lABEBAAG0HUxhdW5jaHBhZCBQUEEgZm9y
      IE1hdGhpYXMgR3VniLYEEwECACAFAkl07EkCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAK
      CRANXKLHCU0EIIJHBAC1NCwdLwchCPIQU2bd562/YWcB7QSgYD3j+Llqm8v6ghFQ0Bdygbn1
      M6tzpwDiPxXQfZRqGhJsluCVHGLCQYNm0HDNisP4+YrZF3UkmAXDwZuh8K3LmvUPM+lLY8YJ
      1qnFHp3eN9M8/SYEFN0wlaVAurZD13NaU34UePd46vPtzA==
      =eVIj
      -----END PGP PUBLIC KEY BLOCK-----

# Add apt configuration files
#  Add an apt.conf.d/ file with the relevant content
#
#  See apt.conf man page for more information.
# 
#  Defaults:
#   + filename: 00-boot-conf
#
apt_conf:

 # Creates an apt proxy configuration in /etc/apt/apt.conf.d/01-proxy
 - filename: "01-proxy"
   content: |
    Acquire::http::Proxy "http://proxy.example.org:3142/ubuntu";

 # Add the following line to /etc/apt/apt.conf.d/00-boot-conf
 #  (run debconf at a critical priority)
 - content: |
    DPkg::Pre-Install-Pkgs:: "/usr/sbin/dpkg-preconfigure --apt -p critical|| true";

# Provide debconf answers
#
# See debconf-set-selections man page.
#
# Default: none
# 
debconf_selections: |     # Need to perserve newlines
        # Force debconf priority to critical.
        debconf debconf/priority select critical

        # Override default frontend to readline, but allow user to select.
        debconf debconf/frontend select readline
        debconf debconf/frontend seen false
 
# Install additional packages on first boot
#
# Default: none
#
packages:
 - openssh-server
 - postfix

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/ubuntu-cloud/attachments/20091221/0ffba11d/attachment.pgp 


More information about the Ubuntu-cloud mailing list