[Groonga-commit] droonga/wikipedia-search.wiki at f9afc54 [master] Updated 実験環境(仮想環境)の構築 (markdown)

Back to archive index

YUKI Piro Hiroshi null+****@clear*****
Wed Apr 16 15:42:08 JST 2014


YUKI "Piro" Hiroshi	2014-04-16 15:42:08 +0900 (Wed, 16 Apr 2014)

  New Revision: f9afc54394911b19b41de3ed93fd3ac634df1ec9
  https://github.com/droonga/wikipedia-search/wiki/%E5%AE%9F%E9%A8%93%E7%92%B0%E5%A2%83%EF%BC%88%E4%BB%AE%E6%83%B3%E7%92%B0%E5%A2%83%EF%BC%89%E3%81%AE%E6%A7%8B%E7%AF%89/f9afc54394911b19b41de3ed93fd3ac634df1ec9

  Message:
    Updated 実験環境(仮想環境)の構築 (markdown)

  Modified files:
    実験環境(仮想環境)の構築.md

  Modified: 実験環境(仮想環境)の構築.md (+26 -17)
===================================================================
--- 実験環境(仮想環境)の構築.md    2014-04-08 18:59:22 +0900 (e63dfe5)
+++ 実験環境(仮想環境)の構築.md    2014-04-16 15:42:08 +0900 (a51067b)
@@ -1,35 +1,44 @@
-vagrantで「ubuntu13.10」という名前の実験環境を用意する。
+vagrantでUbuntu 13.10ベースの実験環境を用意する。
 
 仮想マシンのホストとなる環境のセットアップ
 
     % sudo gem1.9.1 install chef knife-solo
 
-実験環境としての仮想マシンのセットアップ(vagrant使用、Ubuntu 13.10)
+Vagrant自体もインストールする(まだ入っていなければ)。
+
+    % wget https://dl.bintray.com/mitchellh/vagrant/vagrant_1.5.3_x86_64.deb
+    % sudo dpkg -i vagrant_1.5.3_x86_64.deb
+
+実験環境としての仮想マシンのセットアップ(Ubuntu 13.10)
 
     % vagrant box add ubuntu13.10 http://cloud-images.ubuntu.com/vagrant/saucy/current/saucy-server-cloudimg-amd64-vagrant-disk1.box
     % mkdir testserver
     % cd testserver
     % vagrant init ubuntu13.10
 
-設定を書き換えて、固定IPで接続できるようにする。
-
-    % ip=192.168.1.54
-    % net=wlan0
-    % mv Vagrantfile Vagrantfile.bak
-    % cat Vagrantfile.bak | \
-      sed -r -e "s/(^ *)# *(config.vm.network *:bridged)/\1\2, :ip => \"${ip}\", :bridge => \"${net}\"/" \
-      > Vagrantfile
-    % vagrant ssh-config --host ubuntu13.10 | \
-      sed -r -e "s/2222/22/" \ 
-             -e "s/127.0.0.1/${ip}/" \
-      >> ~/.ssh/config
+設定を書き換えて、ノードが3つ起動するようにする。
+
+    % vi Vagrantfile
+    % cat Vagrantfile
+    Vagrant::Config.run do |config|
+      0.upto(2).each do |index|
+        config.vm.define :"node#{index}" do |node_config|
+          node_config.vm.box = "ubuntu13.10"
+          node_config.vm.network :bridged, :bridge => "wlan0"
+          node_config.vm.host_name = "node#{index}"
+        end
+      end
+    end
+    % vagrant ssh-config --host node0 >> ~/.ssh/config
+    % vagrant ssh-config --host node1 >> ~/.ssh/config
+    % vagrant ssh-config --host node2 >> ~/.ssh/config
 
 設定ができたか確認する。
 
     % vagrant up
-    % vagrant ssh
+    % ssh node0
     % exit
-    % ssh vagrant@${ip} -p 22 -i ~/.vagrant.d/insecure_private_key
+    % ssh node1
     % exit
-    % ssh ubuntu13.10
+    % ssh node2
     % exit
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index