pkgr

Packaging Node/Python App Using Pkgr

pkgr is a tool for building deb/rpm packages for Python/Ruby/Node/GO applications. It uses heroku buildpack and embed all the dependencies related to the application runtime within the package. It also gives us a nice executable, which closely replicates the Heroku toolbelt utility. There are only 2 requirements for pkgr, 1) It must have a Procfile and 2) It should be Heroku compatible.

By default, pkgr supports packaging Ruby/GO/Node apps. But it also supports custom buildpacks, so we can use heroku-python build pack to pacakge Python apps too.

Installing pkgr

$ apt-get update

$ apt-get install -y build-essential ruby1.9.1-full rubygems1.9.1

$ gem install pkgr

Packaging a Node application

For pacakging a Node application, run the below command

$ pkgr package <path-to-node-app-source> --verbose --debug --env "HOME=/tmp" --auto

Packaging a Python application,

For pacakging a Python application, run the below command

$ pkgr package <path-to-python-app-source> --verbose --debug --env HOME=/tmp --auto --buildpack=https://github.com/heroku/heroku-buildpack-python

Note: python buld pack, we need to have libssl0.9.8 installed, other wise pip install will throw hashlib errors.

Advertisements
Standard

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s