Skip to content

Instantly share code, notes, and snippets.

@aortmannm
Last active December 15, 2015 03:39
Show Gist options
  • Save aortmannm/5196088 to your computer and use it in GitHub Desktop.
Save aortmannm/5196088 to your computer and use it in GitHub Desktop.
Fifo Recipe for installation in a Local Zone
## Write a new source in the pkgin config file
execute 'pkgin_config' do
command "echo 'http://release.project-fifo.net/pkg/#{node[:fifo][:release]}/' >>/opt/local/etc/pkgin/repositories.conf"
action :run
end
## Update the pkgin sources
execute 'update_pkgin' do
command 'pkgin -fy up'
action :run
end
## Set environment variables
ENV['HOME']= "/root"
ENV['PATH']= "/opt/local/gnu/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/usr/sbin"
## Install the package snarl
package 'snarl' do
version '0.3.4'
action :install
end
## Install the package sniffle
package 'sniffle' do
version '0.3.4p1'
action :install
end
## Install the package howl
package 'howl' do
version '0.1.4'
action :install
end
## Install the package wiggle
package 'wiggle' do
version '0.4.5'
action :install
end
## Install the package jingles
package 'jingles' do
version '0.1.2p1'
action :install
end
## Install the package haproxy
package 'haproxy' do
version '1.4.21'
action :install
end
execute 'copy_nginx_config' do
command 'cp /opt/local/jingles/config/nginx.conf /opt/local/etc/nginx/nginx.conf'
action :run
end
execute 'copy_haproxy_config' do
command 'cp /opt/local/jingles/config/haproxy.cfg /opt/local/etc/haproxy.cfg'
action :run
end
## activate the service epmd
service 'epmd' do
action [ :enable ]
end
## activate the service snarl
service 'snarl' do
action [ :enable ]
end
## activate the service sniffle
service 'sniffle' do
action [ :enable ]
end
## activate the service howl
service 'howl' do
action [ :enable ]
end
## activate the service wiggle
service 'wiggle' do
action [ :enable ]
end
## activate the service nginx
service 'nginx' do
action [ :enable ]
end
## activate the service haproxy
service 'haproxy' do
action [ :enable ]
end
## add and set user grants and password
execute 'add_fifo_user' do
command "fifoadm users add #{node[:fifo][:user]}"
action :run
end
execute 'set_user_rights' do
command "fifoadm users grant #{node[:fifo][:user]} ..."
action :run
end
execute 'set_user_passwd' do
command "fifoadm users passwd #{node[:fifo][:user]} #{node[:fifo][:passwd]}"
action :run
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment