You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2015/03/20 10:31:30 UTC

karaf-cellar git commit: [KARAF-3609] Cloud blob store discovery service factory registers the blob store services created

Repository: karaf-cellar
Updated Branches:
  refs/heads/cellar-2.3.x 7e5c65b86 -> 44d8d43ad


[KARAF-3609] Cloud blob store discovery service factory registers the blob store services created


Project: http://git-wip-us.apache.org/repos/asf/karaf-cellar/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf-cellar/commit/44d8d43a
Tree: http://git-wip-us.apache.org/repos/asf/karaf-cellar/tree/44d8d43a
Diff: http://git-wip-us.apache.org/repos/asf/karaf-cellar/diff/44d8d43a

Branch: refs/heads/cellar-2.3.x
Commit: 44d8d43adae7417f00ca3300f6eaf379b359754c
Parents: 7e5c65b
Author: Jean-Baptiste Onofré <jb...@apache.org>
Authored: Fri Mar 20 10:30:55 2015 +0100
Committer: Jean-Baptiste Onofré <jb...@apache.org>
Committed: Fri Mar 20 10:30:55 2015 +0100

----------------------------------------------------------------------
 .../cloud/BlobStoreDiscoveryServiceFactory.java       |  3 ++-
 manual/src/main/webapp/user-guide/cloud.conf          | 14 ++++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/44d8d43a/cloud/src/main/java/org/apache/karaf/cellar/cloud/BlobStoreDiscoveryServiceFactory.java
----------------------------------------------------------------------
diff --git a/cloud/src/main/java/org/apache/karaf/cellar/cloud/BlobStoreDiscoveryServiceFactory.java b/cloud/src/main/java/org/apache/karaf/cellar/cloud/BlobStoreDiscoveryServiceFactory.java
index 0eb6959..3eb2340 100644
--- a/cloud/src/main/java/org/apache/karaf/cellar/cloud/BlobStoreDiscoveryServiceFactory.java
+++ b/cloud/src/main/java/org/apache/karaf/cellar/cloud/BlobStoreDiscoveryServiceFactory.java
@@ -82,11 +82,12 @@ public class BlobStoreDiscoveryServiceFactory implements ManagedServiceFactory {
                 service.init();
 
                 newRegistration = bundleContext.registerService(DiscoveryService.class.getName(), (Object) service, (Dictionary) serviceProperties);
+                registrations.put(pid, newRegistration);
             }
         } finally {
             ServiceRegistration oldRegistration = (newRegistration == null) ? registrations.remove(pid) : registrations.put(pid, newRegistration);
             if (oldRegistration != null) {
-                LOGGER.debug("CELLAR CLOUD: un-registering blob store discovery service {}", pid);
+                LOGGER.debug("CELLAR CLOUD: unregistering blob store discovery service {}", pid);
                 oldRegistration.unregister();
             }
         }

http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/44d8d43a/manual/src/main/webapp/user-guide/cloud.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/user-guide/cloud.conf b/manual/src/main/webapp/user-guide/cloud.conf
index c1cfdbf..d9c6c31 100644
--- a/manual/src/main/webapp/user-guide/cloud.conf
+++ b/manual/src/main/webapp/user-guide/cloud.conf
@@ -28,4 +28,18 @@ credential=<the credential/password of the blobstore account)
 container=<the name of the bucket>
 validity=<the amount of time an entry is considered valid, after that time the entry is removed>
 
+You can create multiple cloud services, if you want to "gather" nodes from different cloud providers.
+
+For instance, you can create _etc/org.apache.karaf.cellar.cloud-mycloud.cfg_ containing:
+
+{code}
+provider=aws-s3
+identity=mycloud-username
+credential=mycloud-password
+container=cellar
+validity=3600
+{code}
+
+NB: you can find the cloud providers supported by jclouds here http://repo1.maven.org/maven2/org/apache/jclouds/provider/.
+
 After creating the file the service will check for new nodes. If new nodes are found the Hazelcast instance configuration is updated and the instance is restarted.
\ No newline at end of file