use of com.netflix.titus.grpc.protogen.Container in project titus-control-plane by Netflix.
the class JobTemplateCommand method createServiceJobDescriptor.
private JobDescriptor createServiceJobDescriptor() {
Container container = createContainer().addAllEntryPoint(asList("sleep", "30")).build();
ServiceJobSpec jobSpec = ServiceJobSpec.newBuilder().setCapacity(Capacity.newBuilder().setMin(1).setDesired(5).setMax(10).build()).setEnabled(true).setRetryPolicy(RetryPolicy.newBuilder().setDelayed(RetryPolicy.Delayed.newBuilder().setDelayMs(1000).setRetries(3))).build();
return JobDescriptor.newBuilder().setApplicationName("myServiceApp").setOwner(createUser()).setCapacityGroup("service_workloads").setContainer(container).putAllAttributes(createLabels()).setJobGroupInfo(createJobGroupInfo()).setService(jobSpec).build();
}
use of com.netflix.titus.grpc.protogen.Container in project titus-control-plane by Netflix.
the class JobTemplateCommand method createBatchJobDescriptor.
private JobDescriptor createBatchJobDescriptor() {
Container container = createContainer().addAllEntryPoint(asList("echo", "\"Hello\"")).build();
BatchJobSpec jobSpec = BatchJobSpec.newBuilder().setRuntimeLimitSec(180).setSize(1).setRetryPolicy(RetryPolicy.newBuilder().setDelayed(RetryPolicy.Delayed.newBuilder().setDelayMs(1000).setRetries(3))).build();
return JobDescriptor.newBuilder().setApplicationName("myBatchApp").setOwner(createUser()).setCapacityGroup("batch_workloads").setContainer(container).putAllAttributes(createLabels()).setJobGroupInfo(createJobGroupInfo()).setBatch(jobSpec).build();
}
Aggregations