Adds the deploy operation as a step to the composite operation.

@param builder    the builder to add the step to
@param deployment the deployment to deploy
502967
static void addDeployOperationStep(final CompositeOperationBuilder builder, final DeploymentDescription deployment) {
        final String name = deployment.getName();

        final Set<String> serverGroups = deployment.getServerGroups();
        // If the server groups are empty this is a standalone deployment
        if (serverGroups.isEmpty()) {
            final ModelNode address = createAddress(DEPLOYMENT, name);
            builder.addStep(createOperation(DEPLOYMENT_DEPLOY_OPERATION, address));
        } else {
            for (String serverGroup : serverGroups) {
                final ModelNode address = createAddress(SERVER_GROUP, serverGroup, DEPLOYMENT, name);
                builder.addStep(createOperation(DEPLOYMENT_DEPLOY_OPERATION, address));
            }
        }
    }
1241652
public void deployCron() throws MojoExecutionException {
    stager.stage();
    try {
      deployMojo
          .getAppEngineFactory()
          .deployment()
          .deployCron(
              configBuilder.buildDeployProjectConfigurationConfiguration(appengineDirectory));
    } catch (AppEngineException ex) {
      throw new MojoExecutionException("Failed to deploy", ex);
    }
  }
1365780
public void deploy(RemoteRepository target, String pluginName, Artifact ... artifacts) throws DeploymentException {
        deploy(target, pluginName, Arrays.asList(artifacts));
    }
411267
@Override
    public void deploy(InputStream inputStream) throws IOException {
        final List<? extends HasMetadata> entities = deploy("application", inputStream);

        if (this.applicationName == null) {

            Optional<String> deploymentConfig = entities.stream()
                .filter(hm -> hm instanceof DeploymentConfig)
                .map(hm -> (DeploymentConfig) hm)
                .map(dc -> dc.getMetadata().getName()).findFirst();

            deploymentConfig.ifPresent(name -> this.applicationName = name);
        }
    }
725935
public function registerTasks(Workflow $workflow, Deployment $deployment)
    {
        parent::registerTasks($workflow, $deployment);

        if ($deployment->hasOption('initialDeployment') && $deployment->getOption('initialDeployment') === true) {
            $workflow->addTask(DumpDatabaseTask::class, 'initialize', $this);
            $workflow->addTask(RsyncFoldersTask::class, 'initialize', $this);
        }
        $workflow
            ->afterStage('transfer', CreatePackageStatesTask::class, $this)
            ->afterStage(
                'update',
                [
                    SymlinkDataTask::class,
                    CopyConfigurationTask::class
                ],
                $this
            )
            ->afterStage('switch', FlushCachesTask::class, $this)
            ->addTask(SetUpExtensionsTask::class, 'migrate', $this);
    }
581127
protected void createDefaultAuthorizations(DeploymentEntity deployment) {
    if(isAuthorizationEnabled()) {
      ResourceAuthorizationProvider provider = getResourceAuthorizationProvider();
      AuthorizationEntity[] authorizations = provider.newDeployment(deployment);
      saveDefaultAuthorizations(authorizations);
    }
  }
519394
public void copyTo(@Nonnull final UserAgent.Builder builder) {
		final OperatingSystemFamily f = OperatingSystemFamily.evaluate(family);
		final VersionNumber version = VersionNumber.parseOperatingSystemVersion(f, builder.getUserAgentString());
		builder.setOperatingSystem(new net.sf.uadetector.OperatingSystem(f, family, icon, name, producer, producerUrl, url, version));
	}
149222
@Override
    public void addAction(final LifecycleStage stage, final LifecycleAction<T> action)
    {
        stageEvents.add(new StageEvent(stage, action));
    }
382006
@Override
  public void updateDeployment(final String host, final Deployment deployment, final String token)
      throws HostNotFoundException, JobNotDeployedException, TokenVerificationException {
    log.info("updating deployment {}: {}", deployment, host);

    final ZooKeeperClient client = provider.get("updateDeployment");

    final JobId jobId = deployment.getJobId();
    final Job job = getJob(client, jobId);
    final Deployment existingDeployment = getDeployment(host, jobId);

    if (job == null) {
      throw new JobNotDeployedException(host, jobId);
    }
    verifyToken(token, job);

    assertHostExists(client, host);
    assertTaskExists(client, host, deployment.getJobId());

    final String path = Paths.configHostJob(host, jobId);
    final Task task = new Task(job, deployment.getGoal(),
        existingDeployment.getDeployerUser(),
        existingDeployment.getDeployerMaster(),
        existingDeployment.getDeploymentGroupName());
    try {
      client.setData(path, task.toJsonBytes());
    } catch (Exception e) {
      throw new HeliosRuntimeException("updating deployment " + deployment
                                       + " on host " + host + " failed", e);
    }
  }
578444
private synchronized void updateDeploymentMap(DigitalObject obj,
            Connection c, boolean isPurge) throws SQLException {

        String sDep = obj.getPid();
        Set<RelationshipTuple> sDefs =
                obj.getRelationships(Constants.MODEL.IS_DEPLOYMENT_OF, null);
        Set<RelationshipTuple> models =
                obj.getRelationships(Constants.MODEL.IS_CONTRACTOR_OF, null);

        /* Read in the new deployment map from the object */
        Set<ServiceContext> newContext = new HashSet<ServiceContext>();

        if (!isPurge) {
            for (RelationshipTuple sDefTuple : sDefs) {
                String sDef = sDefTuple.getObjectPID();
                for (RelationshipTuple cModelTuple : models) {
                    String cModel = cModelTuple.getObjectPID();
                    newContext.add(ServiceContext.getInstance(cModel, sDef));
                }
            }
        }

        /* Read in the old deployment map from the cache */
        Set<ServiceContext> oldContext =
                m_cModelDeploymentMap.getContextFor(sDep);

        /* Remove any obsolete deployments from the registry/cache */
        for (ServiceContext o : oldContext) {
            if (!newContext.contains(o)) {
                removeDeployment(o, obj, c);
            }
        }

        /* Add any new deployments from the registry/cache */
        for (ServiceContext n : newContext) {
            if (!oldContext.contains(n)) {
                addDeployment(n, obj, c);
            } else {
                updateDeployment(n, obj, c);
            }
        }
    }
96778
private void doInternalUndeployModule(final Message<JsonObject> message) {
    final String deploymentID = message.body().getString("id");
    if (deploymentID == null) {
      message.reply(new JsonObject().putString("status", "error").putString("message", "No deployment ID specified."));
    } else {
      removeDeployment(deploymentID, new Handler<AsyncResult<String>>() {
        @Override
        public void handle(AsyncResult<String> result) {
          platform.undeployModule(result.succeeded() && result.result() != null ? result.result() : deploymentID, createUndeployHandler(message));
        }
      });
    }
  }
1218837
private void doRedeploy(final JsonObject deploymentInfo) {
    if (deploymentInfo.getString("type").equals("module")) {
      log.info(String.format("%s - redeploying module %s", DefaultGroupManager.this, deploymentInfo.getString("module")));
      final CountDownLatch latch = new CountDownLatch(1);
      platform.deployModule(deploymentInfo.getString("module"), deploymentInfo.getObject("config", new JsonObject()), deploymentInfo.getInteger("instances", 1), createRedeployHandler(deploymentInfo, latch));
      try {
        latch.await(10, TimeUnit.SECONDS);
      } catch (InterruptedException e) {
      }
    } else if (deploymentInfo.getString("type").equals("verticle")) {
      log.info(String.format("%s - redeploying verticle %s", DefaultGroupManager.this, deploymentInfo.getString("main")));
      final CountDownLatch latch = new CountDownLatch(1);
      if (deploymentInfo.getBoolean("worker", false)) {
        platform.deployWorkerVerticle(deploymentInfo.getString("main"), deploymentInfo.getObject("config", new JsonObject()), deploymentInfo.getInteger("instances", 1), deploymentInfo.getBoolean("multi-threaded"), createRedeployHandler(deploymentInfo, latch));
      } else {
        platform.deployVerticle(deploymentInfo.getString("main"), deploymentInfo.getObject("config", new JsonObject()), deploymentInfo.getInteger("instances", 1), createRedeployHandler(deploymentInfo, latch));
      }
      try {
        latch.await(10, TimeUnit.SECONDS);
      } catch (InterruptedException e) {
      }
    }
  }
858307
public void add(Collection<Deployment> deployments)
    {
        for(Deployment deployment : deployments)
            this.deployments.put(deployment.getId(), deployment);
    }
1227347
public void addStep(DeploymentOperationStep step) {
    if(currentStep != null) {
      steps.add(steps.indexOf(currentStep)+1, step);
    } else {
      steps.add(step);
    }
  }
945214
public void startOnInit(Result<I> result)
  {
    
    DeployFactory2<I> builder = builder();
    
    if (builder == null) {
      result.ok(null);
      return;
    }
    
    if (! _lifecycle.toInit()) {
      result.ok(get());
      return;
    }
    
    _strategy.startOnInit(this, result);
  }
55925
private void addNewDeployment(final String deploymentID, final JsonObject deploymentInfo, Handler<AsyncResult<String>> doneHandler) {
    context.execute(new Action<String>() {
      @Override
      public String perform() {
        deployments.put(group, deploymentInfo.copy()
            .putString("id", deploymentID)
            .putString("realID", deploymentID)
            .putString("address", internal)
            .putString("node", listener.nodeId()).encode());
        return deploymentID;
      }
    }, doneHandler);
  }
1249552
@Override
    public DeploymentPlanBuilder andRemoveUndeployed() {
        DeploymentActionImpl removeMod = DeploymentActionImpl.getRemoveAction(replacementModification.getReplacedDeploymentUnitUniqueName());
        return new DeploymentPlanBuilderImpl(this, removeMod);
    }