Skip to content

Instantly share code, notes, and snippets.

@tamirko
Created January 29, 2012 13:50
Show Gist options
  • Save tamirko/1698917 to your computer and use it in GitHub Desktop.
Save tamirko/1698917 to your computer and use it in GitHub Desktop.
Exposing the mongos service
// In <cloudify root>/recipes/apps/petclinic/mongos/mongos_install.groovy
import com.gigaspaces.cloudify.dsl.context.ServiceContextFactory
// ...
// Getting the mongos service instance ID
instanceID = serviceContext.getInstanceId()
// Calculating the mongos port and storing it in the serviceContext for later use
// (by the service and by other services).
serviceContext.attributes.thisInstance["port"] = config.basePort+instanceID
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment