github.com/kikitux/packer@v0.10.1-0.20160322154024-6237df566f9f/website/source/docs/extend/plugins.html.md (about)

     1  ---
     2  description: |
     3      Packer Plugins allow new functionality to be added to Packer without modifying
     4      the core source code. Packer plugins are able to add new commands, builders,
     5      provisioners, hooks, and more. In fact, much of Packer itself is implemented by
     6      writing plugins that are simply distributed with Packer. For example, all the
     7      commands, builders, provisioners, and more that ship with Packer are implemented
     8      as Plugins that are simply hardcoded to load with Packer.
     9  layout: docs
    10  page_title: 'Packer Plugins - Extend Packer'
    11  ...
    12  
    13  # Packer Plugins
    14  
    15  Packer Plugins allow new functionality to be added to Packer without modifying
    16  the core source code. Packer plugins are able to add new commands, builders,
    17  provisioners, hooks, and more. In fact, much of Packer itself is implemented by
    18  writing plugins that are simply distributed with Packer. For example, all the
    19  commands, builders, provisioners, and more that ship with Packer are implemented
    20  as Plugins that are simply hardcoded to load with Packer.
    21  
    22  This page will cover how to install and use plugins. If you're interested in
    23  developing plugins, the documentation for that is available the [developing
    24  plugins](/docs/extend/developing-plugins.html) page.
    25  
    26  Because Packer is so young, there is no official listing of available Packer
    27  plugins. Plugins are best found via Google. Typically, searching "packer plugin
    28  *x*" will find what you're looking for if it exists. As Packer gets older, an
    29  official plugin directory is planned.
    30  
    31  ## How Plugins Work
    32  
    33  Packer plugins are completely separate, standalone applications that the core of
    34  Packer starts and communicates with.
    35  
    36  These plugin applications aren't meant to be run manually. Instead, Packer core
    37  executes these plugin applications in a certain way and communicates with them.
    38  For example, the VMware builder is actually a standalone binary named
    39  `packer-builder-vmware`. The next time you run a Packer build, look at your
    40  process list and you should see a handful of `packer-` prefixed applications
    41  running.
    42  
    43  ## Installing Plugins
    44  
    45  The easiest way to install a plugin is to name it correctly, then place it in
    46  the proper directory. To name a plugin correctly, make sure the binary is named
    47  `packer-TYPE-NAME`. For example, `packer-builder-amazon-ebs` for a "builder"
    48  type plugin named "amazon-ebs". Valid types for plugins are down this page more.
    49  
    50  Once the plugin is named properly, Packer automatically discovers plugins in the
    51  following directories in the given order. If a conflicting plugin is found
    52  later, it will take precedence over one found earlier.
    53  
    54  1.  The directory where `packer` is, or the executable directory.
    55  
    56  2.  `~/.packer.d/plugins` on Unix systems or `%APPDATA%/packer.d/plugins`
    57      on Windows.
    58  
    59  3.  The current working directory.
    60  
    61  The valid types for plugins are:
    62  
    63  -   `builder` - Plugins responsible for building images for a specific platform.
    64  
    65  -   `command` - A CLI sub-command for `packer`.
    66  
    67  -   `post-processor` - A post-processor responsible for taking an artifact from
    68      a builder and turning it into something else.
    69  
    70  -   `provisioner` - A provisioner to install software on images created by
    71      a builder.