From a4872e963489f5db2474f1d1350a44c970a873d3 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Tue, 18 Sep 2018 11:27:09 -0700 Subject: [configs] add some aurora configs. --- configs/aurora/fio.aurora | 32 ++++++++++++++++++++++++++++++++ configs/aurora/hello-job.aurora | 21 +++++++++++++++++++++ configs/aurora/smf1-test-cron-job.aurora | 17 +++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 configs/aurora/fio.aurora create mode 100644 configs/aurora/hello-job.aurora create mode 100644 configs/aurora/smf1-test-cron-job.aurora (limited to 'configs') diff --git a/configs/aurora/fio.aurora b/configs/aurora/fio.aurora new file mode 100644 index 0000000..c91095e --- /dev/null +++ b/configs/aurora/fio.aurora @@ -0,0 +1,32 @@ +downloadFIO = Process( + name='download-fio', + cmdline='curl -o fio.rpm https://svn.twitter.biz/rpms/fio.x86_64/RPMS/x86_64/fio-1.50-2.twitter.x86_64.rpm' +) + +extractFIO = Process( + name='extract-fio', + cmdline='rpm2cpio fio.rpm | cpio -idmv' +) + +runFIO = Process( + name='run-fio', + cmdline='./usr/bin/fio --name=writefile --size=8G --filesize=8G --filename=./fiotestfsync --bs=4k --nrfiles=1 --fsync=1 --randrepeat=0 --rw=write --refill_buffers --end_fsync=1 --iodepth=200 --ioengine=libaio --runtime=240', +) + +jobs = [ + Service( + cluster='smf1-test', + environment='devel', + role='fcuny', + name='fio', + task=Task( + processes=[downloadFIO, extractFIO, runFIO], + resources=Resources(cpu=10, ram=4096 * MB, disk=10 * GB), + constraints=order(downloadFIO, extractFIO, runFIO) + ), + instances=4, + constraints={ + 'base_platform': 'f4ww', + } + ) +] diff --git a/configs/aurora/hello-job.aurora b/configs/aurora/hello-job.aurora new file mode 100644 index 0000000..e0758a3 --- /dev/null +++ b/configs/aurora/hello-job.aurora @@ -0,0 +1,21 @@ +hello_date = Process( + name='hello-date', + cmdline='while true; do date; sleep 10; done' +) + +jobs = [ + Service( + cluster='smf1', + environment='devel', + role='fcuny', + name='hello-date', + task=Task( + processes=[hello_date], + resources=Resources(cpu=10, ram=1024 * MB, disk=512 * MB) + ), + instances=1, + constraints={ + 'host': 'smf1-feq-33-sr1', + } + ) +] diff --git a/configs/aurora/smf1-test-cron-job.aurora b/configs/aurora/smf1-test-cron-job.aurora new file mode 100644 index 0000000..3ade1b4 --- /dev/null +++ b/configs/aurora/smf1-test-cron-job.aurora @@ -0,0 +1,17 @@ +# A cron job that runs every 5 minutes. +jobs = [ + Job( + cluster = 'smf1-test', + role = 'fcuny', + environment = 'test', + name = 'cron_hello_world-trashing', + cron_schedule = '*/5 * * * *', + constraints = { + 'host': 'smf1-fki-17-sr1', + }, + instances=10, + task = SimpleTask( + 'cron_hello_world', + 'echo "Hello world from cron, the time is now $(date --rfc-822)"'), + ), +] -- cgit 1.4.1