mrlpm / ovirt-engine-disaster-recovery

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README - oVirt Engine Disaster Recovery

This is a web application that uses Java, oVirt API and PostgreSQL to perform the task needed to for oVirt's Disaster Recovery.

Assumptions

  • Every master Storage domain for each Data Center has been replicated from site A to site B.
  • There is an exact copy of the RHEV-M/Engine available to run on site B, in case of DR.
  • Please refer to next section.

How does this work ?

Installation Guide

Requirements

  • RHV/oVirt 3.6.10+ | RHV/oVirt 4.0, 4.1
  • Centos/RHEL 7.x -> latest version (minimal installation)
  • Java Oracle|OpenJDK 8
  • MariaDB/MySQL 5.x (for storing application configuration and parameters)
  • Play Framework 1.4, we need some help freeing the app, from this framework, we needed to deliver the app fast for a customer, so we used this framework. Play Framework

Preparing OS

  • Always update your OS packages, then install required.
yum update -y 

Installing Java 1.8

  • ORACLE

For RHEL 7.x

subscription-manager repos --enable rhel-7-server-thirdparty-oracle-java-rpms ; \
yum install java-1.8.0-oracle -y

For Centos 7.x

Download from: Java 1.8 Oracle

yum localinstall jre-8u91-linux-x64.rpm -y
  • OpenJDK

For RHEL 7.x | Centos 7.x

yum install java-1.8.0-openjdk-headless 

Verify Java version

[root@localhost ~]# java -version
java version "1.8.0_XX"
Java(TM) SE Runtime Environment (build 1.8.0_XX)
Java HotSpot(TM) 64-Bit Server VM (build XX, mixed mode)

Open port TCP 9000

firewall-cmd --add-port=9000/tcp --permanent
systemctl restart firewalld

Installing oVirt Engine Disaster Recovery from RPM

  • Download YUM REPO
cd /etc/yum.repos.d/
curl -O http://supp01.i-t-m.com/repos/ovirt-engine-disaster-recovery.repo

This is a nightly build !!

  • Install RPMs
yum install -y ovirt-engine-disaster-recovery-app

Configure Database

  • Start/Enable MariaDB
systemctl enable mariadb
systemctl start mariadb
  • MariaDB Secure Installation
mysql_secure_installation
  • Create DB
mysqladmin create ovirtenginedr -p
  • Import Initial DB

    • from RPM
    mysql -u root -p ovirtenginedr < /usr/share/doc/ovirt-engine-disaster-recovery-${VERSION}-${RELEASE}/ovirt-engine-disaster-recovery.sql
    
    • from SOURCE
    mysql -u root -p ovirtenginedr < ~/ovirt-engine-disaster-recovery/docs/ovirt-engine-disaster-recovery.sql
    
  • Create DB User

mysql -u root -p

MariaDB [(none)]> CREATE USER 'ovirtdr'@'localhost' IDENTIFIED BY 'YOURPASSWOR-HERE';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON ovirtenginedr.* TO 'ovirtdr'@'localhost';

Application Configuration

  • Configure Database Parameters

Edit configuration file: /etc/ovirt-engine-disaster-recovery/ovirt-engine-disaster-recovery.conf

# Change Values on Line 91 for MariaDB

90 # To connect to a local MySQL5 database, use:
91 db=mysql://ovirtdr:YOURPASSWOR-HERE@localhost:3306/ovirtenginedr


Service Administration

Systemctl Administration

  • Start
systemctl start ovirt-engine-disaster-recovery

  • Status
systemctl status ovirt-engine-disaster-recovery

  • Stop
systemctl stop ovirt-engine-disaster-recovery

LOG FILE

/var/log/ovirt-engine-disaster-recovery/application.log

You should monitor this file, for Java exceptions or SQL errors.

One common error is supplying wrong credentials to MariaDB.

Installing oVirt Engine Disaster Recovery from SOURCE

  • Build Deps

    • wget
    • git
    • unzip
    • bower
    • epel-release
    • mariadb-server
  • Install Deps

sudo yum install wget -y
sudo yum install git -y
sudo yum install unzip -y
sudo yum install epel-release -y
sudo yum install npm -y
sudo yum install mariadb-server -y
  • Install bower
npm install bower
  • Install Java 8
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/8u101-b13/jdk-8u101-linux-x64.rpm" \
-O jdk-8u101-linux-x64.rpm

sudo rpm -Uvh jdk-8u101-linux-x64.rpm
  • Download Play Framework
wget https://downloads.typesafe.com/play/1.4.2/play-1.4.2.zip
  • Unzip Play Framework
unzip play-1.4.2.zip
  • Clone REPO
git clone https://github.com/xandradx/ovirt-engine-disaster-recovery.git
  • Log configuration
sed -i 's/^log4j.appender.Rolling.File=.*/log4j.appender.Rolling.File=\/var\/log\/ovirt-engine-disaster-recovery\/application.log/g' ~/ovirt-engine-disaster-recovery/conf/log4j.properties
sudo mkdir /var/log/ovirt-engine-disaster-recovery/
sudo chown $USER:$USER /var/log/ovirt-engine-disaster-recovery/
  • Install patternfly
cd ~/ovirt-engine-disaster-recovery/
~/node_modules/bower/bin/bower install
  • Install dependencies Java ( Play Framework )
cd ~
~/play-1.4.2/play deps ovirt-engine-disaster-recovery
  • Add firewall rule
sudo firewall-cmd --add-port=9000/tcp
sudo firewall-cmd --add-port=9000/tcp --permanent
sudo mkdir /etc/ovirt-engine-disaster-recovery
sudo ln -s ~/ovirt-engine-disaster-recovery/conf/application.conf /etc/ovirt-engine-disaster-recovery/ovirt-engine-disaster-recovery.conf
~/play-1.4.2/play start ovirt-engine-disaster-recovery

Next Step

Who do I talk to?

About

License:Apache License 2.0


Languages

Language:Java 59.2%Language:HTML 33.3%Language:JavaScript 6.2%Language:CSS 1.3%