Skip to first unread message

Philip MacIver

Jun 23, 2009, 7:14:30 AM6/23/09
to AutomateIt
Okay I have been through the tutorial and everything looks great.

My only (well major) problem is how do you use this in a Client/Server
set up.

There are no examples of how to use it in a real set up.

Like I have a server called myserver and a client called myclient,
what do I have to do to configure mysever to configure myclient?

Is there any setup needed on myclient?

Is it a push or pull architecture?

Are there any daemons that constantly run to keep things up to date
between the client and server?

Just things like this I am finding finding hard to find information
about. It would be good if you could shed some light on the situation.


Igal Koshevoy

Jun 23, 2009, 9:37:56 AM6/23/09
On Tue, Jun 23, 2009 at 4:14 AM, Philip MacIver<> wrote:
> Are there any daemons that constantly run to keep things up to date
> between the client and server?

No. AutomateIt is just an interpreter, like a UNIX shell. Distributing
files between machines is handled outside Automateit, but it's quite

My preferred approach is to check-in my project's files into a
distributed revision control system, like Git or Mercurial. My
bootstrap script, which installs ruby and automateit, also checks out
the repository to a local directory, e.g., "/var/local/automateit".

I then apply the recipes, and one of these creates a command called
"/usr/local/bin/aiapply", with contents similar to this that'll apply
all my recipes:

cd /var/local/automateit && automateit recipes/all.rb "$@"

And I also create another file called "/usr/local/bin/aiupgrade" that
pulls the latest changes from the revision control repository and
applies them, e.g,:

cd /var/local/automateit
git pull --quiet 2>&1 | grep -v 'Already up-to-date.'
aiapply "$@"

With these two commands in place, I can then either ssh into a machine
and run "aiupgrade" to force an update immediately (push) or wait for
a cronjob to run it for me (pull).

There's an older description of this in "Sharing a project between
systems" at the end of:


Philip MacIver

Jun 24, 2009, 6:41:39 AM6/24/09
to AutomateIt
For reference, what would an "all.rb" recipe look like?

Igal Koshevoy

Jun 24, 2009, 11:07:46 AM6/24/09
For convenience, I usually create a "recipes/all.rb" file for each project that contains a bunch of "invoke" lines to that run the rest of my recipes.

Here's a sample "all.rb" file:

And here's the project it's a part of:


Philip MacIver

Jun 24, 2009, 11:29:20 AM6/24/09

Thanks, very nice and very useful to have a fully coded one as an example.

Being a ruby developer, using this software has proven to be very nice to work with, very simple and straight forward, unlike a few of the other tools that try to do the same.


Philip MacIver

2009/6/24 Igal Koshevoy <>
Reply all
Reply to author
0 new messages