Last active
August 29, 2015 14:25
-
-
Save micktwomey/4641d1da1bd1669e2c4b to your computer and use it in GitHub Desktop.
Django + Aurora + Mesos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fetch = Process( | |
name = 'fetch', | |
cmdline = ('export AWS_ACCESS_KEY_ID=... ' | |
'export AWS_SECRET_ACCESS_KEY=... ' | |
'env ' | |
'; aws s3 cp s3://micktwomey-acaversity/slugs/acaversity-master-24.tar.gz slug.tar.gz ' | |
'&& tar -zxf slug.tar.gz' | |
), | |
) | |
setup = Process( | |
name = 'setup.sh', | |
cmdline = 'bash slug/scripts/setup.sh', | |
) | |
start = Process( | |
name = 'start.sh', | |
cmdline = 'bash slug/scripts/start.sh --http :{{thermos.ports[http]}} --http :{{thermos.ports[health]}}' | |
# cmdline = 'bash slug/scripts/start.sh 0.0.0.0:{{thermos.ports[http]}}' | |
) | |
django_task = SequentialTask( | |
processes = [fetch, setup, start], | |
resources = Resources(cpu = 0.1, ram = 100*MB, disk=100*MB) | |
) | |
update_config = UpdateConfig(watch_secs=45, batch_size=2) | |
health_check_config = HealthCheckConfig(initial_interval_secs=15, | |
interval_secs=10, | |
expected_response='{"ok": true}') | |
announcer_config = Announcer() | |
jobs = [ | |
Service(cluster = 'devcluster', | |
environment = 'devel', | |
role = 'www-data', | |
name = 'acaversity', | |
instances = 4, | |
task = django_task, | |
update_config = update_config, | |
health_check_config = health_check_config, | |
announce = announcer_config, | |
constraints = { | |
'host': 'limit:10', | |
} | |
) | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment