Push: Func Module to Run Arbitrary Python Code

Func is a nifty, although not yet polished, Python-based service for running tasks on many hosts at once. It lets you do things like restart Apache instances, run yum updates or provision virtual machines.

You can accomplish theses tasks via the command line interface

func web-*.example.net call service restart httpd

or through the Python API

import func.overlord.client as fc

client = fc.Client('web-*.example.net')

print client.service.restart('httpd')

One of the annoying issues I'm dealing with right now is the distribution of Func modules, which for various reasons isn't as simple as packaging the modules and pushing them to all the hosts (it is, just not in my network).

My solution is Push, a Func module which lets you instantly run Python code on any or all hosts in your network.

Example usage:

import func.overlord.client as fc

client = fc.Client('web-*.example.net')

source = """
def main():
    return 'Hello World'
"""

print client.push.code(source)

I realize this isn't the most elegant solution, but its very useful and extremely simple.

I also realize that I could use the copyfile module to push modules via Func, but I haven't found a way to restart funcd via Func (required to initialize modules), so until that happens I need a solution which doesn't require restarting Func.

Get Push Module

Adobe Flash 10 64-bit SPEC File for Fedora 9

I hacked up a quick SPEC file for the alpha release of Adobe Flash 10 64-bit for Linux.

Name:           adobe-flash
Version:        10.0.d20.7
Release:        1%{?dist}
Summary:        Adobe Flash player.

Group:          Application/Internet
License:        Proprietary
URL:            http://labs.adobe.com/technologies/flashplayer10/
Source0:        http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-10.0.d20.7.linux-x86_64.so.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      x86_64
Requires:       firefox >= 3
Requires:       mozilla-filesystem

%description
The Adobe Flash player.

%prep
%setup -T -c -a 0

%install
install -D -m 644 libflashplayer.so $RPM_BUILD_ROOT%{_usr}/lib64/mozilla/plugins/libflashplayer.so

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%{_usr}/lib64/mozilla/plugins/libflashplayer.so

%changelog
* Tue Nov 18 2008 Silas Sewell <silas@sewell.ch> - 10.0.d20.7
- Created package.