On 12/1/14 4:56 PM, josie.worker...@gmail.com wrote:
HI there,

I'm looking for any tips/pointers on how to upgrade an existing
puppetmaster installation (v3.2.3, using system ruby 1.8.7 on Centos 6u3).

We don't have RVM installed on the puppetmaster itself, as it's been
around since 2.x days and upgraded over time.

I've installed ruby 1.9.3 from the Centos SCL, and I've managed to
change all profiles to make use of this.

Last part I'm stuck at is how to make the puppetmaster itself use ruby
1.9.3, given the original installation has put the puppet gems
into /usr/lib/ruby/site_ruby/1.8/puppet.

Any help would be hugely appreciated.

Josie

The install is complicated and intricate. You will also need to remember how it works once it's up and running. If you have limited experience with Puppet, Ruby, Passenger, gem installs, strace, etc I do not recommend this. Do not attempt this on your current master, start with a new instance.

1. create a puppetmaster user, create dirs /etc/puppetmaster, /var/lib/puppetmaster Your new Puppet master will run as user puppetmaster.

2. Install Ruby 1.9.3 via SCL, rvm, rbenv, whatever. Leave system Ruby alone. The Puppet agent will continue to use system Ruby.

3. gem install puppet, hiera, and any other gems you currently use. I suggest making a Gemfile and using bundler to install all the needed gems. This will make it easier to clone you Puppet master in the future.

4. Install Passenger 4. Ideally from standard system packages, else gem install it in the Ruby you plan to use (scl, rvm, etc) for your Puppet master. You can get by with Passenger 3 if you install it into the Ruby you plan to use. Passenger 4 allows you to specify any Ruby binary per vhost.

5. Make sure Apache can load Passenger, if it can't fix the paths for PassengerRuby and the location of the Passenger module.

6. /etc/puppetmaster/puppetmaster.conf should be a master only config. Point vardir, ssldir, etc to /var/lib/puppetmaster/

[main]
confdir=/etc/puppetmaster
vardir=/var/lib/puppetmaster
ssldir=$vardir/ssl
# and any other path

7. edit the config.ru that points to your master config

ARGV << "--config=/etc/puppetmaster/puppetmaster.conf"

8. I forget what 8 was for.

9. edit the vhost to point to your new paths and configs

<VirtualHost *:8140>

# if you installed Passenger into a different Ruby than
# the one you installed Puppet into you'll need to tell
# it which to use. Only works for Passenger 4.
# PassengerRuby /home/puppetmaster/.rvm/gems/ruby-1.9.3-p545/wrappers/ruby

# no need to change paths here, but might be better
# to make your own /usr/share/puppetmaster/ dir so that
# you confuse the next admin less
  DocumentRoot /usr/share/puppet/rack/public
  <Directory /usr/share/puppet/rack/public>

10. Get your certs in order. Copy the ca, crl, etc from /var/lib/puppet/ssl/ into /var/lib/puppetmaster/ssl/ Make sure to fix ownership and permissions.

11. copy modules/manifests from /etc/puppet/ to /etc/puppetmaster/

12. Start the Puppet master. Spend an hour looking at logs and strace output to track down the paths and permissions you didn't get right the first time.

Final notes. Anytime you want to run commands against the master install you'll need to load the config. puppet cert --config /etc/puppetmaster/puppetmaster.conf and so on. Also updating the agent won't update the master which can only be updated via gems. Lots of things to forget in this setup.

Ramin

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/547E0629.3020204%40badapple.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to