Whirr
  1. Whirr
  2. WHIRR-436

Allow Whirr to run from inside OSGi

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Component/s: None
    • Labels:
      None

      Description

      Issue WHIRR-429 gave me the idea that it would be great to run Whirr inside an OSGi environment.

      1. karaf.log
        123 kB
        Andrei Savu
      2. packages-import.log
        74 kB
        Andrei Savu
      3. WHIRR-436.patch
        147 kB
        Andrei Savu
      4. WHIRR-436-patch.txt
        124 kB
        Ioannis Canellos
      5. WHIRR-436-update-1.patch
        148 kB
        Ioannis Canellos
      6. WHIRR-436-update-2-patch.txt
        151 kB
        Ioannis Canellos
      7. WHIRR-436-update-3-patch.txt
        136 kB
        Ioannis Canellos

        Issue Links

          Activity

          Tom White made changes -
          Fix Version/s 0.8.0 [ 12321649 ]
          Fix Version/s 0.8.0-alpha.1 [ 12318880 ]
          Andrei Savu made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Andrei Savu added a comment -

          Committed to trunk! Thanks Ioannis! Please open a follow-up issue for adding a live test.

          Show
          Andrei Savu added a comment - Committed to trunk! Thanks Ioannis! Please open a follow-up issue for adding a live test.
          Hide
          Andrei Savu added a comment -

          +1 it works (and worked) as expected. Sorry for all the trouble - I've done a bunch of mistakes while testing.

          Show
          Andrei Savu added a comment - +1 it works (and worked) as expected. Sorry for all the trouble - I've done a bunch of mistakes while testing.
          Andrei Savu made changes -
          Attachment packages-import.log [ 12513302 ]
          Attachment karaf.log [ 12513303 ]
          Hide
          Andrei Savu added a comment -

          I have attached the Karaf log the out for packages:import.

          Show
          Andrei Savu added a comment - I have attached the Karaf log the out for packages:import.
          Hide
          Andrei Savu added a comment -

          Unfortunately I was unable to start a ZooKeeper cluster from Karaf:

          karaf@root> features:addurl mvn:org.apache.whirr.karaf/apache-whirr/0.8.0-SNAPSHOT/xml/features
          karaf@root> features:install whirr
          karaf@root> features:install whirr-zookeeper
          karaf@root> whirr:launch-cluster --config /Users/andreisavu/src/whirr/recipes/zookeeper-ec2.properties
          Error executing command: com.google.inject.internal.util.$ComputationException: java.lang.NoClassDefFoundError: org/jclouds/aws/AWSResponseException
          karaf@root> feature
          feature:add-url              feature:info                 feature:install              feature:list                 
          feature:list-repository      feature:list-url             feature:list-version         feature:refresh-url          
          feature:remove-repository    feature:remove-url           feature:uninstall            features:addurl              
          features:info                features:install             features:list                features:listrepositories    
          features:listurl             features:listversions        features:refreshurl          features:removerepository    
          features:removeurl           features:uninstall           
          karaf@root> features:list
          State         Version           Name                                  Repository             Description
          [installed  ] [0.8.0-SNAPSHOT ] whirr                                 repo-0                 Apache Whirr Core
          [uninstalled] [0.8.0-SNAPSHOT ] whirr-cassandra                       repo-0                 Apache Whirr Cassandra Service
          [uninstalled] [0.8.0-SNAPSHOT ] whirr-chef                            repo-0                 Apache Whirr Chef Service
          [uninstalled] [0.8.0-SNAPSHOT ] whirr-elasticsearch                   repo-0                 Apache Whirr ElasticSearch Service
          [uninstalled] [0.8.0-SNAPSHOT ] whirr-ganglia                         repo-0                 Apache Whirr Ganglia Service
          [installed  ] [0.8.0-SNAPSHOT ] whirr-hadoop                          repo-0                 Apache Whirr Hadoop Service
          [installed  ] [0.8.0-SNAPSHOT ] whirr-hbase                           repo-0                 Apache Whirr Hbase Service
          [uninstalled] [0.8.0-SNAPSHOT ] whirr-hama                            repo-0                 Apache Whirr Hama Service
          [uninstalled] [0.8.0-SNAPSHOT ] whirr-mahout                          repo-0                 Apache Whirr Mahout Service
          [uninstalled] [0.8.0-SNAPSHOT ] whirr-puppet                          repo-0                 Apache Whirr Puppet Service
          [uninstalled] [0.8.0-SNAPSHOT ] whirr-voldemort                       repo-0                 Apache Whirr Voldermort Service
          [installed  ] [0.8.0-SNAPSHOT ] whirr-zookeeper                       repo-0                 Apache Whirr Zookeeper Service
          [uninstalled] [0.3            ] transaction                           karaf-enterprise-2.2.5 OSGi Transaction Manager
          [uninstalled] [0.3            ] jpa                                   karaf-enterprise-2.2.5 OSGi Persistence Container
          [uninstalled] [0.3            ] jndi                                  karaf-enterprise-2.2.5 OSGi Service Registry JNDI access
          [uninstalled] [0.3            ] application-without-isolation         karaf-enterprise-2.2.5 
          [installed  ] [3.0            ] guice                                 jclouds-1.3.1          Google Guice
          [installed  ] [1.3.1          ] jclouds                               jclouds-1.3.1          JClouds
          [installed  ] [1.3.1          ] jclouds-compute                       jclouds-1.3.1          JClouds Compute
          [uninstalled] [1.3.1          ] jclouds-api-filesystem                jclouds-1.3.1          JClouds - API - FileSystem
          [uninstalled] [1.3.1          ] jclouds-api-eucalyptus                jclouds-1.3.1          JClouds - API - Eucalyptus
          [uninstalled] [1.3.1          ] jclouds-api-elasticstack              jclouds-1.3.1          JClouds - API - Elasticstack
          [uninstalled] [1.3.1          ] jclouds-api-vcloud                    jclouds-1.3.1          JClouds - API - Vcloud
          [uninstalled] [1.3.1          ] jclouds-api-byon                      jclouds-1.3.1          JClouds - API - Byon
          [uninstalled] [1.3.1          ] jclouds-api-nova                      jclouds-1.3.1          JClouds - API - Nova
          [uninstalled] [1.3.1          ] jclouds-driver-jsch                   jclouds-1.3.1          JClouds - Drivers - Jsch
          [installed  ] [1.3.1          ] jclouds-driver-sshj                   jclouds-1.3.1          JClouds - Drivers - Sshj
          [installed  ] [1.3.1          ] jclouds-driver-slf4j                  jclouds-1.3.1          JClouds - Drivers - Slf4j
          [installed  ] [1.3.1          ] jclouds-driver-log4j                  jclouds-1.3.1          JClouds - Drivers - Slf4j
          [installed  ] [1.3.1          ] jclouds-driver-bouncycastle           jclouds-1.3.1          JClouds - Drivers - Bouncycastle
          [uninstalled] [1.3.1          ] jclouds-aws-cloudwatch                jclouds-1.3.1          Amazon Web Service - Cloudwatch
          [installed  ] [1.3.1          ] jclouds-aws-ec2                       jclouds-1.3.1          Amazon Web Service - EC2
          [installed  ] [1.3.1          ] jclouds-aws-s3                        jclouds-1.3.1          Amazon Web Service - S3
          [uninstalled] [1.3.1          ] jclouds-azureblob                     jclouds-1.3.1          Azureblob
          [uninstalled] [1.3.1          ] jclouds-bluelock-vcloud-zone01        jclouds-1.3.1          vCloud implementation targeted to Bluelock vCloud Zone01
          [uninstalled] [1.3.1          ] jclouds-cloudfiles-uk                 jclouds-1.3.1          Cloudfiles UK
          [uninstalled] [1.3.1          ] jclouds-cloudfiles-us                 jclouds-1.3.1          Cloudfiles US
          [uninstalled] [1.3.1          ] jclouds-cloudloadbalancers-us         jclouds-1.3.1          Cloud Load Balancers US
          [uninstalled] [1.3.1          ] jclouds-cloudonestorage               jclouds-1.3.1          Cloud One Storage
          [uninstalled] [1.3.1          ] jclouds-cloudserver-uk                jclouds-1.3.1          Cloudservers UK
          [uninstalled] [1.3.1          ] jclouds-cloudserver-us                jclouds-1.3.1          Cloudservers US
          [uninstalled] [1.3.1          ] jclouds-cloudsigma-zrh                jclouds-1.3.1          CloudSigma ZRH
          [uninstalled] [1.3.1          ] jclouds-cloudsigma-lvs                jclouds-1.3.1          CloudSigma ZRH
          [uninstalled] [1.3.1          ] jclouds-elastichosts-lon-b            jclouds-1.3.1          Elastichosts Bluesquare London
          [uninstalled] [1.3.1          ] jclouds-elastichosts-lon-p            jclouds-1.3.1          Elastichosts Peer1 London
          [uninstalled] [1.3.1          ] jclouds-elastichosts-sat-p            jclouds-1.3.1          Elastichosts Peer1 San Antonio
          [uninstalled] [1.3.1          ] jclouds-elastichosts-lax-p            jclouds-1.3.1          Elastichosts Peer1 Los Angeles
          [uninstalled] [1.3.1          ] jclouds-elastichosts-tor-p            jclouds-1.3.1          Elastichosts Peer1 Toronto
          [uninstalled] [1.3.1          ] jclouds-eucalyptus-s3                 jclouds-1.3.1          Eucalyptus Partner - S3
          [uninstalled] [1.3.1          ] jclouds-eucalyptus-ec2                jclouds-1.3.1          Eucalyptus Partner - EC2
          [uninstalled] [1.3.1          ] jclouds-gogrid                        jclouds-1.3.1          GoGrid
          [uninstalled] [1.3.1          ] jclouds-go2cloud-jhb1                 jclouds-1.3.1          Go2Cloud implementation targeted to Johannesburg1
          [uninstalled] [1.3.1          ] jclouds-greenhousedata-element-vcloud jclouds-1.3.1          Green House Data Element vCloud
          [uninstalled] [1.3.1          ] jclouds-hpcloud-objectstorage-lvs     jclouds-1.3.1          HP Cloud Object Storage in Las Vegas
          [uninstalled] [1.3.1          ] jclouds-ninefold-storage              jclouds-1.3.1          Ninefold Storage
          [uninstalled] [1.3.1          ] jclouds-ninefold-compute              jclouds-1.3.1          Ninefold Compute
          [uninstalled] [1.3.1          ] jclouds-openhosting-east1             jclouds-1.3.1          Open Hosting for East1
          [uninstalled] [1.3.1          ] jclouds-rimuhosting                   jclouds-1.3.1          ComputeService implementation of RimuHosting datacenters
          [uninstalled] [1.3.1          ] jclouds-savvis-symphonyvpdc           jclouds-1.3.1          Savvis Symphony VPDC
          [uninstalled] [1.3.1          ] jclouds-serverlove-z1-man             jclouds-1.3.1          Serverlove implementation targeted to Manchester
          [uninstalled] [1.3.1          ] jclouds-skalicloud-sdg-my             jclouds-1.3.1          SkaliCloud implementation targeted to Malaysia
          [uninstalled] [1.3.1          ] jclouds-softlayer                     jclouds-1.3.1          Components to access SoftLayer
          [uninstalled] [1.3.1          ] jclouds-slicehost                     jclouds-1.3.1          ComputeService implementation of Slicehost datacenters
          [uninstalled] [1.3.1          ] jclouds-synaptic-storage              jclouds-1.3.1          Synaptic Storage as a Service
          [uninstalled] [1.3.1          ] jclouds-stratogen-vcloud-mycloud      jclouds-1.3.1          vCloud implementation targeted to StratoGen vCloud MyCloud
          [uninstalled] [1.3.1          ] jclouds-trmk-ecloud                   jclouds-1.3.1          Terremark Enterprise Cloud
          [uninstalled] [1.3.1          ] jclouds-trmk-vcloudexpress            jclouds-1.3.1          Terremark vCloud Express
          [uninstalled] [1.3.1          ] jclouds-services                      jclouds-1.3.1          OSGi Service Factories for JClouds
          [uninstalled] [1.3.1          ] jclouds-commands                      jclouds-1.3.1          Karaf Commands for JClouds
          [uninstalled] [1.3.1          ] jclouds-url-handler                   jclouds-1.3.1          Url Handler for JClouds Blobs
          [uninstalled] [2.2.5          ] karaf-framework                       karaf-2.2.5            
          [uninstalled] [2.5.6.SEC02    ] spring                                karaf-2.2.5            
          [uninstalled] [2.5.6.SEC02    ] spring-web                            karaf-2.2.5            
          [uninstalled] [3.0.6.RELEASE  ] spring                                karaf-2.2.5            
          [uninstalled] [3.0.6.RELEASE  ] spring-aspects                        karaf-2.2.5            
          [uninstalled] [1.2.1          ] spring-dm                             karaf-2.2.5            
          [uninstalled] [1.2.1          ] spring-dm-web                         karaf-2.2.5            
          [uninstalled] [3.0.6.RELEASE  ] spring-instrument                     karaf-2.2.5            
          [uninstalled] [3.0.6.RELEASE  ] spring-jdbc                           karaf-2.2.5            
          [uninstalled] [3.0.6.RELEASE  ] spring-jms                            karaf-2.2.5            
          [uninstalled] [3.0.6.RELEASE  ] spring-struts                         karaf-2.2.5            
          [uninstalled] [3.0.6.RELEASE  ] spring-test                           karaf-2.2.5            
          [uninstalled] [3.0.6.RELEASE  ] spring-orm                            karaf-2.2.5            
          [uninstalled] [3.0.6.RELEASE  ] spring-oxm                            karaf-2.2.5            
          [uninstalled] [3.0.6.RELEASE  ] spring-tx                             karaf-2.2.5            
          [uninstalled] [3.0.6.RELEASE  ] spring-web                            karaf-2.2.5            
          [uninstalled] [3.0.6.RELEASE  ] spring-web-portlet                    karaf-2.2.5            
          [uninstalled] [2.2.5          ] wrapper                               karaf-2.2.5            
          [uninstalled] [2.2.5          ] obr                                   karaf-2.2.5            
          [installed  ] [2.2.5          ] config                                karaf-2.2.5            
          [uninstalled] [7.5.4.v20111024] jetty                                 karaf-2.2.5            
          [uninstalled] [2.2.5          ] http                                  karaf-2.2.5            
          [uninstalled] [2.2.5          ] war                                   karaf-2.2.5            
          [installed  ] [2.2.5          ] kar                                   karaf-2.2.5            
          [uninstalled] [2.2.5          ] webconsole-base                       karaf-2.2.5            
          [uninstalled] [2.2.5          ] webconsole                            karaf-2.2.5            
          [installed  ] [2.2.5          ] ssh                                   karaf-2.2.5            
          [installed  ] [2.2.5          ] management                            karaf-2.2.5            
          [uninstalled] [2.2.5          ] eventadmin                            karaf-2.2.5            
          [uninstalled] [2.2.5          ] jasypt-encryption                     karaf-2.2.5            
          karaf@root> 
          
          

          Any ideas? I guess there are some missing imports.

          Show
          Andrei Savu added a comment - Unfortunately I was unable to start a ZooKeeper cluster from Karaf: karaf@root> features:addurl mvn:org.apache.whirr.karaf/apache-whirr/0.8.0-SNAPSHOT/xml/features karaf@root> features:install whirr karaf@root> features:install whirr-zookeeper karaf@root> whirr:launch-cluster --config /Users/andreisavu/src/whirr/recipes/zookeeper-ec2.properties Error executing command: com.google.inject.internal.util.$ComputationException: java.lang.NoClassDefFoundError: org/jclouds/aws/AWSResponseException karaf@root> feature feature:add-url feature:info feature:install feature:list feature:list-repository feature:list-url feature:list-version feature:refresh-url feature:remove-repository feature:remove-url feature:uninstall features:addurl features:info features:install features:list features:listrepositories features:listurl features:listversions features:refreshurl features:removerepository features:removeurl features:uninstall karaf@root> features:list State Version Name Repository Description [installed ] [0.8.0-SNAPSHOT ] whirr repo-0 Apache Whirr Core [uninstalled] [0.8.0-SNAPSHOT ] whirr-cassandra repo-0 Apache Whirr Cassandra Service [uninstalled] [0.8.0-SNAPSHOT ] whirr-chef repo-0 Apache Whirr Chef Service [uninstalled] [0.8.0-SNAPSHOT ] whirr-elasticsearch repo-0 Apache Whirr ElasticSearch Service [uninstalled] [0.8.0-SNAPSHOT ] whirr-ganglia repo-0 Apache Whirr Ganglia Service [installed ] [0.8.0-SNAPSHOT ] whirr-hadoop repo-0 Apache Whirr Hadoop Service [installed ] [0.8.0-SNAPSHOT ] whirr-hbase repo-0 Apache Whirr Hbase Service [uninstalled] [0.8.0-SNAPSHOT ] whirr-hama repo-0 Apache Whirr Hama Service [uninstalled] [0.8.0-SNAPSHOT ] whirr-mahout repo-0 Apache Whirr Mahout Service [uninstalled] [0.8.0-SNAPSHOT ] whirr-puppet repo-0 Apache Whirr Puppet Service [uninstalled] [0.8.0-SNAPSHOT ] whirr-voldemort repo-0 Apache Whirr Voldermort Service [installed ] [0.8.0-SNAPSHOT ] whirr-zookeeper repo-0 Apache Whirr Zookeeper Service [uninstalled] [0.3 ] transaction karaf-enterprise-2.2.5 OSGi Transaction Manager [uninstalled] [0.3 ] jpa karaf-enterprise-2.2.5 OSGi Persistence Container [uninstalled] [0.3 ] jndi karaf-enterprise-2.2.5 OSGi Service Registry JNDI access [uninstalled] [0.3 ] application-without-isolation karaf-enterprise-2.2.5 [installed ] [3.0 ] guice jclouds-1.3.1 Google Guice [installed ] [1.3.1 ] jclouds jclouds-1.3.1 JClouds [installed ] [1.3.1 ] jclouds-compute jclouds-1.3.1 JClouds Compute [uninstalled] [1.3.1 ] jclouds-api-filesystem jclouds-1.3.1 JClouds - API - FileSystem [uninstalled] [1.3.1 ] jclouds-api-eucalyptus jclouds-1.3.1 JClouds - API - Eucalyptus [uninstalled] [1.3.1 ] jclouds-api-elasticstack jclouds-1.3.1 JClouds - API - Elasticstack [uninstalled] [1.3.1 ] jclouds-api-vcloud jclouds-1.3.1 JClouds - API - Vcloud [uninstalled] [1.3.1 ] jclouds-api-byon jclouds-1.3.1 JClouds - API - Byon [uninstalled] [1.3.1 ] jclouds-api-nova jclouds-1.3.1 JClouds - API - Nova [uninstalled] [1.3.1 ] jclouds-driver-jsch jclouds-1.3.1 JClouds - Drivers - Jsch [installed ] [1.3.1 ] jclouds-driver-sshj jclouds-1.3.1 JClouds - Drivers - Sshj [installed ] [1.3.1 ] jclouds-driver-slf4j jclouds-1.3.1 JClouds - Drivers - Slf4j [installed ] [1.3.1 ] jclouds-driver-log4j jclouds-1.3.1 JClouds - Drivers - Slf4j [installed ] [1.3.1 ] jclouds-driver-bouncycastle jclouds-1.3.1 JClouds - Drivers - Bouncycastle [uninstalled] [1.3.1 ] jclouds-aws-cloudwatch jclouds-1.3.1 Amazon Web Service - Cloudwatch [installed ] [1.3.1 ] jclouds-aws-ec2 jclouds-1.3.1 Amazon Web Service - EC2 [installed ] [1.3.1 ] jclouds-aws-s3 jclouds-1.3.1 Amazon Web Service - S3 [uninstalled] [1.3.1 ] jclouds-azureblob jclouds-1.3.1 Azureblob [uninstalled] [1.3.1 ] jclouds-bluelock-vcloud-zone01 jclouds-1.3.1 vCloud implementation targeted to Bluelock vCloud Zone01 [uninstalled] [1.3.1 ] jclouds-cloudfiles-uk jclouds-1.3.1 Cloudfiles UK [uninstalled] [1.3.1 ] jclouds-cloudfiles-us jclouds-1.3.1 Cloudfiles US [uninstalled] [1.3.1 ] jclouds-cloudloadbalancers-us jclouds-1.3.1 Cloud Load Balancers US [uninstalled] [1.3.1 ] jclouds-cloudonestorage jclouds-1.3.1 Cloud One Storage [uninstalled] [1.3.1 ] jclouds-cloudserver-uk jclouds-1.3.1 Cloudservers UK [uninstalled] [1.3.1 ] jclouds-cloudserver-us jclouds-1.3.1 Cloudservers US [uninstalled] [1.3.1 ] jclouds-cloudsigma-zrh jclouds-1.3.1 CloudSigma ZRH [uninstalled] [1.3.1 ] jclouds-cloudsigma-lvs jclouds-1.3.1 CloudSigma ZRH [uninstalled] [1.3.1 ] jclouds-elastichosts-lon-b jclouds-1.3.1 Elastichosts Bluesquare London [uninstalled] [1.3.1 ] jclouds-elastichosts-lon-p jclouds-1.3.1 Elastichosts Peer1 London [uninstalled] [1.3.1 ] jclouds-elastichosts-sat-p jclouds-1.3.1 Elastichosts Peer1 San Antonio [uninstalled] [1.3.1 ] jclouds-elastichosts-lax-p jclouds-1.3.1 Elastichosts Peer1 Los Angeles [uninstalled] [1.3.1 ] jclouds-elastichosts-tor-p jclouds-1.3.1 Elastichosts Peer1 Toronto [uninstalled] [1.3.1 ] jclouds-eucalyptus-s3 jclouds-1.3.1 Eucalyptus Partner - S3 [uninstalled] [1.3.1 ] jclouds-eucalyptus-ec2 jclouds-1.3.1 Eucalyptus Partner - EC2 [uninstalled] [1.3.1 ] jclouds-gogrid jclouds-1.3.1 GoGrid [uninstalled] [1.3.1 ] jclouds-go2cloud-jhb1 jclouds-1.3.1 Go2Cloud implementation targeted to Johannesburg1 [uninstalled] [1.3.1 ] jclouds-greenhousedata-element-vcloud jclouds-1.3.1 Green House Data Element vCloud [uninstalled] [1.3.1 ] jclouds-hpcloud-objectstorage-lvs jclouds-1.3.1 HP Cloud Object Storage in Las Vegas [uninstalled] [1.3.1 ] jclouds-ninefold-storage jclouds-1.3.1 Ninefold Storage [uninstalled] [1.3.1 ] jclouds-ninefold-compute jclouds-1.3.1 Ninefold Compute [uninstalled] [1.3.1 ] jclouds-openhosting-east1 jclouds-1.3.1 Open Hosting for East1 [uninstalled] [1.3.1 ] jclouds-rimuhosting jclouds-1.3.1 ComputeService implementation of RimuHosting datacenters [uninstalled] [1.3.1 ] jclouds-savvis-symphonyvpdc jclouds-1.3.1 Savvis Symphony VPDC [uninstalled] [1.3.1 ] jclouds-serverlove-z1-man jclouds-1.3.1 Serverlove implementation targeted to Manchester [uninstalled] [1.3.1 ] jclouds-skalicloud-sdg-my jclouds-1.3.1 SkaliCloud implementation targeted to Malaysia [uninstalled] [1.3.1 ] jclouds-softlayer jclouds-1.3.1 Components to access SoftLayer [uninstalled] [1.3.1 ] jclouds-slicehost jclouds-1.3.1 ComputeService implementation of Slicehost datacenters [uninstalled] [1.3.1 ] jclouds-synaptic-storage jclouds-1.3.1 Synaptic Storage as a Service [uninstalled] [1.3.1 ] jclouds-stratogen-vcloud-mycloud jclouds-1.3.1 vCloud implementation targeted to StratoGen vCloud MyCloud [uninstalled] [1.3.1 ] jclouds-trmk-ecloud jclouds-1.3.1 Terremark Enterprise Cloud [uninstalled] [1.3.1 ] jclouds-trmk-vcloudexpress jclouds-1.3.1 Terremark vCloud Express [uninstalled] [1.3.1 ] jclouds-services jclouds-1.3.1 OSGi Service Factories for JClouds [uninstalled] [1.3.1 ] jclouds-commands jclouds-1.3.1 Karaf Commands for JClouds [uninstalled] [1.3.1 ] jclouds-url-handler jclouds-1.3.1 Url Handler for JClouds Blobs [uninstalled] [2.2.5 ] karaf-framework karaf-2.2.5 [uninstalled] [2.5.6.SEC02 ] spring karaf-2.2.5 [uninstalled] [2.5.6.SEC02 ] spring-web karaf-2.2.5 [uninstalled] [3.0.6.RELEASE ] spring karaf-2.2.5 [uninstalled] [3.0.6.RELEASE ] spring-aspects karaf-2.2.5 [uninstalled] [1.2.1 ] spring-dm karaf-2.2.5 [uninstalled] [1.2.1 ] spring-dm-web karaf-2.2.5 [uninstalled] [3.0.6.RELEASE ] spring-instrument karaf-2.2.5 [uninstalled] [3.0.6.RELEASE ] spring-jdbc karaf-2.2.5 [uninstalled] [3.0.6.RELEASE ] spring-jms karaf-2.2.5 [uninstalled] [3.0.6.RELEASE ] spring-struts karaf-2.2.5 [uninstalled] [3.0.6.RELEASE ] spring-test karaf-2.2.5 [uninstalled] [3.0.6.RELEASE ] spring-orm karaf-2.2.5 [uninstalled] [3.0.6.RELEASE ] spring-oxm karaf-2.2.5 [uninstalled] [3.0.6.RELEASE ] spring-tx karaf-2.2.5 [uninstalled] [3.0.6.RELEASE ] spring-web karaf-2.2.5 [uninstalled] [3.0.6.RELEASE ] spring-web-portlet karaf-2.2.5 [uninstalled] [2.2.5 ] wrapper karaf-2.2.5 [uninstalled] [2.2.5 ] obr karaf-2.2.5 [installed ] [2.2.5 ] config karaf-2.2.5 [uninstalled] [7.5.4.v20111024] jetty karaf-2.2.5 [uninstalled] [2.2.5 ] http karaf-2.2.5 [uninstalled] [2.2.5 ] war karaf-2.2.5 [installed ] [2.2.5 ] kar karaf-2.2.5 [uninstalled] [2.2.5 ] webconsole-base karaf-2.2.5 [uninstalled] [2.2.5 ] webconsole karaf-2.2.5 [installed ] [2.2.5 ] ssh karaf-2.2.5 [installed ] [2.2.5 ] management karaf-2.2.5 [uninstalled] [2.2.5 ] eventadmin karaf-2.2.5 [uninstalled] [2.2.5 ] jasypt-encryption karaf-2.2.5 karaf@root> Any ideas? I guess there are some missing imports.
          Andrei Savu made changes -
          Attachment WHIRR-436.patch [ 12513297 ]
          Hide
          Andrei Savu added a comment -

          I have attached a slightly update version of the patch with some fixes.

          Show
          Andrei Savu added a comment - I have attached a slightly update version of the patch with some fixes.
          Hide
          Andrei Savu added a comment -

          I have created WHIRR-503 as a follow-up issue to add the missing commands. I will do one more round of testing & review and commit if everything is fine.

          Show
          Andrei Savu added a comment - I have created WHIRR-503 as a follow-up issue to add the missing commands. I will do one more round of testing & review and commit if everything is fine.
          Andrei Savu made changes -
          Link This issue is required by WHIRR-503 [ WHIRR-503 ]
          Hide
          Andrei Savu added a comment -

          Thanks Ioannis for taking the time to rework this for trunk! I like the speed improvement in test execution. I will add the new commands (configure,start,stop,cleanup) & commit soon.

          Show
          Andrei Savu added a comment - Thanks Ioannis for taking the time to rework this for trunk! I like the speed improvement in test execution. I will add the new commands (configure,start,stop,cleanup) & commit soon.
          Ioannis Canellos made changes -
          Attachment WHIRR-436-update-3-patch.txt [ 12513247 ]
          Hide
          Ioannis Canellos added a comment -

          The correct version of the patch ... hopefully.

          Show
          Ioannis Canellos added a comment - The correct version of the patch ... hopefully.
          Hide
          Ioannis Canellos added a comment -

          You are right, its the wrong one (an older attempt).

          Show
          Ioannis Canellos added a comment - You are right, its the wrong one (an older attempt).
          Ioannis Canellos made changes -
          Attachment WHIRR-436-update-3.patch [ 12513205 ]
          Hide
          Andrei Savu added a comment -

          I'm unable to apply latest patch on trunk. Is this the right one?

          Show
          Andrei Savu added a comment - I'm unable to apply latest patch on trunk. Is this the right one?
          Ioannis Canellos made changes -
          Attachment WHIRR-436-update-3.patch [ 12513205 ]
          Hide
          Ioannis Canellos added a comment -

          Attached a new patch that contains improvements in the integration tests and is up to date with the latest whirr trunk.

          Show
          Ioannis Canellos added a comment - Attached a new patch that contains improvements in the integration tests and is up to date with the latest whirr trunk.
          Andrei Savu made changes -
          Assignee Ioannis Canellos [ iocanel ]
          Hide
          Andrei Savu added a comment -

          Ioannis let me know if I can help in any way

          Show
          Andrei Savu added a comment - Ioannis let me know if I can help in any way
          Andrei Savu made changes -
          Link This issue blocks WHIRR-452 [ WHIRR-452 ]
          Hide
          Ioannis Canellos added a comment -

          We can try decreasing the DEFAULT_WAIT, but I think that we it might cause sporadic failures on slower machines.
          I maybe be able to replace the standard waits, with some polling on services. I'll have a look.

          I have been able to run a service from inside Karaf, with the following command:
          karaf@root>features:addurl mvn:org.apache.whirr.karaf/apache-whirr/0.8.0-SNAPSHOT/xml/features
          karaf@root>features:install whirr-zookeeper
          karaf@root>whirr:launch-cluster --config /tmp/zookeeper-ec2.properties (where zookeeper-ec2.properties is the one shipped with the examples, but without placeholders).

          Show
          Ioannis Canellos added a comment - We can try decreasing the DEFAULT_WAIT, but I think that we it might cause sporadic failures on slower machines. I maybe be able to replace the standard waits, with some polling on services. I'll have a look. I have been able to run a service from inside Karaf, with the following command: karaf@root>features:addurl mvn:org.apache.whirr.karaf/apache-whirr/0.8.0-SNAPSHOT/xml/features karaf@root>features:install whirr-zookeeper karaf@root>whirr:launch-cluster --config /tmp/zookeeper-ec2.properties (where zookeeper-ec2.properties is the one shipped with the examples, but without placeholders).
          Hide
          Andrei Savu added a comment -

          We need to address a bunch of typos: extention -> extension, cental -> central (root pom.xml) + add back the Cloudera repository needed for HBase testing.

          I have done the following things while testing:

          • clean patch apply
          • run unit tests (they seem to take a lot of time - can we use a smaller value for DEFAULT_WAIT or a different mechanism? - I assume feature installation is fast from local disk)
          • tried to execute the ZooKeeper integration tests on EC2 - it fails to instantiate BindLoginCredentialsPatchForEC2 - it works after adding whirr-jclouds as a dependency - we need this for all services

          BTW we should also address this Maven warning:

          [WARNING] The expression $

          {version}

          is deprecated. Please use $

          {project.version}

          instead.

          Have you tried to manually run a service (e.g. ZooKeeper) form Karaf? Can you share the setup steps? Thanks!

          Show
          Andrei Savu added a comment - We need to address a bunch of typos: extention -> extension, cental -> central (root pom.xml) + add back the Cloudera repository needed for HBase testing. I have done the following things while testing: clean patch apply run unit tests (they seem to take a lot of time - can we use a smaller value for DEFAULT_WAIT or a different mechanism? - I assume feature installation is fast from local disk) tried to execute the ZooKeeper integration tests on EC2 - it fails to instantiate BindLoginCredentialsPatchForEC2 - it works after adding whirr-jclouds as a dependency - we need this for all services BTW we should also address this Maven warning: [WARNING] The expression $ {version} is deprecated. Please use $ {project.version} instead. Have you tried to manually run a service (e.g. ZooKeeper) form Karaf? Can you share the setup steps? Thanks!
          Hide
          Ioannis Canellos added a comment -

          No nothing special is required.

          Show
          Ioannis Canellos added a comment - No nothing special is required.
          Hide
          Andrei Savu added a comment -

          Looks good. Do we need to do anything special when deploying to Nexus?

          Show
          Andrei Savu added a comment - Looks good. Do we need to do anything special when deploying to Nexus?
          Ioannis Canellos made changes -
          Attachment WHIRR-436-update-2-patch.txt [ 12507170 ]
          Hide
          Ioannis Canellos added a comment -

          Updated patch, that also OSGi-fies and tests the mahout service.

          Show
          Ioannis Canellos added a comment - Updated patch, that also OSGi-fies and tests the mahout service.
          Hide
          Andrei Savu added a comment -

          Ioannis thanks for updating and adding some tests to show that things work as expected. I think we can commit this as soon as we cut the branch for 0.7.0. I don't want to risk to break the release now and delay things even more. Nice cleanups!

          Show
          Andrei Savu added a comment - Ioannis thanks for updating and adding some tests to show that things work as expected. I think we can commit this as soon as we cut the branch for 0.7.0. I don't want to risk to break the release now and delay things even more. Nice cleanups!
          Ioannis Canellos made changes -
          Attachment WHIRR-436-update-1.patch [ 12506682 ]
          Hide
          Ioannis Canellos added a comment -

          I am attaching an updated patch, that contains everything included by the previous patch plus OSGi integration tests using pax-exam + karaf.

          The integration tests, do the following:
          i) Test that whirr properly installs in OSGi.
          ii) Test that all whirr serivces properly install.
          iii) Test that all whirr service properly register the required ClusterActionHandler to the service registry.
          iv) ActionHandlers properly bind to the ClusterController services.

          It also fixes/improves a lot of stuff from the previous patch, like typos etc.

          Show
          Ioannis Canellos added a comment - I am attaching an updated patch, that contains everything included by the previous patch plus OSGi integration tests using pax-exam + karaf. The integration tests, do the following: i) Test that whirr properly installs in OSGi. ii) Test that all whirr serivces properly install. iii) Test that all whirr service properly register the required ClusterActionHandler to the service registry. iv) ActionHandlers properly bind to the ClusterController services. It also fixes/improves a lot of stuff from the previous patch, like typos etc.
          Hide
          Andrei Savu added a comment -

          It should be more than enough to have tests for i) - iii) at this stage.

          Show
          Andrei Savu added a comment - It should be more than enough to have tests for i) - iii) at this stage.
          Hide
          Jean-Baptiste Onofré added a comment -

          We can introduce Pax Exam/Karaf Pax Exam to make complete integration tests.

          Show
          Jean-Baptiste Onofré added a comment - We can introduce Pax Exam/Karaf Pax Exam to make complete integration tests.
          Hide
          Ioannis Canellos added a comment -

          I can quite easily add a couple of tests, that could test:
          i) The feature cleanly installs.
          ii) The services properly register
          iii) The custom factories, handlermaps work properlly.

          Unfortunately I cannot add more stuff into it, till I have correct & signed bcprov bundles (I have created those, under servicemix bundles, but still wait for them to get release, you know we have the apache way).

          Show
          Ioannis Canellos added a comment - I can quite easily add a couple of tests, that could test: i) The feature cleanly installs. ii) The services properly register iii) The custom factories, handlermaps work properlly. Unfortunately I cannot add more stuff into it, till I have correct & signed bcprov bundles (I have created those, under servicemix bundles, but still wait for them to get release, you know we have the apache way).
          Hide
          Andrei Savu added a comment -

          The patch still applies cleanly on trunk. Ioannis how hard is it to add a few minimal tests just to show that we can load everything as expected inside an OSGi environment? (just to put the testing framework in place and we can add more later)

          Show
          Andrei Savu added a comment - The patch still applies cleanly on trunk. Ioannis how hard is it to add a few minimal tests just to show that we can load everything as expected inside an OSGi environment? (just to put the testing framework in place and we can add more later)
          Hide
          Ioannis Canellos added a comment -

          Hi Tom,

          It does make changes. It changes 3 things on the existing jars.

          i) BindLoginCredentialsPatchForEC2 goes to a new module (In order to work with jclouds 1.2.1 inside OSGi.)
          ii) Shell commands have been refactored to provide public methods that use non-jopt arguments (So that they can be use from other shells e.g. karaf-shell).
          iii) Changed the core jars so that its possible to pass custom controller factories, handler maps etc.

          Since this patch is one month old, and changes have been made to whirr bundles, I think that the commits that have been made since could possible cause conflicts with the patch.

          If you would like to commit the patch and have any kind of issues, I would gladly rework on the patch to resolve pottential conflicts.

          Show
          Ioannis Canellos added a comment - Hi Tom, It does make changes. It changes 3 things on the existing jars. i) BindLoginCredentialsPatchForEC2 goes to a new module (In order to work with jclouds 1.2.1 inside OSGi.) ii) Shell commands have been refactored to provide public methods that use non-jopt arguments (So that they can be use from other shells e.g. karaf-shell). iii) Changed the core jars so that its possible to pass custom controller factories, handler maps etc. Since this patch is one month old, and changes have been made to whirr bundles, I think that the commits that have been made since could possible cause conflicts with the patch. If you would like to commit the patch and have any kind of issues, I would gladly rework on the patch to resolve pottential conflicts.
          Hide
          Tom White added a comment -

          Thanks for the contribution, Ioannis. Does this make any changes to the Whirr jars or do they function as before when used from the CLI or from Java?

          Show
          Tom White added a comment - Thanks for the contribution, Ioannis. Does this make any changes to the Whirr jars or do they function as before when used from the CLI or from Java?
          Hide
          Ioannis Canellos added a comment -

          Andrei,

          Usually OSGi tests are performed with pax-exam, which allows you to run your tests inside an OSGi environment.
          I could try to put some tests there.

          Show
          Ioannis Canellos added a comment - Andrei, Usually OSGi tests are performed with pax-exam, which allows you to run your tests inside an OSGi environment. I could try to put some tests there.
          Hide
          Jean-Baptiste Onofré added a comment -

          I'm gonna submit a new patch including a README file to:

          • how to deploy in Karaf (using features:addurl, features:install)
          • what's the purpose of the Karaf shell commands
          • quick note about the proposed roadmap (more OSGi services, etc)
          Show
          Jean-Baptiste Onofré added a comment - I'm gonna submit a new patch including a README file to: how to deploy in Karaf (using features:addurl, features:install) what's the purpose of the Karaf shell commands quick note about the proposed roadmap (more OSGi services, etc)
          Hide
          Andrei Savu added a comment -

          Really great work! Can you give some pointers about how we can test this? (I am new to OSGi)

          Nit: noticed a typo cassndra

          Show
          Andrei Savu added a comment - Really great work! Can you give some pointers about how we can test this? (I am new to OSGi) Nit: noticed a typo cassndra
          Hide
          Adrian Cole added a comment -

          wow.. epic effort! I also glanced, and want to thank you for putting this first cut together.

          Show
          Adrian Cole added a comment - wow.. epic effort! I also glanced, and want to thank you for putting this first cut together.
          Hide
          Jean-Baptiste Onofré added a comment -

          Awesome Ioannis. Many thanks.

          I gave a first overview and it looks good. I will dig into it later today.

          Show
          Jean-Baptiste Onofré added a comment - Awesome Ioannis. Many thanks. I gave a first overview and it looks good. I will dig into it later today.
          Ioannis Canellos made changes -
          Field Original Value New Value
          Attachment WHIRR-436-patch.txt [ 12504210 ]
          Hide
          Ioannis Canellos added a comment -

          I am attaching a patch that does the following:

          i) Makes all artifacts bundles, using the maven-bundle-plugin.
          ii) Adds blueprint descriptor to core & services, that export ControllerFactories, HandlerMapFactories & ActionHandlers as OSGi services (louse coupling to OSGi, no dependency to OSGi).
          iii) Added dynamic factories for ClusterController & HandlerMap, so that they can work in a dynamic environment (they are plain pojos, that are handled by the OSGi blueprint if available).
          iv) BindLoginCredentialsPatchForEC2 is moved to a new module (extention/jclouds), so that it can be attached to jclouds-core when running in OSGi
          v) Modified the commands so that they also provide jopt-free versions of the run method. This is useful for anyone that wants to reuse the commands inside an other shell (e.g. karaf, gogo shell).
          vi) Added a feature descriptor for Apache Karaf, so that whirr can be easilly installed inside Karaf, ServiceMix, Geronumo etc.
          vii) Provided an OSGi version of most of the shell commands. These commands can also leverage the OSGi configuration admin in order to read the cluster config (if the user doesn't want to just use a file, but want to retrieve its config from a service).

          Some notes:
          i) The Karaf commands, will require a slight modification to jclouds. I created a patch and will be sent shortly (only affects runtime).
          ii) The provided Karaf feature uses commons-configuration 1.6, because version 1.7 bundles require the world (lots of unecessary imports).
          iii) Due to jclouds design whirr bundles have to be fragments that are attached jclouds-core and jclouds-scriptbuilder. Not the best way to do things, but the unfortunately the only way.
          iv) I plan to add support for reusing existing ComputeServices from the OSGi service registry. This patch is already quite big, so this will be part of a second iteration.

          Show
          Ioannis Canellos added a comment - I am attaching a patch that does the following: i) Makes all artifacts bundles, using the maven-bundle-plugin. ii) Adds blueprint descriptor to core & services, that export ControllerFactories, HandlerMapFactories & ActionHandlers as OSGi services (louse coupling to OSGi, no dependency to OSGi). iii) Added dynamic factories for ClusterController & HandlerMap, so that they can work in a dynamic environment (they are plain pojos, that are handled by the OSGi blueprint if available). iv) BindLoginCredentialsPatchForEC2 is moved to a new module (extention/jclouds), so that it can be attached to jclouds-core when running in OSGi v) Modified the commands so that they also provide jopt-free versions of the run method. This is useful for anyone that wants to reuse the commands inside an other shell (e.g. karaf, gogo shell). vi) Added a feature descriptor for Apache Karaf, so that whirr can be easilly installed inside Karaf, ServiceMix, Geronumo etc. vii) Provided an OSGi version of most of the shell commands. These commands can also leverage the OSGi configuration admin in order to read the cluster config (if the user doesn't want to just use a file, but want to retrieve its config from a service). Some notes: i) The Karaf commands, will require a slight modification to jclouds. I created a patch and will be sent shortly (only affects runtime). ii) The provided Karaf feature uses commons-configuration 1.6, because version 1.7 bundles require the world (lots of unecessary imports). iii) Due to jclouds design whirr bundles have to be fragments that are attached jclouds-core and jclouds-scriptbuilder. Not the best way to do things, but the unfortunately the only way. iv) I plan to add support for reusing existing ComputeServices from the OSGi service registry. This patch is already quite big, so this will be part of a second iteration.
          Ioannis Canellos created issue -

            People

            • Assignee:
              Ioannis Canellos
              Reporter:
              Ioannis Canellos
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development