A way to "write configurations" to SALT?

24 views
Skip to first unread message

Stumpy

unread,
Jul 21, 2020, 7:13:38 AM7/21/20
to Qubes users
I have been trying to figure out SALT in my spare time and every time I
start I finish with watery eyes and a mushy brain... for me its hard to
wrap my head around.

While I am not giving up per se it occurred to me, so i just thought id
ask on the off chance its possible... Can one say setup an AppVM and
configure it to ones own needs _then_ somehow write that configuration
to SALT? While this seems unlikely I have to ask.

Thanks!

unman

unread,
Jul 21, 2020, 9:02:24 AM7/21/20
to Qubes users
I think this would depend on what configuration you had in mind - basic
preferences, of course.
Packages installed? Possible but *incredibly* long winded.
Home directory configurations? Possible but somewhat difficult to pull
out the changes.

Have you looked at my notes on using salt?
https://github.com/unman/notes/tree/master/salt

Here's a suggestion - post an example of what you would like to have in
the appVM, and we'll generate the state files. (Obviously don't send
details of an actual qube.)

Peter Funk

unread,
Jul 21, 2020, 9:04:43 AM7/21/20
to Stumpy, Qubes users
Hello all,
I'm no expert, but I believe this is not possible per se.

However: When you wrote "setup an AppVM and configure it" do you
meant doing the configuration on the terminal command line as a
sequence of shell commands?

If so then keep a full record of all those configuration commands
using the shell history command:

history > log_of_my_personal_configuration_actions

I recommend to first set the following variables in your $HOME/.bashrc
files:

export HISTSIZE=100000
export HISTFILESIZE=200000
export HISTTIMEFORMAT="%F %T "

The default values of HISTSIZE and HISTFILESIZE are small so chances are
you could loose something otherwise.

This will help later on if you want to review all of your own configuration
actions and when you did what. If you configure something by editing
certain configuration files I would recommend to make copies of the original
files first to be able to produce .patch files using the command:

diff -u some_configfile.orig some_configfile > some_configfile.patch

Those could also be useful later.

I hope this helps to get you somewhat started.

Turning those history log and .patch files into a set of SALT configuration
files is however completely another story.

Best regards, Peter Funk
--
Peter Funk ✉:Oldenburger Str.86, 27777 Ganderkesee, Germany; 📱:+49-179-640-8878
✉office: ArtCom GmbH, Haferwende 2, D-28357 Bremen, Germany
☎office:+49-421-20419-0 <http://www.artcom-gmbh.de/>
signature.asc

lik...@gmx.de

unread,
Jul 21, 2020, 10:38:09 AM7/21/20
to qubes...@googlegroups.com
With a lot of unmans help, I managed to setup all of my fedora templates with the salt stack. Additionally, I managed to setup my DVMs with salt.

I'm still not sure it's the best way to go (instead of using (dom-cmd line), but it was interesting to dig into it. And it (seems to) work(s).

If you need any help, please feel free to ask questions. I going to try to support you as far as I can.
Reply all
Reply to author
Forward
0 new messages