Testing the Aegir Network module

For the past few weeks we have been working on a module called Aegir Network.

Aegir Network allows Aegir servers to communicate with each other. This means you can centralize information from different servers, and run tasks on remote sites and platforms. It also adds a server overview UI to the Aegir interface.

In short, if you're running multiple sites and platforms across multiple servers, and you'd like to manage them from one central dashboard, you should probably check out this module.

I've recently released a development version of the module. It's stable enough for you to try out for yourself. This article explains how to do just that.

Installing the module

First you'll need two test servers. I recommend our Aegir development base box, which has a very simple script that installs Aegir for you.

Once you have Aegir installed, go to hostmaster (/var/aegir/hostmaster-xyz/sites/example.com) and download the module, as well as its dependencies:

# easier to update if you use Git:
git clone --branch 7.x-1.x http://git.drupal.org/project/hosting_network.git
git clone --branch 7.x-1.x http://git.drupal.org/project/hosting_services.git
drush dl features libraries oauth services

We'll call the server that connects to the other one the "hub" server, and the one that gets connected to is the "node" server (this one will have the OAuth user). These names are arbitrary, but helpful (since the hub server is also in this case an OAuth client, the terminology can get confusing).

Network node server

You'll need to configure the network node before connecting to it. There is a Feature with the right configuration included in the module directory, called simply Aegir Network Node (you don't need to enable the Hosting Services module). It should activate all the right dependencies (mainly OAuth and Hosting Services).

features page
(Admin -> Structure -> Features)

After this you need to set an OAuth consumer in a user (in this case presumably admin). Just go to a user's page, OAuth consumer and add a consumer:
oauth consumer add

Once you're set, go back to the OAuth consumers and edit the one you just added; it should allow you to show the OAuth secret:
oauth consumer view

Hub server

On the hub server, enable the Aegir Network module (there's no "Hosting" feature yet so you'll have to go into the module page). You don't need the Network Node feature unless you want to allow another server to access this one's information about sites and platforms. A server can be both a node and a hub.

After activating the module, use the OAuth credentials you just obtained to add a new server. Use the node server's hostname, and add the credentials in the Network node section:
add server

That's it! You can see the server in the Aegir network tab (in the main menu). You can also run simple tasks and view the task logs. Here are a few examples:

platform view

site view

As you can see, you can run "Reset password" remotely and log in directly to the remote site without going through the network node.

Many features are still in development, such as the ability to mass dispatch tasks. If you would like to help create or fund some of these features, please contact me.

Thanks for reading.