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

Prerequisites for running ansible inside the appliance #42

Merged
merged 2 commits into from
Jan 25, 2017

Conversation

carbonin
Copy link
Member

This PR creates the postgres database that will be used for ansible on the appliance when we create our database.

Additionally this PR adds the host and password to database.yml even when we are running a database locally. This was done so that the password is accessible at configuration time to provide to the ansible process so that it can contact the database.

https://www.pivotaltracker.com/story/show/137048481

…base

This will allow us to access the database information for ansible
which does not use local sockets for "external" databases.

This will also allow failover to work properly when going from
a local database to a remote one.
@miq-bot
Copy link
Member

miq-bot commented Jan 20, 2017

Checked commits carbonin/manageiq-gems-pending@6a90c9c~...16baf81 with ruby 2.2.6, rubocop 0.46.0, and haml-lint 0.19.0
3 files checked, 0 offenses detected
Everything looks good. 🍪

@carbonin
Copy link
Member Author

An alternative approach here could be to execute this stuff when we do the configuration and generate and save the db password like we do for the other keys and passwords (ManageIQ/manageiq#13584). This way we have a separate place to deal with any password rules or special character restrictions that the ansible side may have.

Thoughts @gtanzillo @jrafanie ?

@jrafanie
Copy link
Member

An alternative approach here could be to execute this stuff when we do the configuration and generate and save the db password like we do for the other keys and passwords (ManageIQ/manageiq#13584). This way we have a separate place to deal with any password rules or special character restrictions that the ansible side may have.

Thoughts @gtanzillo @jrafanie ?

I don't know, maybe I'm missing something but it feels like doing this as configure database time is exactly when it needs to happen, when creating the internal database. I'm open to other ideas but I don't see why we'd do it differently.

Copy link
Member

@jrafanie jrafanie left a comment

Choose a reason for hiding this comment

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

Other than adding the host and password that was previously not in the yaml, it seems fine. And @kbrock signed off on the host/password, so I'm good with this.

@gtanzillo
Copy link
Member

I'm in agreement with @jrafanie. Unless there's some reason (other being uncomfortable with adding host and password to the database.yaml file) why we shouldn't or can't create the DB for ansible, I think it should be done at the same time as the vmdb DB. So I'm good with this. anyway, we already save the password when the DB is not local.

Copy link
Member

@kbrock kbrock left a comment

Choose a reason for hiding this comment

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

I liked having nil for the hostname, which uses a local socket.

but the main benefits seem to be:

  • gets us closer to having a common database.yml for all appliances in a region.
  • makes failover easier when teetering between localhost and remote host (which needs a password).
  • stores db password for use by Ansible.

Copy link
Member

@gtanzillo gtanzillo left a comment

Choose a reason for hiding this comment

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

👍

@gtanzillo gtanzillo merged commit 46034e7 into ManageIQ:master Jan 25, 2017
@carbonin carbonin deleted the ansible_inside branch March 7, 2017 16:33
simaishi pushed a commit that referenced this pull request Aug 14, 2018
Use a UNIX socket for the DRb server
(cherry picked from commit 7672ec394b31a011f85676c9620f0eab825df149)

https://bugzilla.redhat.com/show_bug.cgi?id=1603578
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants