This cookbook installs the OpenStack Image service Glance as part of an OpenStack reference deployment Chef for OpenStack. The http://github.com/mattray/chef-openstack-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 0.10.0 or higher required (for Chef environment use).
The following cookbooks are dependencies:
- openstack-common
- openstack-identity
- Installs the image-api server
- Installs the image-registry 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 and glance registry recipes have been executed.
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": [
"cirros"
]
}
}"openstack": {
"image": {
"api": {
"default_store": "swift"
},
"upload_images": [
"cirros"
]
}
}Action: :upload
:image_url: Location of the image to be loaded into Glance.:image_name: A name for the image.:image_type:qcow2orami. Defaults toqcow2.: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.
Attributes for the Image service are in the ['openstack']['image'] namespace.
openstack['image']['verbose']- Enables/disables verbose output for glance services.openstack['image']['debug']- Enables/disables debug output for glance services.openstack['image']['identity_service_chef_role']- The name of the Chef role that installs the Keystone Service API- `openstack['image']['user'] - User glance runs as
- `openstack['image']['group'] - Group glance runs as
openstack['image']['db']['username']- Username for glance database accessopenstack['image']['api']['adminURL']- Used when registering image endpoint with keystoneopenstack['image']['api']['internalURL']- Used when registering image endpoint with keystoneopenstack['image']['api']['publicURL']- Used when registering image endpoint with keystoneopenstack['image']['service_tenant_name']- Tenant name used by glance when interacting with keystone - used in the API and registry paste.ini filesopenstack['image']['service_user']- User name used by glance when interacting with keystone - used in the API and registry paste.ini filesopenstack['image']['service_role']- User role used by glance when interacting with keystone - used in the API and registry paste.ini filesopenstack['image']['api']['auth']['cache_dir']- Defaults to/var/cache/glance/api. Directory whereauth_tokenmiddleware writes certificates for glance-apiopenstack['image']['registry']['auth']['cache_dir']- Defaults to/var/cache/glance/registry. Directory whereauth_tokenmiddleware writes certificates for glance-registryopenstack['image']['upload_images']- Default list of images to upload to the glance repository as part of the installopenstack['image']['upload_image']['<imagename>']- URL location of the<imagename>image. There can be multiple instances of this line to define multiple imagess (eg natty, maverick, fedora17 etc) --- exampleopenstack['image']['upload_image']['natty']- "http://c250663.r63.cf1.rackcdn.com/ubuntu-11.04-server-uec-amd64-multinic.tar.gz"openstack['image']['api']['default_store']- Toggles the backend storage type. Currently supported is "file" and "swift"openstack['image']['api']['swift']['store_container']- Set the container used by glance to store images and snapshots. Defaults to "glance"openstack['image']['api']['swift']['store_large_object_size']- Set the size at which glance starts to chunnk files. Defaults to "200" MBopenstack['image']['api']['swift']['store_large_object_chunk_size']- Set the chunk size for glance. Defaults to "200" MBopenstack['image']['api']['rbd']['rbd_store_ceph_conf']- Default location of ceph.confopenstack['image']['api']['rbd']['rbd_store_user']- User for connecting to ceph storeopenstack['image']['api']['rbd']['rbd_store_pool']- RADOS pool for imagesopenstack['image']['api']['rbd']['rbd_store_chunk_size']- Size in MB of chunks for RADOS Store, should be a power of 2openstack['image']['cron']['redirection']- Redirection of cron output TODO: Add DB2 support on other platformsopenstack['image']['platform']['db2_python_packages']- Array of DB2 python packages, only available on redhat platform
openstack['image']['mq']['service_type']- Select qpid or rabbitmq. default rabbitmqopenstack['image']['mq']['notifier_strategy']- Notifier stragegy. default noop.openstack['image']['mq']['qpid']['host']- The qpid host to useopenstack['image']['mq']['qpid']['port']- The qpid port to useopenstack['image']['mq']['qpid']['qpid_hosts']- Qpid hosts. TODO. use only when ha is specified.openstack['image']['mq']['qpid']['username']- Username for qpid connectionopenstack['image']['mq']['qpid']['password']- Password for qpid connectionopenstack['image']['mq']['qpid']['sasl_mechanisms']- Space separated list of SASL mechanisms to use for authopenstack['image']['mq']['qpid']['reconnect_timeout']- The number of seconds to wait before deciding that a reconnect attempt has failed.openstack['image']['mq']['qpid']['reconnect_limit']- The limit for the number of times to reconnect before considering the connection to be failed.openstack['image']['mq']['qpid']['reconnect_interval_min']- Minimum number of seconds between connection attempts.openstack['image']['mq']['qpid']['reconnect_interval_max']- Maximum number of seconds between connection attempts.openstack['image']['mq']['qpid']['reconnect_interval']- Equivalent to setting qpid_reconnect_interval_min and qpid_reconnect_interval_max to the same value.openstack['image']['mq']['qpid']['heartbeat']- Seconds between heartbeat messages sent to ensure that the connection is still alive.openstack['image']['mq']['qpid']['protocol']- Protocol to use. Default tcp.openstack['image']['mq']['qpid']['tcp_nodelay']- Disable the Nagle algorithm. default disabled.
Please refer to the TESTING.md for instructions for testing the cookbook.
Author:: Justin Shepherd ([email protected]) Author:: Jason Cannavale ([email protected]) Author:: Ron Pedde ([email protected]) Author:: Joseph Breu ([email protected]) Author:: William Kelly ([email protected]) Author:: Darren Birkett ([email protected]) Author:: Evan Callicoat ([email protected]) Author:: Matt Ray ([email protected]) Author:: Jay Pipes ([email protected]) Author:: John Dewey ([email protected]) Author:: Craig Tracey ([email protected]) Author:: Sean Gallagher ([email protected]) Author:: Mark Vanderwiel ([email protected]) Author:: Salman Baset ([email protected]) Author:: Chen Zhiwei ([email protected])
Copyright 2012, Rackspace US, Inc. Copyright 2012-2013, Opscode, Inc. Copyright 2012-2013, AT&T Services, Inc. Copyright 2013, Craig Tracey [email protected] Copyright 2013, IBM Corp.
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
http://www.apache.org/licenses/LICENSE-2.0
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.