remind101 / stacker_blueprints

DEPRECATED - moved to:
https://github.com/cloudtools/stacker_blueprints
BSD 2-Clause "Simplified" License
39 stars 53 forks source link

Should retire old stacker_blueprints/postgres.py in favor if stacker_blueprints/rds #5

Open phobologic opened 8 years ago

phobologic commented 8 years ago

It's just confusing at this point. Need to think about existing examples (empire) that use the old rds.

awaddell commented 8 years ago

Hi @phobologic I had need to provide a MySQL RDS backing-service for apps. I created a mysql.py derived from postgres.py including creating a SG that permits minions instead of controllers however, I can see that it's a fugly move as the MySQL Db now becomes 'required' across all envs and is 99% code duplication anyway.

Do the directions (below) in the base class still apply and are you thinking of something different yourself?

Or perhaps a backing-service should be a standalone stack (but it will then need vpc-id, sg etc)

Should not be used directly. Either use :class:`MasterInstance` or
:class:`ReadReplica` classes, or a engine specific blueprint like
:class:`stacker.blueprints.rds.postgres.MasterInstance` or
:class:`stacker.blueprints.rds.postgres.ReadReplica`.
phobologic commented 8 years ago

Hey @awaddell:

That said, I tend to include all of my stacks in the same stacker config, that includes the minions and all the other services (like a database) that they will interact with. I also, in the case of stateful services, tend to set locked to true on any stacks that I do not want to update every time (we hardly ever update our database stack via cloudformation). The benefit is that if you need to spin up a whole new copy of your existing environment (say for development, or staging, or whatever) you know you can do so with confidence.

Hope that helps!

awaddell commented 8 years ago

Hi @phobologic , Thanks for this. I changed to stacker_blueprints.rds.mysql.MasterInstance and implemented your example EmpireMinionSecurityRules successfully though I had to pull out the unneeded SlaveAPIDBSecurityGroup from the class pending working out how to be able to have it absent from the stacker config. Will return to that when not pressed by deadlines.

phobologic commented 8 years ago

Yeah - you don't actually need the Slave Database parameter if you aren't going to use it, was just giving an example of how you could handle mutliple SecurityGroup changes, etc. Let me know if you run into any issues.