Install the vagrant and chef gems:
gem install vagrant chef
Create a vagrant project directory to work out of:
Note the nginx => {:proxy => "enable"}
is to expose Jenkins on port 80 while keeping the backend process privilege separated and on port 8080.
There is a long standing issue in Ruby where the net/http library by default does not check the validity of an SSL certificate during a TLS handshake. Rather than deal with the underlying problem (a missing certificate authority, a self-signed certificate, etc.) one tends to see bad hacks everywhere. This can lead to problems down the road.
From what I can see the OpenSSL library that Rails Installer delivers has no certificate authorities defined. So, let's go fetch some from the curl website. And since this is for ruby, why don't we download and install the file with a ruby script?
# More info at https://github.com/guard/guard#readme | |
guard 'ego' do | |
watch('Guardfile') | |
end | |
guard 'spork' do | |
watch('config/application.rb') | |
watch('config/environment.rb') | |
watch(%r{^config/environments/.*\.rb$}) |
development: | |
adapter: mysql2 | |
encoding: utf8 | |
reconnect: false | |
database: rails_proj_development | |
pool: 5 | |
username: rp_dev | |
password: wootwoot | |
host: localhost |
namespace :init do | |
task 'gitflow_init' do | |
preconditions = [ | |
%{git config --get gitflow.branch.master >/dev/null 2>&1}, | |
%{git config --get gitflow.branch.develop >/dev/null 2>&1}, | |
%{git config --get gitflow.prefix.feature >/dev/null 2>&1}, | |
%{git config --get gitflow.prefix.release >/dev/null 2>&1}, | |
%{git config --get gitflow.prefix.hotfix >/dev/null 2>&1}, | |
%{git config --get gitflow.prefix.support >/dev/null 2>&1}, | |
%{git config --get gitflow.prefix.versiontag >/dev/null 2>&1} |
server { | |
listen 80; | |
server_name ""; | |
location / { | |
root html; | |
index index.html index.htm; | |
} | |
# redirect server error pages to the static page /50x.html |
cache_dir="/var/cache/downloads" | |
tar_url="http://nginx.org/download/nginx-0.9.7.tar.gz" | |
tar_file="${tar_url##http*/}" | |
tar_dir="${tar_file%.tar.gz}" | |
configure_flags=" | |
--prefix=/opt/${tar_dir} | |
--conf-path=/etc/nginx/nginx.conf | |
--with-http_ssl_module | |
" | |
pkgs=( wget build-essential binutils-doc autoconf flex bison |
{ | |
"webapp": { | |
"web_server": "apache2", | |
"vhosts": [ | |
{ "id": "production", | |
"host_name": "main.example.com", | |
"non_ssl_server": true, | |
"www_redirect": false, | |
"ssl_server": true, | |
"ssl_www_redirect": false |