github.com/homburg/packer@v0.6.1-0.20140528012651-1dcaf1716848/website/source/docs/builders/openstack.html.markdown (about)

     1  ---
     2  layout: "docs"
     3  ---
     4  
     5  # OpenStack Builder
     6  
     7  Type: `openstack`
     8  
     9  The `openstack` builder is able to create new images for use with
    10  [OpenStack](http://www.openstack.org). The builder takes a source
    11  image, runs any provisioning necessary on the image after launching it,
    12  then creates a new reusable image. This reusable image can then be
    13  used as the foundation of new servers that are launched within OpenStack.
    14  The builder will create temporary keypairs that provide temporary access to
    15  the server while the image is being created. This simplifies configuration
    16  quite a bit.
    17  
    18  The builder does _not_ manage images. Once it creates an image, it is up to
    19  you to use it or delete it.
    20  
    21  ## Configuration Reference
    22  
    23  There are many configuration options available for the builder. They are
    24  segmented below into two categories: required and optional parameters. Within
    25  each category, the available configuration keys are alphabetized.
    26  
    27  ### Required:
    28  
    29  * `flavor` (string) - The ID or full URL for the desired flavor for the
    30    server to be created.
    31  
    32  * `image_name` (string) - The name of the resulting image.
    33  
    34  * `password` (string) - The password used to connect to the OpenStack service.
    35    If not specified, Packer will use the environment variables
    36    `SDK_PASSWORD` or `OS_PASSWORD` (in that order), if set.
    37  
    38  * `provider` (string) - The provider used to connect to the OpenStack service.
    39    If not specified, Packer will use the environment variable
    40    `SDK_PROVIDER`, if set.
    41    For Rackspace this should be `rackspace-us` or `rackspace-uk`.
    42  
    43  * `region` (string) - The name of the region, such as "DFW", in which
    44    to launch the server to create the AMI.
    45    If not specified, Packer will use the environment variables
    46    `SDK_REGION` or `OS_REGION_NAME` (in that order), if set.
    47  
    48  * `source_image` (string) - The ID or full URL to the base image to use.
    49    This is the image that will be used to launch a new server and provision it.
    50  
    51  * `username` (string) - The username used to connect to the OpenStack service.
    52    If not specified, Packer will use the environment variables
    53    `SDK_USERNAME` or `OS_USERNAME` (in that order), if set.
    54  
    55  ### Optional:
    56  
    57  * `api_key` (string) - The API key used to access OpenStack. Some OpenStack
    58    installations require this.
    59    If not specified, Packer will use the environment variables
    60    `SDK_API_KEY`, if set.
    61  
    62  * `floating_ip` (string) - A specific floating IP to assign to this instance.
    63    `use_floating_ip` must also be set to true for this to have an affect.
    64  
    65  * `floating_ip_pool` (string) - The name of the floating IP pool to use
    66    to allocate a floating IP. `use_floating_ip` must also be set to true
    67    for this to have an affect.
    68  
    69  * `insecure` (boolean) - Whether or not the connection to OpenStack can be done
    70    over an insecure connection. By default this is false.
    71  
    72  * `openstack_provider` (string)
    73  <!---
    74  @todo document me
    75  -->
    76  
    77  * `project` (string) - The project name to boot the instance into. Some
    78    OpenStack installations require this.
    79    If not specified, Packer will use the environment variables
    80    `SDK_PROJECT` or `OS_TENANT_NAME` (in that order), if set.
    81  
    82  * `provider` (string) - A name of a provider that has a slightly
    83    different API model. Currently supported values are "openstack" (default),
    84    and "rackspace".
    85    If not specified, Packer will use the environment variables
    86    `SDK_PROVIDER` or `OS_AUTH_URL` (in that order), if set.
    87  
    88  * `proxy_url` (string)
    89  <!---
    90  @todo document me
    91  -->
    92  
    93  * `security_groups` (array of strings) - A list of security groups by name
    94    to add to this instance.
    95  
    96  * `ssh_port` (integer) - The port that SSH will be available on. Defaults to port
    97    22.
    98  
    99  * `ssh_timeout` (string) - The time to wait for SSH to become available
   100    before timing out. The format of this value is a duration such as "5s"
   101    or "1m". The default SSH timeout is "5m".
   102  
   103  * `ssh_username` (string) - The username to use in order to communicate
   104    over SSH to the running server. The default is "root".
   105  
   106  * `tenant_id` (string) - Tenant ID for accessing OpenStack if your
   107    installation requires this.
   108  
   109  * `use_floating_ip` (boolean) - Whether or not to use a floating IP for
   110    the instance. Defaults to false.
   111  
   112  ## Basic Example
   113  
   114  Here is a basic example. This is a working example to build a
   115  Ubuntu 12.04 LTS (Precise Pangolin) on Rackspace OpenStack cloud offering.
   116  
   117  <pre class="prettyprint">
   118  {
   119    "type": "openstack",
   120    "username": "",
   121    "password": "",
   122    "provider": "rackspace-us",
   123    "region": "DFW",
   124    "ssh_username": "root",
   125    "image_name": "Test image",
   126    "source_image": "23b564c9-c3e6-49f9-bc68-86c7a9ab5018",
   127    "flavor": "2"
   128  }
   129  </pre>
   130  
   131  ## Troubleshooting
   132  
   133  *I get the error "Missing or incorrect provider"*
   134  
   135  * Verify your "username", "password" and "provider" settings.
   136  
   137  *I get the error "Missing endpoint, or insufficient privileges to access endpoint"*
   138  
   139  * Verify your "region" setting.