Summary: | [Docs] [SHE] Document a procedure for migrating the engine and other databases to a separate host | ||
---|---|---|---|
Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Andrew Dahms <adahms> |
Component: | Documentation | Assignee: | Andrew Burden <aburden> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Lucy Bopf <lbopf> |
Severity: | medium | Docs Contact: | |
Priority: | high | ||
Version: | 3.5.5 | CC: | ecohen, gklein, hkim, lsurette, rbalakri, yeylon, ylavi |
Target Milestone: | ovirt-3.5.7 | ||
Target Release: | 3.5.7 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | docs | ||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-12-23 00:28:49 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | Docs | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Bug Depends On: | Red Hat1285145 | ||
Bug Blocks: |
Description
Andrew Dahms
2015-11-26 02:04:50 UTC
Workflow as tested on 3.5 standard install: On Manager: # service ovirt-engine stop # su - postgres -c 'pg_dump -F c engine -f /tmp/engine.dump' # scp /tmp/engine.dump root.com:/tmp/engine.dump (target directory needs to allow write access for postgres user) On DB Server: # yum install postgresql-server # service postgresql initdb # service postgresql start # chkconfig postgresql on # su postgres $ psql postgres=# create role engine with login encrypted password '[engine password]'; * engine password retrieved from '/etc/ovirt-engine/engine.conf.d/10-setup-database.conf' file on Manager postgres=# create database engine owner engine template template0 encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8'; postgres=# \q $ exit * In /var/lib/pgsql/data/postgresql.conf listen_addresses='*' * In /var/lib/pgsql/data/pg_hba.conf: host engine engine [Manager IP]/32 md5 host engine engine ::0/0 md5 # iptables -I INPUT 5 -p tcp --dport 5432 -j ACCEPT # service iptables save # service postgresql restart # su - postgres -c 'pg_restore -d engine /tmp/engine.dump' On Manager again: * In /etc/ovirt-engine/engine.conf.d/10-setup-database.conf: -ENGINE_DB_HOST="localhost" +ENGINE_DB_HOST="[DB Server IP]" # service ovirt-engine start Note: It took about 90 seconds for the Web admin portal to come online. Building hosted-engine environment overnight to test; I don't foresee the workflow being any different but for restricting engine vm migration during procedure. Testing complete with success on 3.5 hosted engine; including dwhd db migration. As expected, the procedure is the same as above (with additional db considerations for dwhd) but for the need to disable the HA agent on host. This content is being developed to be included in 3.5 publication. Updated Target Milestone. Moving back to ON_QA. Hi Takahashi-san, The engine db migration is now published and can be found here: http://documentation-devel.engineering.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.5/html/Installation_Guide/Migrating_the_Self-Hosted_Engine_Database_to_a_Remote_Server_Database.html I'm still working on verifying the procedure for the dwh and reports dbs. I will update this bug with the correct procedure upon verification, and this will be included in documentation. Thank you, Andrew Hello Takahashi-san, I've verified the reports db migration procedure. It is not yet in publishable state but the workflow is as follows: On Manager: # service ovirt-engine-reportsd stop # su - postgres -c 'pg_dump -F c ovirt-engine-reports -f /tmp/ovirt-engine-reports.dump' # scp /tmp/ovirt-engine-reports.dump root.com:/tmp/ovirt-engine-reports.dump (target directory needs to allow write access for postgres user) On DB Server: # yum install postgresql-server # service postgresql initdb # service postgresql start # chkconfig postgresql on # su postgres $ psql postgres=# create role ovirt-engine-reports with login encrypted password '[ovirt-engine-reports password]'; * ovirt-engine-reports password retrieved from '/var/lib/ovirt-engine-reports/build-conf/master.properties' file on Manager postgres=# create database ovirt-engine-reports owner ovirt-engine-reports template template0 encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8'; postgres=# \q $ exit * In /var/lib/pgsql/data/postgresql.conf listen_addresses='*' * In /var/lib/pgsql/data/pg_hba.conf: host ovirt-engine-reports ovirt-engine-reports [Manager IP]/32 md5 # iptables -I INPUT 5 -p tcp --dport 5432 -j ACCEPT # service iptables save # service postgresql restart # su - postgres -c 'pg_restore -d ovirt-engine-reports /tmp/ovirt-engine-reports.dump' On Manager again: * In /var/lib/ovirt-engine-reports/build-conf/master.properties: -dbHost=localhost +dbHost=[DB Server IP] # engine-setup There continues to be an issue with migrating the dwh db. We are collaborating with engineering to arrive at the solution. The Self-Hosted Engine database migration topics have been published in the 3.5 Installation Guide and can be viewed here: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.5/html/Installation_Guide/Migrating_the_Self-Hosted_Engine_Database_to_a_Remote_Server_Database.html https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.5/html/Installation_Guide/ch03s12.html https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.5/html/Installation_Guide/ch03s13.html The standard installation database migration topics have now been published in the 3.5 Administration Guide. The content can be viewed here: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.5/html/Administration_Guide/chap-Backups.html#Migrating_the_Engine_Database_to_a_Remote_Server_Database https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.5/html/Administration_Guide/chap-Backups.html#idp9642608 https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.5/html/Administration_Guide/chap-Backups.html#idp40373360 This content and the content linked in Comment 16 have been reviewed and verified. |