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

new role for changing engine from local to remote db #145

Open
wants to merge 32 commits into
base: master
Choose a base branch
from

Conversation

leistnerova
Copy link
Contributor

it combines roles ovirt-engine-db-dump and ovirt-engine-remote-db to do the changes

…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
@@ -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)
Copy link
Collaborator

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.
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Member

@lukas-bednar lukas-bednar left a 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 ?

leistnerova and others added 4 commits August 29, 2017 10:50
- 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]>
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']) }}"
Copy link
Contributor

@tasdikrahman tasdikrahman Aug 30, 2017

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

Copy link
Contributor Author

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"
Copy link
Member

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?

Copy link
Collaborator

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
```
Copy link
Collaborator

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"
Copy link
Collaborator

Choose a reason for hiding this comment

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

+1

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]
Copy link
Member

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.

@lukas-bednar lukas-bednar added this to the 0.1.7 milestone Oct 18, 2017
Copy link
Member

@lukas-bednar lukas-bednar left a 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!

@pkubica pkubica self-requested a review May 15, 2018 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants