Explore handy Jekyll snippets for enhancing static site generation, including unique presentation of the latest post and consistent post excerpts.

Jekyll Snippets

Had a go at converting a mostly static but dynamically rendered site to use Jekyll yesterday, it was a lot more straight forward than I thought it was going to be. As part of the conversion I needed to display the first post differently, after consulting the all knowing Google I settled on the following method; Jekyll Snippets 1/4 Getting just the latest post; html {% for post in site.posts offset: 0 limit: 1 %} ...

February 2, 2014 · 1 min · Russ Mckendrick
A deep dive into using Vagrant and Puppet for setting up reproducible development environments, mirroring production with local Virtualbox instances.

Vagrant & Puppet

Vagrant allows developers to bring up local development machines in a controlled method using pre-built configuration files called boxes. Once a box has been installed on the developers local machine it can be powered on with the following command; Vagrant & Puppet 1/2 vagrant up When the box is brought up it automatically provisions itself using a number of provisioners including Puppet, this means that the production deployment scripts can also be run on local development copies of the instances. The instances on the local machines are powered by Virtualbox and there Windows, Linux and Mac versions of Vagrant. ...

January 12, 2014 · 3 min · Russ Mckendrick
My top 10 albums of 2013, a rich mix of genres with highlights from Monster Magnet, David Bowie, and more, showcasing the year's standout music.

Top 10 2013

Keeping up the yearly tradition here is what I have been listing to in 2013 …. Monster Magnet — Last Patrol↗ David Bowie — The Next Day↗ Coheed and Cambria — The Afterman: Descension↗ Gary Numan — Splinter (Songs from a Broken Mind)↗ Gregory Porter — Liquid Spirit↗ Clutch — Earth Rocker↗ Public Service Broadcasting — Inform — Educate — Entertain↗ How to Destroy Angels — Welcome Oblivion↗ Sigur Rós — Kveikur↗ Katatonia — Dethroned & Uncrowned↗ The Temperance Movement — The Temperance Movement↗

December 8, 2013 · 1 min · Russ Mckendrick
Explore the essential tools and services that enhance my efficiency as a developer and sysadmin, from code editors and version control to server hosting.

Stuff I use

I am trying to streamline my workflow at the moment. Currently on the Mac these are; StormSSH↗ — Key Managment Vagrant↗ — Local Server testing Packer↗ — Build Machine Images SublimeText↗ — Text Editor Z↗ — Jump around the CLI Le-git↗ — Adds some GIT features Git Tower↗ — GUI for GIT Home Brew↗ — Install “missing” stuff and on my servers; ...

November 17, 2013 · 1 min · Russ Mckendrick
A comprehensive guide on setting up Cobbler on CentOS 6.x for mirroring repos and server kickstarts, including EPEL enablement and security setup.

Installing Cobbler on CentOS 6.x

I needed a simple way to mirror some repos, and potentially kickstart some servers at a future date. While something like The Foreman↗ would do the build side of things it doesn’t repo mirrors (yet). So I did an install of Cobbler↗ . This turned out to be more stright forward than I thought, first you need to ensure EPEL↗ is enabled …. Installing Cobbler on CentOS 6.x 1/1 yum install http://ftp.linux.ncsu.edu/pub/epel/6/i386/epel-release-6-8.noarch.rpm yum install cobbler cobbler-web pykickstart chkconfig cobblerd on chkconfig xinetd on service httpd restart service xinetd start service cobblerd start service cobblerd status cobbler get-loaders vim /etc/cobbler/modules.conf # Make the following changes …. [dns] module = manage_dnsmasq [dhcp] module = manage_dnsmasq [authentication] module = authn_configfile [authorization] module = authz_allowall # once done save and run the following …. cobbler check cobbler sync # cobbler sets the username and password for the web interface to cobbler / cobbler, change that by running …. htdigest /etc/cobbler/users.digest “Cobbler” cobbler ….. all done. You should be able to access your installation at ….. ...

October 13, 2013 · 1 min · Russ Mckendrick
A concise tutorial on setting up SaltStack for centralized server management on CentOS, including master-minion setup and basic commands.

SaltStack on CentOS 6.x

Had a play with SaltStack↗ today, it’s a good way to manage multiple machines from a central location. It runs as a Server (master) and client (minion). First we need to install the Salt-Master, this assumes you are installing on CentOS and don’t mind having EPEL installed on both the master and minion …. SaltStack on CentOS 6.x 1/3 # Install EPEL and Update on both the master and minions yum update -y yum install http://ftp.linux.ncsu.edu/pub/epel/6/i386/epel-release-6-8.noarch.rpm # Install the salt-master yum install salt-master chkconfig salt-master on sed -i ‘s/#interface: 0.0.0.0/interface: 0.0.0.0/g’ /etc/salt/master service salt-master start # Install the salt-minion # Replace $salt-master.yourdomain.com with the FQDN of your salt-master yum install salt-minion chkconfig salt-minion on sed -i ‘s/#master: salt/master: manager.yourdomain.com/g’ /etc/salt/minion service salt-minion start Now we have a minion talking to the master we need to accept the certificate; ...

October 6, 2013 · 1 min · Russ Mckendrick
Step-by-step guide to setting up a Puppet Server and agent on CentOS 6.4, including Apache configuration and SSL certificate management.

Puppet Server & Client Installation CentOS 6.x

This post assumes that you are starting with a clean minimal CentOS 6.4 64bit server and you have a full hostname set. Puppet Server Installation …… Puppet Server & Client Installation CentOS 6.x 1/4 # Hostname — Make sure the host name it set to puppet.yourdomain.com and that you replace references in this file # Install puppet & epel repos yum install -y http://yum.puppetlabs.com/el/6/products/i386/puppetlabs-release-6-6.noarch.rpm http://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm # Download puppet-server from Puppet Labs, apache and necessary dependencies yum install -y vim-enhanced puppet-server httpd httpd-devel mod_ssl ruby-devel rubygems gcc-c++ curl-devel zlib-devel make automake openssl-devel rubygem-rack rubygem-passenger-native-libs rubygem-passenger-native rubygem-passenger rubygem-fastthread libev mod_passenger git # Start Puppet-Server /etc/init.d/puppetmaster start # Set Puppet Master to run on startup puppet resource service puppetmaster ensure=running enable=true # Create the directory structure for Puppet Master Rack Application mkdir -p /usr/share/puppet/rack/puppetmasterd mkdir /usr/share/puppet/rack/puppetmasterd/public /usr/share/puppet/rack/puppetmasterd/tmp cp /usr/share/puppet/ext/rack/files/config.ru /usr/share/puppet/rack/puppetmasterd/ chown puppet /usr/share/puppet/rack/puppetmasterd/config.ru # Create the VHOST for puppet master cat > /etc/httpd/conf.d/puppetmaster.conf << APACHE_CONFIG PassengerHighPerformance On PassengerMaxPoolSize 6 PassengerMaxRequests 1000 PassengerPoolIdleTime 600 Listen 8140 <VirtualHost *:8140> SSLEngine On # Only allow high security cryptography. Alter if needed for compatibility. SSLProtocol All -SSLv2 SSLCipherSuite HIGH:!ADH:RC4+RSA:-MEDIUM:-LOW:-EXP SSLCertificateFile /var/lib/puppet/ssl/certs/puppet.yourdomain.com.pem SSLCertificateKeyFile /var/lib/puppet/ssl/private_keys/puppet.yourdomain.com.pem SSLCertificateChainFile /var/lib/puppet/ssl/ca/ca_crt.pem SSLCACertificateFile /var/lib/puppet/ssl/ca/ca_crt.pem SSLCARevocationFile /var/lib/puppet/ssl/ca/ca_crl.pem SSLVerifyClient optional SSLVerifyDepth 1 SSLOptions +StdEnvVars +ExportCertData # These request headers are used to pass the client certificate # authentication information on to the puppet master process RequestHeader set X-SSL-Subject %{SSL_CLIENT_S_DN}e RequestHeader set X-Client-DN %{SSL_CLIENT_S_DN}e RequestHeader set X-Client-Verify %{SSL_CLIENT_VERIFY}e DocumentRoot /usr/share/puppet/rack/puppetmasterd/public/ <Directory /usr/share/puppet/rack/puppetmasterd/> Options None AllowOverride None Order Allow,Deny Allow from All </Directory> </VirtualHost> APACHE_CONFIG # Sort out the services /etc/init.d/puppetmaster stop /etc/init.d/httpd start chkconfig puppetmaster off chkconfig httpd on # check its listening netstat -ln | grep 8140 # bosh Install the agent …… ...

August 31, 2013 · 2 min · Russ Mckendrick