Steve Kemp's Blog Writings relating to Debian & Free Software

So PaaS

Fri, 6 Dec 2013 12:32:38 GMT

I just realised a lot of my projects are deployed in the same way:

  • They run under runit.
  • They operate directly from git clones.

This includes both Apache-based projects, and node.js projects.

I'm sure I could generalize this, and do clever things with git-hooks. Right now for example I have run-scripts which look like this:

#!/bin/sh
#
# /etc/service/blogspam.js/run - Runs the blogspam.net API.
#


# update the repository.
git pull --update --quiet

# install dependencies, if appropriate.
npm install

# launche
exec node server.js

It seems the only thing that differs is the name of the directory and the remote git clone URL.

With a bit of scripting magic I'm sure you could push applications to a virgin Debian installation and have it do the right thing.

I think the only obvious thing I'm missing is a list of Debian dependencies. Perhaps adding soemthing like the packages.json file I could add an extra step:

apt-get update -qq
apt-get install --yes --force-yes $(cat packages.apt)

Making deployments easy is a good thing, and consistency helps..

| 2 comments.

 

Comments On This Entry

[gravitar] Nux

Submitted at 09:07:10 on 9 December 2013

Steve, have you looked at Docker yet? From what I read in your post it seems the kind of thing that would get you interested.

[gravitar] Steve

Submitted at 17:55:04 on 9 December 2013

I keep meaning to, but the idea of having a single host share lots of services makes me a little unhappy.

(i.e. You have to bind different deamons to different interfaces explicitly.)

I accept it is flexible, and sexy, and modern, but with my automation tools I'm as well to just spin up a "real" machine. It takes minutes, rather than seconds, but I need to make coffee sometime anyway ...

 

Comments are closed on posts which are more than ten days old.

Spiral Logo

Search

Recent Posts

Recent Tags

Links

RSS Feed

  • Subscribe to feed