From 12929e7f7260f515565578e3197416a946da7964 Mon Sep 17 00:00:00 2001 From: https://www.google.com/accounts/o8/id?id=AItOawlqPq9_Ne52AEM6d0S3RP-8Y33NSIhLpPA Date: Thu, 2 Apr 2015 20:55:08 +0000 Subject: typo fix --- doc/documentation.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/documentation.mdwn b/doc/documentation.mdwn index 340eb09f..47a60865 100644 --- a/doc/documentation.mdwn +++ b/doc/documentation.mdwn @@ -9,6 +9,6 @@ Other documentation: * [[Components]] * [[Contributing]] * [[Interface Stability]] -* [[Coding Stye]] +* [[Coding Style]] * [[Security]] * [[Debugging]] -- cgit v1.2.3 From 8e25c61c6fe29d36b6e2602369e0011d1b815b0f Mon Sep 17 00:00:00 2001 From: https://www.google.com/accounts/o8/id?id=AItOawnlWh_3gGIB4lbo8dR0y3mwQ08eYZ-i1ug Date: Sat, 4 Apr 2015 16:21:49 +0000 Subject: typo fix --- doc/documentation.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/documentation.mdwn b/doc/documentation.mdwn index 47a60865..eccdda56 100644 --- a/doc/documentation.mdwn +++ b/doc/documentation.mdwn @@ -1,5 +1,5 @@ The [API documentation](http://hackage.haskell.org/package/propellor) of -Propellor's modules is the most important docuemntation of propellor. +Propellor's modules is the most important documentation of propellor. Other documentation: -- cgit v1.2.3 From 8896cd38f0dd5436fbb4ce6f9e1ccf232da277e4 Mon Sep 17 00:00:00 2001 From: https://www.google.com/accounts/o8/id?id=AItOawm-czsfuWENKQ0GI8l0gnGTeF1JEli1mA0 Date: Mon, 6 Apr 2015 21:11:46 +0000 Subject: Added a comment: thanks a lot --- .../comment_4_d0d946df7455d079af9bc331da6fac55._comment | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 doc/forum/trying_to_--spin_to_a_sid+experimental_machine/comment_4_d0d946df7455d079af9bc331da6fac55._comment diff --git a/doc/forum/trying_to_--spin_to_a_sid+experimental_machine/comment_4_d0d946df7455d079af9bc331da6fac55._comment b/doc/forum/trying_to_--spin_to_a_sid+experimental_machine/comment_4_d0d946df7455d079af9bc331da6fac55._comment new file mode 100644 index 00000000..72b21450 --- /dev/null +++ b/doc/forum/trying_to_--spin_to_a_sid+experimental_machine/comment_4_d0d946df7455d079af9bc331da6fac55._comment @@ -0,0 +1,16 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawm-czsfuWENKQ0GI8l0gnGTeF1JEli1mA0" + nickname="Andreas" + subject="thanks a lot" + date="2015-04-06T21:11:46Z" + content=""" +thanks for your your commments (both of them), +and fair enough: have just renamed my origin remote to upstream, +will try your installedFromExperimental suggestion next. + + +I will have more questions about propellor, +but aske them in a different thread +(as they are not really about installation) + +"""]] -- cgit v1.2.3 -- cgit v1.2.3 -- cgit v1.2.3 From 2fc30e545aa763ca7e8a03c3380723e0acdc2965 Mon Sep 17 00:00:00 2001 From: https://www.google.com/accounts/o8/id?id=AItOawm-czsfuWENKQ0GI8l0gnGTeF1JEli1mA0 Date: Tue, 14 Apr 2015 17:15:17 +0000 Subject: --- ...:_how_to_run_a_single_task_on_a_host__63__.mdwn | 160 +++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 doc/forum/my_experience_with_propellor:_how_to_run_a_single_task_on_a_host__63__.mdwn diff --git a/doc/forum/my_experience_with_propellor:_how_to_run_a_single_task_on_a_host__63__.mdwn b/doc/forum/my_experience_with_propellor:_how_to_run_a_single_task_on_a_host__63__.mdwn new file mode 100644 index 00000000..17dd3bc9 --- /dev/null +++ b/doc/forum/my_experience_with_propellor:_how_to_run_a_single_task_on_a_host__63__.mdwn @@ -0,0 +1,160 @@ +Having taken the inital hurdle of getting propellor running +(cf. my last post in this forum), I am beginning to like propellor +quite a lot. - This comes not too much as a surprise, as I am +a Haskeller really. - I would love to use it for all my configuration +needs, and to that end ditch ansible. + +Propellor's biggest show stopper for me is this (maybe I am misunderstanding +propellor?): + +I can run + +``` + propellor --spin myhost +``` + +from the command line, and all the tasks/properties that I have +defined myhost to have beforehand will be executed/realized/configured. + +Say eg. I haved defined + +``` + myhost :: Host + myhost = host "myhost" + & os (System (Debian Testing) "amd64") + & emacs + & apt + + + emacs :: Property HasInfo + emacs = propertyList "install & configure emacs" $ props + & Apt.installed ["emacs" + , "auto-complete-el"] + + apt :: Property HasInfo + apt = propertyList "apt update + upgrade" $ props + & Apt.update + & Apt.upgrade +``` + + +Then running + +``` + propellor --spin myhost +``` + +will make sure, that emacs is installed, and all my +packages on myhost are up to date. + +It does so every time I run propellor, but normally I install +emacs only once (and I know it's installed), whereas +the apt update+upgrade combo I would want to run every other day. + +So what I would like is this: have just a minimal config for +myhost, like this: + +``` + myhost :: Host + myhost = host "myhost" + & os (System (Debian Testing) "amd64") +``` + +and then run a task (require a property ?) on myhost, somehow +from the command line, like this + +``` + propellor --spin myhost --task apt +``` + +Many other properties / installation steps I could run in this +manner, like installing emacs initially + +``` + propellor --spin myhost --task emacs +``` + +In ansible I can do this with playbooks: + +``` + ansible-playbook -l myhost apt.yml +``` + +with some preconfigured playbook apt.yml that does just +the apt update + upgrade task and nothing else. But I would +have other tasks in other playbooks of course: I can install & configure +emacs on myhost + +``` + ansible-playbook -l myhost emacs.yml +``` + +etc. + +Related to that (but maybe not strictly the same question): + +I wouldn't mind writing my own haskell script that does +the command line parsing (with optparse applicative eg): +I could have options for + +``` + --host (myhost/...) +``` + +and + +``` + --task (emacs/apt/...) +``` +and then just call into propellor. Unfortunately propellor's +defaultMain does more than I want: gets the command line +from processCmdLine. + +So I tried to create my own otherMain (similar to defaultMain, +but would let me do my own command line parsing): + +``` + otherMain :: [Host] -> CmdLine -> IO () +``` + +but then at some point just gave up: for one thing: things +were getting complicated, because of all the indirection: +the propellor command line tool recompiles itself (?), +does all this git stuff etc. + +And then: maybe I am approaching things in the wrong direction: +maybe it's just not meant to be used that way +(but ansible works fine for me in this regard)? + +And I thought: I don't really want to start a major programming +task just to get this thing working, the way that seems +reasonable to me. Or maybe it's possible already, and I just +don't know how to use it? (So I am stuck with ansible for the time +being). + +Still more or less related: + +Say this otherMain function existed, that allowed me to +to do my own command line parsing and just +call propellor on some host with the one or the other task, +I am not 100% what's the right +way to ensure/require/execute such a task on a host: + +above I am just using + +``` + host & property +``` + +(from PropAccum), but maybe ensureProperty is better suited +for that? + +Also for the wish list: some CONFIG_FILE env variable that +would allow me to keep my config.hs somewhere other than +in ~/.propellor/config.hs + + +Anyway, thanks so far +I would certainly want to switch to propellor completely. + + Andreas -- cgit v1.2.3