Adding support for configuring tasks with Docker Containers
This commit is contained in:
parent
c83e5d268a
commit
66a2868aab
3 changed files with 85 additions and 4 deletions
13
job.go
13
job.go
|
@ -25,8 +25,8 @@ type Job interface {
|
|||
Role(role string) Job
|
||||
Name(name string) Job
|
||||
CPU(cpus float64) Job
|
||||
CronSchedule(cron string) Job
|
||||
CronCollisionPolicy(policy aurora.CronCollisionPolicy) Job
|
||||
CronSchedule(cron string) Job
|
||||
CronCollisionPolicy(policy aurora.CronCollisionPolicy) Job
|
||||
Disk(disk int64) Job
|
||||
RAM(ram int64) Job
|
||||
ExecutorName(name string) Job
|
||||
|
@ -44,6 +44,7 @@ type Job interface {
|
|||
InstanceCount(instCount int32) Job
|
||||
GetInstanceCount() int32
|
||||
MaxFailure(maxFail int32) Job
|
||||
Container(container Container) Job
|
||||
}
|
||||
|
||||
// Structure to collect all information pertaining to an Aurora job.
|
||||
|
@ -262,3 +263,11 @@ func (j AuroraJob) AddLimitConstraint(name string, limit int32) Job {
|
|||
|
||||
return j
|
||||
}
|
||||
|
||||
// Set a container to run for the job configuration to run.
|
||||
// TODO (rdelvalle): Add no thermos mode where container is launched as a task and not an executor.
|
||||
func (j AuroraJob) Container(container Container) Job {
|
||||
j.jobConfig.TaskConfig.Container = container.Build()
|
||||
|
||||
return j
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue