Ask Your Question
1

How can I get an up to date version of puppetmaster installed on a Vagrant provisioned VM?

asked 2013-05-22 18:04:14 -0500

jerrac gravatar image

I've been experimenting with http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210.box Basically, I just want a small puppet cluster to test puppet stuff on.

The problem is that when I try to install puppetmaster on it, it wants to install 2.7, rather than a 3.1 (or whatever the latest is) release.

I tried automating it with a puppet file:

node 'default' {
  import 'hosts.pp'
  include 'apt'
  apt::source { 'puppetlabs':
    location   => 'http://apt.puppetlabs.com',
    repos      => 'main',
    key        => '4BD6EC30',
    key_server => 'pgp.mit.edu',
  }
  package {'puppet':
    ensure => 'latest',
    require => Apt::Source['puppetlabs'],
  }
}

node 'vm.puppetmaster.lab' inherits 'default' {
  package {'puppetmaster-passenger ...
(more)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2013-05-24 12:05:23 -0500

jerrac gravatar image

updated 2013-06-01 16:07:44 -0500

ramindk gravatar image

I ended up writing a bash script to deal with it. So my code looks like:

Vagrant vm config:

config.vm.define :puppetmaster do |puppetmaster|
    puppetmaster.vm.box = "ubuntu-server-12042-x64-vbox4210-nocm"
    puppetmaster.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box"
    puppetmaster.vm.network :private_network, ip: "192.168.77.1"
    puppetmaster.vm.network :forwarded_port, guest: 80, host: 90001
    puppetmaster.vm.network :forwarded_port, guest: 443, host: 94431
    puppetmaster.vm.hostname = "vm.puppetmaster.lab"
    puppetmaster.vm.provision :shell, :path => "master-bootstrap.sh"
    puppetmaster.vm.synced_folder "modules/", "/etc/puppet/modules"
    puppetmaster.vm.synced_folder "manifests/", "/etc/puppet/manifests"
end

master-bootstrap.sh:

#!/usr/bin/env bash

wget <a href ...
(more)
edit flag offensive delete link more

Comments

How do I get rid of the A tag around my wget url? It's showing up automatically...

jerrac gravatar imagejerrac ( 2013-05-24 12:06:58 -0500 )edit

That formatting is very weird. I tried a few things, but couldn't make it go away.

ramindk gravatar imageramindk ( 2013-06-01 16:08:34 -0500 )edit
0

answered 2013-05-30 07:19:50 -0500

jgoldschrafe gravatar image

updated 2013-05-30 07:20:27 -0500

Another simple solution would be to use something like Veewee to build your own baseboxes, rather than relying on pre-built ones. This gives you a lot more flexibility in terms of what you end up with. Since Veewee installs Puppet from the official repo already, it will automatically give you the latest available stable version when you create your Vagrant box.

edit flag offensive delete link more

Comments

Not all of the templates do this. Its a PITA. I hope to solve it in the next round of box builds for puppet-vagrant-boxes however: https://github.com/puppetlabs/puppet-vagrant-boxes/issues/12

ken gravatar imageken ( 2013-05-30 07:37:39 -0500 )edit

I did look into building my own box files, but it's not a simple process. I was hoping I could just make a virtualbox vm, then have some script ...(more)

jerrac gravatar imagejerrac ( 2013-05-30 12:03:54 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-05-22 18:04:14 -0500

Seen: 659 times

Last updated: Jun 01 '13