Permalink
Browse files

Removed pg_backup

  • Loading branch information...
1 parent 6f91be7 commit 665f252364a5d87ffece59529d1891256d9d30d6 @ivanvanderbyl committed Aug 3, 2012
Showing with 13 additions and 13 deletions.
  1. +1 −1 application_stack.rb
  2. +12 −12 chef-deps/knife-client.rb
View
@@ -36,7 +36,7 @@
dep('postgresql.managed') {
installs ['postgresql-9.1', 'postgresql-server-dev-9.1', 'postgresql-contrib']
- provides %w(pg pg_basebackup pg_config pg_createcluster
+ provides %w(pg pg_config pg_createcluster
pg_ctlcluster pg_dropcluster pg_dump pg_dumpall pg_lsclusters
pg_restore pg_upgradecluster)
}
View
@@ -2,7 +2,7 @@
def knife_directory
File.expand_path("~/.chef")
end
-
+
def me
shell('whoami')
end
@@ -14,16 +14,16 @@ def me
# This creates a new client to be copied to your local workstation
dep('external admin client.registered') {
define_var(:local_username, :default => "bob", :message => "What is your workstation username?")
-
+
met? {
shell("knife client show #{var(:local_username)}")
}
-
+
meet {
shell("rm -f /tmp/#{var(:local_username)}.pem")
shell("knife client create #{var(:local_username)} -n -a -f /tmp/#{var(:local_username)}.pem")
}
-
+
after {
log("You're client has been registered with Chef Server successfully. You now need to copy the new private key to your local workstation")
log("Run this on your workstation:")
@@ -35,7 +35,7 @@ def me
dep('external client.registered') {
meet {
# chef_server_url
-
+
}
}
@@ -49,13 +49,13 @@ def me
dep('knife client configured.knife') {
requires "knife configuration.knife"
-
+
met?{
File.exists?(knife_directory / "#{me}.pem") and
shell('knife client list').p and
shell("knife client list |grep -E '#{me}$'").p
}
-
+
meet {
shell("sudo knife configure -i --defaults -r #{var(:chef_git_repository_url)} --no-editor -y -u #{me}", :sudo => true, :as => me).p
}
@@ -65,24 +65,24 @@ def me
requires [
'chef server keys.knife'
]
-
+
met?{
File.exists?(knife_directory / 'knife.rb')
}
-
+
meet {
render_erb 'chef/knife.rb.erb', :to => knife_directory / 'knife.rb', :perms => '755', :sudo => false
}
}
dep('chef server keys.knife') {
requires ['dot chef directory.knife']
-
+
met? {
File.exists?(knife_directory / 'webui.pem') and
File.exists?(knife_directory / 'validation.pem')
}
-
+
meet {
shell("cp /etc/chef/validation.pem /etc/chef/webui.pem #{knife_directory}", :sudo => true)
}
@@ -93,7 +93,7 @@ def me
File.exists?(knife_directory) and
File.writable?(knife_directory)
}
-
+
meet {
shell("mkdir -p #{knife_directory}")
shell("chown -R $USER #{knife_directory}", :sudo => true)

0 comments on commit 665f252

Please sign in to comment.