11 Replies Latest reply on Mar 12, 2013 6:21 AM by logoff

    AS7 provides initial runtime support for Karaf based products

    thomas.diesler

      Folks,

       

      as of today AS7 provides initial runtime support for Karaf based products. If you have a clean AS7 build you can do

       

      > cd build-modular
      > mvn -Dmodular=karaf clean install
      

       

      in separate console you can then start the server

       

      > cd target/jboss-as-karaf-7.2.0.Alpha1-SNAPSHOT
      > bin/standalone.sh
      ...
      15:59:46,676 INFO  [org.jboss.osgi.framework] (MSC service thread 1-3) JBOSGI011011: Starting bundles for start level: 1
      15:59:46,725 INFO  [org.jboss.osgi.framework] (MSC service thread 1-3) JBOSGI011002: Bundle started: org.apache.felix.log:1.0.0
      15:59:46,762 INFO  [org.jboss.osgi.framework] (MSC service thread 1-3) JBOSGI011002: Bundle started: jboss-osgi-logging:1.0.0
      15:59:46,822 INFO  [org.jboss.osgi.framework] (MSC service thread 1-3) JBOSGI011002: Bundle started: org.apache.felix.configadmin:1.2.8
      15:59:46,841 INFO  [org.jboss.osgi.framework] (MSC service thread 1-3) JBOSGI011002: Bundle started: jboss-as-osgi-configadmin:7.2.0.Alpha1-SNAPSHOT
      15:59:46,851 INFO  [org.jboss.osgi.framework] (MSC service thread 1-3) JBOSGI011002: Bundle started: org.apache.servicemix.bundles.asm:3.3.1.1
      15:59:46,853 INFO  [org.jboss.osgi.framework] (MSC service thread 1-3) JBOSGI011002: Bundle started: org.apache.aries.util:0.3.1
      15:59:46,875 INFO  [org.jboss.osgi.framework] (MSC service thread 1-3) JBOSGI011002: Bundle started: org.apache.aries.proxy:0.3.1
      15:59:47,015 INFO  [org.apache.aries.blueprint.container.BlueprintExtender] (MSC service thread 1-3) No quiesce support is available, so blueprint components will not participate in quiesce operations
      15:59:47,084 INFO  [org.jboss.osgi.framework] (MSC service thread 1-3) JBOSGI011002: Bundle started: org.apache.aries.blueprint:0.3.2
      15:59:47,104 INFO  [org.jboss.osgi.framework] (MSC service thread 1-3) JBOSGI011002: Bundle started: org.apache.karaf.jaas.config:2.2.9
      15:59:47,112 INFO  [org.jboss.osgi.framework] (MSC service thread 1-3) JBOSGI011002: Bundle started: org.apache.karaf.jaas.modules:2.2.9
      15:59:47,251 INFO  [org.jboss.osgi.framework] (MSC service thread 1-3) JBOSGI011002: Bundle started: org.apache.karaf.shell.console:2.2.9
      15:59:47,261 INFO  [org.jboss.osgi.framework] (MSC service thread 1-3) JBOSGI011002: Bundle started: org.apache.karaf.shell.commands:2.2.9
      15:59:47,270 INFO  [org.jboss.osgi.framework] (MSC service thread 1-3) JBOSGI011002: Bundle started: org.apache.karaf.shell.osgi:2.2.9
      15:59:47,273 INFO  [org.jboss.osgi.framework] (MSC service thread 1-3) JBOSGI011002: Bundle started: org.apache.mina.core:2.0.1
      15:59:47,276 INFO  [org.jboss.osgi.framework] (MSC service thread 1-3) JBOSGI011002: Bundle started: org.apache.sshd.core:0.7.0
      15:59:47,286 INFO  [org.jboss.osgi.framework] (MSC service thread 1-3) JBOSGI011002: Bundle started: org.apache.karaf.shell.ssh:2.2.9
      15:59:47,288 INFO  [org.jboss.osgi.framework] (MSC service thread 1-3) JBOSGI011000: OSGi Framework started
      

       

      and finally connect using your favorite SSH client

       

      [tdiesler@tdvaio build-modular]$ ssh -o StrictHostKeyChecking=no -p 8101 localhost
      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
      @    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
      IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
      Someone could be eavesdropping on you right now (man-in-the-middle attack)!
      It is also possible that a host key has just been changed.
      The fingerprint for the DSA key sent by the remote host is
      a1:98:65:83:ff:ee:c2:e7:ad:23:77:31:55:b1:4e:af.
      Please contact your system administrator.
      Add correct host key in /home/tdiesler/.ssh/known_hosts to get rid of this message.
      Offending DSA key in /home/tdiesler/.ssh/known_hosts:16
      Password authentication is disabled to avoid man-in-the-middle attacks.
      Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
              __ __                  ____      
             / //_/____ __________ _/ __/      
            / ,<  / __ `/ ___/ __ `/ /_        
           / /| |/ /_/ / /  / /_/ / __/        
          /_/ |_|\__,_/_/   \__,_/_/         
      
        Apache Karaf (2.2.9)
      
      Hit '<tab>' for a list of available commands
      and '[cmd] --help' for help on a specific command.
      Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown Karaf.
      
      tdiesler@root> 
      

       

      For complete support, please monitor AS7-5918

       

      cheers

      --thomas

        • 1. Re: AS7 provides initial runtime support for Karaf based products
          spagop

          Hi Thomas,  I love this integration with karaf.  Cheers

          • 2. Re: AS7 provides initial runtime support for Karaf based products
            ulrichromahn

            This is absolutely awesome!!!

             

            Can't wait to check it out.

             

            I was looking forward to use the Karaf features support again since it provides some great and very convenient capabilities for deployment.

            • 3. Re: AS7 provides initial runtime support for Karaf based products
              ulrichromahn

              Just as a FYI for other folks...

               

              I tried it out and got the following error:

               

              > mvn -Dmodular=kara clean install

              [INFO] Scanning for projects...

              [INFO]                                                                       

              [INFO] ------------------------------------------------------------------------

              [INFO] Building JBoss Application Server: Build Modular 7.2.0.Alpha1-SNAPSHOT

              [INFO] ------------------------------------------------------------------------

              [INFO]

              ....

              [INFO] ------------------------------------------------------------------------

              [INFO] BUILD FAILURE

              [INFO] ------------------------------------------------------------------------

              [INFO] Total time: 20.873s

              [INFO] Finished at: Mon Nov 12 11:32:11 PST 2012

              [INFO] Final Memory: 15M/167M

              [INFO] ------------------------------------------------------------------------

              [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (modular-config) on project jboss-as-build-modular:
              An Ant BuildException has occured: Warning: Could not find file /home/uromahn/.ssh/authorized_keys to copy. -> [Help 1]

               

              I did not have used ssh on my box yet so the file 'authorized_keys' did not exist yet.

              • 4. Re: AS7 provides initial runtime support for Karaf based products
                thomas.diesler

                Yes, this was expected. See https://issues.jboss.org/browse/AS7-5931

                • 5. Re: AS7 provides initial runtime support for Karaf based products
                  mvecera

                  Hello Thomas, this is a great achievement! I tried that and it works like a charm. Btw. what is the expected speed of starting the bundles? It took ~30s on my old Lenovo T61. Is this because of the speed of Karaf?

                  I would also like to thank you for your presentation in Brno the other week (even though the projector was not available ;-)).

                  • 6. Re: AS7 provides initial runtime support for Karaf based products
                    mishra900

                    Hi,

                     

                    I am using Jboss As 7.1.1-Final on windows .  so can i

                     

                    > cd build-modular
                    > mvn -Dmodular=karaf clean install
                    

                     

                    i mean does this work with Jboss As 7.1.1-Final    ?  or, do i need to use jboss-as-karaf-7.2.0.Alpha1-SNAPSHOT ?

                     

                    is there any link to this particulare jboss build ...?

                    • 7. Re: AS7 provides initial runtime support for Karaf based products
                      thomas.diesler

                      Martin,

                       

                      bootstrap performance is a general concern - so it'd be good to find out where that time is spent - on my Vaio laptop it takes ~7sec. The Karaf capabilities are provisioned via the OSGi Repository, which delegates to a maven repository if it cannot find the respective bundles locally. Maybe you are seeing the slow boottime because of a maven remote access (i.e. download time). If that's the case the second boot should be much faster.

                       

                      I would also like to thank you for your presentation in Brno the other week

                       

                      It was a true pleasure - thank you.

                      • 8. Re: AS7 provides initial runtime support for Karaf based products
                        thomas.diesler

                        We are talking in the context of the latest jboss-as/master build.

                        7.1.1 is out of the picture.

                        • 9. Re: AS7 provides initial runtime support for Karaf based products
                          logoff

                          I tried it with a clean checkout of jboss-as 7.2.0.Final-prerelease1 and it gave me this error:

                           

                          [INFO] Scanning for projects...
                          [INFO]                                                                         
                          [INFO] ------------------------------------------------------------------------
                          [INFO] Building JBoss Application Server: Build Modular 7.2.0.Final
                          [INFO] ------------------------------------------------------------------------
                          [INFO] 
                          [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ jboss-as-build-modular ---
                          [INFO] 
                          [INFO] --- maven-enforcer-plugin:1.2:enforce (ban-bad-dependencies) @ jboss-as-build-modular ---
                          [INFO] 
                          [INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-java-version) @ jboss-as-build-modular ---
                          [INFO] 
                          [INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven-version) @ jboss-as-build-modular ---
                          [INFO] 
                          [INFO] --- buildnumber-maven-plugin:1.2:create-timestamp (get-build-timestamp) @ jboss-as-build-modular ---
                          [INFO] 
                          [INFO] --- buildnumber-maven-plugin:1.2:create (get-scm-revision) @ jboss-as-build-modular ---
                          [INFO] Checking for local modifications: skipped.
                          [INFO] Updating project files from SCM: skipped.
                          [INFO] Executing: /bin/sh -c cd /home/logoff/soft/jboss-as/build-modular && git rev-parse --verify HEAD
                          [INFO] Working directory: /home/logoff/soft/jboss-as/build-modular
                          [INFO] Storing buildNumber: 4ed76ceef253c568b7475780a92e49a034f540c5 at timestamp: 1362997311876
                          [INFO] Executing: /bin/sh -c cd /home/logoff/soft/jboss-as/build-modular && git rev-parse --verify HEAD
                          [INFO] Working directory: /home/logoff/soft/jboss-as/build-modular
                          [INFO] Storing buildScmBranch: UNKNOWN
                          [INFO] 
                          [INFO] --- maven-antrun-plugin:1.7:run (modular-config) @ jboss-as-build-modular ---
                          [INFO] Executing tasks
                          
                          
                          main:
                          
                          
                          init:
                          
                          
                          init.standalone:
                          
                          
                          generate-standalone-configs:
                               [echo] Generate subsystems definition for logging:osgi,osgi:karaf,configadmin to /home/logoff/soft/jboss-as/build-modular/target/standalone-subsystems.xml
                               [echo] Generate module dependencies from /home/logoff/soft/jboss-as/build-modular/target/standalone-subsystems.xml to /home/logoff/soft/jboss-as/build-modular/target/standalone-module-dependencies.txt
                               [echo] Static modules: [org.jboss.as.standalone,org.jboss.as.domain-http-error-context,,,   org.jboss.logging,   org.jboss.vfs,   org.slf4j,   org.jboss.logging.jul-to-slf4j-stub]
                               [java] Exception in thread "main" java.io.FileNotFoundException: /home/logoff/soft/jboss-as/build-modular/../build/src/main/resources/modules/org/jboss/as/logging/main/module.xml (No such file or directory)
                               [java]           at java.io.FileInputStream.open(Native Method)
                               [java]           at java
                               [java] .io.FileInputStream.<init>(FileInputStream.java:120)
                               [java]           at org.jboss.as.config.assembly.ModuleParser.parse(ModuleParser.java:61)
                               [java]           at org.jboss.as.config.assembly.GenerateModulesDefinition.processModuleDependency(GenerateModulesDefinition.java:193)
                               [java]           at org.jboss.as.config.assembly.GenerateModulesDefinition.process(GenerateModulesDefinition.java:130)
                               [java]           at org.jboss.as.config.assembly.GenerateModulesDefinition.main(GenerateModulesDefinition.java:104)
                               [java] Java Result: 1
                               [echo] Merging standalone configuration/standalone/template-osgi.xml and /home/logoff/soft/jboss-as/build-modular/target/standalone-subsystems.xml into /home/logoff/soft/jboss-as/build-modular/target/standalone.xml, using StandaloneMain
                          
                          
                          init.domain:
                          
                          
                          generate-domain-configs:
                          
                          
                          build-standalone-server:
                              [mkdir] Created dir: /home/logoff/soft/jboss-as/build-modular/target/jboss-as-karaf-7.2.0.Final
                               [copy] Copying 241 files to /home/logoff/soft/jboss-as/build-modular/target/jboss-as-karaf-7.2.0.Final
                               [copy] Copied 43 empty directories to 4 empty directories under /home/logoff/soft/jboss-as/build-modular/target/jboss-as-karaf-7.2.0.Final
                               [copy] Copying 1 file to /home/logoff/soft/jboss-as/build-modular/target/jboss-as-karaf-7.2.0.Final/standalone/configuration
                          [INFO] ------------------------------------------------------------------------
                          [INFO] BUILD FAILURE
                          [INFO] ------------------------------------------------------------------------
                          [INFO] Total time: 7.356s
                          [INFO] Finished at: Mon Mar 11 11:21:54 CET 2013
                          [INFO] Final Memory: 13M/118M
                          [INFO] ------------------------------------------------------------------------
                          [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (modular-config) on project jboss-as-build-modular: An Ant BuildException has occured: The following error occurred while executing this line:
                          [ERROR] /home/logoff/soft/jboss-as/build-modular/build-modular-config.xml:113: Includesfile /home/logoff/soft/jboss-as/build-modular/target/standalone-module-dependencies.txt not found.
                          [ERROR] around Ant part ...<ant antfile="build-modular-config.xml" inheritRefs="true">... @ 4:62 in /home/logoff/soft/jboss-as/build-modular/target/antrun/build-main.xml
                          [ERROR] -> [Help 1]
                          [ERROR] 
                          [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
                          [ERROR] Re-run Maven using the -X switch to enable full debug logging.
                          [ERROR] 
                          [ERROR] For more information about the errors and possible solutions, please read the following articles:
                          [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
                          

                           

                          It is possible to build JBoss AS 7.2.0.Final-prerelease1 or any version with Apache Karaf support?

                          • 10. Re: AS7 provides initial runtime support for Karaf based products
                            thomas.diesler
                            • 11. Re: AS7 provides initial runtime support for Karaf based products
                              logoff

                              OK, I created this issue.