basalt

basalt allows you to build parameterized packages for Linux (and even OSX or FreeBSD). This is very handy, if you want to build several packages of one project for different customers, or if you need to build packages with small differences for several hosts.

To build packages you basically need a YAML config and a build file. In this example, the package is generated with invoke build_deb --config configs/go.dajool.com.yaml and packages a go application with all the configes needed. Even the webserver config is generated with the information from the YAML file and a post-install-script takes care of the server reload.

A dwarf - standing on the shoulders of giants

basalt makes havy usage of invoke and fpm for the package generation.

The history of basalt

basalt came to being with this tree blog posts:

  1. Cup-Recipe For (Django) Python Deployment - Or How To Make Your Admin Happy
  2. Cup-Recipe For (Django) Python Deployment Part 2 - Detailed Overview
  3. Cup-Recipe For (Django) Python Deployment Part 3 - Deployment

Installation

Packages for Ubuntu 14.04

There are packages available for Ubuntu 14.04 from my personal repository. The packages are signed, so that apt won't complain and you can be sure that they are from me. I'm trying to keep this repository stable, but you shouldn't bet all you money on it.

Just download and install this package. It will add an entry to /etc/apt/sources.d/ and import the key. After that you can install basalt via apt:

apt update && apt install basalt

From source

Since I tried to avoid the chicken and egg problem, you won't need basalt to generate packages for basalt. But you'll have to install fpm. Usually it should be enough to just install ruby and then execute gem install fpm. I not sure, but you might also need to install build-essential for some of the packages.

Packaging the dependencies

git clone https://github.com/basalt/dependencies.git
cd dependencies/ubuntu/14.04/
cd fpm && make package_deb
cd ../python-invoke && make package_deb
cd ../python-sh && make package_deb

Install all generated packages.

Packaging the python core of basalt

git clone https://github.com/basalt/python-basalt.git
cd python-basalt && make package_deb

Install the generated package.

Packaging of basalt

git clone https://github.com/basalt/basalt.git
cd basalt && make package_deb

Install the generated package.

You are done! :)