Quantcast
Channel: Question and Answer » postgresql
Viewing all articles
Browse latest Browse all 1138

Using Configuration Management for DBA tasks?

$
0
0

We have a couple of Postgres 9.3 database servers in our system, all of them with their respective config files, databases, roles, role groups, permissions on schema/tables, extensions etc. We use standalone_migrations to generate and apply new migrations to the schema.

My challenge is to create one single automated flow to both create (the first time, on new machines) and update the databases in all of our different environments: dev machine, vagrant VM, single box staging, staging, production etc. I’ve so far been using Ansible (similar in many ways to Chef/Puppet/Salt etc.) to automate some parts of this work, since I don’t want to be dealing with manual execution or bash scripts when updating or setting up the environments.

It does a pretty good job at idempotently setting up dbs, users, permissions etc, but I haven’t quite figured out how to inject migrations into the flow. I could get away with having ansible run custom scripts to process this, but I’m not sure how bulletproof this process would be.

I’m curious how other people are mixing up automation and configuration management with DB management. Are you letting CM rule the whole thing? Are you keeping SQL separate and running it by hand? Is there a best practice here?


Viewing all articles
Browse latest Browse all 1138

Trending Articles