• Sales: 1-800-961-2888
  • Support: 1-800-961-4454

Configuring OpenStack Image Storage


The Glance cookbook used for Rackspace Private Cloud supports OpenStack Image storage in the local file system, in OpenStack Object Storage (Swift), and in Rackspace Cloud Files.

Note: If you change the image storage location from Swift to Cloud Files (or vice versa), you must manually export and import the images.

Local File Storage

By default, OpenStack Image stores the image files locally on the controller node, and as long as you're using local file storage, you will not have to make any changes to your configuration. In the event that you need to switch from a different storage method to the local file system, follow these steps.

  1. Log into the controller node and use sudo -i to switch to root access.

  2. Define your text editor:

    $ export EDITOR=vi
    
  3. Use knife to open the environment file for editing.

    $ knife environment edit <environmentFile>
    
  4. Add the following attributes to the environment.

    "glance": {
      "api": {
        "default_store": "file"
      },
      "images": [
           "cirros"
      ],
      "image_upload": true 
    } 
    
  5. Run chef-client to commit the change.

    $ chef-client
    

Rackspace Cloud Files

To use Rackspace Cloud Files for image storage, you must have an account. To sign up, visit the Rackspace Cloud Files web site.

  1. Log into the controller node and use sudo -i to switch to root access.

  2. Use the following command to obtain your Cloud Files tenant ID.

    $ curl -s -X POST https://identity.api.rackspacecloud.com/v2.0/tokens  \
      -d '{"auth": {"passwordCredentials": {"cloud_files_username": "", \
      "password":  "cloud_files_password"}}}' \
      -H "Content-type: application/json" |  python -mjson.tool | \
      grep "tenantId.*Mosso" | head -1
    

    The output of this command will display on the screen. Copy and save the tenant ID.

  3. Define your text editor:

    $ export EDITOR=vi
    
  4. Use knife to open the environment file for editing.

    $ knife environment edit <environmentFile>
    
  5. Add the following attributes to the environment, using the tenant ID that you obtained in Step 2 and your Cloud Files username and password.

    "glance": {
      "api": {
        "default_store": "swift",
        "swift_store_user": "cloud_files_tenant_ID:cloud_files_username",
        "swift_store_key": "cloud_files_password",
        "swift_store_auth_version": "2",
        "swift_store_auth_address": "https://identity.api.rackspacecloud.com/v2.0"
      },
      "images": [
        "cirros"
      ],   
    "image_upload": true
     },
    
  6. Run chef-client to commit the change.

    $ chef-client
    

Swift Storage

To use Swift storage, you must have a Swift cluster configured in your environment. Refer to Rackspace Private Cloud OpenStack Object Storage Installation for more the process of creating and configuring a Swift cluster.

  1. Log into the controller node and use sudo -i to switch to root access.

  2. Define your text editor:

    $ export EDITOR=vi
    
  3. Use knife to open the environment file for editing.

    $ knife environment edit <environmentFile>
    
  4. Add the following attributes to the environment.

    "glance": {
      "api": {
        "default_store": "swift"
      },
      "images": [
          "cirros"
      ],
      "image_upload": true 
    }                        
  5. Run chef-client to commit the change.

    $ chef-client
                    

 







© 2011-2013 Rackspace US, Inc.

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License


See license specifics and DISCLAIMER