Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

(CLOUD-295) Add RDS Support #69

Closed

Conversation

petems
Copy link
Contributor

@petems petems commented Feb 6, 2015

Rebase of #57 with spec tests added 👍

@daveseff want to have a look? 👍

@@ -0,0 +1,102 @@
require_relative '../../../puppet_x/puppetlabs/aws.rb'
require "base64"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this is used in this provider?

@garethr
Copy link
Contributor

garethr commented Feb 8, 2015

Thanks @petems @daveseff. I've left lots of comments, mainly small things. We'll need to expand the unit tests and add some acceptance tests to this but it's looking good. I'm happy to help out if I can.

@petems petems force-pushed the MODULES-1702-add_RDS_support branch from 00d65cd to 8184af1 Compare February 8, 2015 21:15
@petems
Copy link
Contributor Author

petems commented Feb 8, 2015

@garethr Made the changes required based on comments, I can rebase the commits later on 👍

@garethr garethr changed the title MODULES-1702 Add RDS Support (MODULES-1702) Add RDS Support Feb 9, 2015
end

newproperty(:iops) do
desc 'The IOPS stype for the DB (minimum 1000)'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From reading the docs, by default this is 0, and that will set your RDS as standard storage rather than the Provisioned IOPS. So I'll probably remove the comment about minimum

@daveseff
Copy link
Contributor

Any news on when this will get merged in?

@petems
Copy link
Contributor Author

petems commented Feb 24, 2015

@daveseff Me and Gareth are going to do some acceptance test pairing soonish, so hopefully should be able to get it tied up soon! 👍

@daveseff
Copy link
Contributor

Nice. Can I remove my fork of this then?

@petems petems force-pushed the MODULES-1702-add_RDS_support branch 2 times, most recently from bae1f42 to d689933 Compare March 4, 2015 16:37
@petems petems force-pushed the MODULES-1702-add_RDS_support branch 2 times, most recently from 15b02c8 to 7b26866 Compare March 9, 2015 00:57
@petems
Copy link
Contributor Author

petems commented Mar 9, 2015

@daveseff Yep, you can probably delete your fork, your commits are safe and sound in this branch! 👍

petems and others added 4 commits March 26, 2015 08:44
It can create db's now. (sort of).

Added the RDS example in the README

I should learn github markup.

Now impliments adding rds instance to security group.

Can now delete RDS instances.

puppet resource rds_instance is now working.

Still learning as I go. :)

Figured it out. Instances no longer throw errors. puppet resource rds_instance is working fine.
* To get an MVP of RDS working, we also need to create an DB Security Group to access it
@petems petems force-pushed the MODULES-1702-add_RDS_support branch from 7b26866 to 6122124 Compare March 26, 2015 08:46
@danieldreier
Copy link

Thanks for your work adding RDS support.

The way I'd like to use the RDS support is to create a multi-AZ MySQL database in the production environment, with backups, maintenance window set, and a parameter group defined, in our VPC.

The only major thing that I noticed about that RDS PR is the inability to manage parameter groups, which are the only mechanism for Amazon gives for configuring MySQL settings. Drupal is so bad about making huge JOINs that tuning mysql really isn't optional - the default settings will have it constantly writing temp tables to disk and performance is significantly impacted.

The most basic use case would be simply associating an RDS instance with a parameter group, though it would really be nice to create parameter groups as well. It would be really ideal if I could copy-paste the settings from the puppetlabs-mysql module into a parameter group. It's just a hash of settings, so it seems like it should be possible.

@petems
Copy link
Contributor Author

petems commented Mar 27, 2015

@danieldreier Just added Parameter Group type and provider, and added being able to add it to an RDS instance on creation 👍

@danieldreier
Copy link

awesome! That was quick. Thanks!

@choonming
Copy link

I was looking into the code and the API documentation on RDS. Noted that you only allow creating DB security groups with some manual work involved as per your documentation in your branch. Is it possible to add a parameter to define the VPC security group associated with the new RDS instance?

@petems
Copy link
Contributor Author

petems commented Apr 8, 2015

@choonming Right now the AWS API is limited to just creating and deleting DB security groups. You have to do the assignment of EC2 or VPC security groups through the GUI.

@petems
Copy link
Contributor Author

petems commented Apr 8, 2015

@choonming Actually, I'm not positive on that for VPC groups, the docs page is timing out for me right now, I'll double check that later! 👍


This example creates a security group to allow Postgres RDS instance, then creates an RDS instance with that security group assigned.

puppet apply rds_security.pp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a few extra leading spaces.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed 👍

@garethr
Copy link
Contributor

garethr commented Apr 16, 2015

@peter This is looking good, apologies for taking so long to get to it. I've left a few more minor comments. On top of those we'll need:

  • Details in the README for the types and properties. See the examples from the 1.0 README
  • Unit tests covering the type property inputs (rather than just existence). This probably involves adding basic type checking as a minimum to the properties - again see lots of examples from the existing types.

@garethr garethr changed the title (MODULES-1702) Add RDS Support (CLOUD-295) Add RDS Support Apr 16, 2015
@choonming
Copy link

@petems if we look at the RDS API documentation on ModifyDBInstance, we can specify the following:

VpcSecurityGroupIds.member.N
A list of EC2 VPC security groups to authorize on this DB instance. This change is asynchronously applied as soon as possible.
Constraints:
Must be 1 to 255 alphanumeric characters
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
Type: String list
Required: No

@petems
Copy link
Contributor Author

petems commented Apr 16, 2015

@choonming Ok, I'll see if I can add that to the creation parameters 👍

@Iristyle
Copy link
Contributor

PR references CLOUD-295 but commits all reference MODULES-1702

@petems
Copy link
Contributor Author

petems commented Apr 22, 2015

Yep, need to rebase and rename the commits to the new ticket name.

@petems
Copy link
Contributor Author

petems commented May 6, 2015

Closed in favour of new ticket name branch: #161

@petems petems closed this May 6, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants