LoginSignup
10
10

More than 5 years have passed since last update.

Packerを利用開始するまでのメモ

Posted at

背景

Why?

インフラの構築作業を自働化したい

How?

ミドルウェアのレイヤーを対象とし、Chefを利用して実装する

What?

何度も繰り返し構築と破壊を繰り返せる開発環境を用意する

作業環境

software version
Mac OS X 10.8.4
zsh 4.3.11 (i386-apple-darwin12.0)
git 1.7.12.4 (Apple Git-37)
Homebrew 0.9.4
VirtualBox 4.2.16-86992
rbenv 0.4.0-51-ga2adc61
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.4.1]
bundler 1.3.5
vagrant 1.2.7
Packer 0.3.4
rbenv plugins github
rbenv-binstubs https://github.com/ianheggie/rbenv-binstubs.git
rbenv-gem-rehash https://github.com/sstephenson/rbenv-gem-rehash.git
rbenv-gemset https://github.com/jf/rbenv-gemset.git
ruby-build https://github.com/sstephenson/ruby-build.git
# Source User definitions
if [ -d $HOME/.rbenv/bin ]; then
    export PATH="$HOME/.rbenv/bin:./.bundle/bin:$PATH"
    eval "$(rbenv init -)"
fi

1. VirtualBox のインストール

上記サイトからバイナリパッケージをダウンロードして実行する
- VirtualBox platform packages
- VirtualBox xx.xx.xx Oracle VM VirtualBox Extension Pack ( xx.xx.xx はバージョン )

2. vagrant のインストール

source "https://rubygems.org"

gem 'vagrant',      :git =>    'https://github.com/mitchellh/vagrant.git',
                    :tag =>    'v1.2.7'
bundle install --path vendor/bundle --binstubs .bundle/bin
source ~/.zshrc

3. Packer のインストール

brew tap homebrew/binary
brew install packer

4. Vagrantfile の設定

以降は、これから実際に設定ファイルを書いて試してみた結果を後日記載する
実際に書いてみた設定ファイルは以下を参照(予定)

5. machine.json の設定

10
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
10