Richard Caceres

San Francisco, CA http://rchrd.net 51 posts

Announcing a Puppet module for Dokku

I am excited to announce that I published a Puppet module for installing Dokku. Dokku is a great tool for easily hosting and deploying projects. It's basically a copy of Heroku that can be installed on Ubuntu 14.04. I recommend Digital Ocean for $5 a month.

With Puppet and this module, you can declaratively install Dokku.

Links:
- https://forge.puppetlabs.com/rchrd2/dokku
- https://github.com/rchrd2/puppet-dokku

Installation

puppet module install rchrd2-dokku  

Usage

node web {  
  # install dokku
  class {'dokku':
    version => 'v0.3.12',
  }

  # install dokku plugins
  dokku::plugin { "dokku-rebuild":
    source => "https://github.com/scottatron/dokku-rebuild.git",
    version => "master",
  }
  dokku::plugin { "dokku-pg-plugin":
    source => "https://github.com/rchrd2/dokku-pg-plugin.git",
    version => "master",
  }
}

https://github.com/rchrd2/puppet-dokku

How to install Ghost with NPM and Dokku

Today I installed Ghost, a blog app, on my very own server!
I installed it with dokku, a mini Heroku clone.


Installation notes

On the server, create an app

dokku apps:create blog  
dokku config:set blog NODE_ENV=production  

Turns out it worked best to install Ghost via npm, because it's already built.

I have it installed, but I need to setup a shared directory.

On the server, add the shared directory

dokku docker-options:add blog "-v /home/dokku/blog/shared:/app/shared"  
dokku docker-options blog  

So... I needed to modify Ghost and things got crazy. Turns out the npm package isn't directly what is in the repo. It contains the built files. So I had to build the files and add those to my fork (in a branch). After that, it worked!

Nice! It works! Hallelujah!

What's really nice is I have a repo that only has the bare minimum to run ghost plus a theme.

It looks like this:

/themes
   /casper
config.js  
index.js  
package.json  
README.md  

Code samples

package.json

{
  "name": "blog",
  "version": "0.0.1",
  "description": "blog.rchrd.net",
  "main": "index.js",
  "dependencies": {
     "ghost": "rchrd2/Ghost#package"
  },
  "devDependencies": {},
  "scripts": {
    "start": "node index",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "Richard Caceres",
  "license": "ISC"
}

index.js

var path = require('path');  
var ghost = require('ghost');

ghost({  
    config: path.join(__dirname, 'config.js')
}).then(function (ghostServer) {
    ghostServer.start();
});

config.js

var path = require('path'),  
    config;

config = {  
  production: {
      url: 'http://blog.rchrd.net',
      mail: {},
      database: {
          client: 'sqlite3',
          connection: {
              filename: path.join(__dirname, '/shared/content/data/ghost.db')
          },
          debug: false
      },

      server: {
          host: '0.0.0.0',
          port: '5000'
      },
      paths: {
          contentPath: path.join(__dirname, '/shared/content/'),
          themePath: path.join(__dirname, '/themes')
      }
  },
  development: {
      url: 'http://localhost:2368',
      database: {
          client: 'sqlite3',
          connection: {
              filename: path.join(__dirname, '/content/data/ghost-dev.db')
          },
          debug: false
      },
      server: {
          host: '127.0.0.1',
          port: '2368'
      },
      paths: {
          contentPath: path.join(__dirname, '/content/'),
          themePath: path.join(__dirname, '/themes')
      }
  } 
}

// Export config
module.exports = config;  

Mixtape 002

Recorded over a few months in 2012 and 2013 by occasionally capturing the output of my laptop into a cassette deck. I usually hit record when something caught my attention and I wanted to save it.

Everything was recording from Youtube with an emphasis on people demonstrating electronic musical instruments.

Materials: Laptop, Stereo Cassette Deck, Youtube
Download: Mixtape-001.mp3.zip

Mixtape 001

Recorded over a few months in mid 2012 by occasionally capturing the output of my laptop into a cassette deck. I usually hit record when something caught my attention or I wanted to save it. Not to be taken seriously, but maybe you'll enjoy it? It sounds a bit like channel surfing a radio since there aren't usually breaks between 'songs'. And sometimes the levels are pretty uneven, but there are some gems... though I can't recall where it all originated.

Materials: Laptop, Stereo Cassette Deck
Download: Mixtape-002.mp3.zip

Spencer Owen Timeshare

Pictured Above: Spencer Owen (center), Richard Caceres (me, left), Eugene Marder (right)

In February 2012 Spencer Owen put together a band to perform his music. I am the keyboardist for this band. Catch us live in the Bay Area, on one of our Tours, or live on the radio.

Here's some info about Spencer Owen.

"Driven by inspirations such as Prince, Laurie Anderson, Gilberto Gil and Todd Rundgren -- among many, many others [even some current musicians! -ed.] -- Spencer Owen (b. Los Angeles/1984, r. Oakland) is a musical polymath, interpreting his interests and influences with careful, passionate abandon. Unafraid of eclecticism both sonic and stylistic (not to mention his own powerful, unexpected falsetto), he supplements his particular approach to melody and arrangement with restless aesthetic creativity in action.

Over the years, he and/or the Timeshare have shared stages with the aforementioned Ariel Pink, Wooden Wand, Raven Fenbahn, Josephine Foster, Whysp, SAFE, Ava Mendoza, Dominique Leone, Cloud Becomes Your Hand, Emma Ruth Rundle (the Nocturnes; the Headless Prince of Zolpidem), Foxtails Brigade, Bells Atlas, Once & Future Band, Wildbirds & Peacedrums, Denny Denny Breakfast, Jackie-O Motherfucker, and, needless to say, more. His live shows are not, in any respect, to be missed. (Source)

Website: http://www.thespencerowen.com/

Object Photography

(Above: Some photographs in this series. Scroll to the right.)

In late 2011 I began photographing (mostly electronic) objects. Most of these are objects that I have owned and used and have some affinity for. A good photograph can capture the essence and convey the qualities that the owner saw in this object.

I end up selling some of these things on Craigslist or Ebay. This is preferred over throwing things away in the trash. Selling objects through these services provides a good sense of closure, and the photograph becomes an artifact and means to hold onto the object without having the object itself.

Instead of having a closet full of things, these things can be discarded, but kept alive forever through a photograph in a photo album.

Materials: Retired Electronics, Nikon D100 Digital SLR, Makeshift photoset

Facebook F8 2011

F8 is Facebook's annual developer conference.

I was contracted to develop projection software that instantly displayed an ever-changing grid of images. This allowed attendees to take a photo at a camera kiosk and then see themselves on a wall of projections. As the day went on, images were displayed on a random cycle, much like a screensaver.

Materials: Apple Quartz Composer