github.com/jerryclinesmith/packer@v0.3.7/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 attempt to read this from the
    36    `SDK_PASSWORD` environment variable.
    37  
    38  * `provider` (string) - The provider used to connect to the OpenStack service.
    39    If not specified, Packer will attempt to read this from the
    40    `SDK_PROVIDER` environment variable.
    41  
    42  * `region` (string) - The name of the region, such as "DFW", in which
    43    to launch the server to create the AMI.
    44  
    45  * `source_image` (string) - The ID or full URL to the base image to use.
    46    This is the image that will be used to launch a new server and provision it.
    47  
    48  * `username` (string) - The username used to connect to the OpenStack service.
    49    If not specified, Packer will attempt to read this from the
    50    `SDK_USERNAME` environment variable.
    51  
    52  Optional:
    53  
    54  * `project` (string) - The project name to boot the instance into. Some
    55    OpenStack installations require this. By default this is empty.
    56  
    57  * `ssh_port` (int) - The port that SSH will be available on. Defaults to port
    58    22.
    59  
    60  * `ssh_timeout` (string) - The time to wait for SSH to become available
    61    before timing out. The format of this value is a duration such as "5s"
    62    or "5m". The default SSH timeout is "1m".
    63  
    64  * `ssh_username` (string) - The username to use in order to communicate
    65    over SSH to the running server. The default is "root".
    66  
    67  ## Basic Example
    68  
    69  Here is a basic example. This is a working example to build a
    70  Ubuntu 12.04 LTS (Precise Pangolin) on Rackspace OpenStack cloud offering.
    71  
    72  <pre class="prettyprint">
    73  {
    74    "type": "openstack",
    75    "username": "",
    76    "password": "",
    77    "provider": "",
    78    "region": "DFW",
    79    "ssh_username": "root",
    80    "image_name": "Test image",
    81    "source_image": "23b564c9-c3e6-49f9-bc68-86c7a9ab5018",
    82    "flavor": "2"
    83  }
    84  </pre>
    85  
    86  ## Troubleshooting
    87  
    88  *I get the error "Missing or incorrect provider"*
    89  
    90  * Verify your "username", "password" and "provider" settings.
    91  
    92  *I get the error "Missing endpoint, or insufficient privileges to access endpoint"*
    93  
    94  * Verify your "region" setting.