Jenkins 1.59 / CentOS 7 / GitHub / Rails / RSpec / Rbenv

As this is for personal use the system I configured has 1 64bit CPU, 1GB of RAM, and 30GB SSD HDD (the $10/mo DigitalOcean plan). I first tried it with the $5 plan, that kept giving me memory issues as Jenkins/Hudson runs on a JavaVM so for my needs 1GB of ram was needed. I won’t be running multiple builds with multiple nodes, pretty much whenever I push code to GitHub/BitBucket I want Jenkins to build and deploy code. If I push to master and it passes deploy to production, If I push to development and it passes deploy to staging.

My setup: 1 VM production server, 1 Physical staging server (in my office), 1 JenkinsCI VM server, and numerous repositories on GitHub and BitBucket.

Setting up Jenkins on CentOS 7

# ssh as root into your server

# grab Jenkins repo
wget -O /etc/yum.repos.d/jenkins.repo

# add to rpm
rpm --import

# update yum
yum update

# install git
yum install git

# install dev tools
yum groupinstall "Development Tools"

# install jenkins
yum install jenkins

# install java for jenkins
yum install java-1.7.0-openjdk

# open firewall for 8080 if you have firewalld on and are going to use 8080
firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload

# restart jenkins service
systemctl restart jenkins.service

# check on status
systemctl status jenkins.service

# add jenkins service boot on restart
chkconfig jenkins on

# at this point jenkins should be running point your browser to http://ip_address:8080

# additional steps if you want to have nginx in front of jenkins
# follow install procedures for nginx here:
# or here:
# i prefer the digitalocean guide
# and here for nginx conf:

# things you might need
yum install epel-release
yum install nodejs
yum install npm
yum install sqlite-devel

Setup for Rails / Rbenv

# for rbenv sourced from:
yum install -y gcc openssl-devel libyaml-devel readline-devel zlib-devel

# you might need to change jenkins user to be able to use a shell
vi /etc/passwd

# change jenkins entry from /bin/false to /bin/bash

# switch to jenkins user
su - jenkins

# install rbenv
git clone ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
exec -l $SHELL

# list all versions of ruby available
rbenv install --list

# install ruby 2.1.5
rbenv install 2.1.5

# 'rbenv rehash' with newer versions of rbenv this is not required 0.4.0 or later

# set 2.1.5 as global ruby
rbenv global 2.1.5


CentOS 7 and PostgreSQL 9.3

Process to install and initialize.

# ssh into server

curl -O

# add to yum
rpm -ivh pgdg*
yum list postgres

yum install postgresql93-server

# initialize database
/usr/pgsql-9.3/bin/postgresql93-setup initdb

# start database
systemctl start postgresql-9.3 # or service postgres-9.3 start

# caveat make sure postgres owns and can write to the directory where the db files are stored.
# /var/lib/pgsql/9.3/data
# if not
# chown -Rf postgres:postgres /var/lib/pgsql/9.3/data
# chmod 700 /var/lib/pgsql/9.3/data/
# then run start command

# switch to postgres user
su - postgres


# quit

# create a user that can create databases (-d can create databases -R can't create roles -P prompt for password)
createuser -d -R -P username

# kill user session

Ubisoft – Assassin’s Creed Unity

Thank you Ubisoft! I now am going to think twice when it comes to pre-ordering games. I wanted to like this game so much like the other Assassin’s Creed games but with all the bugs and the user experience is just unplayable. I’ve jumped from one rooftop to another just to end up in an endless free fall. I am every disappointed.