-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #168 from engineyard/feature/TEY-140-aurora-pg
[TEY-138, TEY-140] Support for Aurora PostgreSQL
- Loading branch information
Showing
6 changed files
with
18 additions
and
56 deletions.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,15 @@ | ||
module RDSHelpers | ||
def db_host_is_rds? | ||
node.engineyard.environment[:db_provider_name] == 'amazon_rds' | ||
end | ||
end | ||
|
||
class Chef | ||
class Recipe | ||
# returns the db_type and specific version number | ||
# nil - no database, or unknown database | ||
def db_type_and_version | ||
case node.engineyard.environment['db_stack_name'] | ||
when "postgres" | ||
["postgres", "8.3"] | ||
when "postgres9" | ||
["postgres", "9.0"] | ||
when /postgres(\d+)_(.*)/ | ||
["postgres", "#{$1}.#{$2}"] | ||
when "mysql" | ||
["mysql", "5.0"] | ||
when /mysql(\d+)_(.*)/ | ||
["mysql", "#{$1}.#{$2}"] | ||
else | ||
nil | ||
end | ||
end | ||
|
||
def db_host_is_rds? | ||
node.engineyard.environment[:db_provider_name] == 'amazon_rds' | ||
end | ||
include RDSHelpers | ||
end | ||
|
||
class Resource | ||
def db_host_is_rds? | ||
node.engineyard.environment[:db_provider_name] == 'amazon_rds' | ||
end | ||
include RDSHelpers | ||
end | ||
end |
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
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
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