0
Déployer                 sur terre et dans les nuagesseptembre 2012                 Alexis Hassler
@AlexisHasslerDéveloppeur, formateur JavaIndépendantCo-leader du
AlexisHassler
Historique                  1999                  2000   2.0JBoss Group LLC   2001   2.2                  2002   3.0      ...
Startup50 s                              AS 6.045 s                         AS 5.140 s35 s30 s25 s20 s15 s   AS 4.0   AS 4...
Startup                                                Geronimo 2                                                GlassFish...
Startup50 s                              AS 6.045 s                         AS 5.140 s35 s30 s25 s20 s15 s   AS 4.0   AS 4...
Startuphttp://community.jboss.org/wiki/AS7StartupTimeShowdown
LightweightHeap used180 Mo160 Mo140 Mo                     AS 5.1120 Mo                              AS 6.0100 Mo80 Mo60 M...
Configurationfind <profile_dir> -name *.xml | wc -l  160  140  120                      AS 5.1                            ...
Configurationbinclient                     binlib                           bundlesserver     default               module...
Configurationstandalone/configuration/standalone.xml
Configurationserver/default/deploy/hdscanner-jboss-beans.xml                                 server/default/conf/bootstrap...
Configurationstandalone.xmldomain.xml / host.xml*-ds.xml                *-jms.xml  Datasource             Queues & Topics
JBoss Logging  JSF - Mojarra  JAX-WS - CXFJBoss Transaction   Datasource     JavaEE       EJB   CDI - Weld JPA - Hibernate...
JBoss Logging  JSF - Mojarra  JAX-WS - CXFJBoss Transaction   Datasource     JavaEE       EJB   CDI - Weld JPA - Hibernate...
Architecture AS7              JBoss  MSC                        DMR       Controller    Threads             Modules       ...
Déploiement                                            binAutomatique                                 bundles             ...
Déploiement  Manuel   –   auto-deploy-zipped="false"cp demo.war $JBOSS_HOME/standalone/deployments/17:12:24,923 INFO ... F...
Administration Console                CLIHTTP / JSON        Java API
http://<host>:9990/console
jboss-admin.shNaviguer–   cd, ls, pwdLire la configuration–   :read-resource, :read-attribute,...Modifier la configuration...
jboss-admin.shDatasourceDéploiement upload + deploy undeploy
Modules"Classpath is dead!"Mark Reinhold, JavaOne 2009           http://java.sun.com/javaone/2009/general_sessions.jsp
ModulesJava Module–   Projet Jigsaw–   Java SE 8OSGiJBoss Module
ModulesHiérarchie                         Modularité             System                 org.javassist           Classloade...
ModulesModules système–   Java EEModules userLocal ResourceInter deployment dependencies
DéploiementSéparation module / application1 war => 1 module–   deployment.demo.war
Déploiement1 ear => n modules–   ear/lib              <!-- config globale -->–   war       <subsystem xmlns="urn:jboss:dom...
Module globalstandalone.xml ou domain.xml–   Slot = version<subsystem xmlns="urn:jboss:domain:ee:1.0" >  <global-modules> ...
Domain                               Server                    Host                  Controller                           ...
Domain                                         Server                               Server    Group 1                    H...
RHQ                        OS       MySQL                  Mem, CPU, FS                  RHQ            JBoss AS          ...
IDEEclipse 3.7+ avec JBoss ToolsIntelliJ IDEA 11Netbeans 7.2
Cloud          SaaS                 Software  Software as a Service                               Runtime          PaaS   ...
PaaS by redhatJava, Perl, PHP, Python, Ruby
OpenShift–   Git–   < Web profile–   EAP 6
EAP 6OpenShift Origin
CloudbeesJava EE 6 – Web Profile  Uniquement war  Déploiement par lAPI Cloudbees  DD spécifiques Cloudbees
?
Versions intermédiairesJBoss AS 7.0 CR1JBoss AS 7.0.0.Final…JBoss AS 7.1.1.Final
MigrationJBoss AS 6 => JBoss AS 7  cf. E. Hugonnet (@ehsavoie)  Migration de Silverpeas
ModulesLog4J                                           modules                        org.apache.log4j:main Corrigé en 7.1...
AS / EAPJBoss AS 7.1.2  Base pour JBoss EAP 6  Pas de release officielle ! git clone git://github.com/jbossas/jboss-as.git...
Messages derreur{"JBAS014653: Opération composite échouée et annulée. Étapes déficientes :" => {"Opération step-2" => {"JB...
JBoss Logging    standalone.xml<subsystem xmlns="urn:jboss:domain:logging:1.1">  <periodic-rotating-file-handler name="FIL...
Conclusion              1999              2000   2.0              2001   2.2              2002   3.0              2003   3...
http://www.jboss.org/as7.htmlhttp://www.jboss.org/openshift/
Auto-promotionhttp://www.sewatech.fr/formation-jboss-7.html                     16 au 18 octobre 2012 à Lyon
?
JBoss AS 7 : Déployer sur terre et dans les nuages
Upcoming SlideShare
Loading in...5
×

JBoss AS 7 : Déployer sur terre et dans les nuages

1,318

Published on

Présentation au LavaJUG (Clermont-Ferrand), le 13 septembre 2012

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,318
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
27
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "JBoss AS 7 : Déployer sur terre et dans les nuages"

  1. 1. Déployer sur terre et dans les nuagesseptembre 2012 Alexis Hassler
  2. 2. @AlexisHasslerDéveloppeur, formateur JavaIndépendantCo-leader du
  3. 3. AlexisHassler
  4. 4. Historique 1999 2000 2.0JBoss Group LLC 2001 2.2 2002 3.0 2003 3.2 JBoss Inc 2004 4.0 2005 RedHat 2006 2007 4.2 2008 5.0 2009 5.1 2010 6.0 2011 7.0, 6.1 2012 7.1
  5. 5. Startup50 s AS 6.045 s AS 5.140 s35 s30 s25 s20 s15 s AS 4.0 AS 4.210 s 5s 0s
  6. 6. Startup Geronimo 2 GlassFish 290 s GlassFish 3 JBoss 580 s JBoss 670 s Weblogic 1060 s Websphere 750 s40 s30 s20 s10 s 0s http://tiny.cc/agoncal-as-startup (12/2009)
  7. 7. Startup50 s AS 6.045 s AS 5.140 s35 s30 s25 s20 s15 s AS 4.0 AS 4.2 AS 7.110 s AS 7.0 (full) 5s 0s
  8. 8. Startuphttp://community.jboss.org/wiki/AS7StartupTimeShowdown
  9. 9. LightweightHeap used180 Mo160 Mo140 Mo AS 5.1120 Mo AS 6.0100 Mo80 Mo60 Mo40 Mo AS 4.0 AS 4.2 AS 7.1 (full)20 Mo AS 7.0 0 Mo
  10. 10. Configurationfind <profile_dir> -name *.xml | wc -l 160 140 120 AS 5.1 AS 6.0 100 80 60 40 AS 4.0 AS 4.2 20 AS 7.1 0
  11. 11. Configurationbinclient binlib bundlesserver default modules conf standalone data configuration deploy deployers data lib deployments standard lib/ext all domain jbossweb-standalone minimal welcome-contentcommon docs deploy libdocs
  12. 12. Configurationstandalone/configuration/standalone.xml
  13. 13. Configurationserver/default/deploy/hdscanner-jboss-beans.xml server/default/conf/bootstrap/profile.xml
  14. 14. Configurationstandalone.xmldomain.xml / host.xml*-ds.xml *-jms.xml Datasource Queues & Topics
  15. 15. JBoss Logging JSF - Mojarra JAX-WS - CXFJBoss Transaction Datasource JavaEE EJB CDI - Weld JPA - Hibernate Subsystems NamingCache - Infinispan Core Infrastructure JMS - HornetQ Composants AS7 JGroupsJAX-RS - RESTeasyJCA - IronJacamar ...
  16. 16. JBoss Logging JSF - Mojarra JAX-WS - CXFJBoss Transaction Datasource JavaEE EJB CDI - Weld JPA - Hibernate Services Naming Micro containerCache - Infinispan JMS - HornetQ Composants AS6 JGroupsJAX-RS - RESTeasy JCA ...
  17. 17. Architecture AS7 JBoss MSC DMR Controller Threads Modules Server Controller ServiceDeployers VFS Jandex Reflect Cache Repository Core Infrastructure Subsystems
  18. 18. Déploiement binAutomatique bundles modules – idem AS <7 pour les archives standalone configuration – désactivé en mode explosé data deployments lib/extcp demo.war $JBOSS_HOME/standalone/deployments/17:12:24,923 INFO ... Deployed "demo.war"
  19. 19. Déploiement Manuel – auto-deploy-zipped="false"cp demo.war $JBOSS_HOME/standalone/deployments/17:12:24,923 INFO ... Found demo.war ...touch $JBOSS_HOME/standalone/deployments/demo.war.dodeploy17:12:24,923 INFO ... Found demo.war ...
  20. 20. Administration Console CLIHTTP / JSON Java API
  21. 21. http://<host>:9990/console
  22. 22. jboss-admin.shNaviguer– cd, ls, pwdLire la configuration– :read-resource, :read-attribute,...Modifier la configuration– :add-namespace, :write-attribute,...
  23. 23. jboss-admin.shDatasourceDéploiement upload + deploy undeploy
  24. 24. Modules"Classpath is dead!"Mark Reinhold, JavaOne 2009 http://java.sun.com/javaone/2009/general_sessions.jsp
  25. 25. ModulesJava Module– Projet Jigsaw– Java SE 8OSGiJBoss Module
  26. 26. ModulesHiérarchie Modularité System org.javassist ClassloaderUCR org.slf4j JBoss Classloaders org.jboss.weld org.hibernate.core Deployment Deployment Classloader Classloader Sub-deployment deployment.my.war Classloader
  27. 27. ModulesModules système– Java EEModules userLocal ResourceInter deployment dependencies
  28. 28. DéploiementSéparation module / application1 war => 1 module– deployment.demo.war
  29. 29. Déploiement1 ear => n modules– ear/lib <!-- config globale -->– war <subsystem xmlns="urn:jboss:domain:ee:1.0" > <ear-subdeployments-isolated> false– ear </ear-subdeployments-isolated> </subsystem> <!-- jboss-deployment-structure.xml--> <jboss-deployment-structure> <ear-subdeployments-isolated> true </ear-subdeployments-isolated> </jboss-deployment-structure>
  30. 30. Module globalstandalone.xml ou domain.xml– Slot = version<subsystem xmlns="urn:jboss:domain:ee:1.0" > <global-modules> <module name="org.javassist" slot="main" /> </global-modules></subsystem>
  31. 31. Domain Server Host Controller Server Host 1 Domain Controller Host Server ControllerHost 0 Host 2 Host Server Controller Host 3
  32. 32. Domain Server Server Group 1 Host Controller Server Host 1 Server Group 2 Domain Controller Host Server ControllerHost 0 Host 2 Host Server Controller Host 3
  33. 33. RHQ OS MySQL Mem, CPU, FS RHQ JBoss AS Agent Httpd Host 1 RHQ Server RHQ ...Host 0 Agent ... ... ... Host 2
  34. 34. IDEEclipse 3.7+ avec JBoss ToolsIntelliJ IDEA 11Netbeans 7.2
  35. 35. Cloud SaaS Software Software as a Service Runtime PaaS / Platform as a Service Middleware Hardware IaaS +Infrastructure as a Service OS
  36. 36. PaaS by redhatJava, Perl, PHP, Python, Ruby
  37. 37. OpenShift– Git– < Web profile– EAP 6
  38. 38. EAP 6OpenShift Origin
  39. 39. CloudbeesJava EE 6 – Web Profile Uniquement war Déploiement par lAPI Cloudbees DD spécifiques Cloudbees
  40. 40. ?
  41. 41. Versions intermédiairesJBoss AS 7.0 CR1JBoss AS 7.0.0.Final…JBoss AS 7.1.1.Final
  42. 42. MigrationJBoss AS 6 => JBoss AS 7 cf. E. Hugonnet (@ehsavoie) Migration de Silverpeas
  43. 43. ModulesLog4J modules org.apache.log4j:main Corrigé en 7.1.2 org.apache.log4j deployment.my.war war
  44. 44. AS / EAPJBoss AS 7.1.2 Base pour JBoss EAP 6 Pas de release officielle ! git clone git://github.com/jbossas/jboss-as.git cd jboss-as git checkout 7.1.2.Final ./build.sh -DskipTests cp -R build/target/jboss-as-7.1.2.Final /opt/java/
  45. 45. Messages derreur{"JBAS014653: Opération composite échouée et annulée. Étapes déficientes :" => {"Opération step-2" => {"JBAS014771: Servicesavec des dépendances manquantes/non disponibles" => ["jboss.deployment.unit."swmsg-web.war".jboss.security.jaccMissing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.unit."swmsg-web.war".component."org.apache.catalina.servlets.DefaultServlet".START Missing[JBAS014861: <one or more transitivedependencies>]","jboss.naming.context.java.module.swmsg-web.swmsg-web.env.ejb.MessageSecuredMissing[jboss.naming.context.java.app.swmsg-web.swmsg-ejb3."MessageSecuredBean!fr.sewatech.formation.appserv.ejb3.MessageServiceLocal"]","jboss.deployment.unit."swmsg-web.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".START Missing[JBAS014861: <one or more transitivedependencies>]","jboss.naming.context.java.module.swmsg-web.swmsg-web.env.ejb.MessageServiceMissing[jboss.naming.context.java.app.swmsg-web.swmsg-ejb3."MessageServiceBean!fr.sewatech.formation.appserv.ejb3.MessageServiceLocal"]","jboss.naming.context.java.module.swmsg-web.swmsg-web.env.jdbc.sewa-ds Missing[jboss.naming.context.java.SewaDS]","jboss.deployment.unit."swmsg-web.war".jndiDependencyService Missing[JBAS014861: <one or more transitivedependencies>]","jboss.naming.context.java.module.swmsg-web.swmsg-web.env.jms.SWqMissing[jboss.naming.context.java.queue.SWq]","jboss.deployment.unit."swmsg-web.war".component."com.sun.faces.config.ConfigureListener".START Missing[JBAS014861: <one or more transitivedependencies>]","jboss.deployment.unit."swmsg-web.war".component."javax.faces.webapp.FacetTag".STARTMissing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.unit."swmsg-web.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START Missing[JBAS014861: <one or more transitivedependencies>]","jboss.deployment.unit."swmsg-web.war".component."org.apache.jasper.servlet.JspServlet".STARTMissing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.unit."swmsg-web.war".component."fr.sewatech.formation.appserv.web.PageFilter".START Missing[JBAS014861: <one or more transitivedependencies>]","jboss.deployment.unit."swmsg-web.war".component."fr.sewatech.formation.appserv.web.MessageServlet".START Missing[JBAS014861: <one or more transitivedependencies>]","jboss.web.deployment.default-host./swmsg-web Missing[JBAS014861: <one or more transitivedependencies>]"]}}}
  46. 46. JBoss Logging standalone.xml<subsystem xmlns="urn:jboss:domain:logging:1.1"> <periodic-rotating-file-handler name="FILE"> <formatter> <pattern-formatter pattern="%d %-5p [%c] (%t) %s%E%n"/> </formatter> <file relative-to="jboss.server.log.dir" path="server.log"/> <suffix value=".yyyy-MM-dd"/> <append value="true"/> </periodic-rotating-file-handler> <root-logger> <level name="INFO"/> <handlers> <handler name="FILE"/> </handlers> </root-logger></subsystem>
  47. 47. Conclusion 1999 2000 2.0 2001 2.2 2002 3.0 2003 3.2 2004 4.0 2005 2006Glassfish 2 2007 4.2 2008 5.0 2009 5.1Glassfish 3 2010 6.0 2011 7.0, 6.1 2012 7.1
  48. 48. http://www.jboss.org/as7.htmlhttp://www.jboss.org/openshift/
  49. 49. Auto-promotionhttp://www.sewatech.fr/formation-jboss-7.html 16 au 18 octobre 2012 à Lyon
  50. 50. ?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×