Salt

Overview

Morpheus integrates with an existing Salt Master for seamless deployment of Salt States to Minions provisioned from Morpheus .

Add Salt Integration

To get started browse to Admin -> Integrations from within Morpheus .

Once there simply add a New Integration

../../_images/salt-af3ca.png

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

../../_images/salt-a41c9.png

Scope Salt Integration to Group Or Cloud

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

../../_images/salt-991dd.png

And from the options toggle Advanced Options and select your Saltstack integration in the Config Management dropdown.

../../_images/salt-be548.png

After a page refresh you should see your Saltstack tab in your group page

../../_images/salt-b5b6f.png

Clicking on it will reveal a page that includes:

  1. An interface to run Salt Master commands
  2. Parsed Top File
  3. Available States
../../_images/salt-ccaca.png

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.

Provisioning with Saltstack

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

../../_images/salt-413c5.png

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.

../../_images/salt-f8e4e.png

If you did not apply a state at provision time now you will be able to run State commands through Morpheus .

../../_images/salt-71b7c.png

In our example the Apache State from a git backend was applied successfully to our newly created vm.

../../_images/salt-bf299.png