Skip to content

1. Install Puppet Master

Alessandro Italiano edited this page Apr 18, 2015 · 11 revisions

Exploit cloud computing features in order to auto-provisioning the resources for a puppet server

a. Login to the OpenStack Horizon dashboard

  • http://212.189.205.200/horizon/
  • username: admin_group_< your group >
  • password: < your password >

b. Upload your ssh public key

  • Follow the teacher's suggestions

c. Customise the security group in order to feet your requirements

  • Follow the teacher's suggestions

d. Instantiate one VM using the flavour m1.medium and the image ubuntu

  • Follow the teacher's suggestions

  1. Install a Puppet Master

    • Login into the Puppet Master
    • sudo su -
    • echo "<PUPPET MASTER IP> puppetmaster.school.cloud.ba.infn.it puppetmaster" >> /etc/hosts
    • Install the repo for puppet software for Ubuntu 14.04

      • wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb
      • sudo dpkg -i puppetlabs-release-trusty.deb
      • sudo apt-get update
    • Install the Puppet Master server

      • apt-get -y install puppetmaster
      • service puppetmaster status
    • Hiera will be automatically installed as puppet dependence

  2. Configure the Puppet Master

    Download all the configuration files in the config dir on this repo into /etc/puppet dir on your puppet master host. You don't need to modify them.

    • wget -O /etc/puppet/autosign.conf http://goo.gl/IyLnsw
    • wget -O /etc/puppet/hiera.yaml http://goo.gl/mQtMzx
    • wget -O /etc/puppet/puppet.conf http://goo.gl/c8WUiH

    Create some directories for future use

    • mkdir -p /etc/puppet/environments/production/hieradata/nodes
    • mkdir -p /etc/puppet/environments/production/manifests/nodes

    Start the Puppet Master

    • service puppetmaster restart

    Test the Puppet Master

    • service puppetmaster status
    • telnet localhost 8140
  3. Test Puppet Master[PM] and Agent[PA] communication

    • Issue the date command, does it correct ?

      • date
    • PM: Install the ntp module

      • puppet module install puppetlabs-ntp
      • puppet module install saz-timezone
      • puppet module install stephenrjohnson-puppet
      • puppet module list --tree
    • PM: deploy a default ntp configuration

      • cd /etc/puppet/environments/production
      • wget -O hieradata/common.yaml http://goo.gl/MBVxRw
      • wget -O manifests/site.pp http://goo.gl/IAi1QD
    • PA: execute the puppet agent

      • puppet agent --server puppet master.school.cloud.ba.infn.it --onetime --no-daemonize --verbose --environment production