This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
application { | |
name="petclinic-mongo" | |
service { | |
name = "mongod" | |
} | |
service { | |
name = "mongoConfig" | |
} | |
service { | |
name = "mongos" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 | |
// ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.gigaspaces.cloudify.dsl.context.ServiceContextFactory | |
// ... | |
// Getting the tomcat service instance ID | |
instanceID = serviceContext.getInstanceId() | |
// Waiting for the mongos service for 20 seconds | |
mongoService = serviceContext.waitForService(config.mongoService, 20, TimeUnit.SECONDS) | |
// Waiting for the mongos service instances for 60 seconds (In this case, | |
// there's only one mongos instance, but we support more). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install-application -timeout 10 <Cloudify root>/examples/petclinic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cloudify@default> uninstall-application petclinic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cloudify@default> teardown-localcloud |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cloudify@default> bootstrap-localcloud |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.cloudifysource.dsl.context.ServiceContextFactory; | |
def context = ServiceContextFactory.getServiceContext() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def serviceName = "cassandra" | |
def service = context.waitForService(serviceName, 20, TimeUnit.SECONDS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String getName(); | |
public int getNumberOfPlannedInstances(); | |
public int getNumberOfActualInstances(); | |
public ServiceInstance[] waitForInstances(final int howmany, | |
final long timeout, final TimeUnit timeUnit); | |
public ServiceInstance[] getInstances(); |
OlderNewer