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
Esempio n. 4
0
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)
Esempio n. 7
0
 class ChoiceDefaultStruct(Struct):
     a = Default(Choice("IntOrDumb", [Dumb, Integer]), 28)
     b = Integer
Esempio n. 8
0
 class ParentNew(Struct):
     child = Default(ChildNew, ChildNew())  # noqa
Esempio n. 9
0
 class ParentOld(Struct):
     child = Default(ChildOld, ChildOld())  # noqa
Esempio n. 10
0
 class ChildNew(Struct):
     interval = Default(Float, 1.0)  # noqa
     endpoint = Default(String, '/health')  # noqa
Esempio n. 11
0
 class ChildOld(Struct):
     interval = Default(Float, 1.0)  # noqa
Esempio n. 12
0
class Logger(Struct):
    destination = Default(LoggerDestination, LoggerDestination('file'))
    mode = Default(LoggerMode, LoggerMode('rotate'))
    rotate = RotatePolicy
Esempio n. 13
0
class RotatePolicy(Struct):
    log_size = Default(Integer, 100 * MB)
    backups = Default(Integer, 5)
Esempio n. 14
0
class Resources(Struct):
    cpu = Required(Float)
    ram = Required(Integer)
    disk = Required(Integer)
    gpu = Default(Integer, 0)
Esempio n. 15
0
 class AudubonTrait(Cluster.Trait):
     master_role = String  # noqa
     slave_role = Default(String, 'slave')  # noqa
     version = Required(Integer)  # noqa
Esempio n. 16
0
class DockerRegistryTrait(Cluster.Trait):
    docker_registry = Default(String, DEFAULT_DOCKER_REGISTRY_HOST)  # noqa