- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with vsphere_conf
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Release Notes
This module automates the software and configuration prerequisites necessary for the puppetlabs/vsphere module.
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
, andbuild-essential
via apt - On RHEL 6 and 7, CentOS and similar, packages
zlib-devel
,libxslt-devel
,patch
andgcc
via yum
- On Debian 7 and 8, Ubuntu 14.04 LTS and similar, packages
- Install the necessary ruby gems
rbvmomi
andhocon
- 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.
- The module installs the packages depending on operating system family Debian or Redhat:
- For Debian it will install the packages
zlib1g-dev
,libxslt1-dev
, andbuild-essential
via apt - For Redhat it will install the packages
zlib-devel
,libxslt-devel
,patch
andgcc
via yum
- For Debian it will install the packages
- The module will install the necessary ruby gems
rbvmomi
andhocon
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.
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,
}
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).
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.
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.
Please test, test, test! No guarantees at all :-)