GithubHelp home page GithubHelp logo

arunsingh / multi-vagrant-puppet-vms Goto Github PK

View Code? Open in Web Editor NEW

This project forked from garystafford/multi-vagrant-puppet-vms

0.0 3.0 0.0 296 KB

Builds Puppet Master and multiple Puppet Agent Nodes using JSON config file.

Home Page: http://wp.me/p1RD28-1kX

License: Apache License 2.0

Shell 92.93% Puppet 7.07%

multi-vagrant-puppet-vms's Introduction

Vagrant Multiple-VM Creation and Configuration

Automatically provision multiple VMs with Vagrant and VirtualBox. Automatically install, configure, and test Puppet Master and Puppet Agents on those VMs. All instructions can be found in my blog post: http://wp.me/p1RD28-1kX

JSON Configuration File

The Vagrantfile retrieves multiple VM configurations from a separate nodes.json file. All VM configuration is contained in the JSON file. You can add additional VMs to the JSON file, following the existing pattern. The Vagrantfile will loop through all nodes (VMs) in the nodes.json file and create the VMs. You can easily swap configuration files for alternate environments since the Vagrantfile is designed to be generic and portable.

Instructions

vagrant up # brings up all VMs
vagrant ssh puppet.example.com

sudo service puppetmaster status # test that puppet master was installed
sudo service puppetmaster stop
sudo puppet master --verbose --no-daemonize
# Ctrl+C to kill puppet master
sudo service puppetmaster start
sudo puppet cert list --all # check for 'puppet' cert

# Shift+Ctrl+T # new tab on host
vagrant ssh node01.example.com # ssh into agent node
sudo service puppet status # test that agent was installed
sudo puppet agent --test --waitforcert=60 # initiate certificate signing request (CSR)

Back on the Puppet Master server (puppet.example.com)

sudo puppet cert list # should see 'node01.example.com' cert waiting for signature
sudo puppet cert sign --all # sign the agent node(s) cert(s)
sudo puppet cert list --all # check for signed cert(s)

Forwarding Ports

Used by Vagrant and VirtualBox. To create additional forwarding ports, add them to the 'ports' array. For example:

"ports": [
       {
         ":host": 1234,
         ":guest": 2234,
         ":id": "port-1"
       },
       {
         ":host": 5678,
         ":guest": 6789,
         ":id": "port-2"
       }
     ]

Useful Multi-VM Commands

The use of the specific name is optional.

  • vagrant up <machine>
  • vagrant reload <machine>
  • vagrant destroy -f <machine> && vagrant up <machine>
  • vagrant status <machine>
  • vagrant ssh <machine>
  • vagrant global-status
  • facter
  • sudo tail -50 /var/log/syslog
  • sudo tail -50 /var/log/puppet/masterhttp.log
  • `tail -50 ~/VirtualBox\ VMs/postblog//Logs/VBox.log'

multi-vagrant-puppet-vms's People

Contributors

garystafford avatar

Watchers

James Cloos avatar Arun Singh avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.