-
Notifications
You must be signed in to change notification settings - Fork 79
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
Conversation
…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.
Checked commits carbonin/manageiq-gems-pending@6a90c9c~...16baf81 with ruby 2.2.6, rubocop 0.46.0, and haml-lint 0.19.0 |
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. |
There was a problem hiding this 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.
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. |
There was a problem hiding this 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Use a UNIX socket for the DRb server (cherry picked from commit 7672ec394b31a011f85676c9620f0eab825df149) https://bugzilla.redhat.com/show_bug.cgi?id=1603578
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