Articles by: glarizza

Using crankd to Respond to Network Events

If you're not familiar with the Pymacadmin project – you should be.  Nigel Kersten and Chris Adams have created an awesome tool called crankd that will let you execute Python code or shell scripts in response to system events.

What does this mean to you?

Do you have laptop users that are bound to OD or AD?  Do they ever leave your network and get the spinning beachball as their computers try to authenticate or otherwise contact your LDAP servers?  Crankd can sense a network change, which will allow you to write code that removes search paths when your users are OFF your network, and add those search paths when your users RETURN to your network.  Awesome.

Do you have users that VPN to your corporate network?  Crankd will let you execute code to kill and resume the VPN when the computer sleeps or wakes.

Maybe you use a Configuration Management System like Chef or Puppet and you would like laptops to check in with your CMS when they connect to the network (think of laptop carts in education or infrequently used laptops elsewhere).  Crankd can make this happen.

All these problems can be solved by implementing and tweaking crankd.  It's not terribly difficult, and I wrote an article that shows you how to do it here.

Read more

The Commandments of Packaging in OS X

Whether you're a Mac Developer or Systems Admin, you've probably had to package up a bundle of files for deployment onto a number of machines.  There are many ways to do this with just as many software options; it's easy to get confused and make some simple mistakes.  The current trend away from deploying software into a monolithic "Golden Master" image and toward a modular package-based approach is pushing (or SHOULD BE pushing) Devs and DevOps folk to rethink the way they package. You can't automatically assume that a package will always be installed interactively on the boot volume through the GUI (could you ever really?), but that still doesn't stop certain developers from doing so.

Read on for more… 

Read more

A Plugin for Monitoring Server Admin with Nagios

For those who haven't tried it, Nagios is quite a cool monitoring package that will run on UNIX (Ed. There fixed that!) variants, including OS X Server.  John C. Welch wrote up an article on setting up Nagios with a Leopard Server which was my inspiration.  While running Nagios, you quickly find that the Plugin system of adding commands to communicate with servers, switches, and all SNMP-speaking devices is…well…awesome. It would be cool if there was a way to pull information out of your Server Admin-managed services and monitor it with Nagios.  I wrote up a small Google Doc on how to do just that.

 Using Felim Whiteley's libsrvrmgrd-osx package, you can pull a wealth of information out of Server Admin over port 311 on a machine running OS X Server the least of which is whether or not a service is running.

 The document is here https://docs.google.com/Doc?docid=0AaQfhLeDuWNcZGNibTU2ODNfNTFjYnF6bjZucg&hl=en and I welcome all comments and suggestions!  

Read more