class SchedulerClientTrait(Cluster.Trait): zk = String # noqa zk_port = Default(Integer, 2181) # noqa scheduler_zk_path = String # noqa scheduler_uri = String # noqa proxy_url = String # noqa auth_mechanism = Default(String, 'UNAUTHENTICATED') # noqa
class SchedulerClientTrait(Cluster.Trait): zk = String zk_port = Default(Integer, 2181) scheduler_zk_path = String scheduler_uri = String proxy_url = String auth_mechanism = Default(String, 'UNAUTHENTICATED') use_thrift_ssl = Default(Boolean, False)
class Process(Struct): cmdline = Required(String) name = Required(String) # This is currently unused but reserved for future use by Thermos. resources = Resources # optionals max_failures = Default(Integer, 1) # maximum number of failed process runs # before process is failed. daemon = Default(Boolean, False) ephemeral = Default(Boolean, False) min_duration = Default(Integer, 5) # integer seconds final = Default(Boolean, False) # if this process should be a finalizing process
class Task(Struct): name = Default(String, '{{processes[0].name}}') processes = List(Process) # optionals constraints = Default(List(Constraint), []) resources = Resources max_failures = Default( Integer, 1) # maximum number of failed processes before task is failed. max_concurrency = Default(Integer, 0) # 0 is infinite concurrency. # > 0 is max concurrent processes. finalization_wait = Default( Integer, 30) # the amount of time in seconds we allocate to run the # finalization schedule. # TODO(jon): remove/replace with proper solution to MESOS-3546 user = String
class ZkAuth(Struct): auth = Default(List(Auth), []) acl = Default(List(Access), [])
class Permissions(Struct): read = Default(Boolean, False) write = Default(Boolean, False) create = Default(Boolean, False) delete = Default(Boolean, False) admin = Default(Boolean, False)
class ChoiceDefaultStruct(Struct): a = Default(Choice("IntOrDumb", [Dumb, Integer]), 28) b = Integer
class ParentNew(Struct): child = Default(ChildNew, ChildNew()) # noqa
class ParentOld(Struct): child = Default(ChildOld, ChildOld()) # noqa
class ChildNew(Struct): interval = Default(Float, 1.0) # noqa endpoint = Default(String, '/health') # noqa
class ChildOld(Struct): interval = Default(Float, 1.0) # noqa
class Logger(Struct): destination = Default(LoggerDestination, LoggerDestination('file')) mode = Default(LoggerMode, LoggerMode('rotate')) rotate = RotatePolicy
class RotatePolicy(Struct): log_size = Default(Integer, 100 * MB) backups = Default(Integer, 5)
class Resources(Struct): cpu = Required(Float) ram = Required(Integer) disk = Required(Integer) gpu = Default(Integer, 0)
class AudubonTrait(Cluster.Trait): master_role = String # noqa slave_role = Default(String, 'slave') # noqa version = Required(Integer) # noqa
class DockerRegistryTrait(Cluster.Trait): docker_registry = Default(String, DEFAULT_DOCKER_REGISTRY_HOST) # noqa