Chef Cookbook - OpenStack Image
Go to file
Lance Albertson e7e76f07a2 CentOS 8 support
- ChefSpec updates

Change-Id: I494763e2d873fc80d01135fb0ec99ab4e2e51635
Signed-off-by: Lance Albertson <>
2021-10-22 11:36:25 -07:00
.delivery Stein fixes 2020-03-24 10:22:19 -07:00
attributes Chef 17 support 2021-10-14 12:04:59 -07:00
files/default sync with rcbops/master as of f481cd8a322dc21526da3158d957f034a33e51fd 2012-07-26 17:20:29 -05:00
providers Chef 17 support 2021-10-14 12:04:59 -07:00
recipes Chef 17 support 2021-10-14 12:04:59 -07:00
resources Chef 17 support 2021-10-14 12:04:59 -07:00
spec CentOS 8 support 2021-10-22 11:36:25 -07:00
.gitignore Initial kilo updates 2015-02-27 13:38:49 -06:00
.gitreview OpenDev Migration Patch 2019-04-19 19:42:26 +00:00
.rubocop.yml Chef 17 support 2021-10-14 12:04:59 -07:00
.rubocop_todo.yml Updates for Train 2020-05-29 17:17:41 -07:00
.zuul.yaml Rename openstack-chef-repo references to openstack-chef 2018-08-06 21:49:49 -07:00
Berksfile Chef 17 support 2021-10-14 12:04:59 -07:00 Moving IRC network reference to OFTC 2021-07-15 10:56:12 -07:00
LICENSE image refactor for Pike and Chef 13 2017-12-10 14:37:40 -08:00
README.rst Chef 17 support 2021-10-14 12:04:59 -07:00
Rakefile Updates for rocky 2019-12-06 11:21:07 -08:00 Sync stackforge/cookbook* to openstack/cookbook* for glance cookbook 2015-06-15 15:21:29 +08:00
metadata.rb Chef 17 support 2021-10-14 12:04:59 -07:00


OpenStack Chef Cookbook - image



This cookbook installs the OpenStack Image service Glance as part of an OpenStack reference deployment Chef for OpenStack. The OpenStack chef-repo contains documentation for using this cookbook in the context of a full OpenStack deployment. Glance is installed from packages, optionally populating the repository with default images.


  • Chef 16 or higher
  • Chef Workstation 21.10.640 for testing (also includes Berkshelf for cookbook dependency resolution)


  • ubuntu
  • redhat
  • centos


The following cookbooks are dependencies:

  • 'openstackclient'
  • 'openstack-common', '>= 20.0.0'
  • 'openstack-identity', '>= 20.0.0'


Please see the extensive inline documentation in attributes/*.rb for descriptions of all the settable attributes for this cookbook.

Note that all attributes are in the default['openstack'] "namespace"

The usage of attributes to generate the glance-api.conf is described in the openstack-common cookbook.



  • Installs the glance-api server


  • Registers the API endpoint and glance service Keystone user


  • Upload image to glance. If you want to upload image during openstack installation, you need to add this recipe or the os-image role to the run list in a certain role and ensure before this recipe or the os-image role glance api recipes have been executed.


  • Install and configure swift glance packages

Glance Backend

The Glance cookbook currently supports file, swift, and Rackspace Cloud Files (swift API compliant) backing stores. NOTE: changing the storage location from cloudfiles to swift (and vice versa) requires that you manually export and import your stored images.

To enable these features set the following in the default attributes section in your environment:


"openstack": {
  "image": {
    "api": {
     "default_store": "file"
    "upload_images": [


"openstack": {
  "image": {
    "api": {
      "default_store": "swift"
    "upload_images": [

Custom Resources


Action: :upload

  • :image_url: Location of the image to be loaded into Glance.
  • :image_name: A name for the image.
  • :image_type: unknown, qcow, ami, vhd, vmdk, vdi, iso, raw. Defaults of unknown will use file extension '.gz', '.tgz' = ami, '.qcow2', '.img' = qcow.
  • :image_public: Set image to be public or private
  • :image_id: Set the image ID
  • :identity_user: Username of the Keystone admin user.
  • :identity_pass: Password for the Keystone admin user.
  • :identity_tenant: Name of the Keystone admin user's tenant.
  • :identity_uri: URI of the Identity API endpoint.
  • :identity_user_domain_name: User domain name for Keystone admin user.
  • :identity_project_domain_name: Project domain name for Keystone admin user.

License and Author

Author Justin Shepherd (
Author Jason Cannavale (
Author Ron Pedde (
Author Joseph Breu (
Author William Kelly (
Author Darren Birkett (
Author Evan Callicoat (
Author Matt Ray (
Author Jay Pipes (
Author John Dewey (
Author Craig Tracey (
Author Sean Gallagher (
Author Mark Vanderwiel (
Author Salman Baset (
Author Chen Zhiwei (
Author Eric Zhou (
Author Jian Hua Geng (
Author Ionut Artarisi (
Author Imtiaz Chowdhury (
Author Jan Klare (
Author Christoph Albers (
Author Lance Albertson (
Copyright Copyright (c) 2012, Rackspace US, Inc.
Copyright Copyright (c) 2012-2013, Opscode, Inc.
Copyright Copyright (c) 2012-2013, AT&T Services, Inc.
Copyright Copyright (c) 2013, Craig Tracey
Copyright Copyright (c) 2013-2014, IBM Corp.
Copyright Copyright (c) 2014, SUSE Linux, GmbH.
Copyright Copyright (c) 2019-2021, Oregon State University

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.