Skip to content

Instantly share code, notes, and snippets.

@bryanwb
Created July 31, 2013 08:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bryanwb/6120426 to your computer and use it in GitHub Desktop.
Save bryanwb/6120426 to your computer and use it in GitHub Desktop.
prototype for build lwrp
# this is an example of the build LWRP
# based on the configuration DSL from https://github.com/opscode/omnibus-ruby
# and to be used together w/ thunderball
# thunderball downloads from a pre-configured s3 bucket, node[:thunderball][:bucket]
thunderball "nginx" do
url 'nginx-1.2.3.tgz'
end
# simplest example
build 'nginx' do
source "#{node[:thunderball][:storedir]}/nginx-1.2.3.tgz"
version "1.2.3"
install_path "/usr/local/nginx"
commands ["./configure", "make", "make install"]
end
# more complex example
build 'nginx' do
source "#{node[:thunderball][:storedir]}/nginx-1.2.3.tgz"
version "1.2.3"
install_path "/usr/local/nginx"
bin_cmds ['sbin/nginx', 'sbin/quickcheck'], :path => '/usr/local/sbin'
env "SOME_GLOBAL_ENV_FLAGS" => 'some_value'
command "./configure" do
args [ '--prefix /usr/local', '--enable-ssl', ]
env 'LDPATH' => '/usr/local/lib'
end
command 'make'
command 'make install' do
shell '/bin/bash'
end
creates '/usr/local/sbin/nginx'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment