Commit ad5e432a authored by Marc Dutoo's avatar Marc Dutoo

studio : added LocalTomcat cloud configuration, improved war deployment & its doc

However compiling apps in Studio doesn't work anymore (whatever the deployment architecture) :

Caused by: org.objectweb.fractal.juliac.api.JuliacRuntimeException: No unique registered service type: org.objectweb.fractal.juliac.api.CompileSupportItf. Got instead: 0
	at org.objectweb.fractal.juliac.conf.JuliacConfig.lookupUnique(JuliacCon
fig.java:670)
parent f45d6fa3
......@@ -24,6 +24,7 @@ Before the first launch, use the phpMyAdmin interface to create a new database f
To do it, use import tab in database manager in the database easysoasimplified.
Or alternatively, you can create & fill the database using command line :
$> mysql -u root -p
$mysql> create database easysoasimplified;
$mysql> quit;
......@@ -31,15 +32,26 @@ Or alternatively, you can create & fill the database using command line :
$> mysql -u root -p easysoasimplified < scriptsSql/init_countries_towns.sql
$> mysql -u root -p easysoasimplified < scriptsSql/init_FileType.sql
Other databases can be used instead of MySQL by changing the configuration properties
and providing the right driver jar, both in pom.xml (see there commented configuration
for PostgreSQL).
If your choice differs from default configuration (PostgreSQL), you have
* to change accordingly properties named "hibernate.*" in webapp configuration
* and provide the right database driver jar.
PREPARING LIBRARIES
The folder documents/frascati-studio/lib must to be created, and inside
it must contain all the common libs used in the majority of FraSCAti applications.
The folder documents/frascati-studio/lib must to be created, and inside it must contain
all libs to be used in the Studio's FraSCAti applications, such as service libraries
commonly used when designing service interfaces or implementing them (JAXRS & JAXWS
annotation jars) or libraries used in custom application templates (EasySOA HTTPProxy).
Unfortunately, there is no automatic process available to do that. The easier way to do that
at this moment is doing a "mvn clean install" in "FraSCAtiWarBuild" pom and
then extract all the jar files inside the generated war file and put them in "documents/frascati-studio/lib" path.
To put such libraries there, you can :
* either list them in the maven-dependency plugin's "copy" goal in the pom.xml file and rebuild
* or put library jars manually there, possibly by extracting them from frascati-studio.war (see
"production deployment" below).
COMPILATION AND EXECUTION
......@@ -50,12 +62,13 @@ Mac and Linux : compile.sh then run.sh
By default, the website is so available at localhost:8095/easySoa . It can be changed in pom file.
To package Studio in production, do a "mvn clean install" in "warBuild" folder. A war file will be generated to be deployed in a Cloud.
To enable remote debugging when running from Maven,
on *nix, do :
export MAVEN_OPTS="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
on Windows, do :
export MAVEN_OPTS="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000"
on Windows, do :
set MAVEN_OPTS=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
......@@ -63,14 +76,69 @@ For the compilation of FraSCAti studio with Easysoa application templates, you c
Windows : compile_with_easysoa_template.bat then run_with_easysoa_template.bat
Mac and Linux : compile_with_easysoa_template.sh then run_with_easysoa_template.sh
These command files activate a Maven profil for the compilation and integration of the Easysoa application templates. This profil, named Easysoa, is disabled by default. It can be activated in a Maven command line by adding the option "-DEasysoa".
These command files activate a Maven profil for the compilation and integration of the Easysoa
application templates. This profil, named Easysoa, is disabled by default. It can be activated
in a Maven command line by adding the option "-DEasysoa".
PROVIDING TARGET FRASCATI CLOUDS
FraSCAti Studio deploys its user-designed applications on FraSCAti clouds that must be provided. A FraSCAti Cloud is a running FraSCAti instance with capabilities for remote deployment and for features used by said applications (ex. binding.ws). FraSCAti Clouds are configured in src/main/resources/properties/deploy.properties .
FraSCAti Studio deploys its user-designed applications on FraSCAti clouds that must be provided.
A FraSCAti Cloud is a running FraSCAti instance with capabilities for remote deployment and for features
used by said applications (ex. binding.ws). FraSCAti Clouds are configured in :
src/main/resources/properties/deploy.properties .
In development, to easily start the "LocalExamples" FraSCAti Cloud, go to src/test/resources/Helloworld and do :
mvn -Pexplorer,remote-fscript -DskipTests
mvn -Pexplorer,remote-fscript -DskipTests
PRODUCTION DEPLOYMENT - STUDIO
To package Studio in production, do a "mvn clean install" in "warBuild/studioWarBuild" folder.
The generated .../target/frascati-studio.war file can then be deployed in an application server.
* in production, these properties can be changed by copying (src/main/resources/)META-INF/persistence.xml
within the webapp to the WEB-INF/classes/META-INF/persistence.xml file and adapting it,
and the database driver has to be added in the webapp's WEB-INF/lib or in your application server's
shared library directory.
*WARNING* for now it only supports to be deployed at application server root url.
Here is how to do it with Apache Tomcat :
Download Tomcat 6 from http://tomcat.apache.org/download-60.cgi and unzip it.
If you want to run EasySOA Registry & use case in parallel, change all 80xx ports to 90xx in conf/server.xml .
Now copy frascati-studio/warBuild/studioWarBuild/target/frascati-studio/* in its webapps/ROOT directory :
rm -rf [TOMCAT_HOME]/webapps/ROOT/*
cp -rf frascati-studio/warBuild/studioWarBuild/target/frascati-studio/* [TOMCAT_HOME]/webapps/ROOT/
Then go in bin/ directory and start it :
cd [TOMCAT_HOME]/bin/
./catalina.sh run
And FraSCAti Studio will be available at http://localhost:7080/ .
PRODUCTION DEPLOYMENT - CLOUD
To package a complete Cloud in production, do a "mvn clean install" in "warBuild/fraSCAtiWarBuild" folder.
The generated .../target/frascati-cloud.war file can then be deployed in an application server.
Here is how to do it with Apache Tomcat :
Download Tomcat and optionally change ports as described above, copy the produced frascati-cloud.war
to the tomcat's webapps/ directory, then go in bin/ directory and start it :
cd [TOMCAT_HOME]/bin/
./catalina.sh run
The FraSCAti Cloud will be available at http://localhost:9080/frascati-cloud , and its FraSCAti Web Explorer
at http://localhost:9080/frascati-cloud/frascati-web-explorer .
FAQ
......
......@@ -24,21 +24,35 @@ Avant la première exécution, créer une nouvelle base de données sur MySQL en
Pour cela, utilisez l'onglet importer en haut du gestion de base de donnees dans la base easysoasimplified.
Ou bien, vous pouvez créer et remplir la base de données en ligne de commande :
$> mysql -u root -p
$mysql> create database easysoasimplified
$mysql> create database easysoasimplified;
$mysql> quit;
$> mysql -u root -p easysoasimplified < scriptsSql/structure_database.sql
$> mysql -u root -p easysoasimplified < scriptsSql/init_countries_towns.sql
$> mysql -u root -p easysoasimplified < scriptsSql/init_countries_towns.sql
$> mysql -u root -p easysoasimplified < scriptsSql/init_FileType.sql
Other databases can be used instead of MySQL by changing the configuration properties
and providing the right driver jar, both in pom.xml (see there commented configuration
for PostgreSQL).
If your choice differs from default configuration (PostgreSQL), you have
* to change accordingly properties named "hibernate.*" in webapp configuration
* and provide the right database driver jar.
PRÉPARATION DE LIBRAIRIES
Le dossier documents/frascati-studio/lib doit être créé, et il doit cotenir toutes les librairies
fréquenment utilisées dans les applications FraSCAti.
à utiliser dans les applications FraSCAti du Studio, telles que les librairies de services
utilisées d'habitude pour concevoir les interfaces de services ou les implémenter (jars
d'annotations JAXRS & JAXWS) ou les librairies utilisées dans des templates d'applications
spécifiques (EasySOA HTTPProxy).
Malheureusement, il n'y a pas de processus automatique pour faire cela. La manière la plus simple est de faire
un "mvn clean install" dans le dossier "FraSCAtiWarBuild" et extraire tous les jars dans le fichier "war" généré
et les mettre dans le dossier "documents/frascati-studio/lib".
Pour y mettre de telles librairies, vous pouvez :
* soit les lister dans le goal "copy" du plugin maven-dependency et recompiler
* ou y mettre les jars des librairies à la main, par exemple en les extrayant du rascati-studio.war
(voir plus bas "déploiement en production").
COMPILATION ET EXECUTION
......@@ -58,20 +72,75 @@ sur Windows, exécuter :
set MAVEN_OPTS=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
Pour la compilation de FraSCAti studio avec les templates d'applications Easysoa, il faut utiliser les scripts suivants :
Pour compiler FraSCAti studio avec les templates d'applications Easysoa, il faut utiliser les scripts suivants :
Windows : compile_with_easysoa_template.bat puis run_with_easysoa_template.bat
Mac et Linux : compile_with_easysoa_template.sh puis run_with_easysoa_template.sh
Ces fichiers de commandes activent un profil maven permettant la compilation et l'intégration des templates Easysoa. Ce profil, nommé Easysoa, est désactivé pae défaut. Il peut etre activé dans une ligne de commande Maven en ajoutant l'option "-DEasysoa".
Ces fichiers de commandes activent un profil maven permettant la compilation et l'intégration des templates
Easysoa. Ce profil, nommé Easysoa, est désactivé pae défaut. Il peut etre activé dans une ligne de commande
Maven en ajoutant l'option "-DEasysoa".
FOURNIR LES CLOUDS FRASCATI CIBLES
FraSCAti Studio déploie les applications conçues par ses utilisateurs sur des clouds FraSCAti qui doivent être fournis. Un cloud FraSCAti est une instance démarrée de FraSCAti avec les fonctionnalités de déploiement distant et celles utilisées par lesdites applications (ex. binding.ws). Les clouds FraSCAti sont configurés dans src/main/resources/properties/deploy.properties .
En développement, pour facilement démarrer le cloud FraSCAti "LocalExamples", aller dans src/test/resources/Helloworld et faire :
FraSCAti Studio déploie les applications conçues par ses utilisateurs sur des clouds FraSCAti qui doivent
être fournis. Un cloud FraSCAti est une instance démarrée de FraSCAti avec les fonctionnalités de déploiement
distant et celles utilisées par lesdites applications (ex. binding.ws). Les clouds FraSCAti sont configurés
dans src/main/resources/properties/deploy.properties .
En développement, pour facilement démarrer le cloud FraSCAti "LocalExamples", aller dans
src/test/resources/Helloworld et faire :
mvn -Pexplorer,remote-fscript -DskipTests
PRODUCTION DEPLOYMENT - STUDIO
To package Studio in production, do a "mvn clean install" in "warBuild/studioWarBuild" folder.
The generated .../target/frascati-studio.war file can then be deployed in an application server.
* in production, these properties can be changed by copying (src/main/resources/)META-INF/persistence.xml
within the webapp to the WEB-INF/classes/META-INF/persistence.xml file and adapting it,
and the database driver has to be added in the webapp's WEB-INF/lib or in your application server's
shared library directory.
*WARNING* for now it only supports to be deployed at application server root url.
Here is how to do it with Apache Tomcat :
Download Tomcat 6 from http://tomcat.apache.org/download-60.cgi and unzip it.
If you want to run EasySOA Registry & use case in parallel, change all 80xx ports to 90xx in conf/server.xml .
Now copy frascati-studio/warBuild/studioWarBuild/target/frascati-studio/* in its webapps/ROOT directory :
rm -rf [TOMCAT_HOME]/webapps/ROOT/*
cp -rf frascati-studio/warBuild/studioWarBuild/target/frascati-studio/* [TOMCAT_HOME]/webapps/ROOT/
Then go in bin/ directory and start it :
cd [TOMCAT_HOME]/bin/
./catalina.sh run
And FraSCAti Studio will be available at http://localhost:7080/ .
PRODUCTION DEPLOYMENT - CLOUD
To package a complete Cloud in production, do a "mvn clean install" in "warBuild/fraSCAtiWarBuild" folder.
The generated .../target/frascati-cloud.war file can then be deployed in an application server.
Here is how to do it with Apache Tomcat :
Download Tomcat and optionally change ports as described above, copy the produced frascati-cloud.war
to the tomcat's webapps/ directory, then go in bin/ directory and start it :
cd [TOMCAT_HOME]/bin/
./catalina.sh run
The FraSCAti Cloud will be available at http://localhost:9080/frascati-cloud , and its FraSCAti Web Explorer
at http://localhost:9080/frascati-cloud/frascati-web-explorer .
FAQ
En cas d'erreur "java.lang.OutOfMemoryError: PermGen space" : augmenter la mémoire PermGen. Si le démarrage est fait par Maven,
......
......@@ -51,6 +51,7 @@
<!--<service.name>r</service.name> <method.name>run</method.name> -->
<frascati.version>${pom.version}</frascati.version>
<!-- juliac.version>2.6-SNAPSHOT</juliac.version --><!-- from FraSCAti root pom -->
<org.ow2.frascati.class>org.ow2.frascati.FraSCAti</org.ow2.frascati.class>
<org.ow2.frascati.bootstrap>org.ow2.frascati.bootstrap.FraSCAti</org.ow2.frascati.bootstrap>
......@@ -64,11 +65,21 @@
BUT FraSCAti works with : slf4j-1.6.2(api,jdk14)
see http://grepcode.com/snapshot/repository.jboss.org/nexus/content/repositories/releases/org.hibernate/hibernate-entitymanager/3.6.0.Final-->
<!-- database conf -->
<!-- NB. it is setup by Maven build resources filtering (must be activated),
see http://www.sonatype.com/books/mvnref-book/reference/resource-filtering-sect-description.html -->
<!-- for mysql : -->
<hibernate.connection.driver_class>com.mysql.jdbc.Driver</hibernate.connection.driver_class>
<hibernate.dialect>org.hibernate.dialect.MySQLDialect</hibernate.dialect>
<hibernate.connection.url>jdbc:mysql://localhost:3306/easysoasimplified</hibernate.connection.url>
<hibernate.connection.username>root</hibernate.connection.username>
<hibernate.connection.password></hibernate.connection.password>
<!-- for postgresql : -->
<!-- hibernate.connection.driver_class>org.postgresql.Driver</hibernate.connection.driver_class>
<hibernate.dialect>org.hibernate.dialect.PostgreSQLDialect</hibernate.dialect>
<hibernate.connection.url>jdbc:postgresql://localhost:5432/axxx_pivotal</hibernate.connection.url>
<hibernate.connection.username>axxx</hibernate.connection.username>
<hibernate.connection.password>axxx</hibernate.connection.password -->
</properties>
......@@ -386,11 +397,19 @@
<artifactId>maven-invoker</artifactId>
<version>2.0.11</version>
</dependency>
<!-- database driver : -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.14</version>
</dependency>
<!-- dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.1-901-1.jdbc4</version>
</dependency -->
<dependency>
<groupId>org.scribe</groupId>
<artifactId>scribe</artifactId>
......
Jelastic=http://frascati-deployment.jelastic.com/deploy#http://frascati-deployment.jelastic.com/frascati-web-explorer
Local=http://localhost:8095/deploy#http://localhost:8095/frascati-web-explorer
LocalExamples=http://localhost:8765/deploy#http://localhost:8765/frascati-web-explorer
\ No newline at end of file
LocalExamples=http://localhost:8765/deploy#http://localhost:8765/frascati-web-explorer
LocalTomcat=http://localhost:7080/frascati-cloud/deploy#http://localhost:7080/frascati-cloud/frascati-web-explorer
......@@ -44,6 +44,15 @@
<dependencies>
<!-- NB. frascati-web-explorer & remote deployment deps through parent FraSCAti Studio -->
<!-- OW2 FraSCAti Runtime Factory is not required-->
<!-- dependency>
<groupId>org.ow2.frascati</groupId>
<artifactId>frascati-runtime-factory</artifactId>
<version>${project.version}</version>
</dependency -->
<!-- OW2 FraSCAti Fractal Implementation. -->
<dependency>
<groupId>org.ow2.frascati</groupId>
......@@ -58,12 +67,12 @@
<version>${project.version}</version>
</dependency>
<!-- OW2 FraSCAti Binding JMS Module. -->
<dependency>
<!-- OW2 FraSCAti Binding JMS Module. NOT REQUIRED FOR NOW -->
<!-- dependency>
<groupId>org.ow2.frascati</groupId>
<artifactId>frascati-binding-jms</artifactId>
<version>${project.version}</version>
</dependency>
</dependency -->
<!-- OW2 FraSCAti Interface WSDL Module. -->
<dependency>
......@@ -120,5 +129,8 @@
</dependencies>
<build>
<finalName>frascati-cloud</finalName>
</build>
</project>
\ No newline at end of file
</project>
......@@ -24,5 +24,9 @@
</dependency>
</dependencies>
<build>
<finalName>frascati-studio</finalName>
</build>
</project>
\ No newline at end of file
</project>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment