On 11/16/2012 12:12 PM, Stephen Liu wrote:
----- Original Message -----
> From: Juan Hernandez <jhernand(a)redhat.com>
> To: Itamar Heim <iheim(a)redhat.com>; Stephen Liu <satimis(a)yahoo.com>
> Cc: "engine-devel(a)ovirt.org" <engine-devel(a)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"?
There is no such build log. If you want a log you need to redirect the
build command to a file, something like this:
mvn clean install > build.log
The fact that you see the "BUILD SUCCESS" message means that everything
worked, included the tests, otherwise it would have failed.
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] ------------------------------------------------------------------------
Good, you have it deployed now!
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
That worked just fine, you have to keep the application server running
and go to another terminal windows if you want to run any other thing,
don't press Ctrl+C as that will stop the application server.
By the way, I see the # prompt in the commands that you are using. I
guess that means that you are using the root user to run the application
server. You shouldn't, it is better if you use an unprivileged user. If
you use root it will create log and temporary files owned by root and
then you will not be able to modify or remove them with your normal user.
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?
The port number used by the engine is 8700, not 8080. We changed that
some time ago to avoid conflicts with the default port used by JBoss. So
you have to go to the following URL:
http://fedora17:8700
That should give you the welcome page. If you want to go to the API
directly then use the following:
http://fedora17:8700/api
> 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
--
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
3ºD, 28016 Madrid, Spain
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.