Skip to content

Instantly share code, notes, and snippets.

@max-arnold
Last active January 31, 2024 15:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save max-arnold/d04ee9b93761bb674eeecc4aee8b4ca6 to your computer and use it in GitHub Desktop.
Save max-arnold/d04ee9b93761bb674eeecc4aee8b4ca6 to your computer and use it in GitHub Desktop.
Salt SSH vs Heist

Feature parity between Salt SSH and Heist

Salt SSH features

Salt SSH rosters

  • ansible - Read in an Ansible inventory file or script.
  • cache - The cache roster provides a flexible interface to the Salt Masters' minion cache to access regular minions over salt-ssh.
  • cloud - Use the cloud cache on the master to derive IPv4 addresses based on minion ID.
  • clustershell - This roster resolves hostname in a pdsh/clustershell style
  • dir - Create a salt roster out of a flat directory of files.
  • flat - Read in the roster from a flat file using the renderer system
  • range - This roster resolves targets from a range server.
  • scan - Scan a netmask or ipaddr for open ssh ports
  • sshconfig - Parses roster entries out of Host directives from SSH config
  • sshknownhosts - Parses roster entries out of Host directives from SSH known_hosts
  • terraform - Dynamic roster from terraform current state (also see https://github.com/dmacvicar/terraform-provider-salt)

Heist rosters

  • heist.roster.clustershell
  • heist.roster.flat
  • heist.roster.scan

Salt SSH shortcomings

  • Doesn't support Windows destination hosts (not sure whether Windows source host is supported)
  • By default wants to access /etc, /var/log, /var/cache. CLI args or a Saltfile is needed to overcome that.
  • Not every Salt feature is supported (wrappers are needed)
  • Issues related to incomplete state tree being transferred to remote hosts (saltstack/salt#60003)

Useful features to borrow from salt-cloud

Heist shortcomings

Comments by @lkubb

heist-salt

  • + I assume the bidirectional tunnel solves many architectural problems Salt-SSH currently has (requiring wrappers, empty __pillar__ on the remote, incomplete state tree for Jinja imports, very hacky to simulate peer publishing on the remote - e.g. for the x509_v2 modules, strict separation of regular from SSH minions, the other way around works now)
  • + Delivers compiled core dependencies like cryptography to the remote at no cost.
  • - Agree that requiring a master is a significant downstep. Salt-SSH can be used standalone, a bit like Ansible. The cognitive and actual steps to get /opt/saltstack/salt/extras-*/bin/heist salt.minion ... into a workable state also seem more complicated than for salt-ssh ....
  • - Not sure about the integration depth into Salt itself. I assume to target the minions from Salt, I have to (in some way) instantiate a LocalClient from the master node (and target via the minion_type grain)? Does this require persistent connections to be established before in a separate step or are they created on-the-fly (and the remote cleaned up afterwards) like with Salt-SSH?
  • - From what I can tell, heist-salt currently only works for x86_64. This is easily fixed for cpu archs that have official onedir artifacts (and provides more stable support for supported platforms), but will still lack support for those without (apart from custom onedir builds).

Salt-SSH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment