I wanted to start using propellor in the most simple way and the requirement to have a GPG key, signed commits, propellor updating itself, and so on was way too much to start with.
So I wrote this Haskell file:
module Main where
import Propellor
import Propellor.Engine
import qualified Propellor.Property.Apt as Apt
main :: IO ()
main = mainProperties myHost
myHost :: Host
myHost = host "local" $ props
& Apt.installed [
"etckeeper"
, "git"
, "rsync"
, "tmux"
, "tree"
, "unattended-upgrades"
, "zsh"
]
And then used the Debian package entr to scp the executable to a test server and have it executed there:
echo mytest-exe | entr scp /_ mytesthost:
and on the test host:
echo mytest-exe | entr sudo ./mytest-exe
Maybe somebody finds this useful as a starting point to learn propellor.
Thank you for this excellent idea and post! I've added a link to it under the quick start on the front page.
Propellor's deployment system is just what happened to meet my needs, but certianly not ideal for anyone, and what I really like about this is it shows how the core of propellor is not locked into that one system.
I see that
entr
automatically re-transfers the file when it has changed, so am I right that you could use this in combination with egstack build --file-watch
to immediately test each change to config.hs?Do note that your method doesn't transfer over any private data that propellor might use on the host. And, some container properties need the propellor binary in /usr/local/propellor/ in order to work. But until you need such properties, it's a nice way to get your feet wet.