Posted by & filed under aws, Go, Python, Web development.

At Turret.IO, our stack includes software written in both Python and Go. While it’s relatively easy and efficient to deploy Python code that handles the website and API, shipping Go binaries isn’t nearly as elegant. Our initial methods involved deploying the source, compiling on each machine (since Go does compile incredibly fast), and startup scripts handled the rest. As things became more complex and our number of daemon processes increased, this method became tedious and difficult to manage.

FPM to the rescue

Effing Package Management ( is a Ruby script that makes creating files compatible with various package managers incredibly simple (.rpm, .deb., etc.). Feed FPM a source directory, post-init script, and a version tag and in a few seconds you can have an installable package. FPM also supports a handful of source types like Python modules, Ruby gems, even other packages. This all works without having to run through the burdensome process of creating an rpmbuild environment.

How we use it

Incorporating FPM into our build process allows us to compile all of our Go code one time, bundle the necessary init scripts with each binary, and finally build a manageable RPM file. Each application server gets the RPM during our deployment process for installation. This worked well enough for us that we decided to build packages for other services that we used as well, such as NGiNX. After installing to a temporary directory, pass FPM the path and you have a custom, installable NGiNX package.

Leave a Reply

Your email address will not be published. Required fields are marked *