Morpheus Appliance now integrates with an existing Salt Master for seamless deployment of Salt States to Minions provisioned from Morpheus.
To get started browse to Admin -> Integrations from within Morpheus.
Once there simply add a New Integration
And then scope the integration to your existing Salt Master by ip address. Make sure that the username entered is one with proper escalation privileges for running Salt, and point the Working Directory at the directory on your Master where your States live.
(NOTE: Morpheus will allow you to run States from a git backend, but in v2.10 you will not see states from a git backend within Morpheus)
Configuration Management integrations like Saltstack apply to the Infrastructure Group abstraction in Morpheus. To ties yours in, browse to Infrastructure -> Groups in Morpheus and select the group that you would like to tie to your Salt Master.
From here select Edit
And from the options toggle Advanced Options and select your Saltstack integration in the Config Management dropdown.
After a page refresh you should see your Saltstack tab in your group page
Clicking on it will reveal a page that includes:
- An interface to run Salt Master commands
- Parsed Top File
- Available States
The classic example of running
salt '*' test.ping
will return empty unless there are existing Minions with accepted keys on the Master. However, provisioning Minions via Morpheus is extremely easy.
To do so, provision as usual and Instances within the Group tied to the Saltstack Integration will now show additional options on the Configure pane
Minion ID defaults to the hostname, and a State can be applied directly at provision time.
(NOTE: Only States served from the Master's Working Directory can be applied at provision, not States from a git backend)
Once your instance is provisioned and key negotiation has completed you will be able to access it and run commands via the integrated Salt command center in your Group.
If you did not apply a state at provision time now you will be able to run State commands through Morpheus.
In our example the Apache State from a git backend was applied successfully to our newly created vm.