Skip to content

Instantly share code, notes, and snippets.

@dln
Last active October 21, 2015 13:41
Show Gist options
  • Select an option

  • Save dln/caf67e3e23f09ca5d41e to your computer and use it in GitHub Desktop.

Select an option

Save dln/caf67e3e23f09ca5d41e to your computer and use it in GitHub Desktop.
Parameterized jobs in Aurora
CLUSTERS = [
'dc1.example.com',
'dc2.example.com',
'dc3.example.com',
'dc4.example.com',
'dc5.example.com',
'dc6.example.com',
]
include("clusters.aurora")
myprocess = Process(
name = 'my awesome program',
cmdline = ...
)
myservice = Service(
role = 'user',
env = 'prod',
name = 'myjob',
task = Task(
processes = [myprocess],
resources = Resources(cpu = 1.0, ram = 3*GB, disk = 10*GB),
),
instances = 3,
)
jobs = [myservice(cluster = cluster) for cluster in CLUSTERS]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment