Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

merge with upstream

  • Loading branch information...
commit d2593d5342c6778cc52a68474419839f3adb3f17 2 parents 05b50d8 + a70b3ef
@ronhopper authored
Showing with 484 additions and 350 deletions.
  1. +22 −1 cookbooks/elasticsearch/README.md
  2. +1 −1  cookbooks/elasticsearch/recipes/default.rb
  3. +2 −2 cookbooks/elasticsearch/recipes/non_util.rb
  4. +11 −11 cookbooks/main/recipes/default.rb
  5. +7 −8 cookbooks/mongodb/README.md
  6. +1 −2  cookbooks/mongodb/attributes/recipe.rb
  7. +49 −0 cookbooks/mongodb/recipes/backup.rb
  8. +2 −0  cookbooks/mongodb/recipes/default.rb
  9. +4 −0 cookbooks/mongodb/recipes/install.rb
  10. +63 −0 cookbooks/mongodb/templates/default/mongo-backup.rb.erb
  11. +135 −132 cookbooks/postgresql9_extensions/README.md
  12. +3 −1 cookbooks/postgresql9_extensions/attributes/recipe.rb
  13. +5 −7 cookbooks/postgresql9_extensions/definitions/auto_explain.rb
  14. +5 −6 cookbooks/postgresql9_extensions/definitions/btree_gin.rb
  15. +5 −6 cookbooks/postgresql9_extensions/definitions/btree_gist.rb
  16. +5 −6 cookbooks/postgresql9_extensions/definitions/chkpass.rb
  17. +5 −6 cookbooks/postgresql9_extensions/definitions/citext.rb
  18. +5 −6 cookbooks/postgresql9_extensions/definitions/cube.rb
  19. +5 −6 cookbooks/postgresql9_extensions/definitions/dblink.rb
  20. +5 −6 cookbooks/postgresql9_extensions/definitions/dict_int.rb
  21. +5 −6 cookbooks/postgresql9_extensions/definitions/dict_xsyn.rb
  22. +5 −6 cookbooks/postgresql9_extensions/definitions/earthdistance.rb
  23. +5 −6 cookbooks/postgresql9_extensions/definitions/file_fdw.rb
  24. +5 −6 cookbooks/postgresql9_extensions/definitions/fuzzystrmatch.rb
  25. +5 −6 cookbooks/postgresql9_extensions/definitions/hstore.rb
  26. +5 −6 cookbooks/postgresql9_extensions/definitions/intarray.rb
  27. +5 −6 cookbooks/postgresql9_extensions/definitions/isn.rb
  28. +5 −6 cookbooks/postgresql9_extensions/definitions/lo.rb
  29. +5 −5 cookbooks/postgresql9_extensions/definitions/load_shared_library.rb
  30. +7 −4 cookbooks/postgresql9_extensions/definitions/load_sql_file.rb
  31. +5 −6 cookbooks/postgresql9_extensions/definitions/ltree.rb
  32. +5 −5 cookbooks/postgresql9_extensions/definitions/pg_buffercache.rb
  33. +4 −4 cookbooks/postgresql9_extensions/definitions/pg_freespacemap.rb
  34. +9 −0 cookbooks/postgresql9_extensions/definitions/pg_stat_statements.rb
  35. +4 −5 cookbooks/postgresql9_extensions/definitions/pg_trgm.rb
  36. +4 −5 cookbooks/postgresql9_extensions/definitions/pgcrypto.rb
  37. +5 −6 cookbooks/postgresql9_extensions/definitions/pgrowlocks.rb
  38. +17 −16 cookbooks/postgresql9_extensions/definitions/postgis.rb
  39. +5 −6 cookbooks/postgresql9_extensions/definitions/seg.rb
  40. +1 −1  cookbooks/postgresql9_extensions/definitions/sslinfo.rb
  41. +5 −6 cookbooks/postgresql9_extensions/definitions/tablefunc.rb
  42. +5 −6 cookbooks/postgresql9_extensions/definitions/test_parser.rb
  43. +5 −6 cookbooks/postgresql9_extensions/definitions/uuid-ossp.rb
  44. +5 −6 cookbooks/postgresql9_extensions/definitions/xml2.rb
  45. +1 −0  cookbooks/postgresql9_extensions/recipes/ext_autoexplain.rb
  46. +2 −2 cookbooks/postgresql9_extensions/recipes/ext_postgis_install.rb
  47. +4 −2 cookbooks/postgresql9_extensions/templates/default/custom_autoexplain.erb
  48. +2 −2 cookbooks/redis/README.md
  49. +1 −1  cookbooks/redis/attributes/redis.rb
  50. +3 −1 cookbooks/timezone/README.md
View
23 cookbooks/elasticsearch/README.md
@@ -37,7 +37,28 @@ Using it
* elasticsearch_2
* ...
- * Produce /data/<appname>/shared/config/elasticsearch.yml on all instances so you can easily parse/configure elasticsearch for your usage.
+ * Produce /data/#{appname}/shared/config/elasticsearch.yml on all instances so you can easily parse/configure elasticsearch for your usage.
+
+
+Verify
+-------
+
+On your instance, run:
+
+ curl localhost:9200
+
+Results should be simlar to:
+
+ {
+ "ok" : true,
+ "name" : "Charles Xavier",
+ "version" : {
+ "number" : "0.18.2",
+ "snapshot_build" : false
+ },
+ "tagline" : "You Know, for Search"
+ ...
+ }
Plugins
--------
View
2  cookbooks/elasticsearch/recipes/default.rb
@@ -20,7 +20,7 @@
Chef::Log.info "Downloading Elasticsearch v#{node[:elasticsearch_version]} checksum #{node[:elasticsearch_checksum]}"
remote_file "/tmp/elasticsearch-#{node[:elasticsearch_version]}.zip" do
- source "https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-#{node[:elasticsearch_version]}.zip"
+ source "http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-#{node[:elasticsearch_version]}.zip"
mode "0644"
checksum node[:elasticsearch_checksum]
not_if { File.exists?("/tmp/elasticsearch-#{node[:elasticsearch_version]}.zip") }
View
4 cookbooks/elasticsearch/recipes/non_util.rb
@@ -7,7 +7,7 @@
if ['solo','app_master'].include?(node[:instance_role])
Chef::Log.info "Downloading Elasticsearch v#{node[:elasticsearch_version]} checksum #{node[:elasticsearch_checksum]}"
remote_file "/tmp/elasticsearch-#{node[:elasticsearch_version]}.zip" do
- source "https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-#{node[:elasticsearch_version]}.zip"
+ source "http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-#{node[:elasticsearch_version]}.zip"
mode "0644"
checksum node[:elasticsearch_checksum]
not_if { File.exists?("/tmp/elasticsearch-#{node[:elasticsearch_version]}.zip") }
@@ -120,7 +120,7 @@
source "es.yml.erb"
backup 0
variables(:yaml_file => {
- node.engineyard.environment.framework_env => {
+ node.engineyard.environment.framework_env => {
:hosts => solo ? "127.0.0.1:9200" : "#{node[:master_app_server][:public_ip]}:9200" }})
end
end
View
22 cookbooks/main/recipes/default.rb
@@ -93,7 +93,7 @@
#enable Extension modules for a given Postgresql database
# if ['solo','db_master', 'db_slave'].include?(node[:instance_role])
- # Extensions that support both Postgres 9.0 and 9.1
+ # Extensions that support both Postgres 9.0, 9.1 and 9.2
# postgresql9_autoexplain "dbname"
# postgresql9_btree_gin "dbname"
# postgresql9_btree_gist "dbname"
@@ -110,29 +110,29 @@
# postgresql9_isn "dbname"
# postgresql9_lo "dbname"
# postgresql9_ltree "dbname"
- # postgresql9_pg_trgm "dbname"
+ # postgresql9_pg_trgm "dbname"
# postgresql9_pgcrypto "dbname"
# postgresql9_pgrowlocks "dbname"
- # postgresql9_postgis "dbname"
+ # postgresql9_postgis "dbname" - Only works for 9.0 and 9.1 atm
# postgresql9_seg "dbname"
# postgresql9_sslinfo "dbname"
# postgresql9_tablefunc "dbname"
# postgresql9_test_parser "dbname"
# postgresql9_unaccent "dbname"
# postgresql9_uuid_ossp "dbname"
-
-
- # 9.1 Extensions
- # postgresql9_file_fdw "dbname"
+
+
+ # 9.1 and 9.2 Extensions
+ # postgresql9_file_fdw "dbname"
# postgresql9_xml2 "dbname"
-
+
+ # 9.2 Extensions
+ # postgresql9_pg_stat_statements "dbname"
+
#Admin-Level Contribs
# postgresql9_pg_buffercache "postgres"
# postgresql9_pg_freespacemap "postgres"
- # postgresql9_pg_stat_statements "todo" - Not done
-
# end
require_recipe "clockwork"
# require_recipe "whenever"
-
View
15 cookbooks/mongodb/README.md
@@ -1,14 +1,14 @@
-ey-cloud-recipes/mongodb v2.0.2
+ey-cloud-recipes/mongodb v2.2.0
--------
-A chef recipe for enabling mongodb v2.0.2 on Engine Yard AppCloud. This recipe downloads the latest version binary from 10gen and sets up a 3 node MongoDB Replica Set.
+A chef recipe for enabling mongodb v2.2.0 on Engine Yard AppCloud. This recipe downloads the latest version binary from 10gen and sets up a 3 node MongoDB Replica Set.
It makes a few assumptions:
* You will be running MongoDB on a utility instance(s).
* You will be using Replica sets.
-MMS support
+MMS support
--------
The recipe will also install Mongo Monitoring Service (MMS) on a solo or db_master. You will need to provide your api & secret keys.
See https://mms.10gen.com/help/ for more information.
@@ -19,11 +19,11 @@ Using it
* add the following to main/recipes/default.rb,
-``require_recipe "mongodb"``
+``require_recipe "mongodb"``
* Upload recipes to your environment
-``ey recipes upload -e <environment>``
+``ey recipes upload -e <environment>``
* Add an utility instance with the following naming scheme(s)
* For an replica set,
@@ -38,9 +38,10 @@ Using it
Caveats
--------
-Replica sets should normally be in a size of 3 or greater. This recipe does not and will not support 32-bit instances.
+Replica sets should normally be in a size of 3 or greater. This recipe does not and will not support 32-bit instances.
Please ensure you use 64-bit instances when you create the Utility slices.
+This recipe has been extended to support very basic backups.
Legend
--------
@@ -51,9 +52,7 @@ TODO
--------
Things (currently) lacking from this recipe:
- * Ability to set up scheduled backups of your MongoDB database
* Ability to set up a sharded installation
- * Arbiter support
Known Bugs
--------
View
3  cookbooks/mongodb/attributes/recipe.rb
@@ -1,5 +1,4 @@
-mongo_version("2.0.2")
-mongo_name("mongodb-linux-#{@attribute["kernel"]["machine"]}-#{@attribute["mongo_version"]}")
+mongo_version("2.2.0")
mongo_path("/usr")
mongo_base("/data/mongodb")
mongo_port("27017")
View
49 cookbooks/mongodb/recipes/backup.rb
@@ -0,0 +1,49 @@
+#
+# Cookbook Name:: mongodb
+# Recipe:: backup
+#
+
+ey_cloud_report "mongodb" do
+ message "configuring backup"
+end
+
+mongo_nodes = @node[:utility_instances].select { |instance| instance[:name].match(/^mongodb_repl#{@node[:mongo_replset]}/) }
+if @node[:name] == mongo_nodes.last[:name]
+
+ node[:applications].each do |app_name, data|
+ user = node[:users].first
+ db_name = "#{app_name}_#{node[:environment][:framework_env]}"
+
+ template "/usr/local/bin/mongo-backup" do
+ source "mongo-backup.rb.erb"
+ owner "root"
+ group "root"
+ mode 0700
+ variables({
+ :username => 'root',
+ :password => user[:password],
+ :database => db_name,
+ :secret_key => node[:aws_secret_key],
+ :id_key => node[:aws_secret_id],
+ :env => node[:environment][:name],
+ :app_name => app_name
+ })
+ end
+
+ if node[:environment][:framework_env] == 'production'
+ cron "#{app_name}-mongo-backup" do
+ hour "1"
+ minute "30"
+ command "/usr/local/bin/mongo-backup"
+ end
+ end
+ end
+
+else
+
+ cron "mongo-backup" do
+ action :delete
+ end
+
+end
+
View
2  cookbooks/mongodb/recipes/default.rb
@@ -21,6 +21,7 @@
require_recipe "mongodb::install"
require_recipe "mongodb::configure"
+ require_recipe "mongodb::backup"
require_recipe "mongodb::start"
if @node[:mongo_replset]
@@ -33,6 +34,7 @@
Chef::Log.info "Setting up Mongo in db_master or solo"
require_recipe "mongodb::install"
require_recipe "mongodb::configure"
+ require_recipe "mongodb::backup"
require_recipe "mongodb::start"
end
end
View
4 cookbooks/mongodb/recipes/install.rb
@@ -4,6 +4,10 @@
message "installing mongodb #{mongodb_version}"
end
+enable_package "dev-db/mongodb-bin" do
+ version mongodb_version
+end
+
package "dev-db/mongodb-bin" do
version mongodb_version
action :install
View
63 cookbooks/mongodb/templates/default/mongo-backup.rb.erb
@@ -0,0 +1,63 @@
+#!/usr/bin/env ruby
+
+require 'rubygems'
+require 'aws/s3'
+require 'date'
+require 'digest'
+require 'net/http'
+require 'fileutils'
+
+module AWS::S3
+ class S3Object
+ def <=>(other)
+ DateTime.parse(self.about['last-modified']) <=> DateTime.parse(other.about['last-modified'])
+ end
+ end
+end
+
+AWS::S3::Base.establish_connection!(
+ :access_key_id => '<%= @id_key %>',
+ :secret_access_key => '<%= @secret_key %>'
+)
+@dbuser = '<%= @username %>'
+@dbpass = '<%= @password %>'
+@databases = `mongo --quiet --eval "for each(var db in db.runCommand('listDatabases').databases) if(db.sizeOnDisk > 1) print(db.name);" admin`.split("\n")
+@ismaster = `mongo --quiet --eval 'printjson(db.runCommand("ismaster"))' | grep ismaster | awk '{print $3}'| sed s/,//`
+@environment = '<%= @env %>'
+@app_name = '<%= @app_name %>'
+@keep = 10 * @databases.length
+@bucket = "ey-backup-#{Digest::SHA1.hexdigest('<%= @id_key %>')[0..11]}-mongo"
+@tmpname = "#{Time.now.strftime("%Y-%m-%dT%H:%M:%S").gsub(/:/, '-')}"
+FileUtils.mkdir_p '/mnt/tmp'
+begin
+ AWS::S3::Bucket.create @bucket
+rescue AWS::S3::BucketAlreadyExists
+end
+
+if @ismaster == "false" #only dump non-primary nodes
+ @databases.each do |database|
+ token = "#{database}"
+ mongocmd = "mongodump -h 127.0.0.1 -d #{database} -u #{@dbuser} -p #{@dbpass} -o /mnt/tmp/#{token}.#{@tmpname} && tar cjf \"/mnt/tmp/#{token}.#{@tmpname}.tar.bz\" \"/mnt/tmp/#{token}.#{@tmpname}\""
+ if system(mongocmd)
+ AWS::S3::S3Object.store(
+ "/#{@environment}.#{@app_name}/#{@app_name}-#{token}.#{@tmpname}.bson.tar.bz",
+ open("/mnt/tmp/#{token}.#{@tmpname}.tar.bz"),
+ @bucket,
+ :access => :private
+ )
+ FileUtils.rm "/mnt/tmp/#{token}.#{@tmpname}.tar.bz"
+ FileUtils.rm_r "/mnt/tmp/#{token}.#{@tmpname}"
+ puts "successful backup: #{database}.#{@tmpname}"
+ else
+ raise "Unable to dump database#{database} wtf?"
+ end
+ end
+
+ backups = []
+ backups << AWS::S3::Bucket.objects(@bucket).sort
+ backups = backups.flatten.sort
+ backups[0...-@keep].each do |object|
+ puts "deleting: #{object.key}"
+ object.delete
+ end
+end
View
267 cookbooks/postgresql9_extensions/README.md
@@ -1,39 +1,39 @@
ey-cloud-recipes/postgresql9_extensions
------------------------------------------------------------------------------
-A chef recipe for enabling Postgres extensions (contribs on Postgres 9.0) packages on Engine Yard AppCloud. This recipe defines multiple methods that
+A chef recipe for enabling Postgres extensions (contribs on Postgres 9.0) packages on Engine Yard Cloud. This recipe defines multiple methods that
can be called from main/recipes/default.rb to enable extensions for a given database.
Dependencies
--------------------------
-You need to have a running Postgres 9.0.x or Postgres 9.1.x instance to apply these recipes.
+You need to have an instance running Postgres 9.0 or above to apply these recipes.
-Available Extensions
+Available Extensions
--------------------------
-At the moment the following extensions are available.
+At the moment the following extensions are available.
##auto_explain
-###supported versions: 9.0, 9.1
-This extension provides a means for logging execution plans of slow statements automatically, without having to run EXPLAIN by hand.
-This is especially helpful for tracking down un-optimized queries in large applications.
-WARNING: Enabling this extension will restart your Postgres service.
+###supported versions: 9.0, 9.1, 9.2
+This extension provides a means for logging execution plans of slow statements automatically, without having to run EXPLAIN by hand.
+This is especially helpful for tracking down un-optimized queries in large applications.
+WARNING: Enabling this extension will restart your Postgres service.
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
-extension applied to.
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+extension applied to.
-``postgresql9_autoexplain "dbname""``
+``postgresql9_autoexplain "dbname""``
##btree_gin
-###supported versions: 9.0, 9.1
+###supported versions: 9.0, 9.1, 9.2
This extension provides support for indexing common datatypes in GIN
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_btree_gin "dbname""``
@@ -42,179 +42,179 @@ extension applied to.
###supported versions: 9.0, 9.1
The intarray module provides a number of useful functions and operators for manipulating null-free arrays of integers. There is also support for indexed searches using some of the operators.
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_intarray "dbname""``
##btree_gist
-###supported versions: 9.0, 9.1
+###supported versions: 9.0, 9.1, 9.2
This extension provides support for indexing common datatypes in GiST
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_btree_gist "dbname""``
##chkpass
-###supported versions: 9.0, 9.1
-This extension implements a data type chkpass that is designed for storing encrypted passwords. Each password is automatically converted
+###supported versions: 9.0, 9.1, 9.2
+This extension implements a data type chkpass that is designed for storing encrypted passwords. Each password is automatically converted
to encrypted form upon entry, and is always stored encrypted.
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_chkpass "dbname""``
##citext
-###supported versions: 9.0, 9.1
-The citext module provides a case-insensitive character string type, citext. Essentially, it internally calls lower when comparing values.
+###supported versions: 9.0, 9.1, 9.2
+The citext module provides a case-insensitive character string type, citext. Essentially, it internally calls lower when comparing values.
Otherwise, it behaves almost exactly like text. (This is great for MySQL compatibility which does text comparisons case-insensitive, by default)
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_citext "dbname""``
##cube
-###supported versions: 9.0, 9.1
+###supported versions: 9.0, 9.1, 9.2
This module implements a data type cube for representing multidimensional cubes.
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_cube "dbname""``
##dblink
-###supported versions: 9.0, 9.1
+###supported versions: 9.0, 9.1, 9.2
dblink is a module which supports connections to other PostgreSQL databases from within a database session.
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_dblink "dbname""``
##dict_int
-###supported versions: 9.0, 9.1
+###supported versions: 9.0, 9.1, 9.2
dict_int is an example of an add-on dictionary template for full-text search. The motivation for this example dictionary is to control the indexing of integers (signed and unsigned), allowing such numbers to be indexed while preventing excessive growth in the number of unique words, which greatly affects the performance of searching.
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_dict_int "dbname""``
##dict_xsyn
-###supported versions: 9.0, 9.1
+###supported versions: 9.0, 9.1, 9.2
dict_xsyn (Extended Synonym Dictionary) is an example of an add-on dictionary template for full-text search. This dictionary type replaces words with groups of their synonyms, and so makes it possible to search for a word using any of its synonyms.
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_dict_xsyn "dbname""``
##earthdistance
-###supported versions: 9.0, 9.1
+###supported versions: 9.0, 9.1, 9.2
The earthdistance module provides two different approaches to calculating great circle distances on the surface of the Earth.
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_earthdistance "dbname""``
##file_fdw
-###supported versions: 9.1
-The file fdw module provides the foreign-data wrapper, which can be used to access data files in the server's file system. Data files must be in a format that can be read by COPY FROM;
+###supported versions: 9.1, 9.2
+The file fdw module provides the foreign-data wrapper, which can be used to access data files in the server's file system. Data files must be in a format that can be read by COPY FROM;
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_file_fdw "dbname""``
##fuzzystrmatch
-###supported versions: 9.0, 9.1
+###supported versions: 9.0, 9.1, 9.2
The fuzzystrmatch module provides several functions to determine similarities and distance between strings.
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_fuzzystrmatch "dbname""``
##hstore
-###supported versions: 9.0, 9.1
-This module implements the hstore data type for storing sets of key/value pairs within a single PostgreSQL value. This can be useful
-in various scenarios, such as rows with many attributes that are rarely examined, or semi-structured data. Keys and values are simply
-text strings.
+###supported versions: 9.0, 9.1, 9.2
+This module implements the hstore data type for storing sets of key/value pairs within a single PostgreSQL value. This can be useful
+in various scenarios, such as rows with many attributes that are rarely examined, or semi-structured data. Keys and values are simply
+text strings.
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_hstore "dbname""``
##intarray
-###supported versions: 9.0, 9.1
+###supported versions: 9.0, 9.1, 9.2
The intarray module provides a number of useful functions and operators for manipulating null-free arrays of integers. There is also support for indexed searches using some of the operators.
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_intarray "dbname""``
##isn
-###supported versions: 9.0, 9.1
-The isn module provides data types for the following international product numbering standards: EAN13, UPC, ISBN (books), ISMN (music),
+###supported versions: 9.0, 9.1, 9.2
+The isn module provides data types for the following international product numbering standards: EAN13, UPC, ISBN (books), ISMN (music),
and ISSN (serials). Numbers are validated on input, and correctly hyphenated on output.
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_isn "dbname""``
##lo
-###supported versions: 9.0, 9.1
+###supported versions: 9.0, 9.1, 9.2
The lo module provides support for managing Large Objects (also called LOs or BLOBs). This includes a data type lo and a trigger lo_manage.
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_lo "dbname""``
@@ -222,72 +222,82 @@ extension applied to.
##ltree
###supported versions: 9.0, 9.1
-This module implements a data type ltree for representing labels of data stored in a hierarchical tree-like structure. Extensive facilities
+This module implements a data type ltree for representing labels of data stored in a hierarchical tree-like structure. Extensive facilities
for searching through label trees are provided.
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_ltree "dbname""``
##pg_trgm
-###supported versions: 9.0, 9.1
-The pg_trgm module provides GiST and GIN index operator classes that allow you to create an index over a text column for the purpose of very fast similarity searches. These index types support the above-described similarity operators, and additionally support trigram-based index searches for LIKE and ILIKE queries. (These indexes do not support equality nor simple comparison operators, so you may need a regular B-tree index too.).
+###supported versions: 9.0, 9.1, 9.2
+The pg_trgm module provides GiST and GIN index operator classes that allow you to create an index over a text column for the purpose of very fast similarity searches. These index types support the above-described similarity operators, and additionally support trigram-based index searches for LIKE and ILIKE queries. (These indexes do not support equality nor simple comparison operators, so you may need a regular B-tree index too.).
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_pg_trgm "dbname""``
##pgcrypto
-###supported versions: 9.0, 9.1
+###supported versions: 9.0, 9.1, 9.2
The pgcrypto module provides cryptographic functions for PostgreSQL.
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_pgcrypto "dbname""``
##pgrowlocks
-###supported versions: 9.0, 9.1
+###supported versions: 9.0, 9.1, 9.2
The pgrowlocks module provides a function to show row locking information for a specified table.
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_pgrowlocks "dbname""``
+##pg_stat_statements
+###supported versions: 9.2
+The pg_stat_statements module provides a means for tracking execution statistics of all SQL statements executed by a server.
+
+Enabling this extension:
+
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+extension applied to.
+
+``postgresql9_pg_stat_statements "dbname""``
##PostGIS
###supported versions: 9.0, 9.1
-This extension adds support for geographic objects. PostGIS "spatially enables" the PostgreSQL server, allowing it to be used as a backend
+This extension adds support for geographic objects. PostGIS "spatially enables" the PostgreSQL server, allowing it to be used as a backend
spatial database for geographic information systems (GIS).
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_postgis "dbname""``
##seg
-###supported versions: 9.0, 9.1
-This module implements a data type seg for representing line segments, or floating point intervals. seg can represent uncertainty in the
+###supported versions: 9.0, 9.1, 9.2
+This module implements a data type seg for representing line segments, or floating point intervals. seg can represent uncertainty in the
interval endpoints, making it especially useful for representing laboratory measurements.
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_seg "dbname""``
@@ -297,33 +307,33 @@ extension applied to.
###supported versions: 9.0, 9.1
The sslinfo module provides information about the SSL certificate that the current client provided when connecting to PostgreSQL. The module is useless (most functions will return NULL) if the current connection does not use SSL.
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_sslinfo "dbname""``
##tablefunc
-###supported versions: 9.0, 9.1
-The tablefunc module includes various functions that return tables (that is, multiple rows). These functions are useful both in their own
+###supported versions: 9.0, 9.1, 9.2
+The tablefunc module includes various functions that return tables (that is, multiple rows). These functions are useful both in their own
right and as examples of how to write C functions that return multiple rows.
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_tablefunc "dbname""``
##test_parser
-###supported versions: 9.0, 9.1
+###supported versions: 9.0, 9.1, 9.2
test_parser is an example of a custom parser for full-text search. It doesn't do anything especially useful, but can serve as a starting point for developing your own parser.
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_test_parser "dbname""``
@@ -331,69 +341,69 @@ extension applied to.
##unaccent
###supported versions: 9.0, 9.1
-unaccent is a text search dictionary that removes accents (diacritic signs) from lexemes. It's a filtering dictionary, which means its output
-is always passed to the next dictionary (if any), unlike the normal behavior of dictionaries. This allows accent-insensitive processing for
+unaccent is a text search dictionary that removes accents (diacritic signs) from lexemes. It's a filtering dictionary, which means its output
+is always passed to the next dictionary (if any), unlike the normal behavior of dictionaries. This allows accent-insensitive processing for
full text search.
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_unaccent "dbname""``
##uuid-ossp
-###supported versions: 9.0, 9.1
-The uuid-ossp module provides functions to generate universally unique identifiers (UUIDs) using one of several standard algorithms. There are
-also functions to produce certain special UUID constants. (This also requires a separate USE flag when building the postgres binaries that pulls
+###supported versions: 9.0, 9.1, 9.2
+The uuid-ossp module provides functions to generate universally unique identifiers (UUIDs) using one of several standard algorithms. There are
+also functions to produce certain special UUID constants. (This also requires a separate USE flag when building the postgres binaries that pulls
in another package.)
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_uuid_ossp "dbname""``
##xml2
-###supported versions: 9.1
-The uuid-ossp module provides functions to generate universally unique identifiers (UUIDs) using one of several standard algorithms. There are
-also functions to produce certain special UUID constants. (This also requires a separate USE flag when building the postgres binaries that pulls
+###supported versions: 9.1, 9.2
+The uuid-ossp module provides functions to generate universally unique identifiers (UUIDs) using one of several standard algorithms. There are
+also functions to produce certain special UUID constants. (This also requires a separate USE flag when building the postgres binaries that pulls
in another package.)
-Enabling this extension:
+Enabling this extension:
-* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
+* Edit main/recipes/default.rb and comment out the line shown below. Replace dbname with the name of the database you want this
extension applied to.
``postgresql9_xml2 "dbname""``
-Admin-level Contrib packages
+Admin-level Contrib packages
---------------------------------------------
Notes: This module requires a privileged user. Please log in as the postgres user to use the extension
##pg_buffercache
-###supported versions: 9.0
-The pg_buffercache module provides a means for examining what's happening in the shared buffer cache in real time.
+###supported versions: 9.0, 9.2
+The pg_buffercache module provides a means for examining what's happening in the shared buffer cache in real time.
-Enabling this Module:
+Enabling this Module:
-* Edit main/recipes/default.rb and comment out the line shown below.
+* Edit main/recipes/default.rb and comment out the line shown below.
``postgresql9_pg_buffercache "postgres""``
##pg_freespacemap
-###supported versions: 9.0
-The pg_freespacemap module provides a means for examining the free space map (FSM). It provides a function called pg_freespace,
-or two overloaded functions, to be precise. The functions show the value recorded in the free space map for a given page, or for all
-pages in the relation.
+###supported versions: 9.0, 9.2
+The pg_freespacemap module provides a means for examining the free space map (FSM). It provides a function called pg_freespace,
+or two overloaded functions, to be precise. The functions show the value recorded in the free space map for a given page, or for all
+pages in the relation.
-Enabling this Module:
+Enabling this Module:
-* Edit main/recipes/default.rb and comment out the line shown below.
+* Edit main/recipes/default.rb and comment out the line shown below.
``postgresql9_pg_freespacemap "postgres""``
@@ -404,11 +414,11 @@ Note: This module requires a priviledged user. Please log in as the postgres use
Uploading this recipe
--------------------------
-1. Edit main/recipes/default.rb to enable or disable extensions as shown above.
+1. Edit main/recipes/default.rb to enable or disable extensions as shown above.
2. Upload recipes to your environment
-``ey recipes upload -e <environment>``
+``ey recipes upload -e <environment>``
3. Apply recipes to your environment
@@ -422,21 +432,14 @@ This cookbook is work in progress and will be expanded to incorporate additional
Caveats
--------
-None so far.
+None so far.
Known Bugs
--------
-None so far.
-
-
-Warranty
---------
-This cookbook is provided as is, there is no offer of support for this
-recipe by Engine Yard in any capacity. If you find bugs, please open an
-issue and submit a pull request.
+None so far.
Credits
--------
-Thanks to Erik Jones, Scott Likens, Joel Watson, Edward Muller, and Jayson Vantuyl for their help.
+Thanks to Erik Jones, Scott Likens, Joel Watson, Edward Muller, and Jayson Vantuyl for their help.
View
4 cookbooks/postgresql9_extensions/attributes/recipe.rb
@@ -4,5 +4,7 @@
postgres_version("9.0")
elsif db_stack == "postgres9_1"
postgres_version("9.1")
+elsif db_stack == "postgres9_2"
+ postgres_version("9.2")
end
-postgres_root("/db/postgresql/")
+postgres_root("/db/postgresql/")
View
12 cookbooks/postgresql9_extensions/definitions/auto_explain.rb
@@ -1,14 +1,12 @@
define :postgresql9_autoexplain do
dbname_to_use = params[:name]
-
- load_shared_library do
- db_name dbname_to_use
+
+ load_shared_library do
+ db_name dbname_to_use
library_name "auto_explain"
- supported_versions %w[9.0 9.1]
+ supported_versions %w[9.0 9.1 9.2]
end
-
+
include_recipe "postgresql9_extensions::ext_autoexplain"
end
-
-
View
11 cookbooks/postgresql9_extensions/definitions/btree_gin.rb
@@ -1,11 +1,10 @@
define :postgresql9_btree_gin do
- dbname_to_use = params[:name]
-
- load_sql_file do
+ dbname_to_use = params[:name]
+
+ load_sql_file do
db_name dbname_to_use
username "postgres"
extname "btree_gin"
- supported_versions %w[9.0 9.1]
+ supported_versions %w[9.0 9.1 9.2]
end
-
-end
+end
View
11 cookbooks/postgresql9_extensions/definitions/btree_gist.rb
@@ -1,11 +1,10 @@
define :postgresql9_btree_gist do
- dbname_to_use = params[:name]
-
- load_sql_file do
+ dbname_to_use = params[:name]
+
+ load_sql_file do
db_name dbname_to_use
username "postgres"
extname "btree_gist"
- supported_versions %w[9.0 9.1]
+ supported_versions %w[9.0 9.1 9.2]
end
-
-end
+end
View
11 cookbooks/postgresql9_extensions/definitions/chkpass.rb
@@ -1,11 +1,10 @@
define :postgresql9_chkpass do
- dbname_to_use = params[:name]
-
- load_sql_file do
+ dbname_to_use = params[:name]
+
+ load_sql_file do
db_name dbname_to_use
username "postgres"
extname "chkpass"
- supported_versions %w[9.0 9.1]
+ supported_versions %w[9.0 9.1 9.2]
end
-
-end
+end
View
11 cookbooks/postgresql9_extensions/definitions/citext.rb
@@ -1,10 +1,9 @@
define :postgresql9_citext do
- dbname_to_use = params[:name]
-
- load_sql_file do
+ dbname_to_use = params[:name]
+
+ load_sql_file do
db_name dbname_to_use
extname "citext"
- supported_versions %w[9.0 9.1]
+ supported_versions %w[9.0 9.1 9.2]
end
-
-end
+end
View
11 cookbooks/postgresql9_extensions/definitions/cube.rb
@@ -1,10 +1,9 @@
define :postgresql9_cube do
- dbname_to_use = params[:name]
-
- load_sql_file do
+ dbname_to_use = params[:name]
+
+ load_sql_file do
db_name dbname_to_use
extname "cube"
- supported_versions %w[9.0 9.1]
+ supported_versions %w[9.0 9.1 9.2]
end
-
-end
+end
View
11 cookbooks/postgresql9_extensions/definitions/dblink.rb
@@ -1,10 +1,9 @@
define :postgresql9_dblink do
- dbname_to_use = params[:name]
-
- load_sql_file do
+ dbname_to_use = params[:name]
+
+ load_sql_file do
db_name dbname_to_use
extname "dblink"
- supported_versions %w[9.0 9.1]
+ supported_versions %w[9.0 9.1 9.2]
end
-
-end
+end
View
11 cookbooks/postgresql9_extensions/definitions/dict_int.rb
@@ -1,10 +1,9 @@
define :postgresql9_dict_int do
- dbname_to_use = params[:name]
-
- load_sql_file do
+ dbname_to_use = params[:name]
+
+ load_sql_file do
db_name dbname_to_use
extname "dict_int"
- supported_versions %w[9.0 9.1]
+ supported_versions %w[9.0 9.1 9.2]
end
-
-end
+end
View
11 cookbooks/postgresql9_extensions/definitions/dict_xsyn.rb
@@ -1,10 +1,9 @@
define :postgresql9_dict_xsyn do
- dbname_to_use = params[:name]
-
- load_sql_file do
+ dbname_to_use = params[:name]
+
+ load_sql_file do
db_name dbname_to_use
extname "dict_xsyn"
- supported_versions %w[9.0 9.1]
+ supported_versions %w[9.0 9.1 9.2]
end
-
-end
+end
View
11 cookbooks/postgresql9_extensions/definitions/earthdistance.rb
@@ -1,10 +1,9 @@
define :postgresql9_earthdistance do
- dbname_to_use = params[:name]
-
- load_sql_file do
+ dbname_to_use = params[:name]
+
+ load_sql_file do
db_name dbname_to_use
extname "earthdistance"
- supported_versions %w[9.0 9.1]
+ supported_versions %w[9.0 9.1 9.2]
end
-
-end
+end
View
11 cookbooks/postgresql9_extensions/definitions/file_fdw.rb
@@ -1,10 +1,9 @@
define :postgresql9_file_fdw do
- dbname_to_use = params[:name]
-
- load_sql_file do
+ dbname_to_use = params[:name]
+
+ load_sql_file do
db_name dbname_to_use
extname "file_fdw"
- supported_versions %w[9.1]
+ supported_versions %w[9.1 9.2]
end
-
-end
+end
View
11 cookbooks/postgresql9_extensions/definitions/fuzzystrmatch.rb
@@ -1,10 +1,9 @@
define :postgresql9_fuzzystrmatch do
- dbname_to_use = params[:name]
-
- load_sql_file do
+ dbname_to_use = params[:name]
+
+ load_sql_file do
db_name dbname_to_use
extname "fuzzystrmatch"
- supported_versions %w[9.0 9.1]
+ supported_versions %w[9.0 9.1 9.2]
end
-
-end
+end
View
11 cookbooks/postgresql9_extensions/definitions/hstore.rb
@@ -1,10 +1,9 @@
define :postgresql9_hstore do
- dbname_to_use = params[:name]
-
- load_sql_file do
+ dbname_to_use = params[:name]
+
+ load_sql_file do
db_name dbname_to_use
extname "hstore"
- supported_versions %w[9.0 9.1]
+ supported_versions %w[9.0 9.1 9.2]
end
-
-end
+end
View
11 cookbooks/postgresql9_extensions/definitions/intarray.rb
@@ -1,10 +1,9 @@
define :postgresql9_intarray do
- dbname_to_use = params[:name]
-
- load_sql_file do
+ dbname_to_use = params[:name]
+
+ load_sql_file do
db_name dbname_to_use
extname "intarray"
- supported_versions %w[9.0 9.1]
+ supported_versions %w[9.0 9.1 9.2]
end
-
-end
+end
View
11 cookbooks/postgresql9_extensions/definitions/isn.rb
@@ -1,10 +1,9 @@
define :postgresql9_isn do
- dbname_to_use = params[:name]
-
- load_sql_file do
+ dbname_to_use = params[:name]
+
+ load_sql_file do
db_name dbname_to_use
extname "isn"
- supported_versions %w[9.0 9.1]
+ supported_versions %w[9.0 9.1 9.2]
end
-
-end
+end
View
11 cookbooks/postgresql9_extensions/definitions/lo.rb
@@ -1,10 +1,9 @@
define :postgresql9_lo do
- dbname_to_use = params[:name]
-
- load_sql_file do
+ dbname_to_use = params[:name]
+
+ load_sql_file do
db_name dbname_to_use
extname "lo"
- supported_versions %w[9.0 9.1]
+ supported_versions %w[9.0 9.1 9.2]
end
-
-end
+end
View
10 cookbooks/postgresql9_extensions/definitions/load_shared_library.rb
@@ -2,7 +2,7 @@
library_name = params[:library_name]
db_name = params[:db_name]
supported_versions = params[:supported_versions]
-
+
if @node[:postgres_version] == "9.0" && supported_versions.include?("9.0")
execute "Postgresql loading library #{library_name}" do
command "psql -U postgres -d #{db_name} -c \"LOAD \'#{library_name}\'\";"
@@ -11,9 +11,9 @@
execute "Postgresql loading library #{library_name}" do
command "psql -U postgres -d #{db_name} -c \"LOAD \'#{library_name}\'\";"
end
+ elsif @node[:postgres_version] == "9.2" && supported_versions.include?("9.2")
+ execute "Postgresql loading library #{library_name}" do
+ command "psql -U postgres -d #{db_name} -c \"LOAD \'#{library_name}\'\";"
+ end
end
-
end
-
-
-
View
11 cookbooks/postgresql9_extensions/definitions/load_sql_file.rb
@@ -2,9 +2,9 @@
db_name = params[:db_name]
extname = params[:extname]
supported_versions = params[:supported_versions]
-
- Chef::Log.info "Loading to database #{db_name} extension #{extname} supported on versions: (#{supported_versions}). PG version installed is #{@node[:postgres_version]}"
-
+
+ Chef::Log.info "Loading to database #{db_name} extension #{extname} supported on versions: #{supported_versions.join(", ")}. PG version installed is #{@node[:postgres_version]}"
+
if @node[:postgres_version] == "9.0" && supported_versions.include?("9.0")
execute "Postgresql loading contrib #{extname} on database #{db_name}" do
command "psql -U postgres -d #{db_name} -f /usr/share/postgresql-9.0/contrib/#{extname}.sql"
@@ -13,6 +13,9 @@
execute "Postgresql loading extension #{extname}" do
command "psql -U postgres -d #{db_name} -c \"CREATE EXTENSION IF NOT EXISTS #{extname}\";"
end
+ elsif @node[:postgres_version] == "9.2" && supported_versions.include?("9.2")
+ execute "Postgresql loading extension #{extname}" do
+ command "psql -U postgres -d #{db_name} -c \"CREATE EXTENSION IF NOT EXISTS #{extname}\";"
+ end
end
-
end
View
11 cookbooks/postgresql9_extensions/definitions/ltree.rb
@@ -1,10 +1,9 @@
define :postgresql9_ltree do
- dbname_to_use = params[:name]
-
- load_sql_file do
+ dbname_to_use = params[:name]
+
+ load_sql_file do
db_name dbname_to_use
extname "ltree"
- supported_versions %w[9.0 9.1]
+ supported_versions %w[9.0 9.1 9.2]
end
-
-end
+end
View
10 cookbooks/postgresql9_extensions/definitions/pg_buffercache.rb
@@ -1,9 +1,9 @@
define :postgresql9_pg_buffercache do
- dbname_to_use = params[:name]
-
- load_sql_file do
+ dbname_to_use = params[:name]
+
+ load_sql_file do
db_name dbname_to_use
extname "pg_buffercache"
- supported_versions %w[9.0]
+ supported_versions %w[9.0 9.2]
end
-end
+end
View
8 cookbooks/postgresql9_extensions/definitions/pg_freespacemap.rb
@@ -1,9 +1,9 @@
define :postgresql9_pg_freespacemap do
- dbname_to_use = params[:name]
-
+ dbname_to_use = params[:name]
+
load_sql_file do
db_name dbname_to_use
extname "pg_freespacemap"
- supported_versions %w[9.0]
+ supported_versions %w[9.0 9.2]
end
-end
+end
View
9 cookbooks/postgresql9_extensions/definitions/pg_stat_statements.rb
@@ -0,0 +1,9 @@
+define :postgresql9_pg_stat_statements do
+ dbname_to_use = params[:name]
+
+ load_sql_file do
+ db_name dbname_to_use
+ extname "pg_stat_statements"
+ supported_versions %w[9.2]
+ end
+end
View
9 cookbooks/postgresql9_extensions/definitions/pg_trgm.rb
@@ -1,10 +1,9 @@
define :postgresql9_pg_trgm do
- dbname_to_use = params[:name]
-
+ dbname_to_use = params[:name]
+
load_sql_file do
db_name dbname_to_use
extname "pg_trgm"
- supported_versions %w[9.0 9.1]
+ supported_versions %w[9.0 9.1 9.2]
end
-
-end
+end
View
9 cookbooks/postgresql9_extensions/definitions/pgcrypto.rb
@@ -1,10 +1,9 @@
define :postgresql9_pgcrypto do
- dbname_to_use = params[:name]
-
+ dbname_to_use = params[:name]
+
load_sql_file do
db_name dbname_to_use
extname "pgcrypto"
- supported_versions %w[9.0 9.1]
+ supported_versions %w[9.0 9.1 9.2]
end
-
-end
+end
View
11 cookbooks/postgresql9_extensions/definitions/pgrowlocks.rb
@@ -1,10 +1,9 @@
define :postgresql9_pgrowlocks do
- dbname_to_use = params[:name]
-
- load_sql_file do
+ dbname_to_use = params[:name]
+
+ load_sql_file do
db_name dbname_to_use
extname "pgrowlocks"
- supported_versions %w[9.0 9.1]
+ supported_versions %w[9.0 9.1 9.2]
end
-
-end
+end
View
33 cookbooks/postgresql9_extensions/definitions/postgis.rb
@@ -1,47 +1,48 @@
define :postgresql9_postgis do
dbname_to_use = params[:name]
-
+
if @node[:postgres_version] == "9.0"
include_recipe "postgresql9_extensions::ext_postgis_install"
-
- load_sql_file do
+
+ load_sql_file do
db_name dbname_to_use
supported_versions %w[9.0]
- extname "postgis-1.5/postgis"
+ extname "postgis-1.5/postgis"
end
-
- load_sql_file do
+
+ load_sql_file do
db_name dbname_to_use
supported_versions %w[9.0]
- extname "postgis-1.5/spatial_ref_sys"
+ extname "postgis-1.5/spatial_ref_sys"
end
-
- load_sql_file do
+
+ load_sql_file do
db_name dbname_to_use
supported_versions %w[9.0]
- extname"postgis-1.5/postgis_comments"
+ extname"postgis-1.5/postgis_comments"
end
- elsif @node[:postgres_version] == "9.1"
+ elsif @node[:postgres_version] == "9.1"
include_recipe "postgresql9_extensions::ext_postgis_install"
execute "Postgresql loading postgis on database #{dbname_to_use} for version 9.1 as a contrib" do
command "psql -U postgres -d #{dbname_to_use} -f /usr/share/postgresql-9.1/contrib/postgis-1.5/postgis.sql"
end
-
+
execute "Postgresql loading spatial_ref_sys on database #{dbname_to_use} for version 9.1 as a contrib" do
command "psql -U postgres -d #{dbname_to_use} -f /usr/share/postgresql-9.1/contrib/postgis-1.5/spatial_ref_sys.sql"
end
-
+
execute "Postgresql loading postgis_comments on database #{dbname_to_use} for version 9.1 as a contrib" do
command "psql -U postgres -d #{dbname_to_use} -f /usr/share/postgresql-9.1/contrib/postgis-1.5/postgis_comments.sql"
end
-
+ elsif @node[:postgres_version] == "9.2"
+ Chef::Log.info "PostGIS support for 9.2 is coming soon"
end
-
+
execute "Grant permissions to the deploy user on the geometry_columns schema" do
command "psql -U postgres -d #{dbname_to_use} -c \"GRANT all on geometry_columns to deploy\""
end
-
+
execute "Grant permissions to the deploy user on the spatial_ref_sys schema" do
command "psql -U postgres -d #{dbname_to_use} -c \"GRANT all on spatial_ref_sys to deploy\""
end
View
11 cookbooks/postgresql9_extensions/definitions/seg.rb
@@ -1,10 +1,9 @@
define :postgresql9_seg do
- dbname_to_use = params[:name]
-
- load_sql_file do
+ dbname_to_use = params[:name]
+
+ load_sql_file do
db_name dbname_to_use
extname "seg"
- supported_versions %w[9.0 9.1]
+ supported_versions %w[9.0 9.1 9.2]
end
-
-end
+end
View
2  cookbooks/postgresql9_extensions/definitions/sslinfo.rb
@@ -7,4 +7,4 @@
supported_versions %w[9.0 9.1]
end
-end
+end
View
11 cookbooks/postgresql9_extensions/definitions/tablefunc.rb
@@ -1,10 +1,9 @@
define :postgresql9_tablefunc do
- dbname_to_use = params[:name]
-
- load_sql_file do
+ dbname_to_use = params[:name]
+
+ load_sql_file do
db_name dbname_to_use
extname "tablefunc"
- supported_versions %w[9.0 9.1]
+ supported_versions %w[9.0 9.1 9.2]
end
-
-end
+end
View
11 cookbooks/postgresql9_extensions/definitions/test_parser.rb
@@ -1,10 +1,9 @@
define :postgresql9_test_parser do
- dbname_to_use = params[:name]
-
- load_sql_file do
+ dbname_to_use = params[:name]
+
+ load_sql_file do
db_name dbname_to_use
extname "test_parser"
- supported_versions %w[9.0 9.1]
+ supported_versions %w[9.0 9.1 9.2]
end
-
-end
+end
View
11 cookbooks/postgresql9_extensions/definitions/uuid-ossp.rb
@@ -1,10 +1,9 @@
define :postgresql9_uuid_ossp do
- dbname_to_use = params[:name]
-
- load_sql_file do
+ dbname_to_use = params[:name]
+
+ load_sql_file do
db_name dbname_to_use
extname "uuid-ossp"
- supported_versions %w[9.0 9.1]
+ supported_versions %w[9.0 9.1 9.2]
end
-
-end
+end
View
11 cookbooks/postgresql9_extensions/definitions/xml2.rb
@@ -1,10 +1,9 @@
define :postgresql9_xml2 do
- dbname_to_use = params[:name]
-
- load_sql_file do
+ dbname_to_use = params[:name]
+
+ load_sql_file do
db_name dbname_to_use
extname "xml2"
- supported_versions %w[9.1]
+ supported_versions %w[9.1 9.2]
end
-
-end
+end
View
1  cookbooks/postgresql9_extensions/recipes/ext_autoexplain.rb
@@ -12,6 +12,7 @@
mode 0600
backup 0
variables({
+ :db_version => @node[:postgres_version],
:shared_preload_libraries => "'auto_explain'",
:custom_variable_classes => "'auto_explain'",
:auto_explain_log_min_duration => "'3s'",
View
4 cookbooks/postgresql9_extensions/recipes/ext_postgis_install.rb
@@ -2,7 +2,7 @@
postgis_version = "1.5.2"
proj_version = "4.6.1"
geos_version = "3.2.2"
-
+
package_use "sci-libs/geos" do
flags "-ruby"
end
@@ -45,7 +45,7 @@
execute "setting emerge options" do
command "emerge --ignore-default-opts dev-db/postgis"
end
-
+elsif@node[:postgres_version] == "9.2"
end
View
6 cookbooks/postgresql9_extensions/templates/default/custom_autoexplain.erb
@@ -1,5 +1,6 @@
# ------------------------------------
# PostgreSQL Custom configuration file
+# DB Version: <%= @db_version %>
# ------------------------------------
#
# This file was created by the postgresql9_extensions custom chef run
@@ -12,5 +13,6 @@ auto_explain.log_buffers = <%= @auto_explain_log_buffers %>
auto_explain.log_format = <%= @auto_explain_log_format %>
auto_explain.log_nested_statements = <%= @auto_explain_log_nested_statements %>
shared_preload_libraries = <%= @shared_preload_libraries %>
-custom_variable_classes = <%= @custom_variable_classes %>
-
+<% if @db_version != "9.2" %>
+ custom_variable_classes = <%= @custom_variable_classes %>
+<% end %>
View
4 cookbooks/redis/README.md
@@ -18,7 +18,7 @@ Design
Backups
--------
-This cookbook does not automate not facilitate any backup method currently. By default there is a snapshot enabled for your environment and that should provide a viable backup to recover from. If you have any backup concerns open a ticket with our [Support Team][9].
+This cookbook does not automate nor facilitate any backup method currently. By default there is a snapshot enabled for your environment and that should provide a viable backup to recover from. If you have any backup concerns open a ticket with our [Support Team][9].
Specifics of Usage
--------
@@ -69,4 +69,4 @@ How to get Support
[6]: http://redis.io/topics/data-types#hashes
[7]: http://redis.io/topics/data-types#strings
[8]: http://redis.io/topics/introduction
-[9]: https://support.cloud.engineyard.com
+[9]: https://support.cloud.engineyard.com
View
2  cookbooks/redis/attributes/redis.rb
@@ -1 +1 @@
-redis :version => "2.4.6", :bindport => "6379", :unixsocket => "/tmp/redis.sock", :basename => "dump.rdb", :basedir => "/data/redis", :pidfile => "/var/run/redis_util.pid", :loglevel => "notice", :logfile => "/data/redis/redis.log", :timeout => 300000, :saveperiod => ["90 1","300 10","60 10000"], :databases => 16, :rdbcompression => "yes"
+redis :version => "2.4.6", :bindport => "6379", :unixsocket => "/tmp/redis.sock", :basename => "dump.rdb", :basedir => "/data/redis", :pidfile => "/var/run/redis_util.pid", :loglevel => "notice", :logfile => "/data/redis/redis.log", :timeout => 300000, :saveperiod => ["900 1","300 10","60 10000"], :databases => 16, :rdbcompression => "yes"
View
4 cookbooks/timezone/README.md
@@ -1,6 +1,8 @@
# Changing the Timezone
-This cookbook makes it easy to change the timezone of an instance to one that suits your geographical location, rather than the default PST zone.
+This cookbook makes it easy to change the timezone of an instance to one that suits your geographical location, rather than the default UTC zone.
+
+NOTE: Older instances on Engine Yard Cloud use(d) the PST time zone by default. We've made changes to our stack to default to UTC in an effort to better standardize our product, and any new instances launched will default to UTC.
## Installation
Please sign in to comment.
Something went wrong with that request. Please try again.