from apache.aurora.executor.aurora_executor import AuroraExecutor
from apache.aurora.executor.common.announcer import DefaultAnnouncerCheckerProvider
from apache.aurora.executor.common.executor_timeout import ExecutorTimeout
from apache.aurora.executor.common.health_checker import HealthCheckerProvider
from apache.aurora.executor.common.resource_manager import ResourceManagerProvider
from apache.aurora.executor.common.sandbox import DefaultSandboxProvider
from apache.aurora.executor.thermos_task_runner import (
    DefaultThermosTaskRunnerProvider,
    UserOverrideThermosTaskRunnerProvider
)
from apache.thermos.common.path import TaskPath

CWD = os.environ.get('MESOS_SANDBOX', '.')

app.configure(debug=True)
LogOptions.set_simple(True)
LogOptions.set_disk_log_level('DEBUG')
LogOptions.set_log_dir(CWD)


app.add_option(
    '--announcer-enable',
    dest='announcer_enable',
    action='store_true',
    default=False,
    help='Enable the ServerSet announcer for this executor.  Jobs must still activate using '
         'the Announcer configuration.')


app.add_option(
Esempio n. 2
0
from twitter.common import app, log
from twitter.common.app.modules.http import RootServer
from twitter.common.log.options import LogOptions
from twitter.common.metrics import RootMetrics

from twitter.common.examples.pingpong import PingPongServer


app.add_option('--target_host', default='localhost',
               help='The target host to send pingpong requests.')
app.add_option('--target_port', default=12345, type='int',
               help='The target port to send pingpong requests.')


app.configure('twitter.common.app.modules.http', enable=True)


def main(args, options):
  pingpong = PingPongServer(options.target_host, options.target_port)
  RootServer().mount_routes(pingpong)
  RootMetrics().register_observable('pingpong', pingpong)

  try:
    time.sleep(2**20)
  except KeyboardInterrupt:
    log.info('Shutting down.')


LogOptions.set_disk_log_level('NONE')
LogOptions.set_stderr_log_level('google:DEBUG')
"""

import os

from mesos.native import MesosExecutorDriver
from twitter.common import app, log
from twitter.common.log.options import LogOptions

from apache.aurora.executor.aurora_executor import AuroraExecutor
from apache.aurora.executor.common.announcer import DefaultAnnouncerCheckerProvider
from apache.aurora.executor.common.executor_timeout import ExecutorTimeout
from apache.aurora.executor.common.health_checker import HealthCheckerProvider
from apache.aurora.executor.thermos_task_runner import DefaultThermosTaskRunnerProvider

app.configure(debug=True)
LogOptions.set_simple(True)
LogOptions.set_disk_log_level('DEBUG')
LogOptions.set_log_dir('.')

app.add_option(
    '--announcer-enable',
    dest='announcer_enable',
    action='store_true',
    default=False,
    help=
    'Enable the ServerSet announcer for this executor.  Jobs must still activate using '
    'the Announcer configuration.')

app.add_option(
    '--announcer-ensemble',
Esempio n. 4
0
from twitter.common import app, log
from twitter.common.app.modules.http import RootServer
from twitter.common.log.options import LogOptions
from twitter.common.metrics import RootMetrics

from twitter.common.examples.pingpong import PingPongServer

app.add_option('--target_host',
               default='localhost',
               help='The target host to send pingpong requests.')
app.add_option('--target_port',
               default=12345,
               type='int',
               help='The target port to send pingpong requests.')

app.configure('twitter.common.app.modules.http', enable=True)


def main(args, options):
    pingpong = PingPongServer(options.target_host, options.target_port)
    RootServer().mount_routes(pingpong)
    RootMetrics().register_observable('pingpong', pingpong)

    try:
        time.sleep(2**20)
    except KeyboardInterrupt:
        log.info('Shutting down.')


LogOptions.set_disk_log_level('NONE')
LogOptions.set_stderr_log_level('google:DEBUG')