dracoblue.net

Updating Puppet Modules in Vagrant Boxes

If you are working with vagrant machines and provision those machines with puppet, you will find plenty of good modules at puppetforge and of course at github.

But in both cases you will download a specific version of the module and clone it into a directory called modules.

# e.g. for stdlib and nginx module
modules\
  nginx
  stdlib
Continue reading ...

In apt-get, git, open source, puppet, ubuntu, vagrant by DracoBlue @ 07 Dec 2013 | 697 Words

PowerShell Community Extensions in Vagrant for Windows

Setting up windows machines with vagrant, is pretty good supported. To have less problems, you might want to use vagrant-windows plugin.

Since the windows version relies on Microsoft's PowerShell, you usually want to use the PowerShell Community Extensions.

To ensure that those are installed, you have to provision this package by using for instance puppet.

But, since pscx is only available as .zip-File, we need to install 7-Zip in first place.

Continue reading ...

In powershell, puppet, vagrant, windows by DracoBlue @ 06 Dec 2013 | 352 Words

SHOW TABLES in sqlite/postgresql

When working on craur's pdo functionalities, I wanted to know all tables in a specific pdo database.

If you are using mysql, you can use

SHOW TABLES;

to retrieve a list of all available tables in the current database.

But this does not work in postgres nor in sqlite.

Continue reading ...

In postgresql, sqlite by DracoBlue @ 05 Dec 2013 | 152 Words

Generate Sitemap for jekyll-models

If you want to use a sitemap with jekyll, you need to use a plugin like recurser's generate_sitemap.rb.

This works well for static pages and for posts, but won't work out of the box, if you use jekyll-models.

Since I am creating the downloads area of dracoblue.net with jekyll-models, I want to have those downloads in the sitemap.xml, too.

Continue reading ...

In jekyll by DracoBlue @ 04 Dec 2013 | 178 Words

Run Jekyll as Upstart/Monit Service

When using jekyll to generate a static page, I wanted to have jekyll running as a service (by using upstart and monit).

Usually you launch jekyll with the --watch parameter and it will refresh the page continously.

Setup a upstart file called /etc/init/jekyll.conf.

script
    export LANG="en_US.UTF-8"
    exec start-stop-daemon --make-pid --start --pidfile /var/run/jekyll.pid --chdir /home/dracoblue/live/ --chuid dracoblue:dracoblue --exec /usr/bin/jekyll -- build --watch
end script

It's very important to have export LANG="en_US.UTF-8" in this definition, because otherwise jekyll uses US-ASCII and you can't get rid of messages like:

Liquid Exception: invalid byte sequence in US-ASCII in
Continue reading ...

In jekyll, monit, ubuntu, upstart by DracoBlue @ 03 Dec 2013 | 213 Words

Page 10 - Page 11 - Page 12