-
Notifications
You must be signed in to change notification settings - Fork 28
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
new role for changing engine from local to remote db #145
base: master
Are you sure you want to change the base?
new role for changing engine from local to remote db #145
Conversation
…al to remote database - first it runs role ovirt-engine-db-dump for dumping databases and get db variables - then it runs role ovirt-engine-remote-db to create databases and import data - at last it sets configuration on engine to remote databases - in ovirt-engine-db-dump are path for dumps fixed and local directory can be added as parameter - examples for inventory and playbook created
roles/ovirt-engine-db-dump/README.md
Outdated
@@ -21,6 +21,7 @@ Role Variables | |||
--- | |||
ovirt_engine_db_dump_dwh: [True, False] Dump also DWH database (default: False) | |||
ovirt_engine_db_dump_start_services: [True, False] Start engine and DWH service after dump (default: True) | |||
ovirt_engine_db_dump_local_dir: directory on local machine where to store files (default: angine_dump in playbook directory) |
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.
Angine_dump?
------------ | ||
|
||
Preinstalled engine with local DB. | ||
Preinstalled clean operating system on remote server. |
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 would add el7/linux based operating system
ovirt_engine_db_dump_start_services: False | ||
ovirt_engine_db_dump_local_dir: "{{ playbook_dir }}/engine_dump" | ||
when: ovirt_type == "engine" | ||
- name: get engine variables from file |
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.
empty space between new tasks
- empty lines between tasks added - meta file added - description changed
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.
Where are my tests ?
- 2 new containers added in containers-deploy, that are used for migration - new engine added to engine-cleanup - engine-deploy-local-db added - test of ovirt-engine-local-to-remote-db added to test-* - get ip of engine and database from proper variables in ovirt-engine-local-to-remote-db - reset added to ovirt-engine-local-to-remote-db
Signed-off-by: leistnerova <[email protected]>
tests/engine-cleanup.yml
Outdated
ovirt_engine_db_host: "localhost" | ||
ovirt_engine_dwh: true | ||
ovirt_engine_dwh_db_host: "localhost" | ||
ovirt_engine_dwh_db_host: "{{ engine_dwh_db_host | hostvars['remote_db_centos7']['ansible_default_ipv4']['address']) }}" |
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 believe the trailing )
in ['address'])
here is causing the interpolation error
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.
Thank you, I have overlooked that. I will fix it.
|
||
- include: engine-cleanup.yml | ||
vars: | ||
engine_db_host: "localhost" |
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.
when I move db from local to remote, then here in cleanup I should point to remote one then, no?
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.
+1
ovirt_engine_dwh_to_remote_db: True | ||
roles: | ||
- ovirt-engine-local-to-remote-db | ||
``` |
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 would add example inventory as you are hacking around with ovirt_type var in it
|
||
- include: engine-cleanup.yml | ||
vars: | ||
engine_db_host: "localhost" |
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.
+1
…ible into local_to_remote_db
93d566e
to
532616e
Compare
README.md
Outdated
@@ -46,6 +46,7 @@ This host group is meant for virtual machines hosted by oVirt Engine. | |||
* [ovirt-engine-config] | |||
* [ovirt-engine-db-dump] | |||
* [ovirt-engine-install-packages] | |||
* [ovirt-engine-local-to-remote-db] |
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.
Please mention new test under Test
section, on line 105.
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 am good with this change!
it combines roles ovirt-engine-db-dump and ovirt-engine-remote-db to do the changes