summary refs log tree commit diff
path: root/playgrounds/aurora/iperf.aurora
blob: e071bd295961c5c0c151397ac25847b0bf35f6ad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
class StandardProfile(Struct):
  environment=Default(String, 'prod')
  tier=Default(String, 'preferred')

DevelProfile = StandardProfile(
  environment = 'devel',
  tier = 'preemptible',
)

api = Process(
  name = 'iperf',
  cmdline = '/usr/bin/iperf3 -s -p {{thermos.ports[http]}}'
)

task = Task(
  name = api.name(),
  resources = Resources(cpu = 1.0, ram = 4 * GB, disk = 1 * GB),
  processes = [api]
)

service_template = Service(
  role='fcuny',
  name = 'iperf',
  environment='{{profile.environment}}',
  task = task,
  instances = 3,
  contact = 'fcuny@twitter.com',
  announce=Announcer(),
  tier ='{{profile.tier}}',
  constraints={
    'host': 'smf1-bgr-27-sr1',
  }
)

jobs = [
  service_template(cluster='smf1-test').bind(profile=DevelProfile()),
]