Public Gists by adamhjk

Gravatar
Sat Nov 07 11:48:01 -0800 2009
1
2
3
    ## Then, deploy
    deploy_revision app['id'] do
      revision app['revision'][node.app_environment]
Gravatar
Wed Nov 04 21:00:34 -0800 2009
1
2
3
diff --git a/chef/lib/chef/provider/git.rb b/chef/lib/chef/provider/git.rb
index 9da744c..d77b858 100644
--- a/chef/lib/chef/provider/git.rb
Gravatar
Mon Nov 02 16:01:10 -0800 2009
1
2
3
          solr_base = File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "..", "..", "solr"))
 
          # Create the Jetty container
Gravatar
Wed Oct 28 13:56:35 -0700 2009
1
2
3
# Chef Client Config File
 
require 'ohai'
Gravatar
Tue Oct 27 19:14:25 -0700 2009
1
2
3
#
# Author:: Nathan Haneysmith <nathan@opscode.com>
# Cookbook Name:: opscode-account
Gravatar
Thu Oct 22 16:53:20 -0700 2009
1
2
3
require 'chef'
require 'chef/config'
 
Gravatar
Thu Oct 22 15:22:31 -0700 2009
1
2
3
# Chef Client Config File
 
require 'ohai'
Gravatar
Thu Oct 22 01:01:15 -0700 2009
1
2
3
[adam@latte.local](1)% cap monkeynews:deploy REVISION=food ~/src/sandbox/opscode/chefistrano
  * executing `monkeynews:deploy'
  * executing `monkeynews:deploy:update'
Gravatar
Wed Oct 21 16:10:08 -0700 2009
1
2
3
service "nginx" do
  action :restart
end
Gravatar
Wed Oct 21 15:26:28 -0700 2009
1
2
3
{
  "server_roles": [
    "monkeynews"
Gravatar
Wed Oct 21 12:36:48 -0700 2009
1
2
3
task :monkeypants do
  chefistrano.recipe do
    service "apache2" do
Gravatar
Tue Oct 20 10:43:09 -0700 2009
1
2
3
define :sudo_user, :username => nil do
  begin
    r = resource(:template => "/etc/sudoers")
Gravatar
Sun Oct 18 22:52:14 -0700 2009
1
2
3
require 'rubygems'
require 'merb-core'
require 'chef'
Gravatar
Fri Oct 16 13:14:15 -0700 2009
1
2
3
#
# Cookbook Name:: users
# Recipe:: default
Gravatar
Fri Oct 16 13:14:08 -0700 2009
1
2
3
#
# Cookbook Name:: users
# Recipe:: default
Gravatar
Wed Sep 23 11:39:38 -0700 2009
1
2
3
class Server
 
  require 'json'
Gravatar
Wed Sep 23 11:39:00 -0700 2009
1
2
3
  def self.send_pkg_resource(server_name, pkg, action)
    resource = Chef::Resource::Package.new(pkg)
    resource.action(action)
Gravatar
Wed Sep 23 11:15:31 -0700 2009
1
2
3
{
  "run_list": [ "role[base]" ]
}
Gravatar
Thu Sep 17 14:02:56 -0700 2009
1
2
3
ruby_block "reload config" do
  block do
    Chef::Config.from_file("/etc/chef/client.rb")
Gravatar
Tue Sep 15 12:56:39 -0700 2009
1
2
3
execute "this command" do
  not_if do (Time.now - FileUtils.stat("somefile").mtime) > 300 end
end