VMware has aquired SaltStack a while ago and incorporated some of the products into the vRealize Automation product family. While most of the configuration management functionality focusses on guest operating systems there has been increasing demand to do the same for VMware SDDC components like vCenter, ESX, NSX etc. as well.
As of this VMware has released SDDC modules for SaltStack where my colleague Vincent Riccio has already done a great job in his blog explaining more details on it.
In this blog I’d would like to give a quick guidance on how to make it work on a SaltStack Config appliance that has been deployed by Lifecycle Manager. It requires few additions to the blog from Vincent above. The blog is not intended to provide a comprehensive coverage of the full functionality. Additional use cases might be added in upcoming blogs.
Installation of SDDC modules
Here’s the installation steps on the SaltStack master (appliance):
Install SDDC modules
pip3 install saltext.vmware
Restart service on salt master
service salt-master restart
Verify that files have been installed under /usr/lib/python3.7/site-packages/saltext/vmware/modules
Create the file /etc/salt/minion.d/module_dirs.conf with following content
Restart salt-minion service
service salt-minion restart
Create following top.sls file unter /srv/pillars where you replace the hostname by your salt master
Create vmware_config.sls file in the same directory. This file contains the credentials for vCenter access if you want to leverage the vCenter module.
For a quick and dirty test you could run this command to list all vCenter datacenters:
To test the functionality from the GUI interface you can create a job that is run on the SaltStack master.
Create a state file that is stored on the file server. In this case it simply creates a VM folder on vCenter.
Create a job based on the state file.
Run the job on the SaltStack master.
Follow job execution in activity log.
- Configure roles in Cloud Extensibility Proxy (vRO 8.x) - 1. August 2022
- Manage templates with vSphere content library and vRA 8 - 11. July 2022
- Manage vCenter, ESX, NSX etc. with SaltStack - 28. January 2022