[chef] Re: Re: Re: Re: Is Berkshelf vagrant plugin are usable only with a application cookbooks instead of pure site cookbooks ?


Chronological Thread 
  • From: Vladimir Skubriev < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Is Berkshelf vagrant plugin are usable only with a application cookbooks instead of pure site cookbooks ?
  • Date: Wed, 30 Oct 2013 17:20:32 +0400

30.10.2013 17:05, Eduardo Dias пишет:
You need to download a box (like ubuntu), create a vagrant file, and vagrant up.
vagrant box add <name> <url> (look at Vagrant to get the corerct url)

Simple Vargrant file:
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.hostname = "<server_name>"
  config.vm.box = "<box_name>"
  config.berkshelf.enabled = true

To be honest I can not understand: "What is the role of plugin enabled by `config.berkshelf.enabled = true` ?"

or

What is the role of berks in virtual machine created by vagrant, with config defined option `config.berkshelf.enabled = true` ?

1. This is for testing cookbooks with chef-solo on workstation?

2. To upload defined in Berksfile cookbooks(from working machine or somewhere else but with berks instead of chef-client) in a virtualmachine provisioned by vagrant ?

So I used opensource chef-server in our localnetwork. And most of all i'am interested in deploy our and community cookbooks on production virtual machines (lxc).

May be my questions is not good. May be I need some time to read a documentation of berks and vagrant. There is no doubt of course.

Why not use only vagrant with defined chef cookbooks ?

Thank youf or help.

# the lines below is to forward ports
  config.vm.network :forwarded_port, host: 8080, guest: 8080
  config.vm.network :forwarded_port, host: 8443, guest: 8443

# the line below must be used if you need to sync a local directory with the remote
  config.vm.synced_folder "../../", "/repo"
  config.vm.provision :chef_solo do |chef|
# the line below is used if you need a proxy
#    config.proxy.http  = "http://web-proxy.corp.hp.com:8080/";
#    config.proxy.https = "http://web-proxy.corp.hp.com:8080/";
# the chef .son you use to pass attributes that you need to rewrite if you use Vagrant for example.
    chef.json = {
    }
    chef.run_list = [
      "recipe[xxxx::default]",
      "recipe[minitest-handler::default]"
    ]
  end
end

vagrant ssh --> to connect to the provisioned system

The vagrant up, destroy, reload, ssh must be ran at the same directory that you have Vagrant file

Eduardo


--
Best regards,

CVision Lab System Administrator
Vladmir Skubriev




Archive powered by MHonArc 2.6.16.

§