29
29

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Vagrant + CoreOS + Docker + Itamae で使い捨ての Ruby 2.2.0 環境を構築する #ruby #vagrant #docker #itamae

Last updated at Posted at 2014-12-26

Vagrant + CoreOS + Docker + Itamae で使い捨ての Ruby 2.2.0 環境を構築する #ruby #vagrant #docker #itamae

概要

Vagrant + CoreOS + Docker で Ruby 2.2.0 環境を構築する

:deciduous_tree: 前提環境

  • Vagrant 1.6 以降
  • Virtual Box
  • Ruby
  • Itamae

手順

Ubuntu 仮想環境を構築

Itamae で Ruby 2.2 をインストールする

node.json
{
    "rtn_rbenv": {
        "user": "core",
        "versions": {
            "2.2.0": [
                {
                    "name": "bundler",
                    "version": "1.7.3",
                    "force": true
                }
            ]
        },
        "global": "2.2.0"
    }
}
  • 。。。という手順だけでうまくいく予定でしたがエラーに。

  • コミッタ界隈がざわついてる模様

  • recipe に libffi-dev を追加して再試行します。
execute 'apt-get update' do
  command 'apt-get update -y'
end

%w(build-essential libffi-dev).each do |e|
  package e do
    action :install
    options "--force-yes"
  end
end

include_recipe 'rtn_rbenv::user'
  • 再試行
$ itamae ssh -p 2222 -j node.json -i /path/to/your/key -h 172.17.9.101 -u core recipe.rb

確認

# Ubuntu 環境に SSH 接続
$ ssh core@172.17.9.101 -p 2222
Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.17.2+ x86_64)

 * Documentation:  https://help.ubuntu.com/
Last login: Fri Dec 26 01:43:40 2014 from 172.17.9.1
$ ruby -v
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]

:rage1: 歓喜の雄叫びを上げる

$ sudo apt-get install cowsay
$ cowsay -f moose -e "><" "Ruby 2.2.0 Yeah!"
 __________________
< Ruby 2.2.0 Yeah! >
 ------------------
  \
   \   \_\_    _/_/
    \      \__/
           (><)\_______
           (__)\       )\/\
               ||----w |
               ||     ||

:santa::christmas_tree: クリスマスリリースということで、 トナカイ(じゃなくて上記はヘラジカだけど)さんにお願いしました。

Complete!

29
29
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
29
29

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?