2013-06-21 14:46:38 -04:00
|
|
|
---
|
2015-07-22 22:31:00 -04:00
|
|
|
layout: intro
|
2017-03-25 18:13:52 -04:00
|
|
|
sidebar_current: intro-use-cases
|
|
|
|
page_title: Use Cases - Introduction
|
|
|
|
description: |-
|
|
|
|
By now you should know what Packer does and what the benefits of image
|
|
|
|
creation are. In this section, we'll enumerate *some* of the use cases for
|
|
|
|
Packer. Note that this is not an exhaustive list by any means. There are
|
|
|
|
definitely use cases for Packer not listed here. This list is just meant to
|
|
|
|
give you an idea of how Packer may improve your processes.
|
|
|
|
---
|
2013-06-21 14:46:38 -04:00
|
|
|
|
|
|
|
# Use Cases
|
|
|
|
|
2015-07-22 22:31:00 -04:00
|
|
|
By now you should know what Packer does and what the benefits of image creation
|
|
|
|
are. In this section, we'll enumerate *some* of the use cases for Packer. Note
|
|
|
|
that this is not an exhaustive list by any means. There are definitely use cases
|
|
|
|
for Packer not listed here. This list is just meant to give you an idea of how
|
|
|
|
Packer may improve your processes.
|
2013-06-21 14:46:38 -04:00
|
|
|
|
|
|
|
### Continuous Delivery
|
|
|
|
|
|
|
|
Packer is lightweight, portable, and command-line driven. This makes it the
|
|
|
|
perfect tool to put in the middle of your continuous delivery pipeline. Packer
|
|
|
|
can be used to generate new machine images for multiple platforms on every
|
|
|
|
change to Chef/Puppet.
|
|
|
|
|
|
|
|
As part of this pipeline, the newly created images can then be launched and
|
2015-07-22 22:31:00 -04:00
|
|
|
tested, verifying the infrastructure changes work. If the tests pass, you can be
|
2016-04-22 19:42:13 -04:00
|
|
|
confident that the image will work when deployed. This brings a new level of
|
2015-07-22 22:31:00 -04:00
|
|
|
stability and testability to infrastructure changes.
|
2013-06-21 14:46:38 -04:00
|
|
|
|
|
|
|
### Dev/Prod Parity
|
|
|
|
|
2015-07-22 22:31:00 -04:00
|
|
|
Packer helps [keep development, staging, and production as similar as
|
|
|
|
possible](http://www.12factor.net/dev-prod-parity). Packer can be used to
|
|
|
|
generate images for multiple platforms at the same time. So if you use AWS for
|
2016-01-14 15:31:19 -05:00
|
|
|
production and VMware (perhaps with [Vagrant](https://www.vagrantup.com)) for
|
2015-07-22 22:31:00 -04:00
|
|
|
development, you can generate both an AMI and a VMware machine using Packer at
|
|
|
|
the same time from the same template.
|
2013-06-21 14:46:38 -04:00
|
|
|
|
2013-11-07 21:22:25 -05:00
|
|
|
Mix this in with the continuous delivery use case above, and you have a pretty
|
2015-07-22 22:31:00 -04:00
|
|
|
slick system for consistent work environments from development all the way
|
|
|
|
through to production.
|
2013-06-21 14:46:38 -04:00
|
|
|
|
|
|
|
### Appliance/Demo Creation
|
|
|
|
|
2015-07-22 22:31:00 -04:00
|
|
|
Since Packer creates consistent images for multiple platforms in parallel, it is
|
|
|
|
perfect for creating
|
2016-01-14 15:31:19 -05:00
|
|
|
[appliances](https://en.wikipedia.org/wiki/Software_appliance) and disposable
|
2015-07-22 22:31:00 -04:00
|
|
|
product demos. As your software changes, you can automatically create appliances
|
|
|
|
with the software pre-installed. Potential users can then get started with your
|
|
|
|
software by deploying it to the environment of their choice.
|
2013-06-21 14:46:38 -04:00
|
|
|
|
2015-07-22 22:31:00 -04:00
|
|
|
Packaging up software with complex requirements has never been so easy. Or
|
|
|
|
enjoyable, if you ask me.
|