Tbpgr Blog

Employee Experience Engineer tbpgr(てぃーびー) のブログ

様々な環境のマシンイメージを簡単に作成できるPackerの基礎

f:id:tbpg:20150819232628j:plain

Packerとは?

一つの設定から複数の環境のためのマシンイメージを簡単に作成できるツールです。
Packerは軽量で、全てのメジャーなOSで動作する。
複数環境のイメージを並列で高速に作成します。

なぜPackerを使うか?

  • インフラのデプロイが非常に高速になる
  • 複数の環境で同じイメージを利用できる
  • 安定性
  • テスト容易性

Packerのユースケース

  • 継続的デリバリ(Continuous Delivery)
  • 開発本番一致(Dev/Prod Parity)
  • デモ環境(Appliance/Demo Creation)

サポートするプラットフォーム

Install

Windows環境(64bit)版をインストールします。

$ 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

Qiita

QiitaのPacker関連投稿

外部資料