Created
February 10, 2012 22:33
-
-
Save bradmontgomery/1793609 to your computer and use it in GitHub Desktop.
To install PostgresSQL 9.1 on Ubuntu 10.04 with Chef
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
# mycookbook/recipes/apt_postgresql_ppa.rb | |
# | |
# This recipe should add the sources for | |
# PostgreSQL 9.1 using the PPA available at: | |
# https://launchpad.net/~pitti/+archive/postgresql | |
apt_repository "postgresql" do | |
uri "http://ppa.launchpad.net/pitti/postgresql/ubuntu" | |
distribution node['lsb']['codename'] | |
components ["main"] | |
keyserver "keyserver.ubuntu.com" | |
key "8683D8A2" | |
action :add | |
notifies :run, resources(:execute => "apt-get update"), :immediately | |
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
# roles/pg_server.rb | |
name "pg_server" | |
description "a PostgreSQL server" | |
run_list( | |
"recipe[mycookbook::apt_postgresql_ppa]", | |
"recipe[postgresql::server]", | |
"recipe[database]", | |
) | |
override_attributes( | |
:postgresql => { | |
:version => "9.1", | |
:dir => "/etc/postgresql/9.1/main" # IF you don't include this, chef tries to find | |
} # postgresql config files in /etc/postgresql/8.4/main | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment