Application Packaging and Deployment with tpkg


Tpkg, a tool for cross-platform application packaging and large scale deployment.

Tpkg is a tool for packaging and deploying applications. It is designed to work alongside your operating system's packaging tool. I'll talk about the advantages of separating the packaging of your applications from your base OS. Separating the packaging of applications from the base OS system ensures that application packages and their dependencies don't interfere with the functioning of the base OS. For example, your OS comes with Perl 5.6.1, but your application needs 5.8.9. Upgrading the OS copy of Perl may break other applications. By using tpkg and installing your application and the newer version of Perl in a location reserved for tpkg you avoid any conflicts. Tpkg is cross platform, so although you may have two or three different operating systems in your environment you can use a common tool to package and deploy your applications on those systems.

I'll talk about some of the unique features of tpkg that make it ideally suited to packaging applications, and distinguish tpkg from OS packaging tools like rpm and dpkg. Tpkg supports encrypting some or all of the files in the package, so your application package can contain secret files like SSL or SSH keys, database passwords, etc. Also supported are external hooks that can be used to tie into a system configuration management tool, allowing packages to request accounts and other OS configuration.

The process of making and deploying packages in tpkg will be covered.

The process of building a package is quite simple. The package metadata is stored in an XML or YAML configuration file. Packages can have pre and post install and removal scripts. Incorporating init scripts and crontabs into packages will be discussed. cpan2tpkg and gem2tpkg utilities are also available to readily package Perl modules or Ruby gems.

Tpkg supports dependencies both on other tpkg packages as well as native packages, and tpkg handles dependency resolution and automatic dependency installation of both tpkg and native dependencies. As such installing applications with complex dependency trees is simple and fast. The deployment features of tpkg allow you to automate the installation, upgrade or removal of packages across a large number of systems. Tpkg handles SSH and sudo prompts that might be encountered in connecting to the target systems when performing a deployment.

I'll also compare tpkg with deployment tools like Capistrano.

Speaker: Jason Heiss

Copyright 2002-2010 Linux Expo of Southern California. All Rights Reserved.