Return-Path: X-Original-To: apmail-aurora-commits-archive@minotaur.apache.org Delivered-To: apmail-aurora-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C9AA51084D for ; Thu, 30 Jan 2014 19:45:22 +0000 (UTC) Received: (qmail 85565 invoked by uid 500); 30 Jan 2014 19:45:22 -0000 Delivered-To: apmail-aurora-commits-archive@aurora.apache.org Received: (qmail 85531 invoked by uid 500); 30 Jan 2014 19:45:22 -0000 Mailing-List: contact commits-help@aurora.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@aurora.incubator.apache.org Delivered-To: mailing list commits@aurora.incubator.apache.org Received: (qmail 85520 invoked by uid 99); 30 Jan 2014 19:45:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jan 2014 19:45:21 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 30 Jan 2014 19:45:20 +0000 Received: (qmail 84654 invoked by uid 99); 30 Jan 2014 19:45:00 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jan 2014 19:45:00 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id B7785916369; Thu, 30 Jan 2014 19:44:59 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: kevints@apache.org To: commits@aurora.incubator.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: Fix indentation in tutorial Date: Thu, 30 Jan 2014 19:44:59 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org Updated Branches: refs/heads/master ec4472625 -> 2e89d69bb Fix indentation in tutorial Testing Done: Pushed to github branch and verified formatting. Reviewed at https://reviews.apache.org/r/17507/ Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/2e89d69b Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/2e89d69b Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/2e89d69b Branch: refs/heads/master Commit: 2e89d69bb1fee0ea88160a065ffcb9848017f636 Parents: ec44726 Author: Kevin Sweeney Authored: Thu Jan 30 11:43:45 2014 -0800 Committer: Kevin Sweeney Committed: Thu Jan 30 11:43:45 2014 -0800 ---------------------------------------------------------------------- docs/tutorial.md | 80 +++++++++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 40 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/2e89d69b/docs/tutorial.md ---------------------------------------------------------------------- diff --git a/docs/tutorial.md b/docs/tutorial.md index a9c83fb..20a2780 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -4,15 +4,15 @@ Aurora Tutorial Before reading this document, you should read over the (short) [README](README.md) for the Aurora docs. -[Introduction](#Introduction) -[Setup: Install Aurora](#Setup) -[The Script](#Script) -[Aurora Configuration](#Configuration) -[What's Going On In That Configuration File?](#What) -[Creating the Job](#Creating) -[Watching the Job Run](#Watching) -[Cleanup](#Cleanup) -[Next Steps](#Next) +- [Introduction](#Introduction) +- [Setup: Install Aurora](#Setup) +- [The Script](#Script) +- [Aurora Configuration](#Configuration) +- [What's Going On In That Configuration File?](#What) +- [Creating the Job](#Creating) +- [Watching the Job Run](#Watching) +- [Cleanup](#Cleanup) +- [Next Steps](#Next) ## Introduction @@ -45,20 +45,20 @@ this directory is the same as `/vagrant` inside the Vagrant VMs). The script has an intentional bug, which we will explain later on. - import sys - import time + import sys + import time - def main(argv): - SLEEP_DELAY = 10 - # Python ninjas - ignore this blatant bug. - for i in xrang(100): - print("Hello world! The time is now: %s. Sleeping for %d secs" % ( - time.asctime(), SLEEP_DELAY)) - sys.stdout.flush() - time.sleep(SLEEP_DELAY) + def main(argv): + SLEEP_DELAY = 10 + # Python ninjas - ignore this blatant bug. + for i in xrang(100): + print("Hello world! The time is now: %s. Sleeping for %d secs" % ( + time.asctime(), SLEEP_DELAY)) + sys.stdout.flush() + time.sleep(SLEEP_DELAY) - if __name__ == "__main__": - main(sys.argv) + if __name__ == "__main__": + main(sys.argv) ## Aurora Configuration @@ -68,27 +68,27 @@ code in the file `hello_world.aurora` in the same directory as your `hello_world.py' file. (all Aurora configuration files end with `.aurora` and are written in a Python variant). - import os + import os - # copy hello_world.py into the local sandbox - install = Process( - name = 'fetch_package', - cmdline = 'cp /vagrant/hello_world.py . && chmod +x hello_world.py') + # copy hello_world.py into the local sandbox + install = Process( + name = 'fetch_package', + cmdline = 'cp /vagrant/hello_world.py . && chmod +x hello_world.py') - # run the script - hello_world = Process( - name = 'hello_world', - cmdline = 'python2.6 hello_world.py') + # run the script + hello_world = Process( + name = 'hello_world', + cmdline = 'python2.6 hello_world.py') - # describe the task - hello_world_task = SequentialTask( - processes = [install, hello_world], - resources = Resources(cpu = 1, ram = 1*MB, disk=8*MB)) + # describe the task + hello_world_task = SequentialTask( + processes = [install, hello_world], + resources = Resources(cpu = 1, ram = 1*MB, disk=8*MB)) - jobs = [ - Job(name = 'hello_world', cluster = 'example', role = 'www-data', - environment = 'devel', task = hello_world_task) - ] + jobs = [ + Job(name = 'hello_world', cluster = 'example', role = 'www-data', + environment = 'devel', task = hello_world_task) + ] For more about Aurora configuration files, see the [Configuration Tutorial](configurationtutorial.md) and the [Aurora + Thermos @@ -128,7 +128,7 @@ identical, the job keys identify the same job. cluster names. For Vagrant, from the top-level of your Aurora repository clone, do: - $ vagrant ssh aurora-scheduler + $ vagrant ssh aurora-scheduler Followed by: @@ -212,7 +212,7 @@ not `xrang`. Edit the `hello_world.py` script, save as `hello_world_v2.py` and c Now that we've updated our configuration, let's restart the job: - $ aurora update example/www-data/devel/hello_world /vagrant/hello_world.aurora + $ aurora update example/www-data/devel/hello_world /vagrant/hello_world.aurora This time, the task comes up, we inspect the page, and see that the `hello_world` process is running.