Vagrant CFEngine Provisioner - Missing documentation

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Vagrant CFEngine Provisioner - Missing documentation

Nick Anderson
I am testing out the new CFEngine provisioner. I got the basics working, but the documentation seems to be missing http://docs.vagrantup.com/v2/provisioning/index.html.

I am trying to seed the policy using files_path which I have set to a directory relative to my Vagrantfile. It doesnt seem to seed the policy. It's quite possible I am just doing it wrong.

Here is the relevant section of my Vagrantfile, any ideas?

  config.vm.provision :cfengine do |cfengine|
    cfengine.install = true
    cfengine.policy_server_address = "192.168.33.2"
    cfengine.files_path = "masterfiles"
  end

  num_nodes = 1
  (1..num_nodes).each do |num|

      hostnumber = "#{num}".rjust(3,'0')
      vmname = "node#{hostnumber}"
      config.vm.define vmname.to_sym do |node_config|
        node_config.vm.network :private_network, ip: "192.168.33.#{1+num}"
        node_config.vm.hostname = vmname
      end
  end

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Vagrant CFEngine Provisioner - Missing documentation

Mitchell Hashimoto
Nick,

Ignoring your main question (sorry) because of time, but for documentation: I'm sorry its missing. I didn't have time to write it before release and never got a pull. Would you be interested in writing some once we get everything figured out and working?

Best,
Mitchell


On Wed, Apr 17, 2013 at 5:37 PM, Nick Anderson <[hidden email]> wrote:
I am testing out the new CFEngine provisioner. I got the basics working, but the documentation seems to be missing http://docs.vagrantup.com/v2/provisioning/index.html.

I am trying to seed the policy using files_path which I have set to a directory relative to my Vagrantfile. It doesnt seem to seed the policy. It's quite possible I am just doing it wrong.

Here is the relevant section of my Vagrantfile, any ideas?

  config.vm.provision :cfengine do |cfengine|
    cfengine.install = true
    cfengine.policy_server_address = "192.168.33.2"
    cfengine.files_path = "masterfiles"
  end

  num_nodes = 1
  (1..num_nodes).each do |num|

      hostnumber = "#{num}".rjust(3,'0')
      vmname = "node#{hostnumber}"
      config.vm.define vmname.to_sym do |node_config|
        node_config.vm.network :private_network, ip: "192.168.33.#{1+num}"
        node_config.vm.hostname = vmname
      end
  end

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Vagrant CFEngine Provisioner - Missing documentation

Nick Anderson


On Thursday, April 18, 2013 1:58:01 AM UTC-5, Mitchell Hashimoto wrote:
Nick,

Ignoring your main question (sorry) because of time, but for documentation: I'm sorry its missing. I didn't have time to write it before release and never got a pull. Would you be interested in writing some once we get everything figured out and working?


Sure, I could take a stab at it.

Looks like it doesn't work to specify a file:/// url for the gpg key.

I downloaded the cfengine gpg key and placed it in my project directory then I specified the url like this.

    cfengine.repo_gpg_key_url = "file:///vagrant/cfengine_gpg.key"

Installing CFEngine fails when when I try to do this.

Digging around I see that wget is used to retrieve the file, but wget doesn't support the file scheme. It silently fails, this should probably at minimum show up as an error. curl supports the file scheme, but its probably a little less ubiquitous in minimal installs. rpm --import takes urls as well as file paths, I am not sure what the advantage is to the intermediary wget. If repo_gpg_key_url is passed directly to rpm --import it could be a file:// url an http url or a file path.

[root@node001 ~]# rpm -qa | grep gpg
libgpg-error-1.4-2
gpg-pubkey-e8562897-459f07a4
[root@node001 ~]# rpm --import file:///vagrant/cfengine_gpg.key
[root@node001 ~]# rpm -qa | grep gpg
libgpg-error-1.4-2
gpg-pubkey-e8562897-459f07a4
gpg-pubkey-f97e94be-50281f57

https://github.com/mitchellh/vagrant/blob/master/plugins/provisioners/cfengine/cap/redhat/cfengine_install.rb#L15

But file:// and http:// wont work for apt-key. Maybe curl is a better option.


--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.