Fork me on GitHub

wamonomicon

Tag: Cuisine

Zypper support for Cuisine

Fabric is a great Python module for deploying and running software on remote SSH-enabled machines without the need for an array of terminal windows or mad shell-scripting skills.

Cuisine is a Python module adding high-level administrative functions to Fabric (similar to Chef for Ruby).

I'd been using Fabric for a while but wanted to use Cuisine to automate production and build system configuration, but was out of luck with package management dependencies. We use openSUSE which uses Zypper while Cuisine only supported 'apt' and 'yum'. It was too useful not to have, so by the power of open source I remedied that.

Here's an example fabfile.py to ensure FFmpeg is installed from the Packman repository:-

from cuisine import select_package, package_ensure, repository_ensure_zypper

select_package("zypper")

def installFFmpeg():
  repository_ensure_zypper("http://packman.inode.at/suse/openSUSE_11.4/packman.repo")
  package_ensure("ffmpeg")

This could be executed repeatedly without ill effect on the remote hosts peppa and yaffle with the following call:-

fab -u root -H peppa,yaffle installFFmpeg

Posted Mon 15 Oct '12 in Dev (Python, Fabric, Cuisine, Zypper)