github.com/tonnydourado/packer@v0.6.1-0.20140701134019-5d0cd9676a37/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  * `networks` (array of strings) - A list of networks by UUID to attach
    73    to this instance.
    74  
    75  * `openstack_provider` (string)
    76  <!---
    77  @todo document me
    78  -->
    79  
    80  * `project` (string) - The project name to boot the instance into. Some
    81    OpenStack installations require this.
    82    If not specified, Packer will use the environment variables
    83    `SDK_PROJECT` or `OS_TENANT_NAME` (in that order), if set.
    84  
    85  * `provider` (string) - A name of a provider that has a slightly
    86    different API model. Currently supported values are "openstack" (default),
    87    and "rackspace".
    88    If not specified, Packer will use the environment variables
    89    `SDK_PROVIDER` or `OS_AUTH_URL` (in that order), if set.
    90  
    91  * `proxy_url` (string)
    92  <!---
    93  @todo document me
    94  -->
    95  * `security_groups` (array of strings) - A list of security groups by name
    96    to add to this instance.
    97  
    98  * `ssh_port` (integer) - The port that SSH will be available on. Defaults to port
    99    22.
   100  
   101  * `ssh_timeout` (string) - The time to wait for SSH to become available
   102    before timing out. The format of this value is a duration such as "5s"
   103    or "1m". The default SSH timeout is "5m".
   104  
   105  * `ssh_username` (string) - The username to use in order to communicate
   106    over SSH to the running server. The default is "root".
   107  
   108  * `tenant_id` (string) - Tenant ID for accessing OpenStack if your
   109    installation requires this.
   110  
   111  * `use_floating_ip` (boolean) - Whether or not to use a floating IP for
   112    the instance. Defaults to false.
   113  
   114  ## Basic Example
   115  
   116  Here is a basic example. This is a working example to build a
   117  Ubuntu 12.04 LTS (Precise Pangolin) on Rackspace OpenStack cloud offering.
   118  
   119  <pre class="prettyprint">
   120  {
   121    "type": "openstack",
   122    "username": "",
   123    "password": "",
   124    "provider": "rackspace-us",
   125    "region": "DFW",
   126    "ssh_username": "root",
   127    "image_name": "Test image",
   128    "source_image": "23b564c9-c3e6-49f9-bc68-86c7a9ab5018",
   129    "flavor": "2"
   130  }
   131  </pre>
   132  
   133  ## Troubleshooting
   134  
   135  *I get the error "Missing or incorrect provider"*
   136  
   137  * Verify your "username", "password" and "provider" settings.
   138  
   139  *I get the error "Missing endpoint, or insufficient privileges to access endpoint"*
   140  
   141  * Verify your "region" setting.