Skip to content

Instantly share code, notes, and snippets.

deploy_revision 'chef' do
repository '[email protected]:opscode/chef'
symlink_before_migrate Hash.new
deploy_to '/srv/chef'
migrate false
end
rsync "deployment" do
hosts search(:nodes, "application:foo")
from '/srv/chef'
deploy_revision 'chef' do
repository '[email protected]:opscode/chef'
symlink_before_migrate Hash.new
deploy_to '/srv/chef'
migrate false
end
rsync "deployment" do
hosts search(:nodes, "application:foo")
from '/srv/chef'
#
# Cookbook Name:: postgresql
# Library:: helpers
#
# Copyright 2010, Estately, Inc.
#
# All rights reserved - Do Not Redistribute
#
module Foo
sysadmins = search(:users, 'groups:sysadmin')
sysadmin_group = Array.new
sysadmins.each do |u|
sysadmin_group << u['id']
u['openid'].each do |oid|
node[:apache][:allowed_openids] << oid unless node[:apache][:allowed_openids].include?(oid)
end if u['openid']
def create_account(self, new_account, new_user, new_password):
"""
Handles the create_account call for developers, used to request
an account be created both on a Swift cluster and in the auth server
database.
This will make ReST requests to the Swift cluster's account servers
to have an account created on its side. The resulting account hash
along with the URL to use to access the account, the account name, the
user name, and the password is recorded in the auth server's database.
account_hash = self.add_storage_account() if !account_hash
# Copyright (c) 2010 OpenStack, LLC.
#
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
(defn new-role
"Create a new role"
([] (struct role))
([& roleargs] (struct role roleargs)))
deploy_revision "gem-#{name}-src" do
#action :force_deploy
revision (env["#{name}-revision"] || env['default-revision'])
repository '[email protected]:' + (env["#{name}-remote"] || env['default-remote']) + "/#{name}.git"
remote (env["#{name}-remote"] || env['default-remote'])
symlink_before_migrate Hash.new
user "root"
group "root"
deploy_to "/srv/#{name}"
migrate false
deploy_revision "gem-#{name}-src" do
#action :force_deploy
revision (env["#{name}-revision"] || env['default-revision'])
repository '[email protected]:' + (env["#{name}-remote"] || env['default-remote']) + "/#{name}.git"
remote (env["#{name}-remote"] || env['default-remote'])
symlink_before_migrate Hash.new
user "root"
group "root"
deploy_to "/srv/#{name}"
migrate false