SunOfShine/ovirt-engine
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
Developer mode installation
===========================
PREPARATIONS
------------
PREREQUISITES
Install the following system components:
- jdk-7 / openjdk-7-jdk / icedtea-7
- bash
- openssl
- postgresql-server postgresql
- python-m2crypto / m2crypto
- python-psycopg2 / psycopg
- python-cheetah / cheetah
- python-daemon
- otopi >= 1.0.2
- ovirt-host-deploy
- jboss-as (optional)
- maven-3 (optional)
Maven-3 is required, download and extract if not installed using
distribution package management, and add to PATH.
>=Jboss 7.1.1 is required, download and extract it if not installed
using distribution package management.
POSTGRESQL ACCESSIBILITY
Configure postgresql to accept user and password:
Locate pg_hba.conf within your distribution,
common locations are:
- /var/lib/pgsql/data/pg_hba.conf
- /etc/postgresql-*/pg_hba.conf
- /etc/postgresql/*/main/pg_hba.conf
Within pg_hba.conf set method to 'password' for
127.0.0.1/32 and ::1/128.
restart postgresql service.
DATABASE CREATION
Create database for ovirt-engine, usually the following
sequence should work:
# su - postgres -c "psql -d template1"
template1=# create user engine password 'engine';
template1=# drop database engine;
template1=# create database engine owner engine;
DEVELOPMENT
-----------
ENVIRONMENT
Development environment is supported only under non-root account. Do
not run this sequence as root.
BUILD
To build and install ovirt-engine at your home folder under ovirt-engine
directory, use:
$ make clean install-dev PREFIX=$HOME/ovirt-engine
BUILD TARGETS
clean
Clean project.
install-dev
Install a development environment at PREFIX.
dist
Create source tarball.
BUILD CUSTOMIZATION
The following Makefile environment variables are available for build
customization:
PREFIX [/usr/local]
Installation root directory.
BUILD_GWT [1]
Build GWT.
BUILD_GWT_USERPORTAL [1]
Build user portal if gwt is enabled.
BUILD_GWT_WEBADMIN [1]
Build web admin if gwt is enabled.
BUILD_LOCALES [0]
Build additional locales.
BUILD_TEST_FLAGS [-D skipTests]
By default, unit tests are disabled, to enable specify
BUILD_TEST_FLAGS=""
EXTRA_BUILD_FLAGS_DEV
Any maven build flags requires for building.
For example, if your machine is low on memory, use:
EXTRA_BUILD_FLAGS_DEV="-Dgwt-plugin.localWorkers=2"
EXTRA_BUILD_FLAGS_DEV_GWT [-D gwt.userAgent=gecko1_8]
By default, only the gecko1_8 support is built, building all
permutations is possible by specifying EXTRA_BUILD_FLAGS_DEV_GWT="".
DEV_REBUILD [1]
Disable if only packaging components were modified.
SETUP
To setup the product use the following command:
$ $HOME/ovirt-engine/bin/engine-setup-2
If Jboss is installed not via distribution package management,
add the following parameter, provided JBOSS_HOME environment contains
the location of the Jboss installation:
--jboss-home="${JBOSS_HOME}"
REFRESH
If there are no significant changes, such as file structure or database
schema, there is no need to run the setup again, 'make install-dev <args>'
will overwrite files as required.
Do remember to restart the engine service.
If there is a significant change, safest path is to stop service, remove
$HOME/ovirt-engine directory, build and setup.
The $HOME/ovirt-engine/bin/engine-cleanup-2 is also available to cleanup
the environment, it is useful for application changes, less for packaging
changes.
ADMINISTRATION
Most utilities and services are operational, including PKI, host deploy.
To start/stop the engine service use:
$ $HOME/ovirt-engine/share/ovirt-engine/services/ovirt-engine.py start
While the service is running, this command will not exit.
Press <Ctrl>-C to stop service.
Acess using HTTP or HTTPS:
- http://<server>:8080
- http://<server>:8443
Debug port is available at 127.0.0.1:8787
DAO TESTS
Create empty database for DAO tests refer to DATABASE CREATION.
Provided user is 'engine', psasword is 'engine' and database is engine_dao.
Create empty schema (one time):
$ PGPASSWORD=engine \
./backend/manager/dbscripts/create_schema.sh -d engine_dao -u engine
Upgrade schema (when needed):
$ PGPASSWORD=engine \
./backend/manager/dbscripts/upgrade.sh -u engine -d engine_dao
Run build as:
$ make BUILD_TEST_FLAGS="-P enable-dao-tests \
-D engine.db.username=engine \
-D engine.db.password=engine \
-D engine.db.url=jdbc:postgresql://localhost/engine_dao"
RPM PACKAGING
$ make dist
$ rpmbuild -ts @tarball@
# yum-builddep @srpm@
# rpmbuild -tb @tarball@
The following spec file variables are available for package customization:
ovirt_build_quick [0]
Quick build, best for syntax checks.
ovirt_build_minimal [0]
Build minimal Firefox only package.
ovirt_build_gwt [1]
Build gwt components.
ovirt_build_locales [1]
Build extra locales.
Example:
# rpmbuild -D"ovirt_build_minimal 1" -tb @tarball@