vagrant provision経由でゲストOSにパッケージ導入
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
** vagrant provision経由でゲストOSにパッケージ導入 [#x585...
- ホストOS:Windows7、ゲストOS:CentOS 6.4の条件で試してみ...
- windowsコマンドから、chef-solo 叩くもエラーとなってしま...
-- windows側で「Hello」まで出した環境を作成していることが...
*** とりあえず centos のbox いれてみる。そして…。 [#sfbc4...
- こんな感じで Vagrantfile を作ってゲストOSをセットアップ...
Vagrant.configure("2") do |config|
config.vm.box = "CentOS-6.3-x86_64-v20130101"
config.vm.box_url = "http://developer.nrel.gov/downloa...
config.vm.define :chef1 do |chef1|
chef1.vm.network :forwarded_port, guest: 22, host: 2...
chef1.vm.network :private_network, ip: "192.168.10.12"
end
end
- このまま使ってもいいけど、セキュリティ的にあれなので「y...
[chef1] -- /vagrant
The following SSH command responded with a non-zero exit...
Vagrant assumes that this means the command failed!
-- vboxをリビルドしてやる / [[Vagrantでmountエラーで、フ...
[root@localhost vagrant]# /etc/init.d/vboxadd setup
Removing existing VirtualBox non-DKMS kernel modules ...
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module ...
Building the shared folder support module ...
Building the OpenGL support module ...
(Look at /var/log/vboxadd-install.log to find out what w...
Doing non-kernel setup of the Guest Additions ...
- ゲストOS再起動して、/vagrant がマウントされていることを...
-- 蛇足、centos のバージョン確認方法
[root@localhost vagrant]# cat /etc/redhat-release
CentOS release 6.4 (Final)
*** provision の設定 [#l7b1309f]
- provision の設定を Vagrantfile にいれてみる。(C:\Users\...
Vagrant.configure("2") do |config|
config.vm.box = "CentOS-6.3-x86_64-v20130101"
config.vm.box_url = "http://developer.nrel.gov/downloa...
config.vm.define :chef1 do |chef1|
chef1.vm.network :forwarded_port, guest: 22, host: 2...
chef1.vm.network :private_network, ip: "192.168.10.12"
end
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "./chef-repo/cookbooks"
chef.add_recipe "hello"
end
end
- この状態でゲストOSを再起動してみる。
C:\Users\hoge\chef-repo> vagrant reload
-- どきどき
…
[chef1] Mounting shared folders...
[chef1] -- /vagrant
[chef1] -- /tmp/vagrant-chef-1/chef-solo-1/cookbooks
[chef1] Running provisioner: chef_solo...
Generating chef JSON and uploading...
Running chef-solo...
[2013-08-20T09:42:34+00:00] INFO: *** Chef 10.16.4 ***
[2013-08-20T09:42:34+00:00] INFO: Setting the run_list t...
[2013-08-20T09:42:34+00:00] INFO: Run List is [recipe[he...
[2013-08-20T09:42:34+00:00] INFO: Run List expands to [h...
[2013-08-20T09:42:34+00:00] INFO: Starting Chef Run for ...
[2013-08-20T09:42:34+00:00] INFO: Running start handlers
[2013-08-20T09:42:34+00:00] INFO: Start handlers complete.
[2013-08-20T09:42:34+00:00] INFO: Hello, Chef! ...
[2013-08-20T09:42:34+00:00] INFO: Chef Run complete in 0...
[2013-08-20T09:42:34+00:00] INFO: Running report handlers
[2013-08-20T09:42:34+00:00] INFO: Report handlers complete
*** zsh をいれてみる [#q7813266]
- default.rb を編集
C:\Users\hoge\chef-repo\cookbooks\hello\recipes> notepad...
#
# Cookbook Name:: hello
# Recipe:: default
#
# Copyright 2013, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#
log "Hello, Chef!"
package "zsh" do
action :install
end
- provision 実行!
C:\Users\hoge\chef-repo> vagrant provision
[chef1] Running provisioner: chef_solo...
Generating chef JSON and uploading...
Running chef-solo...
[2013-08-20T09:50:57+00:00] INFO: *** Chef 10.16.4 ***
[2013-08-20T09:50:57+00:00] INFO: Setting the run_list t...
[2013-08-20T09:50:57+00:00] INFO: Run List is [recipe[he...
[2013-08-20T09:50:57+00:00] INFO: Run List expands to [h...
[2013-08-20T09:50:57+00:00] INFO: Starting Chef Run for ...
[2013-08-20T09:50:57+00:00] INFO: Running start handlers
[2013-08-20T09:50:57+00:00] INFO: Start handlers complete.
[2013-08-20T09:50:57+00:00] INFO: Hello, Chef!
[2013-08-20T09:51:00+00:00] INFO: package[zsh] installin...
[2013-08-20T09:51:09+00:00] INFO: Chef Run complete in 1...
[2013-08-20T09:51:09+00:00] INFO: Running report handlers
[2013-08-20T09:51:09+00:00] INFO: Report handlers complete
*** 参考にさせて頂いたサイト様 [#r86711d4]
- [[VagrantとChef-soloについて学んだいくつかのこと>http:/...
- [[VagrantとChef-soloについて初歩の備忘>http://havelog.a...
終了行:
** vagrant provision経由でゲストOSにパッケージ導入 [#x585...
- ホストOS:Windows7、ゲストOS:CentOS 6.4の条件で試してみ...
- windowsコマンドから、chef-solo 叩くもエラーとなってしま...
-- windows側で「Hello」まで出した環境を作成していることが...
*** とりあえず centos のbox いれてみる。そして…。 [#sfbc4...
- こんな感じで Vagrantfile を作ってゲストOSをセットアップ...
Vagrant.configure("2") do |config|
config.vm.box = "CentOS-6.3-x86_64-v20130101"
config.vm.box_url = "http://developer.nrel.gov/downloa...
config.vm.define :chef1 do |chef1|
chef1.vm.network :forwarded_port, guest: 22, host: 2...
chef1.vm.network :private_network, ip: "192.168.10.12"
end
end
- このまま使ってもいいけど、セキュリティ的にあれなので「y...
[chef1] -- /vagrant
The following SSH command responded with a non-zero exit...
Vagrant assumes that this means the command failed!
-- vboxをリビルドしてやる / [[Vagrantでmountエラーで、フ...
[root@localhost vagrant]# /etc/init.d/vboxadd setup
Removing existing VirtualBox non-DKMS kernel modules ...
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module ...
Building the shared folder support module ...
Building the OpenGL support module ...
(Look at /var/log/vboxadd-install.log to find out what w...
Doing non-kernel setup of the Guest Additions ...
- ゲストOS再起動して、/vagrant がマウントされていることを...
-- 蛇足、centos のバージョン確認方法
[root@localhost vagrant]# cat /etc/redhat-release
CentOS release 6.4 (Final)
*** provision の設定 [#l7b1309f]
- provision の設定を Vagrantfile にいれてみる。(C:\Users\...
Vagrant.configure("2") do |config|
config.vm.box = "CentOS-6.3-x86_64-v20130101"
config.vm.box_url = "http://developer.nrel.gov/downloa...
config.vm.define :chef1 do |chef1|
chef1.vm.network :forwarded_port, guest: 22, host: 2...
chef1.vm.network :private_network, ip: "192.168.10.12"
end
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "./chef-repo/cookbooks"
chef.add_recipe "hello"
end
end
- この状態でゲストOSを再起動してみる。
C:\Users\hoge\chef-repo> vagrant reload
-- どきどき
…
[chef1] Mounting shared folders...
[chef1] -- /vagrant
[chef1] -- /tmp/vagrant-chef-1/chef-solo-1/cookbooks
[chef1] Running provisioner: chef_solo...
Generating chef JSON and uploading...
Running chef-solo...
[2013-08-20T09:42:34+00:00] INFO: *** Chef 10.16.4 ***
[2013-08-20T09:42:34+00:00] INFO: Setting the run_list t...
[2013-08-20T09:42:34+00:00] INFO: Run List is [recipe[he...
[2013-08-20T09:42:34+00:00] INFO: Run List expands to [h...
[2013-08-20T09:42:34+00:00] INFO: Starting Chef Run for ...
[2013-08-20T09:42:34+00:00] INFO: Running start handlers
[2013-08-20T09:42:34+00:00] INFO: Start handlers complete.
[2013-08-20T09:42:34+00:00] INFO: Hello, Chef! ...
[2013-08-20T09:42:34+00:00] INFO: Chef Run complete in 0...
[2013-08-20T09:42:34+00:00] INFO: Running report handlers
[2013-08-20T09:42:34+00:00] INFO: Report handlers complete
*** zsh をいれてみる [#q7813266]
- default.rb を編集
C:\Users\hoge\chef-repo\cookbooks\hello\recipes> notepad...
#
# Cookbook Name:: hello
# Recipe:: default
#
# Copyright 2013, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#
log "Hello, Chef!"
package "zsh" do
action :install
end
- provision 実行!
C:\Users\hoge\chef-repo> vagrant provision
[chef1] Running provisioner: chef_solo...
Generating chef JSON and uploading...
Running chef-solo...
[2013-08-20T09:50:57+00:00] INFO: *** Chef 10.16.4 ***
[2013-08-20T09:50:57+00:00] INFO: Setting the run_list t...
[2013-08-20T09:50:57+00:00] INFO: Run List is [recipe[he...
[2013-08-20T09:50:57+00:00] INFO: Run List expands to [h...
[2013-08-20T09:50:57+00:00] INFO: Starting Chef Run for ...
[2013-08-20T09:50:57+00:00] INFO: Running start handlers
[2013-08-20T09:50:57+00:00] INFO: Start handlers complete.
[2013-08-20T09:50:57+00:00] INFO: Hello, Chef!
[2013-08-20T09:51:00+00:00] INFO: package[zsh] installin...
[2013-08-20T09:51:09+00:00] INFO: Chef Run complete in 1...
[2013-08-20T09:51:09+00:00] INFO: Running report handlers
[2013-08-20T09:51:09+00:00] INFO: Report handlers complete
*** 参考にさせて頂いたサイト様 [#r86711d4]
- [[VagrantとChef-soloについて学んだいくつかのこと>http:/...
- [[VagrantとChef-soloについて初歩の備忘>http://havelog.a...
ページ名: