Deploying Janky on Ubuntu
Janky is a Github-developed Hubot + Jenkins control interface. It’s developed to be deployed on Heroku. However, what if you need it to live on an internal VM? Here’s how I got it running on a Ubuntu (12.04 Precise) VM.
Make sure you have the correct MySQL libs installed:
1
sudo apt-get install mysql-server libmysqlclient-dev
Clone janky from the Github repository
1
2
git clone https://github.com/github/janky.git
cd janky
Bootstrap your environment
The following steps are taken nearly verbatim from the “Hacking” section on the Janky README:
1
2
3
4
5
6
7
8
9
script/bootstrap
mysqladmin -uroot create janky_development
mysqladmin -uroot create janky_test
RACK_ENV=development bin/rake db:migrate
RACK_ENV=test bin/rake db:migrate
RACK_ENV=development bundle exec rake db:seed
Configure Thin
Open Gemfile
in your text editor and add:
1
gem "foreman"
Then install it:
1
bundle install
Then create a Procfile:
1
touch Procfile
Open the Procfile in your text editor and add the following line:
1
web: bundle exec thin start -p $PORT
Add the JANKY_* variables to your environment according to the janky README. I use zsh, so I added these as export statements in my ~/.zshenv
Start your server
1
bundle exec foreman start
Note that the server starts on port 5000 by default, and you can override it like so:
1
PORT=8080 bundle exec foreman start
That’s it!
Let me know how that works for you!