Archive for November 6th, 2006

Scripting Releases to Chiara_PEAR_Server

November 6th, 2006

I’ve been working on some ways to automate release deployment to my PEAR Channel Servers (pear.unl.edu, pear.saltybeagle.com) running Chiara_PEAR_Server.
Right now I have scripts that automatically create the package.xml file using PFM2 and the package tgz files but uploading the release was still a manual process.
The process isn’t that complicated, you log in to the channel server, and upload a file…. the server handles the rest (haha, so punny).

So finally I got friendly with HTTP_Request and wrote a simple class/script to remotely release a pear package to a Chiara_PEAR_Server.

Now it’s even easier to release early, release often.

<?php
/**
 * sample usage of the Salty_PEAR_Server_RemoteReleaseDeployer
 */

require_once 'Salty/PEAR/Server/RemoteReleaseDeployer.php';

$d = new Salty_PEAR_Server_RemoteReleaseDeployer();

$d->adminuri = 'http://pear.saltybeagle.com/admin.php';
$d->username = 'adminhandle';
$d->password = '1234';

if ($d->deployRelease('/home/bbieber/workspace/Salty_PEAR_Server_RemoteReleaseDeployer/Salty_PEAR_Server_RemoteReleaseDeployer-0.0.1.tgz')) {
    echo 'Success!';
} else {
    echo 'Something went terribly wrong.';
}

So what the heck, I made it into a PEAR package.

Salty_PEAR_Server_RemoteReleaseDeployer

Hooray for PEAR Channels!

Things to check out, when the Ruby on Rails site comes back up.

November 6th, 2006

I wanted to read up on Capistrano, but the RoR website was down today.

Capistrano was referenced in Matthew Weier O’Phinney’s “PHP Development Best Practices” for open source application deployment tools.

The slides from his talk offer a good broad stroke introduction to best practices for application development – not too many things applicable only to PHP, most could be applied to software development in general.

The slides are an OK read, but a podcast would be excellent.