-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi,
What is designed data flow in salt-ssh based setup? Currently I see it
works like this:
1. Sends a thin wrapper to execute commands, it first checks:
- if thin minion is deployed, if not - emit "deploy" message and exit
- if required external modules are deployed, if not - emit "ext_mods"
message and exit
2. Thin wrapper execute requested function, and return output after
special delimiter.
In case of state.highstate, state.sls etc, this is somehow more complex:
1. salt-ssh first execute test.opts_pkg (through thin minion) to get
grains from target system.
2. It package state with all required files, suitable for state.pkg
function. This (tgz) package consists of:
- pillar.json
- lowstate.json
- additional files referenced with salt://
3. Send that tgz using scp.
4. Call thin minion again to actually execute state.pkg salt_state.tgz.
5. Receive the output.
Now the actual questions:
1. Is it design decision (something one can rely on) that only states
targeted to this particular system are included in salt_state.tgz? Or is
it only a coincidence that can change in the future?
2. Similar for additional files - is it guaranteed that only files
referenced from states targeted at this particular system will be
included in the package? In other words, is salt-ssh a "solution" to
file access control[2]?
3. Is it possible to render the states at the minion side (so salt-ssh
would not need to receive grains), while still holding properties 1 and
2? This would be at the cost of using grains to target states in top
files, but lets assume for now it isn't a problem (which is reasonable
assumption given [1]).
4. Is it possible to use salt_state.tgz building code outside of
salt-ssh? For example in some custom runner.
Especially valuable is the part for extracting referenced files.
5. Does "ext_mods" callback give all the additional modules, or only
those referenced from states targeted at given system?
6. And finally - is it possible to use salt-ssh (or equivalent) over
some other shell access protocol? I've managed to do that by writing a
wrapper replacing original /usr/bin/ssh (and scp), but it's rather ugly
solution...
[1]
https://docs.saltstack.com/en/latest/faq.html#is-targeting-using-grain-data-secure
[2]
https://docs.saltstack.com/en/latest/faq.html#is-it-possible-to-deploy-a-file-to-a-specific-minion-without-other-minions-having-access-to-it
- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQEcBAEBCAAGBQJWyjOEAAoJENuP0xzK19csJswH/jF13RRSeUopG9hWt+zHdvYS
0LwaVeus6pcnne/mYmIR8h7ejd0StAjNZXbLVFiZEiR1dSwelQ8G74Q++5roP+6e
xTF1izOI3+vG4iyHKnp+UzvvNOgymXXF7Q0cKT9YoHdI8ts8iFkiF+5iVbOE+BPB
wWstETjN2Lo4IvRQsNbZbceBm/2UchgOH+vtsmLX0ANTCGf4tJ7TFh9/poZ5GRcM
vTtBGHEx+kPnW3YnDMUYhP40AJeFO7ayF9bIE18DNtP4UJn7f6VfxvxIQ9m/xAMS
cI9Jp/EsHVNne0GmnC+QJNN/nhUBrYSO2nH0WS2LZkMPMfUXY9RjbQBw25usccU=
=A3Mu
-----END PGP SIGNATURE-----