[Engine-devel] Building oVirt from source

Stephen Liu satimis at yahoo.com
Fri Nov 16 11:12:43 UTC 2012



----- Original Message -----

> From: Juan Hernandez <jhernand at redhat.com>
> To: Itamar Heim <iheim at redhat.com>; Stephen Liu <satimis at yahoo.com>
> Cc: "engine-devel at ovirt.org" <engine-devel at ovirt.org>
> Sent: Thursday, November 15, 2012 12:43 AM
> Subject: Re: [Engine-devel] Building oVirt from source
>
 -  snip -

> The reason is that the jboss rpm installs the files in
> /usr/share/jboss-as, owned by the root:jboss-as, so a non privileged
> user will not have permission to write to those directories.
> 
> Stephen, what I suggested you to do is to leave the installation of the
> application server in the /home/satimis/jboss-as directory and then
> modify the /home/satimis/.m2/settings.xml file. It should read as follows:
> 
> <settings
>   xmlns="http://maven.apache.org/POM/4.0.0"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/settings-1.0.0.xsd">
> 
>   <activeProfiles>
>     <activeProfile>oVirt</activeProfile>
>   </activeProfiles>
> 
>   <profiles>
>     <profile>
>       <id>oVirt</id>
>       <properties>
>         <jbossHome>/home/satimis/jboss-as</jbossHome>
>       </properties>
>     </profile>
>   </profiles>
> 
> </settings>
> 
> Also you don't need to start the jboss-as service, as ovirt doesn't use
> it. In a development environment you just go to
> /home/satimis/jboss-as/bin and run standalone.sh.
> 
> Also make sure that you own the /home/satimis/jboss-as directory:
> 
> sudo chown --recursive satimis:satimis /home/satimis/jboss-as


Hi Juan,

Thanks for your advice.

Performed following steps:

$ sudo gedit /home/satimis/.m2/settings.xml
change;
<jbossHome>/usr/share/jboss-as</jbossHome>
to
<jbossHome>/home/satimis/jboss-as</jbossHome>


$ sudo chown -R satimis:satimis /home/satimis/jboss-as


I have to re-run following commands;

$> git clone git://gerrit.ovirt.org/ovirt-engine
$> export OVIRT_HOME=$PWD/ovirt-engine
$> cd $OVIRT_HOME/backend/manager/dbscripts
#> ./create_db_devel.sh -u postgres


Build
=====
$> cd $OVIRT_HOME
$> mvn clean install
....
.....
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7:36.078s
[INFO] Finished at: Fri Nov 16 18:22:13 HKT 2012
[INFO] Final Memory: 137M/593M
[INFO] ------------------------------------------------------------------------

There are "test run" failure messages.  Because the text scrolling moving too fast I can't take them down.  Where is the log of "Build"?


Deploy 
======
$> cd $OVIRT_HOME/ear
$> mvn clean install -Pdep,setup
....
....
[INFO] Executed tasks
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.909s
[INFO] Finished at: Fri Nov 16 18:26:49 HKT 2012
[INFO] Final Memory: 13M/246M
[INFO] ------------------------------------------------------------------------


Re-run following command as mentioned in the "Instruction" :
$ mvn clean install -Pdep
....
....
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.236s
[INFO] Finished at: Fri Nov 16 18:29:08 HKT 2012
[INFO] Final Memory: 13M/246M
[INFO] ------------------------------------------------------------------------


Testing 
======

# ./standalone.sh -b 0.0.0.0
-bash: ./standalone.sh: No such file or directory

# ls | grep standalone.sh
no output

# locate standalone.sh
/home/satimis/jboss-as/bin/standalone.sh
/home/satimis/jboss-as/bin/init.d/jboss-as-standalone.sh

It is very strange!  It is there!


I have to run following command to get it;
# cd /home/satimis/jboss-as/bin/
# ls | grep standalone.sh
standalone.sh

Then it is there.


# ./standalone.sh -b 0.0.0.0
....
....
2012-11-16 18:45:51,728 INFO  [org.jboss.as] (MSC service thread 1-4) JBAS015951: Admin console listening on http://127.0.0.1:9990
2012-11-16 18:45:51,732 INFO  [org.jboss.as] (MSC service thread 1-4) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 11328ms - Started 536 of 627 services (90 services are passive or on-demand)
2012-11-16 18:45:51,752 INFO  [org.ovirt.engine.core.bll.InitBackendServicesOnStartupBean] (pool-10-thread-1) MacPoolManager finished: 11/16/12 6:45 PM
2012-11-16 18:45:51,853 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "engine.ear"

It hung here.  I have to press [Ctrl]+c to exit

Neither I found the "Welcome" page.


# hostname
fedora17
# hostname -f
fedora17


On browser I can't start api

http://fedora17:8080/api nor webadmin

Any mistake did I make?


> Let me insist that if the build runs correctly what you will have is an
> environment that you can use for development, it is not suitable or
> designed for using ovirt. If what you want to do is test ovirt from the
> user point of view then I strongly recommend that you use the prebuilt RPMs.

I have another hard drive testing the prebuilt RPMs.  Thanks

B.R.
Stephen L




More information about the Devel mailing list