LoginSignup
10
10

More than 5 years have passed since last update.

boxen使ってみた

Last updated at Posted at 2013-11-20

月一でOS再インストールしている自分には神ツール。
puppetの勉強にもなるしね。

準備

cd
git clone https://github.com/boxen/our-boxen
cd our-boxen
git remote rm origin
git remote add origin ~/our-boxen
git push -u origin master

設定

Puppetfile追加分
github "vagrant",   "3.0.0"
github "chrome",    "1.1.2"
github "macvim",    "1.0.0"
github "virtualbox","1.0.9"
github "phpstorm",  "1.0.4"
github "vlc",       "1.0.5"
github "java",      "1.1.0"
github "wget",      "1.0.0"
manifests/site.pp以下コメントアウト
  #include nginx

  #include nodejs::v0_4
  #include nodejs::v0_6
  #include nodejs::v0_8

  #include ruby::1_8_7
  #include ruby::1_9_2
  #include ruby::1_9_3
modules/people/manifests/tukiyo.pp
class people::tukiyo {

  # Puppetfile で定義したもの
  include chrome
  include macvim
  include vagrant
  include virtualbox
  include phpstorm
  include vlc 
  include java
  include wget

  # homebrew でインストールするもの
  package {
    [   
      'tmux',
      'w3m',
      'nkf',
    ]:  
  }
  package {
    'Kobito':
      source   => "http://kobito.qiita.com/download/Kobito_v1.8.3.zip",
      provider => compressed_app;
    'GoogleJapaneseInput':
      source => "http://dl.google.com/japanese-ime/latest/GoogleJapaneseInput.dmg",
      provider => pkgdmg;
  }

  $home     = "/Users/${::boxen_user}"
  $dotfiles = "${home}/.dotfiles"

  file { $home:
    ensure  => directory
  }

  repository { $dotfiles:
    source  => 'tukiyo/dotfiles',
    require => File[$home]
  }
  exec { "cd ${dotfiles} && git checkout mac && sh ${dotfiles}/setup.sh":
    cwd => $dotfiles,
    require => Repository[$dotfiles],
  }
  exec { "xcode-select --install":
    unless => "/bin/test -e /usr/bin/xcodebuild",
  }

}

実行

$ script/boxen --no-fde

30分くらいかかる。
実行中~/src/ が作られるが、これはscript/boxen --no-fdeにて使われるディレクトリのため消してはいけない。
(消したらエラーで止まった・・・。)

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