Resource Type: glance_image

Defined in:
lib/puppet/type/glance_image.rb
Providers:
openstack

Overview

This allows manifests to declare an image to be stored in glance.

glance_image { “Ubuntu 12.04 cloudimg amd64”:

ensure           => present,
name             => "Ubuntu 12.04 cloudimg amd64",
is_public        => yes,
container_format => 'ovf',
disk_format      => 'qcow2',
source           => 'http://uec-images.ubuntu.com/releases/precise/release/ubuntu-12.04-server-cloudimg-amd64-disk1.img',
proxy            => 'http://127.0.0.1:8080',
min_ram          => 1234,
min_disk         => 1234,
properties       => { 'img_key' => img_value },
image_tag        => 'amphora',

}

Known problems / limitations:

* All images are managed by the glance service.
  This means that since users are unable to manage their own images via this type,
  is_public is really of no use. You can probably hide images this way but that's all.
* As glance image names do not have to be unique, you must ensure that your glance
  repository does not have any duplicate names prior to using this.
* Ensure this is run on the same server as the glance-api service.

Properties

  • container_format

    The format of the container

    Supported values:
    • ami
    • ari
    • aki
    • bare
    • ovf
  • disk_format

    The format of the disk

    Supported values:
    • ami
    • ari
    • aki
    • vhd
    • vmdk
    • raw
    • qcow2
    • vdi
    • iso
    • ploop
  • ensure (defaults to: present)

    The basic property that the resource should be in.

    Supported values:
    • present
    • absent
  • id

    The unique id of the image

    Supported values:
    • /[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}/
  • image_tag

    The image tag

    Supported values:
    • /\S+/
  • is_public (defaults to: true)

    Whether the image is public or not. Default true

    Supported values:
    • /(y|Y)es/
    • /(n|N)o/
    • /(t|T)rue/
    • /(f|F)alse/
    • true
    • false
  • min_disk

    The minimal disk size

    Supported values:
    • /\d+/
  • min_ram

    The minimal ram size

    Supported values:
    • /\d+/
  • project_id

    A uuid identifying the project which will own the image.

  • properties

    The set of image properties

Parameters

  • location

    The permanent location of the image. Optional

    Supported values:
    • /\S+/
  • name (namevar)

    The image name

    Supported values:
    • /.*/
  • project_name

    The name of the project which will own the image.

  • provider

    The specific backend to use for this ‘glance_image` resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

  • proxy

    The proxy server to use if source should be downloaded

    Supported values:
    • /\S+/
  • source

    The source of the image to import from

    Supported values:
    • /\S+/