This file contains 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
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' |
This file contains 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
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' |
This file contains 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
# | |
# Cookbook Name:: postgresql | |
# Library:: helpers | |
# | |
# Copyright 2010, Estately, Inc. | |
# | |
# All rights reserved - Do Not Redistribute | |
# | |
module Foo |
This file contains 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
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'] |
This file contains 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
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. |
This file contains 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
account_hash = self.add_storage_account() if !account_hash |
This file contains 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
# 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, |
This file contains 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
(defn new-role | |
"Create a new role" | |
([] (struct role)) | |
([& roleargs] (struct role roleargs))) |
This file contains 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
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 |
This file contains 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
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 |