If you integrated SaltStack Config with vRealize Automation, you can apply the SaltStack Config resource to install the minions on virtual machines in your deployments. After the minion is deployed, you can use SaltStack Config's powerful configuration management, drift remediation, and state management capabilities to manage your resources.
Minions are agents that run the salt-minion service. The service subscribes to jobs published by a Salt master, which is a server that runs the salt-master service. When a specific job applies to a minion, the minion executes the job.
You can use the SaltStack Config resource to deploy minions and apply state files when you deploy Linux and Windows machines. To add or update minions and state files on existing deployments, you can run the Attach SaltStack Resource day 2 action. For more about the day 2 action, see What actions can I run on Cloud Assembly deployments.
If you used the saltConfiguration
property to deploy minions and state files as a day 0 action, consider updating your cloud templates to use the SaltStack Config resource. The saltConfiguration
property is now deprecated. You can still use the saltConfiguration
property in your cloud templates, but SaltStack Config integration features will be limited.
The Apply Salt Configuration day 2 action is still available for resources that use the saltConfiguration
property.
Before you start
- Verify that you installed SaltStack Config and configured the integration. See Create a SaltStack Config integration in vRealize Automation.
To familiarize yourself with how SaltStack Config works, including the key concepts of minions, see Understanding the SaltStack User Interface.
- In SaltStack Config, verify that the FQDN name resolution from minion to master is working.
- To verify the FQDN on the Salt master in SaltStack Config, select .
- Filter the Minion ID column for the value saltmaster.
- Click saltmaster to see the details.
- Verify that the FQDN value is correct.
- If you are deploying minions on a Linux machine, verify that the images in vSphere that you intend to deploy with a Salt minion have SSH capabilities enabled. SSH is used to remotely access the machine and deploy the minion.
-
If you are deploying minions on a Windows machine, see How do I deploy minions using the API (RaaS) in a Windows environment.
- Verify that you can assign IP addresses to the machines you deploy.
SaltStack Config requires the machines to have IP addresses. Use the IP addresses for the public IP CIDR range for the SDDC (software-defined datacenter) where your Salt master is located.
- Verify that the cloud template that you are adding the minion to is deployable before you add the SaltStack Config resource properties.
- Verify that you have the following service roles:
- Cloud Assembly administrator
- Cloud Assembly user
- Service Broker administrator
These service roles are required to use the SaltStack Config resource.
Add the SaltStack Config resource to the cloud template
As a cloud template developer, you can add properties to the YAML that install the SaltStack Config minion when you deploy the template.
The core properties that you add to the template include remote access for the machine you want to deploy and configuration properties for the SaltStack Config resource. The procedure only includes selected properties. The YAML includes other SaltStack Config resource properties that are not used in this example. For more information, review the schema.
Although this example shows how to add the username and password for the remote access properties, you can configure a secret property and add it to the template. For an example, see Secret Cloud Assembly properties.
Procedure
Verify the minion in SaltStack Config
After you install the minion on the virtual machine, locate the minion and run any jobs or commands on the resource.
Procedure
Troubleshooting minion deployments
Read about some common errors users experience while deploying Salt minions using the SaltStack Config resource or the saltConfiguration
property.
Delayed host startup
If Windows or Linux services on the host are not ready after you deploy your cloud template, you might receive a "Minion deployment and/or state file run failed" error in Cloud Assembly.
To resolve this error, upgrade the Master Plugin to the latest stable version. After you upgrade, you can enable a configuration setting in /etc/salt/master.d/raas.conf
that allows Windows and Linux services time to become active before deploying the Salt minon.
After you upgrade to the latest version of the Master Plugin, complete these steps to delay host startup:
- Check the History tab on the deployment details page.
- If the error message says, "Minion deployment and/or state file run failed", copy the job ID (JID) and open SaltStack Config.
- In SaltStack Config, select to open completed jobs.
- In the JID column, click the filter icon and type the JID.
- Click the JID to review the job results page.
- Click the Raw tab to see the raw output for the job.
Windows
If the last line in the raw output for the job contains "Failed to connect to host: timed out", you must add this configuration setting to/etc/salt/master.d/raas.conf
to delay startup by 180 seconds:sseapi_win_minion_deploy_delay: 180
Linux
If the line last in the raw output for the job contains "Remote host is not accessible using provided credentials", you must add this configuration setting to/etc/salt/master.d/raas.conf
to delay startup by 90 seconds:sseapi_linux_minion_deploy_delay: 90
- Restart the Salt master service:
systemctl restart salt-master
- Re-deploy your cloud template.
If the deployment was not successful, you can increase the delay parameter and re-deploy the template.
What to do next
To use the SaltStack Config capabilities to manage your resources, see the SaltStack Config documentation.