Ask Your Question
0

bootstrapping puppetmaster on lxc (multiple problems)

asked 2014-03-31 12:30:14 -0500

Adam Ryczkowski gravatar image

updated 2014-04-04 14:04:58 -0500

Installation of puppet master on Ubuntu has always been a matter of luck and a lot of patience to me - there are so many seemingly unrelated things to do which has to be done in the precise order, so many combinations and always-changing behaviour of the software. So I set to write a bootstrapping script, which one day would be able to automate this task. I share it here in hope, that with help of you it will be a good starting point for many beginners.

Prerequisites:

  • Ubuntu-based Linux with recent support for lxc (tested on Ubuntu 14.04 Trusty ...
(more)
edit retag flag offensive close merge delete

Comments

I don't see the reasoning behind wanting to rm -r /var/lib/puppet/ssl. Would you elaborate on that?

ffrank gravatar imageffrank ( 2014-04-03 07:52:04 -0500 )edit

@ffrank After each trial with setting up the puppetserver, I need to advice the client about the new server. AFAIK puppet agents don't support multiple servers. I need to ...(more)

Adam Ryczkowski gravatar imageAdam Ryczkowski ( 2014-04-04 02:25:14 -0500 )edit

Half right I'd say. If you do generate a new CA during master setup, yes, the old client certs won't be of use, because a different CA signed ...(more)

ffrank gravatar imageffrank ( 2014-04-04 03:10:12 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-04-04 14:04:33 -0500

Adam Ryczkowski gravatar image

updated 2014-04-04 14:12:05 -0500

The problem was that hostname still didn't match the 127.0.1.1 host from the /etc/hosts. This is the working version of the script.

#!/bin/bash

puppetmaster=puppetmaster
puppetmasterfqdn=puppetmaster.myfqdn.name
puppetuser=adam
gitlocation=/home/puppet/puppet.git
puppetauth=`cat ~/.ssh/id_rsa.pub`
puppetip='10.0.4.90'
puppetgetewayip='10.0.4.1'

mydir="/var/lib/lxc/$puppetmaster/rootfs"
#mycodename=`lsb_release -c | perl -pe 's/^Codename:\s*(.*)$/$1/'`
mycodename=saucy


#lxc installation

sudo dpkg -s lxc>/dev/null
if [ $? -eq 0 ]; then
    echo "lxc already installed!"
else
    sudo apt-get --yes install lxc
fi


#Container creation

sudo ...
(more)
edit flag offensive delete link more

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: 2014-03-31 12:30:14 -0500

Seen: 125 times

Last updated: Apr 04 '14