Skip to content
This repository has been archived by the owner on Jul 7, 2021. It is now read-only.

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

Open
phobologic opened this issue Jan 9, 2016 · 4 comments

Comments

@phobologic
Copy link
Contributor

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

@phobologic phobologic changed the title Should retire old stacker_blueprints/postgres.py in favor if stacker_blueprints/rds Should retire old stacker_blueprints/postgres.py in favor if stacker_blueprints/rds Jan 9, 2016
@awaddell
Copy link

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
Copy link
Contributor Author

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
Copy link

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
Copy link
Contributor Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants