Skip to content

Instantly share code, notes, and snippets.

@eheydrick
Last active February 26, 2016 19:38
Show Gist options
  • Save eheydrick/f337643bdca1bb70c453 to your computer and use it in GitHub Desktop.
Save eheydrick/f337643bdca1bb70c453 to your computer and use it in GitHub Desktop.
install postgresql pg gem into the sensu embedded ruby
ark 'postgresql' do
url 'https://ftp.postgresql.org/pub/source/v9.4.6/postgresql-9.4.6.tar.bz2'
end
# build and install postgresql into the sensu embedded install
execute 'configure postgresql' do
command './configure --prefix /opt/sensu/embedded --with-openssl'
not_if '/opt/sensu/embedded/bin/gem list pg -i'
cwd '/usr/local/postgresql'
environment(
CFLAGS: '-I/opt/sensu/embedded/include',
LDFLAGS: '-L/opt/sensu/embedded/lib'
)
notifies :run, 'execute[make postgresql]', :immediately
end
execute 'make postgresql' do
command 'make'
cwd '/usr/local/postgresql'
action :nothing
notifies :run, 'execute[make install postgresql]', :immediately
end
execute 'make install postgresql' do
command 'make install'
cwd '/usr/local/postgresql'
action :nothing
end
sensu_gem 'pg'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment