Infra Ansible - fix ExecDB's local deployment inconsistency
ClosedPublic

Authored by jskladan on Oct 27 2015, 12:38 PM.

Details

Reviewers
tflink
Summary

roles/taskotron/execdb/tasks/main.yml and roles/taskotron/execdb/templates/alembic.ini.j2 use local_ prefix for the execdb variables, but roles/taskotron/execdb/templates/settings.py.j2 was not. This removes the need for both local_execdb_db_{user, pasword} and execdb_db_{user, pasword} in the private vars for the local deployment.

Test Plan

The ansible allinone works with just local_ execdb variables.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
jskladan retitled this revision from to Infra Ansible - fix ExecDB's local deployment inconsistency.Oct 27 2015, 12:38 PM
jskladan updated this object.
jskladan edited the test plan for this revision. (Show Details)
jskladan added a project: infrastructure.
tflink requested changes to this revision.Oct 27 2015, 4:20 PM

I'd rather solve this in a similar way to how I've been refactoring the non-local playbooks: keep setting the local_* vars as they are but set the non-prefixed variables in a group_vars file. For example, set execdb_db_password: {{ local_execdb_password }} in the inventory/group_vars/resultsdb file. resultsdb for dev and stg should mostly be set up that way. I won't be doing production until we upgrade to F22, though.

I really want to get rid of those conditional blocks in the templates and tasks - they're confusing and encourage silly repetition. Apparently I missed some of it in the execdb role :-/

This revision now requires changes to proceed.Oct 27 2015, 4:20 PM
In D629#12105, @tflink wrote:

...

roger, will have a look at that

jskladan updated this revision to Diff 1654.Nov 3 2015, 11:10 AM

How about this? I "finished" the resultsdb/execdb refactoring, so there are (almost) no conditionals in the tasks/templates, using the aforementioned method of setting stuff in the inventory/group_vars. I hope I grasped the idea right, though.

tflink accepted this revision.Nov 3 2015, 2:15 PM

LGTM - can you wait until tomorrow before pushing this, though - infra freeze is still in place until tomorrow morning and this affects some production systems.

This revision is now accepted and ready to land.Nov 3 2015, 2:15 PM

It doesn't look like this was ever applied to the infra ansible repo

jskladan updated this revision to Diff 1894.Feb 3 2016, 11:22 AM
tflink added a comment.Feb 3 2016, 1:00 PM

New changes look good to me

roles/taskotron/resultsdb-backend/templates/settings.py.j2
10

When we have more than one of these, I'd prefer to see {% when deployment_type in ['local', 'dev'] %}

jskladan closed this revision.Feb 3 2016, 1:12 PM