The Salt Appliance
How to use the Salt Appliance OVA
v0.10.0
| Specification | Details |
|---|---|
| Salt Appliance Description & Location | -Placeholder URL- |
| Appliance Profile | 1 vCPU 2GB Memory 16GB Hard disk 1 NIC VM version 15 |
| Dependencies | • vSphere 9 & above vCenter and ESX Hosts (tested) • One IPv4 address • Network connectivity to 9.x VMware appliances • One or more 9.x VMware appliances • Administrative username and password to each VMware Appliance |
The basic overview
- Deploy the OVA
- Login
- VMware appliance credentials input
- Review sample Salt state files (provide specific functionality)
- Run Salt commands to perform the task.
Step by Step
1. Deploy the OVA
Deploy the OVA in your environment with the defaults. It needs an IP that can reach the VMware appliances you want to reach. It will pick up a dynamic IP by default so change it to a static one if you need to.
2. Login
- Credentials are username:
rootwith password:shessalty. You will be prompted to change the password upon successful login. - It is highly recommended that you run
tdnf updateto update the Photon OS with the latest patches. - Salt Master 3008.2, Salt Minion 3008.2, and the Salt Extensions for VCF are already installed. You can check the Salt version by running the following commands:
salt-master --versionsalt-minion --version
- Two directories that are required by Salt Master were created:
/srv/pillar— in this example use case, this directory will hold the credentials to your target VCF Appliances./srv/salt— this is the default location where Salt Master holds the Salt State files. Salt state files are text based files where you document your desired values for configuration settings (for this example).
You can navigate into those directories to view the example files that have been created for your use. You will need to edit those files for your environment next.
3. Modify the sample default files with your VMware appliance credentials
Navigate to /srv/pillar and view the example files:
| File | Description |
|---|---|
vcfcredentialspillar.sls | This system is designed to use this file as the default file containing credentials to your VCF environment. You will edit this file in order to configure Salt to access your VCF appliances. |
vcfcredentialspillar-reference.sls | If you are unsure of any changes in the default vcfcredentialspillar.sls file, you can refer to this file for reference. |
vcfcredentialspillar-EXAMPLE.sls | During my testing, besides the actual password, these were the settings I used to successfully use Salt with my VCF instance. |
All example files provided in /srv/pillar and /srv/salt adhere to Salt’s required formatting and syntax. If you deviate from this format, Salt will not be able to parse, read, and use the file.
Edit the vcfcredentialspillar.sls file and add the username and password to the VCF components you would like to target. Comment out any components you do not intend to use.
Here is an example of the contents of the vcfcredentialspillar.sls file:
saltext.vcf:
vcenter:
host: myfqdn.myorg.com
username: administrator@vsphere.local
password: yourpasswordhere
verify_ssl: false
sddc_manager:
host: myfqdn.myorg.com
username: administrator@vsphere.local
password: yourpasswordhere
verify_ssl: false
nsx:
host: myfqdn.myorg.com
username: admin
password: yourpasswordhere
verify_ssl: false
vcf_ops:
host: myfqdn.myorg.com
username: admin
password: yourpasswordhere
verify_ssl: false
Please keep in mind that this ova and the Salt components in this installation are designed to use the credentials outlined in the vcfcredentials.sls file. If you use a different credential for the appliances, they may not work.
Important: It is recommended that you issue the following command in order to ensure the Salt system is refreshed to use your credentials:
salt-call saltutils.pillar_refresh
*Important Note: It is recommended to encrypt any files you store sensitive credentials or important data. Since this system is being offered as a proof of concept for functionality, clear text files are being used to reduce the complexity of the environment.
4. Review sample Salt state files
Modify the sample Salt state files that contain the settings you want to monitor for.
All example files provided in /srv/pillar and /srv/salt adhere to Salt’s required formatting and syntax. If you deviate from this format, Salt will not be able to parse, read, and use the file.
Navigate to /srv/salt and review the sample files included:
| File | Description |
|---|---|
checkpwexpire_AllVCF.sls | This state file will return all local accounts on VCF with passwords that will expire within 90 days. The expiration length of 90 days is modifiable in the file. This file will only return the requested data. |
dns_VC.sls | This file will compare the dns server setting in vcenter against the dns server listed in this file (8.8.8.8 is in the file as a default). This file will tell you whether the target vcenter is using the designated dns server. This file can also apply the dns server setting on vCenter if it does not match the dns setting in the file. |
list_local_users_ALL_VCF.sls | This file will return all local users from all VCF appliances. This file will only return the requested data. |
list_local_users_NSX.sls | This file will return all local users from NSX appliances. This file will only return the requested data. |
list_local_users_VC.sls | This file will return all local users from vCenter appliances. This file will only return the requested data. |
These sample Salt state files are intentional in their simplicity and are meant to demonstrate the basic Salt constructs needed to perform operational VCF Tasks. Salt is capable of significantly more complex logic via the Salt state files, jinja files, top files, etc. However, the more advanced Salt capabilities are beyond the scope of this post.
5. Run Salt commands to perform the task
Execute a Salt state file to perform the designated task in the state file.
| File | Commands |
|---|---|
checkpwexpire_AllVCF.sls | At the command line of the system:salt '*' state.apply checkpwexpire_AllVCFIf you want to capture the return in a file, direct the return to a file: salt '*' state.apply checkpwexpire_AllVCF > /tmp/checkpwexpire_AllVCF_output.txt |
dns_VC.sls | At the command line of the system:salt '*' state.apply dns_VC test=TrueTo update the vCenter's dns settings with what is in the dns_VC.sls file, issue the following command: salt '*' state.apply dns_VC |
list_local_users_ALL_VCF.sls | At the command line of the system:salt '*' state.apply list_local_users_ALL_VCFIf you want to capture the return in a file, direct the return to a file: salt '*' state.apply list_local_users_ALL_VCF > /tmp/list_local_users_ALL_VCF_output.txt |
list_local_users_NSX.sls | At the command line of the system:salt '*' state.apply list_local_users_NSXIf you want to capture the return in a file, direct the return to a file: salt '*' state.apply list_local_users_NSX > /tmp/list_local_users_NSX_output.txt |
list_local_users_VC.sls | At the command line of the system:salt '*' state.apply list_local_users_VCIf you want to capture the return in a file, direct the return to a file: salt '*' state.apply list_local_users_VC > /tmp/list_local_users_VC_output.txt |
If you want to see what else is possible with the modules on the OVA, visit the saltext-vcf page.
Additional Common Tasks
| Task | Command |
|---|---|
| Getting all VCF appliance certificates | Salt '*' vcf_vcfops_fleet_certificates.list_If you want to save output to a file: Salt '*' vcf_vcfops_fleet_certificates.list_ > filename |
| List accounts in all VCF appliances in your pillar | Salt "*" vcf_vcfops_fleet_passwords.query_accountsIf you want to save output to a file: Salt "*" vcf_vcfops_fleet_passwords.query_accounts > filename |
| List accounts in vCenters only | Salt "*" vcf_vcfops_fleet_passwords.list_ appliance=VCENTER |
| List Certs in vCenters Only | Salt '*' vcf_vcfops_fleet_certificates.query_certificates appliance=VCENTER category=TLS_CERT |
| List certs in NSX Managers Only | Salt '*' vcf_vcfops_fleet_certificates.query_certificates appliance=NSX category=TLS_CERT |
Saltext-VCF Module Reference
For reference, here is the saltext-vcf modules partial functionality parsed:
| VCF Component | Function Category | ID | Action Description | Saltext-VCF Module Target | Comments / Details |
|---|---|---|---|---|---|
| SDDC Manager | Domain Management | 1.1 | Create Workload Domain | vcf_sddc_domain.create | Deploys new workload domains via JSON specification files. |
| 1.2 | List/Read Domains | vcf_sddc_domain.list | Retrieves configuration and health status of all active domains. | ||
| 1.3 | Delete/Decommission Domain | vcf_sddc_domain.delete | Safely tears down workload domains and releases host inventory. | ||
| Host Management | 2.1 | Commission ESXi Hosts | vcf_sddc_host.commission | Validates and introduces physical/virtual hosts into SDDC inventory. | |
| 2.2 | Decommission ESXi Hosts | vcf_sddc_host.decommission | Cleans configurations and safely unbinds hosts from the SDDC pool. | ||
| Lifecycle & Secrets | 3.1 | Manage Network Pools | vcf_sddc_network.pool_manage | Automates VTEP, vMotion, and vSAN IP pool allocations. | |
| 3.2 | Password Rotation | vcf_sddc_credentials.rotate | Triggers automated rotation of system and service passwords. | ||
| vCenter Server | Datacenters & Clusters | 4.1 | Create Datacenter | vcf_vcenter_datacenter.create | Initializes root Datacenter inventory objects. |
| 4.2 | Manage Cluster Configurations | vcf_vcenter_cluster.manage | Enforces HA, DRS, and EVC settings across host clusters. | ||
| Virtual Networking | 5.1 | Create Distributed Switches (vDS) | vcf_vcenter_network.vds_create | Programs virtual distributed switches globally. | |
| 5.2 | Configure Port Groups | vcf_vcenter_network.portgroup_manage | Defines VLAN bindings, teaming policies, and active uplinks. | ||
| Virtual Machines | 6.1 | Deploy/Clone VM | vcf_vcenter_vm.deploy | Provisions VMs from templates using customization specs. | |
| 6.2 | Manage VM State | vcf_vcenter_vm.power | Asserts execution states (Power On, Off, Soft Reboot). | ||
| NSX | Gateway Routing | 7.1 | Configure Tier-0 Gateway | vcf_nsx_t0.manage | Establishes top-tier routing interfaces and physical peerings. |
| 7.2 | Configure Tier-1 Gateway | vcf_nsx_t1.manage | Sets up tenant-isolated segment gateways linked to Tier-0. | ||
| Logical Networking | 8.1 | Create Segment | vcf_nsx_segment.create | Programs overlays and VLAN logical segments. | |
| 8.2 | Delete Segment | vcf_nsx_segment.delete | Tears down segment networks when empty. | ||
| Security | 9.1 | Configure DFW Rules | vcf_nsx_security.dfw_policy | Orchestrates stateful distributed firewall rules system-wide. | |
| vSAN | Storage Architecture | 10.1 | Enable vSAN Cluster | vcf_vsan.cluster_configure | Enforces vSAN cluster configuration and storage profiles. |
| 10.2 | Manage Disk Groups | vcf_vsan.disk_group_manage | Claims local cache and capacity drives per host. | ||
| 10.3 | Fault Domain Routing | vcf_vsan.fault_domain_config | Organizes rack and host fault boundaries. | ||
| Integrity | 11.1 | Verify Storage Health | vcf_vsan.health_check | Queries vSAN SOAP health interfaces directly. | |
| ESXi Host | Host Configuration | 12.1 | NTP & Syslog Config | vcf_esxi.sys_config | Enforces atomic infrastructure time and logging targets. |
| 12.2 | Advanced Host Settings | vcf_esxi.advanced_config | Sets security, kernel parameters, and lockouts. | ||
| Storage | 13.1 | Mount NFS/VMFS Datastore | vcf_esxi.datastore_manage | Connects file-based or block-based storage platforms. | |
| VCF Operations | Fleet Analytics | 14.1 | Deploy Operations Node | vcf_vcfops_deployment.deploy | Provisions/scales Aria Operations cluster elements. |
| 14.2 | Check Deployment Health | vcf_vcfops_deployment.healthy | Confirms active cluster health metrics. | ||
| VMSP | Mediated Access | 15.1 | Configure Multi-Tenant Gateway | vcf_vmsp.access_control | Sets up secure proxying and client credential boundaries. |
Update the VCF capabilities with newly contributed functionality (modules, etc.) by issuing the following command to pull down the latest update:
salt-pip install -U saltext-vcf
Authors:
Frances Wong, Salt PM
Rob Robertson, Field Application Engineer
Derek Ardolf, Software Engineer
