Package org.apache.whirr.service.jclouds

Examples of org.apache.whirr.service.jclouds.StatementBuilder.render()


      Credentials credentials = new Credentials(
          Iterables.get(cluster.getInstances(), 0).getLoginCredentials().identity,
          clusterSpec.readPrivateKey());
      try {
        LOG.info("Running configuration script");
        Payload script = newStringPayload(statementBuilder.render(OsFamily.UNIX));
        LOG.debug("Running script:\n{}", script.getRawContent());
        computeService.runScriptOnNodesMatching(
            toNodeMetadataPredicate(clusterSpec, cluster, entry.getKey().getRoles()),
            script,
            RunScriptOptions.Builder.overrideCredentialsWith(credentials));
View Full Code Here


          clusterSpec.getClusterUser(),
          clusterSpec.getPrivateKey());
      try {
        LOG.info("Running configuration script");
        if (LOG.isDebugEnabled())
          LOG.debug("Running script:\n{}", statementBuilder.render(OsFamily.UNIX));
        computeService.runScriptOnNodesMatching(
            toNodeMetadataPredicate(clusterSpec, cluster, entry.getKey().getRoles()),
            statementBuilder,
            RunScriptOptions.Builder.overrideCredentialsWith(credentials));
        LOG.info("Configuration script run completed");
View Full Code Here

      futures.add(executorService.submit(new Callable<Void>() {
        @Override
        public Void call() throws Exception {
          LOG.info("Running script");
          if (LOG.isDebugEnabled())
            LOG.debug("Running script:\n{}", statementBuilder.render(OsFamily.UNIX));
          computeService.runScriptOnNodesMatching(
              Predicates.in(templateNodes),
              statementBuilder);
          LOG.info("Script run completed");
          return null;
View Full Code Here

            getNodeId
        );

        LOG.info("Running configuration script on nodes: {}", nodesToApply.keySet());
        if (LOG.isDebugEnabled())
          LOG.debug("script:\n{}", statementBuilder.render(OsFamily.UNIX));
       
        computeService.runScriptOnNodesMatching(
            withIds(nodesToApply.keySet()),
            statementBuilder,
            RunScriptOptions.Builder.overrideCredentialsWith(credentials)
View Full Code Here

      futures.add(executorService.submit(new Callable<Void>() {
        @Override
        public Void call() throws Exception {
          LOG.info("Running script");
          if (LOG.isDebugEnabled())
            LOG.debug("Running script:\n{}", statementBuilder.render(OsFamily.UNIX));
          computeService.runScriptOnNodesMatching(
              Predicates.in(templateNodes),
              statementBuilder);
          LOG.info("Script run completed");
          return null;
View Full Code Here

          clusterSpec.getClusterUser(),
          clusterSpec.getPrivateKey());
      try {
        LOG.info("Running configuration script");
        if (LOG.isDebugEnabled())
          LOG.debug("Running script:\n{}", statementBuilder.render(OsFamily.UNIX));
        computeService.runScriptOnNodesMatching(
            toNodeMetadataPredicate(clusterSpec, cluster, entry.getKey().getRoles()),
            statementBuilder,
            RunScriptOptions.Builder.overrideCredentialsWith(credentials));
        LOG.info("Configuration script run completed");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.