This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define :localgem, :version => nil do | |
| script "install_#{params[:name]}_local_#{params[:version]}" do | |
| interpreter "bash" | |
| user "root" | |
| code <<-EOH | |
| export GEM_HOME=/srv/localgems | |
| export GEM_PATH=/srv/localgems | |
| export PATH="/srv/localgems/bin:$PATH" | |
| gem install #{params[:name]} #{params[:version].nil? ? '' : "--version #{params[:version]}" } --no-rdoc --no-ri | |
| EOH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define :localgem, :version => nil do | |
| script "install_#{params[:name]}_local_#{params[:version]}" do | |
| interpreter "bash" | |
| user "root" | |
| code <<-EOH | |
| export GEM_HOME=/srv/localgems | |
| export GEM_PATH=/srv/localgems | |
| export PATH="/srv/localgems/bin:$PATH" | |
| gem install #{params[:name]} #{params[:version].nil? ? '' : "--version #{params[:version]}" } --no-rdoc --no-ri | |
| EOH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| service "slapd" do | |
| supports :restart => true, :status => true | |
| action [ :enable, :start ] | |
| end | |
| # ... some shit ... | |
| service "slapd" do | |
| action :stop | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (template "/etc/chef/client.rb" | |
| :source "client.rb.erb" | |
| :owner "root") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rubygems' | |
| require 'merb-core' | |
| require 'chef' | |
| require 'rack/etag' | |
| Chef::Config.from_file(File.join("/etc", "chef", "server.rb")) | |
| Merb::Config.setup(:merb_root => File.expand_path(File.dirname(__FILE__)), | |
| :environment => 'production', | |
| :fork_for_class_load => false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set[:scaffold] = { | |
| "hostname" => "gstmatch-prodstor-01", | |
| "fqdn" => "las1.colo.ignops.com", | |
| "ip_address" => "10.93.56.49", | |
| "net_device" => "eth0", | |
| "netmask" => "255.255.254.0", | |
| "gateway" => "10.93.56.1", | |
| "datacenter" => "las1", | |
| "farm" => { | |
| "name" => "gstmatch", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ruby | |
| # | |
| # Author:: Adam Jacob (<[email protected]>) | |
| # Copyright:: Copyright (c) 2010 Opscode, Inc. | |
| # License:: Apache License, Version 2.0 | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Chef | |
| file "/tmp/foo" do | |
| owner "root" | |
| mode "0755" | |
| end | |
| # Puppet | |
| file { "/tmp/foo": | |
| owner => "root", | |
| mode => "0755", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # | |
| # Author:: Adam Jacob (<[email protected]>) | |
| # Copyright:: Copyright (c) 2010 Opscode, Inc. | |
| # License:: Apache License, Version 2.0 | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ruby | |
| # | |
| # Author:: Adam Jacob (<[email protected]>) | |
| # Copyright:: Copyright (c) 2010 Opscode, Inc. | |
| # License:: Apache License, Version 2.0 | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # |