Search in sources :

Example 6 with SingularityContainerInfo

use of com.hubspot.mesos.SingularityContainerInfo in project Singularity by HubSpot.

the class SingularityMesosTaskBuilder method prepareContainerInfo.

private void prepareContainerInfo(final SingularityOfferHolder offerHolder, final SingularityTaskId taskId, final TaskInfo.Builder bldr, final SingularityContainerInfo containerInfo, final Optional<long[]> ports) {
    ContainerInfo.Builder containerBuilder = ContainerInfo.newBuilder();
    containerBuilder.setType(ContainerInfo.Type.valueOf(containerInfo.getType().toString()));
    final Optional<SingularityDockerInfo> dockerInfo = containerInfo.getDocker();
    if (dockerInfo.isPresent()) {
        final DockerInfo.Builder dockerInfoBuilder = DockerInfo.newBuilder();
        dockerInfoBuilder.setImage(dockerInfo.get().getImage());
        if (dockerInfo.get().getNetwork().isPresent()) {
            dockerInfoBuilder.setNetwork(DockerInfo.Network.valueOf(dockerInfo.get().getNetwork().get().toString()));
        }
        final List<SingularityDockerPortMapping> portMappings = dockerInfo.get().getPortMappings();
        final boolean isBridged = SingularityDockerNetworkType.BRIDGE.equals(dockerInfo.get().getNetwork().orNull());
        if ((dockerInfo.get().hasAllLiteralHostPortMappings() || ports.isPresent()) && !portMappings.isEmpty()) {
            for (SingularityDockerPortMapping singularityDockerPortMapping : portMappings) {
                final Optional<DockerInfo.PortMapping> maybePortMapping = buildPortMapping(singularityDockerPortMapping, ports);
                if (maybePortMapping.isPresent()) {
                    dockerInfoBuilder.addPortMappings(maybePortMapping.get());
                }
            }
        } else if (configuration.getNetworkConfiguration().isDefaultPortMapping() && isBridged && portMappings.isEmpty() && ports.isPresent()) {
            for (long longPort : ports.get()) {
                int port = Ints.checkedCast(longPort);
                dockerInfoBuilder.addPortMappings(DockerInfo.PortMapping.newBuilder().setHostPort(port).setContainerPort(port).build());
            }
        }
        if (!dockerInfo.get().getDockerParameters().isEmpty()) {
            List<Parameter> parameters = new ArrayList<>();
            for (SingularityDockerParameter parameter : dockerInfo.get().getDockerParameters()) {
                parameters.add(Parameter.newBuilder().setKey(parameter.getKey()).setValue(parameter.getValue()).build());
            }
            dockerInfoBuilder.addAllParameters(parameters);
        }
        dockerInfoBuilder.setPrivileged(dockerInfo.get().isPrivileged());
        dockerInfoBuilder.setForcePullImage(dockerInfo.get().isForcePullImage());
        containerBuilder.setDocker(dockerInfoBuilder);
    }
    for (SingularityVolume volumeInfo : containerInfo.getVolumes().or(Collections.<SingularityVolume>emptyList())) {
        final Volume.Builder volumeBuilder = Volume.newBuilder();
        volumeBuilder.setContainerPath(fillInTaskIdValues(volumeInfo.getContainerPath(), offerHolder, taskId));
        if (volumeInfo.getHostPath().isPresent()) {
            volumeBuilder.setHostPath(fillInTaskIdValues(volumeInfo.getHostPath().get(), offerHolder, taskId));
        }
        if (volumeInfo.getMode().isPresent()) {
            volumeBuilder.setMode(Volume.Mode.valueOf(volumeInfo.getMode().get().toString()));
        } else {
            volumeBuilder.setMode(Volume.Mode.RO);
        }
        if (volumeInfo.getSource().isPresent()) {
            final Volume.Source.Builder sourceBuilder = Volume.Source.newBuilder();
            final SingularityVolumeSource source = volumeInfo.getSource().get();
            sourceBuilder.setType(Volume.Source.Type.valueOf(source.getType().toString()));
            if (source.getDockerVolume().isPresent()) {
                final Volume.Source.DockerVolume.Builder dockerVolumeBuilder = Volume.Source.DockerVolume.newBuilder();
                final SingularityDockerVolume dockerVolume = source.getDockerVolume().get();
                if (dockerVolume.getDriver().isPresent()) {
                    dockerVolumeBuilder.setDriver(dockerVolume.getDriver().get());
                }
                if (dockerVolume.getName().isPresent()) {
                    dockerVolumeBuilder.setName(dockerVolume.getName().get().replace("%i", Integer.toString(taskId.getInstanceNo())));
                }
                if (!dockerVolume.getDriverOptions().isEmpty()) {
                    final Parameters.Builder parameters = Parameters.newBuilder();
                    for (Entry<String, String> option : dockerVolume.getDriverOptions().entrySet()) {
                        parameters.addParameter(Parameter.newBuilder().setKey(option.getKey()).setValue(option.getValue()).build());
                    }
                    dockerVolumeBuilder.setDriverOptions(parameters.build());
                }
                sourceBuilder.setDockerVolume(dockerVolumeBuilder.build());
            }
            volumeBuilder.setSource(sourceBuilder.build());
        }
        containerBuilder.addVolumes(volumeBuilder);
    }
    prepareMesosInfo(containerBuilder, containerInfo);
    prepareNetworkInfos(containerBuilder, containerInfo, ports);
    bldr.setContainer(containerBuilder);
}
Also used : SingularityVolume(com.hubspot.mesos.SingularityVolume) ArrayList(java.util.ArrayList) ByteString(com.google.protobuf.ByteString) SingularityDockerPortMapping(com.hubspot.mesos.SingularityDockerPortMapping) SingularityDockerInfo(com.hubspot.mesos.SingularityDockerInfo) DockerInfo(org.apache.mesos.v1.Protos.ContainerInfo.DockerInfo) SingularityVolumeSource(com.hubspot.mesos.SingularityVolumeSource) SingularityPortMapping(com.hubspot.mesos.SingularityPortMapping) SingularityDockerPortMapping(com.hubspot.mesos.SingularityDockerPortMapping) Parameters(org.apache.mesos.v1.Protos.Parameters) SingularityDockerVolume(com.hubspot.mesos.SingularityDockerVolume) SingularityDockerParameter(com.hubspot.mesos.SingularityDockerParameter) SingularityDockerInfo(com.hubspot.mesos.SingularityDockerInfo) SingularityDockerVolume(com.hubspot.mesos.SingularityDockerVolume) Volume(org.apache.mesos.v1.Protos.Volume) SingularityVolume(com.hubspot.mesos.SingularityVolume) SingularityContainerInfo(com.hubspot.mesos.SingularityContainerInfo) ContainerInfo(org.apache.mesos.v1.Protos.ContainerInfo) Parameter(org.apache.mesos.v1.Protos.Parameter) SingularityDockerParameter(com.hubspot.mesos.SingularityDockerParameter) SingularityVolumeSource(com.hubspot.mesos.SingularityVolumeSource) SingularityDockerVolume(com.hubspot.mesos.SingularityDockerVolume)

Example 7 with SingularityContainerInfo

use of com.hubspot.mesos.SingularityContainerInfo in project Singularity by HubSpot.

the class SingularityMesosTaskBuilder method buildTask.

public SingularityMesosTaskHolder buildTask(SingularityOfferHolder offerHolder, List<Resource> availableResources, SingularityTaskRequest taskRequest, Resources desiredTaskResources, Resources desiredExecutorResources) {
    final String sanitizedRackId = offerHolder.getSanitizedRackId();
    final String sanitizedHost = offerHolder.getSanitizedHost();
    final SingularityTaskId taskId = new SingularityTaskId(taskRequest.getPendingTask().getPendingTaskId().getRequestId(), taskRequest.getDeploy().getId(), System.currentTimeMillis(), taskRequest.getPendingTask().getPendingTaskId().getInstanceNo(), sanitizedHost, sanitizedRackId);
    final TaskInfo.Builder bldr = TaskInfo.newBuilder().setTaskId(TaskID.newBuilder().setValue(taskId.toString()));
    Optional<long[]> ports = Optional.absent();
    Optional<Resource> portsResource = Optional.absent();
    final Optional<SingularityContainerInfo> containerInfo = taskRequest.getDeploy().getContainerInfo();
    if (desiredTaskResources.getNumPorts() > 0 || hasLiteralPortMapping(containerInfo)) {
        List<Long> requestedPorts = new ArrayList<>();
        if (hasLiteralPortMapping(containerInfo)) {
            requestedPorts.addAll(containerInfo.get().getDocker().get().getLiteralHostPorts());
        }
        portsResource = Optional.of(MesosUtils.getPortsResource(desiredTaskResources.getNumPorts(), availableResources, requestedPorts));
        ports = Optional.of(MesosUtils.getPorts(portsResource.get(), desiredTaskResources.getNumPorts()));
    }
    if (containerInfo.isPresent()) {
        prepareContainerInfo(offerHolder, taskId, bldr, containerInfo.get(), ports);
    }
    if (taskRequest.getDeploy().getCustomExecutorCmd().isPresent()) {
        prepareCustomExecutor(bldr, taskId, taskRequest, offerHolder, ports, desiredExecutorResources);
    } else {
        prepareCommand(bldr, taskId, taskRequest, offerHolder, ports);
    }
    if (portsResource.isPresent()) {
        bldr.addResources(portsResource.get());
    }
    Optional<String> requiredRole = taskRequest.getRequest().getRequiredRole();
    bldr.addResources(MesosUtils.getCpuResource(desiredTaskResources.getCpus(), requiredRole));
    bldr.addResources(MesosUtils.getMemoryResource(desiredTaskResources.getMemoryMb(), requiredRole));
    bldr.addResources(MesosUtils.getDiskResource(desiredTaskResources.getDiskMb(), requiredRole));
    bldr.setAgentId(offerHolder.getOffers().get(0).getAgentId());
    bldr.setName(taskRequest.getRequest().getId());
    final Builder labelsBuilder = Labels.newBuilder();
    // apply request-specific labels, if any
    if (taskRequest.getDeploy().getMesosLabels().isPresent() && !taskRequest.getDeploy().getMesosLabels().get().isEmpty()) {
        for (SingularityMesosTaskLabel label : taskRequest.getDeploy().getMesosLabels().get()) {
            org.apache.mesos.v1.Protos.Label.Builder labelBuilder = Label.newBuilder();
            labelBuilder.setKey(label.getKey());
            if ((label.getValue().isPresent())) {
                labelBuilder.setValue(label.getValue().get());
            }
            labelsBuilder.addLabels(labelBuilder.build());
        }
    }
    // apply task-specific labels, if any
    final int taskInstanceNo = taskRequest.getPendingTask().getPendingTaskId().getInstanceNo();
    if (taskRequest.getDeploy().getMesosTaskLabels().isPresent() && taskRequest.getDeploy().getMesosTaskLabels().get().containsKey(taskInstanceNo) && !taskRequest.getDeploy().getMesosTaskLabels().get().get(taskInstanceNo).isEmpty()) {
        for (SingularityMesosTaskLabel label : taskRequest.getDeploy().getMesosTaskLabels().get().get(taskInstanceNo)) {
            org.apache.mesos.v1.Protos.Label.Builder labelBuilder = Label.newBuilder();
            labelBuilder.setKey(label.getKey());
            if ((label.getValue().isPresent())) {
                labelBuilder.setValue(label.getValue().get());
            }
            labelsBuilder.addLabels(labelBuilder.build());
        }
    }
    bldr.setLabels(labelsBuilder);
    TaskInfo task = bldr.build();
    return new SingularityMesosTaskHolder(new SingularityTask(taskRequest, taskId, offerHolder.getOffers().stream().map((o) -> mesosProtosUtils.offerFromProtos(o)).collect(Collectors.toList()), mesosProtosUtils.taskFromProtos(task), Optional.of(offerHolder.getRackId())), task);
}
Also used : SingularityTask(com.hubspot.singularity.SingularityTask) ExecutorInfo(org.apache.mesos.v1.Protos.ExecutorInfo) Parameter(org.apache.mesos.v1.Protos.Parameter) Inject(com.google.inject.Inject) LoggerFactory(org.slf4j.LoggerFactory) Labels(org.apache.mesos.v1.Protos.Labels) SingularityContainerInfo(com.hubspot.mesos.SingularityContainerInfo) SingularityMesosImage(com.hubspot.mesos.SingularityMesosImage) CommandInfo(org.apache.mesos.v1.Protos.CommandInfo) Optional(com.google.common.base.Optional) Map(java.util.Map) NetworkInfo(org.apache.mesos.v1.Protos.NetworkInfo) SingularityDockerInfo(com.hubspot.mesos.SingularityDockerInfo) MesosProtosUtils(com.hubspot.singularity.helpers.MesosProtosUtils) Variable(org.apache.mesos.v1.Protos.Environment.Variable) Resources(com.hubspot.mesos.Resources) SingularityDockerNetworkType(com.hubspot.mesos.SingularityDockerNetworkType) SingularityPortMapping(com.hubspot.mesos.SingularityPortMapping) SingularityTaskId(com.hubspot.singularity.SingularityTaskId) SingularityDockerVolume(com.hubspot.mesos.SingularityDockerVolume) SingularityVolumeSource(com.hubspot.mesos.SingularityVolumeSource) Collectors(java.util.stream.Collectors) MesosInfo(org.apache.mesos.v1.Protos.ContainerInfo.MesosInfo) ExecutorID(org.apache.mesos.v1.Protos.ExecutorID) ExecutorDataBuilder(com.hubspot.deploy.ExecutorDataBuilder) ByteString(com.google.protobuf.ByteString) List(java.util.List) MesosUtils(com.hubspot.singularity.helpers.MesosUtils) SingularityDockerImage(com.hubspot.mesos.SingularityDockerImage) SingularityMesosInfo(com.hubspot.mesos.SingularityMesosInfo) Entry(java.util.Map.Entry) ContainerInfo(org.apache.mesos.v1.Protos.ContainerInfo) Image(org.apache.mesos.v1.Protos.Image) DockerInfo(org.apache.mesos.v1.Protos.ContainerInfo.DockerInfo) Supplier(com.google.common.base.Supplier) HashMap(java.util.HashMap) SingularityTaskExecutorData(com.hubspot.singularity.SingularityTaskExecutorData) Singleton(javax.inject.Singleton) ArrayList(java.util.ArrayList) Resource(org.apache.mesos.v1.Protos.Resource) Strings(com.google.common.base.Strings) SingularityDockerPortMapping(com.hubspot.mesos.SingularityDockerPortMapping) SingularityS3UploaderFile(com.hubspot.singularity.SingularityS3UploaderFile) ImmutableList(com.google.common.collect.ImmutableList) ExecutorIdGenerator(com.hubspot.singularity.data.ExecutorIdGenerator) Volume(org.apache.mesos.v1.Protos.Volume) URI(org.apache.mesos.v1.Protos.CommandInfo.URI) SingularityAppcImage(com.hubspot.mesos.SingularityAppcImage) SingularityConfiguration(com.hubspot.singularity.config.SingularityConfiguration) SingularityNetworkInfo(com.hubspot.mesos.SingularityNetworkInfo) Logger(org.slf4j.Logger) Parameters(org.apache.mesos.v1.Protos.Parameters) SingularityDockerParameter(com.hubspot.mesos.SingularityDockerParameter) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) Builder(org.apache.mesos.v1.Protos.Labels.Builder) Ints(com.google.common.primitives.Ints) SingularityMesosTaskHolder(com.hubspot.singularity.helpers.SingularityMesosTaskHolder) Environment(org.apache.mesos.v1.Protos.Environment) SingularityMesosArtifact(com.hubspot.mesos.SingularityMesosArtifact) SingularityTaskRequest(com.hubspot.singularity.SingularityTaskRequest) SingularityVolume(com.hubspot.mesos.SingularityVolume) TaskID(org.apache.mesos.v1.Protos.TaskID) TaskInfo(org.apache.mesos.v1.Protos.TaskInfo) Collections(java.util.Collections) SingularityMesosTaskLabel(com.hubspot.mesos.SingularityMesosTaskLabel) Label(org.apache.mesos.v1.Protos.Label) ExecutorDataBuilder(com.hubspot.deploy.ExecutorDataBuilder) Builder(org.apache.mesos.v1.Protos.Labels.Builder) Resource(org.apache.mesos.v1.Protos.Resource) ArrayList(java.util.ArrayList) SingularityMesosTaskLabel(com.hubspot.mesos.SingularityMesosTaskLabel) Label(org.apache.mesos.v1.Protos.Label) SingularityMesosTaskHolder(com.hubspot.singularity.helpers.SingularityMesosTaskHolder) ByteString(com.google.protobuf.ByteString) TaskInfo(org.apache.mesos.v1.Protos.TaskInfo) SingularityContainerInfo(com.hubspot.mesos.SingularityContainerInfo) SingularityTask(com.hubspot.singularity.SingularityTask) SingularityTaskId(com.hubspot.singularity.SingularityTaskId) SingularityMesosTaskLabel(com.hubspot.mesos.SingularityMesosTaskLabel)

Example 8 with SingularityContainerInfo

use of com.hubspot.mesos.SingularityContainerInfo in project Singularity by HubSpot.

the class SingularityValidator method checkDeploy.

public SingularityDeploy checkDeploy(SingularityRequest request, SingularityDeploy deploy, List<SingularityTaskId> activeTasks, List<SingularityPendingTaskId> pendingTasks) {
    checkNotNull(request, "request is null");
    checkNotNull(deploy, "deploy is null");
    String deployId = deploy.getId();
    if (deployId == null) {
        checkBadRequest(createDeployIds, "Id must not be null");
        SingularityDeployBuilder builder = deploy.toBuilder();
        builder.setId(createUniqueDeployId());
        deploy = builder.build();
        deployId = deploy.getId();
    }
    checkBadRequest(deployId != null && !DEPLOY_ID_ILLEGAL_PATTERN.matcher(deployId).find(), "Id cannot be null or contain characters other than [a-zA-Z0-9_.]");
    checkBadRequest(deployId.length() <= maxDeployIdSize, "Deploy id must be %s characters or less, it is %s (%s)", maxDeployIdSize, deployId.length(), deployId);
    checkBadRequest(deploy.getRequestId() != null && deploy.getRequestId().equals(request.getId()), "Deploy id must match request id");
    if (request.isLoadBalanced()) {
        checkBadRequest(deploy.getServiceBasePath().isPresent(), "Deploy for loadBalanced request must include serviceBasePath");
        checkBadRequest(deploy.getLoadBalancerGroups().isPresent() && !deploy.getLoadBalancerGroups().get().isEmpty(), "Deploy for a loadBalanced request must include at least one load balacner group");
    }
    checkForIllegalResources(request, deploy);
    if (deploy.getResources().isPresent()) {
        if (deploy.getHealthcheck().isPresent()) {
            HealthcheckOptions healthcheck = deploy.getHealthcheck().get();
            checkBadRequest(!(healthcheck.getPortIndex().isPresent() && healthcheck.getPortNumber().isPresent()), "Can only specify one of portIndex or portNumber for healthchecks");
            if (healthcheck.getPortIndex().isPresent()) {
                checkBadRequest(healthcheck.getPortIndex().get() >= 0, "healthcheckPortIndex cannot be negative");
                checkBadRequest(deploy.getResources().get().getNumPorts() > healthcheck.getPortIndex().get(), String.format("Must request %s ports for healthcheckPortIndex %s, only requested %s", healthcheck.getPortIndex().get() + 1, healthcheck.getPortIndex().get(), deploy.getResources().get().getNumPorts()));
            }
        }
        if (deploy.getLoadBalancerPortIndex().isPresent()) {
            checkBadRequest(deploy.getLoadBalancerPortIndex().get() >= 0, "loadBalancerPortIndex must be greater than 0");
            checkBadRequest(deploy.getResources().get().getNumPorts() > deploy.getLoadBalancerPortIndex().get(), String.format("Must request %s ports for loadBalancerPortIndex %s, only requested %s", deploy.getLoadBalancerPortIndex().get() + 1, deploy.getLoadBalancerPortIndex().get(), deploy.getResources().get().getNumPorts()));
        }
    }
    if (deploy.getHealthcheck().isPresent()) {
        checkBadRequest(!Strings.isNullOrEmpty(deploy.getHealthcheck().get().getUri()), "Must specify a uri when specifying health check parameters");
        if (!deploy.getResources().isPresent() || deploy.getResources().get().getNumPorts() == 0) {
            checkBadRequest(deploy.getHealthcheck().get().getPortNumber().isPresent(), "Either an explicit port number, or port resources and port index must be specified to run healthchecks against a uri");
        }
        if (maxTotalHealthcheckTimeoutSeconds.isPresent()) {
            HealthcheckOptions options = deploy.getHealthcheck().get();
            int intervalSeconds = options.getIntervalSeconds().or(defaultHealthcheckIntervalSeconds);
            int httpTimeoutSeconds = options.getResponseTimeoutSeconds().or(defaultHealthcheckResponseTimeoutSeconds);
            int startupTime = options.getStartupTimeoutSeconds().or(defaultHealthcheckStartupTimeoutSeconds);
            int attempts = options.getMaxRetries().or(defaultHealthcehckMaxRetries) + 1;
            int totalHealthCheckTime = startupTime + ((httpTimeoutSeconds + intervalSeconds) * attempts);
            checkBadRequest(totalHealthCheckTime < maxTotalHealthcheckTimeoutSeconds.get(), String.format("Max healthcheck time cannot be greater than %s, (was startup timeout: %s, interval: %s, attempts: %s)", maxTotalHealthcheckTimeoutSeconds.get(), startupTime, intervalSeconds, attempts));
        }
        if (deploy.getHealthcheck().get().getStartupDelaySeconds().isPresent()) {
            int startUpDelay = deploy.getHealthcheck().get().getStartupDelaySeconds().get();
            checkBadRequest(startUpDelay < defaultKillHealthcheckAfterSeconds, String.format("Health check startup delay time must be less than max health check run time %s (was %s)", defaultKillHealthcheckAfterSeconds, startUpDelay));
        }
    }
    checkBadRequest(deploy.getCommand().isPresent() && !deploy.getExecutorData().isPresent() || deploy.getExecutorData().isPresent() && deploy.getCustomExecutorCmd().isPresent() && !deploy.getCommand().isPresent() || deploy.getContainerInfo().isPresent(), "If not using custom executor, specify a command or containerInfo. If using custom executor, specify executorData and customExecutorCmd and no command.");
    checkBadRequest(!deploy.getContainerInfo().isPresent() || deploy.getContainerInfo().get().getType() != null, "Container type must not be null");
    if (deploy.getLabels().isPresent() && deploy.getMesosTaskLabels().isPresent()) {
        List<SingularityMesosTaskLabel> deprecatedLabels = SingularityMesosTaskLabel.labelsFromMap(deploy.getLabels().get());
        checkBadRequest(deprecatedLabels.containsAll(deploy.getMesosLabels().get()) && deploy.getMesosLabels().get().containsAll(deprecatedLabels), "Can only specify one of 'labels' or 'mesosLabels");
    }
    if (deploy.getTaskLabels().isPresent() && deploy.getMesosTaskLabels().isPresent()) {
        for (Map.Entry<Integer, Map<String, String>> entry : deploy.getTaskLabels().get().entrySet()) {
            List<SingularityMesosTaskLabel> deprecatedLabels = SingularityMesosTaskLabel.labelsFromMap(entry.getValue());
            checkBadRequest(deploy.getMesosTaskLabels().get().containsKey(entry.getKey()) && deprecatedLabels.containsAll(deploy.getMesosTaskLabels().get().get(entry.getKey())) && deploy.getMesosTaskLabels().get().get(entry.getKey()).containsAll(deprecatedLabels), "Can only specify one of 'taskLabels' or 'mesosTaskLabels");
        }
    }
    if (deploy.getContainerInfo().isPresent()) {
        SingularityContainerInfo containerInfo = deploy.getContainerInfo().get();
        checkBadRequest(containerInfo.getType() != null, "container type may not be null");
        if (containerInfo.getVolumes().isPresent() && !containerInfo.getVolumes().get().isEmpty()) {
            for (SingularityVolume volume : containerInfo.getVolumes().get()) {
                checkBadRequest(volume.getContainerPath() != null, "volume containerPath may not be null");
            }
        }
        if (deploy.getContainerInfo().get().getType() == SingularityContainerType.DOCKER) {
            checkDocker(deploy);
        }
    }
    checkBadRequest(deployHistoryHelper.isDeployIdAvailable(request.getId(), deployId), "Can not deploy a deploy that has already been deployed");
    if (deploy.getRunImmediately().isPresent()) {
        deploy = checkImmediateRunDeploy(request, deploy, deploy.getRunImmediately().get(), activeTasks, pendingTasks);
    }
    if (request.isDeployable()) {
        checkRequestForPriorityFreeze(request);
    }
    return deploy;
}
Also used : SingularityContainerInfo(com.hubspot.mesos.SingularityContainerInfo) HealthcheckOptions(com.hubspot.deploy.HealthcheckOptions) SingularityVolume(com.hubspot.mesos.SingularityVolume) SingularityDeployBuilder(com.hubspot.singularity.SingularityDeployBuilder) SingularityMesosTaskLabel(com.hubspot.mesos.SingularityMesosTaskLabel) Map(java.util.Map)

Aggregations

SingularityContainerInfo (com.hubspot.mesos.SingularityContainerInfo)8 SingularityDockerInfo (com.hubspot.mesos.SingularityDockerInfo)6 SingularityDockerPortMapping (com.hubspot.mesos.SingularityDockerPortMapping)6 SingularityVolume (com.hubspot.mesos.SingularityVolume)6 SingularityDeployBuilder (com.hubspot.singularity.SingularityDeployBuilder)6 Resources (com.hubspot.mesos.Resources)5 SingularityTaskRequest (com.hubspot.singularity.SingularityTaskRequest)5 SingularityMesosTaskHolder (com.hubspot.singularity.helpers.SingularityMesosTaskHolder)5 SingularityPortMapping (com.hubspot.mesos.SingularityPortMapping)4 SingularityDeploy (com.hubspot.singularity.SingularityDeploy)4 SingularityRequest (com.hubspot.singularity.SingularityRequest)4 SingularityRequestBuilder (com.hubspot.singularity.SingularityRequestBuilder)4 Test (org.junit.Test)4 SingularityDockerVolume (com.hubspot.mesos.SingularityDockerVolume)3 SingularityVolumeSource (com.hubspot.mesos.SingularityVolumeSource)3 Parameter (org.apache.mesos.v1.Protos.Parameter)3 Volume (org.apache.mesos.v1.Protos.Volume)3 ByteString (com.google.protobuf.ByteString)2 SingularityDockerImage (com.hubspot.mesos.SingularityDockerImage)2 SingularityDockerParameter (com.hubspot.mesos.SingularityDockerParameter)2