Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add beginning example of db role #92

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add beginning example of db role #92

wants to merge 1 commit into from

Conversation

cooldracula
Copy link
Contributor

This is an incomplete example that is useful hopefully for illustration on provisioning a managed database with ansible.

It uses the digital ocean community module which has a database option. It would work similar to the existing new-do-droplet role.

I was investigating whether you could provision a droplet and a db at the same time before my time ran out. It would be best to have the droplet and the database communicating over a virtual private network, so that we can close any connections to the db except for the app. To do this would require creating a VPC during the new-do-droplet tasks, storing its unique ID as a variable, and then using that variable in the creation of the db. However, this creates a unique connection string to use for the app to communicate to the db and I wasn't sure how to store that in like an inventory vault file as part of the db creation. You might find that you want to create the database first, set it up, and then provision the droplet to connect to it--so trying to do it as a single ansible playbook may not be practical.

Hopefully this pr gives inspiration on where to go next, though.

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

Successfully merging this pull request may close these issues.

1 participant