Packerとは?
一つの設定から複数の環境のためのマシンイメージを簡単に作成できるツールです。
Packerは軽量で、全てのメジャーなOSで動作する。
複数環境のイメージを並列で高速に作成します。
なぜPackerを使うか?
- インフラのデプロイが非常に高速になる
- 複数の環境で同じイメージを利用できる
- 安定性
- テスト容易性
Packerのユースケース
- 継続的デリバリ(Continuous Delivery)
- 開発本番一致(Dev/Prod Parity)
- デモ環境(Appliance/Demo Creation)
サポートするプラットフォーム
- Amazon EC2
- Digital Ocean
- Docker
- Google Compute Engine
- Parallels
- QEMU
- VirtualBox
- VMWare
- etc...
Install
Windows環境(64bit)版をインストールします。
- https://www.packer.io/downloads.html からWindows環境(64bit)版をダウンロード
- 任意の場所にzipを解凍
- パスを通す
- インストールを確認
$ packer usage: packer [--version] [--help] <command> [<args>] Available commands are: build build image(s) from template fix fixes templates from old versions of packer inspect see components of a template push push a template and supporting files to a Packer build service validate check that a template is valid version Prints the Packer version $ packer version Packer v0.8.5