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
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a5e9ac7
new role for dumping engine and dwh databases
leistnerova Aug 17, 2017
e24a787
Merge remote-tracking branch 'upstream/master'
leistnerova Aug 22, 2017
19b558e
new role ovirt-engine-local-to-remote-db for changing engine from loc…
leistnerova Aug 24, 2017
556109f
update according to comments
leistnerova Aug 24, 2017
0bedcf8
Merge branch 'master' of https://github.com/rhevm-qe-automation/ovirt…
leistnerova Aug 29, 2017
9500dfa
tests form changine engine from local to remote db added, some fixes
leistnerova Aug 29, 2017
739d1ad
fixing whitespaces
leistnerova Aug 29, 2017
36ddc5e
separate test created
lukas-bednar Aug 30, 2017
3235a69
default value in engine-cleanup fixed
leistnerova Aug 30, 2017
9870d31
removed local to remove db flow from other tests
leistnerova Aug 30, 2017
e5543e0
check of engine status, reset if not running, remove db in the end
leistnerova Oct 11, 2017
a5e1f2a
Merge branch 'master' into local_to_remote_db
leistnerova Oct 11, 2017
bf33241
Update .travis.yml
leistnerova Oct 11, 2017
66b4438
text fixed, example of inventory
leistnerova Oct 11, 2017
8994178
Merge branch 'local_to_remote_db' of github.com:leistnerova/ovirt-ans…
leistnerova Oct 11, 2017
e57c2e3
travis.yml fix
leistnerova Oct 11, 2017
9691c80
Merge remote-tracking branch 'upstream/master'
leistnerova Oct 12, 2017
532616e
fix for test-promote-db-local-to-remote.yml - load all containers facts
leistnerova Oct 12, 2017
1a389c9
fix of become postgres user
leistnerova Oct 12, 2017
e1399a1
changes for ovirt >= 4.2
leistnerova Oct 13, 2017
7f7d264
fix on getting variables from engine settings
leistnerova Oct 13, 2017
12bc29c
condition of dwh db added back to dump db
leistnerova Oct 13, 2017
90e4605
update of README
leistnerova Oct 17, 2017
90aaca1
change of remove db variable, fix ovirt_engine_version
leistnerova Oct 17, 2017
3169b17
fix ovirt_engine_version
leistnerova Oct 17, 2017
29d776e
gix db_dump_local_dir variable use
leistnerova Oct 17, 2017
0c1ad97
Merge remote-tracking branch 'upstream/master'
leistnerova Oct 17, 2017
e8ab3ff
Merge branch 'master' into local_to_remote_db
leistnerova Oct 17, 2017
951141f
test in README added, fix restoring db
leistnerova Oct 17, 2017
064bffb
fixing only reset usage
leistnerova Oct 19, 2017
0df0b0e
Merge branch 'master' into local_to_remote_db
leistnerova May 15, 2018
9a29cbb
Merge branch 'master' into local_to_remote_db
petr-balogh May 30, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ env:
- TEST_NAME=4.0
- TEST_NAME=4.1
- TEST_NAME=master
- TEST_NAME=upgrade-4.1-to-master
- TEST_NAME=upgrade-4.0-to-4.1
- TEST_NAME=upgrade-4.1-to-master
- TEST_NAME=promote-db-local-to-remote

# Install python-pip
addons:
Expand Down
6 changes: 1 addition & 5 deletions tests/containers-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@
provision_docker_inventory_group: "{{ groups['remote-db'] }}"
- role: provision_docker
provision_docker_inventory_group: "{{ groups['engine'] }}"
- role: provision_docker
provision_docker_inventory_group: "{{ groups['engine-local-db'] }}"
- role: provision_docker
provision_docker_inventory_group: "{{ groups['remote-db-migrate'] }}"

- name: "Update python because of ovirt-imageio-proxy"
hosts: engine engine-local-db
hosts: engine
tasks:
- name: Update python
yum:
Expand Down
15 changes: 2 additions & 13 deletions tests/engine-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,8 @@
ovirt_engine_type: "ovirt-engine"
ovirt_engine_version: "{{ ovirt_engine_version }}"
ovirt_engine_hostname: "localhost"
ovirt_engine_db_host: "{{ hostvars['remote_db_centos7']['ansible_default_ipv4']['address'] }}"
ovirt_engine_db_host: "{{ engine_db_host | default(hostvars['remote_db_centos7']['ansible_default_ipv4']['address']) }}"
ovirt_engine_dwh: true
ovirt_engine_dwh_db_host: "{{ hostvars['remote_db_centos7']['ansible_default_ipv4']['address'] }}"
roles:
- role: ovirt-engine-cleanup # This role must be last
- name: Run ovirt-engine-cleanup on engine with local db
hosts: engine-local-db
vars:
ovirt_engine_type: "ovirt-engine"
ovirt_engine_version: "{{ ovirt_engine_version }}"
ovirt_engine_hostname: "localhost"
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.

roles:
- role: ovirt-engine-cleanup # This role must be last
32 changes: 0 additions & 32 deletions tests/engine-deploy-local-db.yml

This file was deleted.

4 changes: 2 additions & 2 deletions tests/engine-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
ovirt_engine_hostname: "localhost"
ovirt_engine_organization: "example.com"
ovirt_engine_admin_password: "123456"
ovirt_engine_db_host: "{{ hostvars['remote_db_centos7']['ansible_default_ipv4']['address'] }}"
ovirt_engine_db_host: "{{ engine_db_host | default(hostvars['remote_db_centos7']['ansible_default_ipv4']['address']) }}"
ovirt_engine_dwh: true
ovirt_engine_dwh_db_host: "{{ hostvars['remote_db_centos7']['ansible_default_ipv4']['address'] }}"
ovirt_engine_dwh_db_host: "{{ engine_dwh_db_host | default(hostvars['remote_db_centos7']['ansible_default_ipv4']['address']) }}"
ovirt_engine_configure_iso_domain: true
ovirt_engine_firewall_manager: null
ovirt_engine_config:
Expand Down
12 changes: 3 additions & 9 deletions tests/inventory
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,11 @@ localhost ansible_connection=local ansible_python_interpreter="/usr/bin/env pyth
[engine]
engine_centos7 image="chrismeyers/centos7"

[remote-db]
remote_db_centos7 image="chrismeyers/centos7"

[engine-local-db]
engine_centos7 image="chrismeyers/centos7"

[engine-local-db:vars]
[engine:vars]
ovirt_type=engine

[remote-db-migrate]
[remote-db]
remote_db_centos7 image="chrismeyers/centos7"

[remote-db-migrate:vars]
[remote-db:vars]
ovirt_type=remote_db
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Change engines local to remote db
hosts: engine-local-db remote-db-migrate
hosts: engine remote-db
roles:
- role: ovirt-engine-local-to-remote-db
16 changes: 16 additions & 0 deletions tests/test-promote-db-local-to-remote.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
- include: containers-deploy.yml
- include: engine-deploy.yml
vars:
engine_db_host: "localhost"
engine_dwh_db_host: "localhost"
ovirt_engine_version: "4.1"
ovirt_rpm_repo: "http://plain.resources.ovirt.org/pub/yum-repo/ovirt-release41.rpm"

- include: promote-db-local-to-remote.yml

- 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

engine_dwh_db_host: "localhost"
ovirt_engine_version: "4.1"