emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Waldemar Quevedo <waldemar.quevedo@gmail.com>
To: Grant Rettke <gcr@wisdomandwonder.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Org Converge: Configuration management with Org Babel
Date: Sun, 8 Jun 2014 10:02:01 +0900	[thread overview]
Message-ID: <CALzn4yj7kmhMxagntzAEP4GuBegTpL3TH1WvUKHxssqjPSeZLg@mail.gmail.com> (raw)
In-Reply-To: <CAAjq1mdZPHPDrV0fFO-UE-otSZNNsmtOVK0dVwZnt8hUrgQ8FQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3402 bytes --]

Hi Grant,

This is an attempt to augment the current functionality of Org mode
so that we can use documentes authored with Org mode in Emacs
and execute then in other environments with Ruby as the only dependency.

I was mostly motivated because in the Ruby world there
are tools like Chef or Puppet used to define idempotent runs
of the setup from a server.
For example the Chef execute resource:
http://docs.opscode.com/resource_execute.html

execute 'bundle install' do
  cwd '/myapp'
  not_if 'bundle check'end


As you can see we are defining two commands, the command to run
and one more command to check whether the first command should be run.

What I have implemented so far is that you could for example express
this in Org mode using literate programming as well:

#+name: bundle-check
#+begin_src sh :dir /myapp
bundle check
#+end_src

#+name: bundle-install
#+begin_src sh :dir /myapp :unless bundle-check
bundle install
#+end_src

Here the second code block will only run if the first code block has a
non-zero exit status,
meaning that the action has not been done yet, because the exit status of
each code block is being tracked.

You can take a look at some of the examples here
for some of the other use cases where I was thinking that this would be
useful:
https://github.com/wallyqs/org-converge/tree/master/spec/converge_examples

Here is a more complex example of what is possible to do:
https://github.com/wallyqs/org-converge/blob/master/spec/converge_examples/multi_proc/run.org

Thanks,

- Wally



On Sun, Jun 8, 2014 at 3:50 AM, Grant Rettke <gcr@wisdomandwonder.com>
wrote:

> Hi Waldemar,
>
> Would this be used in parallel with org-mode? Would it replace it or
> complement it?
>
> I'm not very familiar with what you are trying to replace or augment.
>
> Kind regards,
>
> gcr
> Grant Rettke | AAAS, ACM, ASA, FSF, IEEE, SIAM, Sigma Xi
> gcr@wisdomandwonder.com | http://www.wisdomandwonder.com/
> “Wisdom begins in wonder.” --Socrates
> ((λ (x) (x x)) (λ (x) (x x)))
> “Life has become immeasurably better since I have been forced to stop
> taking it seriously.” --Thompson
>
>
> On Sat, Jun 7, 2014 at 5:48 AM, Waldemar Quevedo
> <waldemar.quevedo@gmail.com> wrote:
> >
> > Hello Org mode users,
> >
> > I've had the idea for some time of using Org babel functionality
> > as a method to provide configuration management
> > features and the result is the following:
> >
> > https://github.com/wallyqs/org-converge
> >
> > Note that this uses the Ruby implementation of the Org mode parser
> > that I've been maintaining to interop with some useful gems from Ruby,
> like
> > rake and foreman.
> >
> > The idea here is to a able to use Org Babel not only
> > for reproducible research, but also for reproducible runs entirely.
> > This way a local development environment could be considered to be
> > a run where the processes run in parallel, or in the case
> > of the configuration of a server, we rely on the tangling
> > syntax from Org Babel as well defined idempotency checks
> > to make sure that the configuration from a server converges.
> >
> > In case you have some feedback, please let me know!
> > Feel free to create any issues in the tracker in case
> > you think that the idea has potential :)
> >
> > Thanks,
> >
> > - Waldemar
> >
>

[-- Attachment #2: Type: text/html, Size: 5656 bytes --]

      reply	other threads:[~2014-06-08  1:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-07 10:48 Org Converge: Configuration management with Org Babel Waldemar Quevedo
2014-06-07 18:50 ` Grant Rettke
2014-06-08  1:02   ` Waldemar Quevedo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALzn4yj7kmhMxagntzAEP4GuBegTpL3TH1WvUKHxssqjPSeZLg@mail.gmail.com \
    --to=waldemar.quevedo@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=gcr@wisdomandwonder.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).