Version information
This module has been deprecated by its author since Apr 1st 2023.
Start using this module
Documentation
VMware vCenter module for Puppet
This module deploys VMware vCenter and manages folders, datacenter, ESX host and clusters.
Installation
The vCenter module depends on the following modules:
The modules can be installed via puppet module tool (require version 2.7.14+):
puppet module install puppetlabs/vcenter
Preparing to install into /Users/nan/.puppet/modules ...
Downloading from http://forge.puppetlabs.com ...
Installing -- do not interrupt ...
/Users/nan/.puppet/modules
ââ⬠puppetlabs-vcenter (v0.1.0)
ââ⬠puppetlabs-mssql (v0.1.0)
â âââ puppetlabs-dism (v0.1.0)
âââ puppetlabs-registry (v0.1.1)
Usage
Parameters:
- media: vCenter installation software media location.
- sql_media: Microsoft SQL installation software media location.
- username: vcenter service account (default: VCENTER).
- password: vcenter service account password (default: 'vC3nt!2008demo'),
- jvm_memory_option: vcenter sql server size, support S, M, L.
- client: install vsphere client software (default: true).
Example:
class vcenter {
media => 's:\\',
jvm_memory_option => 'M',
}
If you already have vCenter deployed or are using vCSA, rbvmomi package is the only dependency for vCenter resources:
package { 'rbvmomi':
ensure => present,
provider => 'gem',
}
Vc_folder {
require => Pakcage['rbvmomi'],
}
...
Vc_host {
require => Pakcage['rbvmomi'],
}
vc_folder
Manages vCenter folders.
vc_folder { 'lab1':
path => '/stumptown_lab1', # namevar
ensure => present,
connection => 'administrator:puppet@vcenter.puppetlabs.lan',
}
vc_datacenter
Manages vCenter datacenter.
vc_datacenter { 'dc1':
path => '/stumptown_lab1/datacenter1', # namevar
ensure => present,
connection => 'administrator:puppet@vcenter.puppetlabs.lan',
}
vc_cluster
Manages vCenter cluster.
vc_cluster { 'cl1':
path => '/stumptown_lab1/datacenter1/cluster1', # namevar
ensure => present,
connection => 'administrator:puppet@vcenter.puppetlabs.lan',
}
vc_host
Manages vCenter host.
vc_cluster { '192.168.1.1':
path => '/stumptown_lab1/datacenter1/cluster1', # namevar
ensure => present,
username => 'root', # ESX host username
password => 'demo1', # ESX host password
connection => 'administrator:puppet@vcenter.puppetlabs.lan',
}
Export and Collect vc_host resources:
In puppet.conf enable storeconfig to support export resources on the Puppet master. The following section is an example for mysql, see documentation other databases such as puppetdb.
[master]
storeconfigs = true
storeconfigs_backend = mysql
dbuser = puppet
dbpassword = password
dbserver = master.puppetlabs.local
The provision host can export vc_host resources to be managed by vCenter controlled by puppet:
@@vc_host { '192.168.1.1':
ensure => 'present',
username => 'root',
password => 'demo1',
tag => 'beaker',
}
On the puppet master specify where these tags get collected for the vCenter system.
node vcenter.puppetlabs.local {
vc_folder { '/lab':
ensure => present,
}
vc_datacenter { [ '/lab/ny', '/lab/ca' ]:
ensure => present,
}
vc_cluster { [ '/lab/ny/kermit', '/lab/ca/beaker' ]:
ensure => present,
}
# Collect resource specify path and connection for vc_host:
Vc_host <<| tag=='kermit' |>> {
ensure => present,
path => '/lab/ny/kermit',
connection => 'administrator:vmware@192.168.72.100',
}
Vc_host <<| tag=='dc2' |>> {
ensure => present,
path => '/lab/ca/beaker',
connection => 'administrator:vmware2@192.168.72.100',
}
}
Types in this module release
Dependencies
- puppetlabs/registry (>= 0.1.1)
- puppetlabs/mssql (>= 0.1.0)
Copyright (C) 2012 Puppet Labs Inc Puppet Labs can be contacted at: info@puppetlabs.com Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.