Forge Home

vsphere_conf

Install and manage software and config prerequisites for the puppetlabs/vsphere module.

23,922 downloads

19,182 latest version

4.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.0.9 (latest)
  • 0.0.8
  • 0.0.7
  • 0.0.6
  • 0.0.5
  • 0.0.4
  • 0.0.3
  • 0.0.2
  • 0.0.1
released Feb 16th 2016
This version is compatible with:
  • ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'andulla-vsphere_conf', '0.0.9'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add andulla-vsphere_conf
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install andulla-vsphere_conf --version 0.0.9

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

andulla/vsphere_conf — version 0.0.9 Feb 16th 2016

vsphere_conf

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with vsphere_conf
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Release Notes

Overview

This module automates the software and configuration prerequisites necessary for the puppetlabs/vsphere module.

Module Description

The following steps are automated:

  • Install the necessary packages:
    • On Debian 7 and 8, Ubuntu 14.04 LTS and similar, packages zlib1g-dev, libxslt1-dev, and build-essential via apt
    • On RHEL 6 and 7, CentOS and similar, packages zlib-devel, libxslt-devel, patch and gcc via yum
  • Install the necessary ruby gems rbvmomi and hocon
  • Configures /etc/puppetlabs/puppet/vcenter.conf with the following settings:
    • Username (user)
    • Password (password)
    • vSphere host (host)
    • Port (port)
    • Use insecure http? (insecure)
    • SSL encryption? (ssl)
  • You can test the deployment of new virtual machines within the connected vCenter instance by using the vsphere_conf::provision class.

Setup

What vsphere_conf affects

  • The module installs the packages depending on operating system family Debian or Redhat:
    • For Debian it will install the packages zlib1g-dev, libxslt1-dev, and build-essential via apt
    • For Redhat it will install the packages zlib-devel, libxslt-devel, patch and gcc via yum
  • The module will install the necessary ruby gems rbvmomi and hocon via the following executable: /opt/puppetlabs/puppet/bin/gem install rbvmomi hocon --no-ri --no-rdoc
  • This module will configure the /etc/puppetlabs/puppet/vcenter.conf for the connection to the vSphere host.

Beginning with vsphere_conf

At a minimum, you need to include your vSphere vCenter connection settings:

class vsphere_conf {
 host     => 'myvcenterhost.example.com',
 user     => 'myvcenteruser',
 password => 'myvcenteruserpassword',
}

You can also specify additional configuration, like the port used to connect to vCenter, if the connection should be done by http (insecure) and if ssl encryption will be used (ssl).

class vsphere_conf {
 host     => 'myvcenterhost.example.com',
 user     => 'myvcenteruser',
 password => 'myvcenteruserpassword',
 port     => 443,
 insecure => false,
 ssl      => true,
}

Usage

The following parameters can be configured:

  • $packages: Specifies the packages that will be installed as pre requirement for the vSphere module
  • $host: The vSphere vCenter Host that will be used to connect
  • $user: The user that will be used to create, modify and delete virtual machines
  • $password: The password for the user that will be used to connect to the vCenter host
  • $port: The port that will be used to connect to the vCenter instance. Default = 443, if you enable insecure connections you must use port 80
  • $insecure: true if you connect via insecure HTTP (port 80). False if you connect via secure HTTPS (port 443).
  • $ssl: Using ssl to establish the connection to the vSphere vCenter host.
  • $datacenter: The vCenter datacenter to be used by the module (defaults to undef).

If you use the vsphere_conf::provision class you can specify the following parameters:

  • $vmprename: The Pre Name of the virtual machines that will be provisioned ex 'myvirtualmachine' pre name will create VMs with the name myvirtualmachine1, myvirtualmachine2 etc.
  • $numberofvms: the number of virtual machines that should be created. can be also used to do performance tests inside your vSphere environment.
  • $vmlocation: The location of the virtual machine within the VM & Template view. Please also specify the invisible vm folder between datacenter and the first folder name. So a structure datacenter/myvms will look like /datacenter/vm/myvms/ for this parameter.
  • $vmstatus: Specify the status of the VMs - if it should be running, stopped etc.
  • $vmsource: The template source from where the virtual machine should be provisioned from. Please also specify the invisible vm folder between datacenter and the first folder name. So a structure datacenter/mytemplates/mytemplate will look like /datacenter/vm/mytemplates/mytemplate for this parameter.
  • $vmmemory: The amount of virtual memory you would like to configure for the virtual machines (default is 1024 MB of vRAM).
  • $vmvcpus: The number of virtual vCPUs configured for each virtual Machine (default is 1).

Reference

The following classes are included inside the module:

  • vsphere_conf: Default class, calls an install with default values. Requires the $user, $password and $host.
  • vsphere::params: Declares the default values.
  • vsphere::provision: Provision class to provision new example virtual machines for tests.

Limitations

This module uses the puppetlabs/vsphere module, which is only available with Puppet Enterprise.

This module has been tested with Puppet Enterprise 2015.2 and 2015.3 only.

Release Notes

Please test, test, test! No guarantees at all :-)