{"action":"created","comment":{"url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/pulls/comments/38951945","id":38951945,"diff_hunk":"@@ -8,6 +8,10 @@ spark.jobserver {\n   filedao.rootdir = {{ sjs_filedao_dir }}\n }\n \n+spark.contexts {\n+  geoprocessing {}","path":"deployment/ansible/roles/model-my-watershed.spark-jobserver/templates/spark-jobserver.conf.j2","position":5,"original_position":5,"commit_id":"ebf38b869f6e261aefdbb817a2611e1082751bc1","original_commit_id":"ebf38b869f6e261aefdbb817a2611e1082751bc1","user":{"login":"hectcastro","id":43639,"avatar_url":"https://avatars.githubusercontent.com/u/43639?v=3","gravatar_id":"","url":"https://api.github.com/users/hectcastro","html_url":"https://github.com/hectcastro","followers_url":"https://api.github.com/users/hectcastro/followers","following_url":"https://api.github.com/users/hectcastro/following{/other_user}","gists_url":"https://api.github.com/users/hectcastro/gists{/gist_id}","starred_url":"https://api.github.com/users/hectcastro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hectcastro/subscriptions","organizations_url":"https://api.github.com/users/hectcastro/orgs","repos_url":"https://api.github.com/users/hectcastro/repos","events_url":"https://api.github.com/users/hectcastro/events{/privacy}","received_events_url":"https://api.github.com/users/hectcastro/received_events","type":"User","site_admin":false},"body":"This creates a Spark context named `geoprocessing` on SJS startup. Any changes we need to make to the context should happen here.","created_at":"2015-09-08T17:09:23Z","updated_at":"2015-09-08T17:09:23Z","html_url":"https://github.com/jamesmcclain/model-my-watershed/pull/4#discussion_r38951945","pull_request_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/jamesmcclain/model-my-watershed/pulls/comments/38951945"},"html":{"href":"https://github.com/jamesmcclain/model-my-watershed/pull/4#discussion_r38951945"},"pull_request":{"href":"https://api.github.com/repos/jamesmcclain/model-my-watershed/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/pulls/4","id":44457276,"html_url":"https://github.com/jamesmcclain/model-my-watershed/pull/4","diff_url":"https://github.com/jamesmcclain/model-my-watershed/pull/4.diff","patch_url":"https://github.com/jamesmcclain/model-my-watershed/pull/4.patch","issue_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/issues/4","number":4,"state":"open","locked":false,"title":"Add support for SJS; load it with geoprocessing JAR","user":{"login":"hectcastro","id":43639,"avatar_url":"https://avatars.githubusercontent.com/u/43639?v=3","gravatar_id":"","url":"https://api.github.com/users/hectcastro","html_url":"https://github.com/hectcastro","followers_url":"https://api.github.com/users/hectcastro/followers","following_url":"https://api.github.com/users/hectcastro/following{/other_user}","gists_url":"https://api.github.com/users/hectcastro/gists{/gist_id}","starred_url":"https://api.github.com/users/hectcastro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hectcastro/subscriptions","organizations_url":"https://api.github.com/users/hectcastro/orgs","repos_url":"https://api.github.com/users/hectcastro/repos","events_url":"https://api.github.com/users/hectcastro/events{/privacy}","received_events_url":"https://api.github.com/users/hectcastro/received_events","type":"User","site_admin":false},"body":"Spark Job Server (SJS) has been added to the `worker` virtual machine within a Docker container. Upstart manages the SJS container, so all normal interactions with it should be via the `start`, `stop`, and\r\n`restart` commands.\r\n\r\nOnce SJS is up-and-running, a second Upstart job fires to load the geoprocessing JAR. The `geoprocessing` Spark context is created by SJS itself. Any additional tuning we do to the context should happen via the SJS configuration file.\r\n\r\nAmazon credentials need to be mapped into the `worker` virtual machine for anything to work (the geoprocessing process makes tile requests to Amazon S3). This happens via a Vagrant mount for the `vagrant` user, but also via an Ansible `copy` task for the geoprocessing service itself.\r\n\r\nRight now, SJS jobs are synchronous, but I believe that they'll need to be made asynchronous (with the Celery job polling for status), or else we are going to run into issues with long-running synchronous SJS jobs.\r\n\r\nI also increased the JavaScript polling timeout from 5 seconds to 10. This allows more successfully completed SJS jobs to have their results make it back to the UI before giving up on polling.\r\n\r\nAttempts to resolve #50.","created_at":"2015-09-08T17:02:40Z","updated_at":"2015-09-08T17:09:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"129459fa9afd659c96f53def2c0ad337be9e3ffd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/pulls/4/commits","review_comments_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/pulls/4/comments","review_comment_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/issues/4/comments","statuses_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/statuses/ebf38b869f6e261aefdbb817a2611e1082751bc1","head":{"label":"WikiWatershed:jamesmcclain-feature/use-datahub","ref":"jamesmcclain-feature/use-datahub","sha":"ebf38b869f6e261aefdbb817a2611e1082751bc1","user":{"login":"WikiWatershed","id":8520008,"avatar_url":"https://avatars.githubusercontent.com/u/8520008?v=3","gravatar_id":"","url":"https://api.github.com/users/WikiWatershed","html_url":"https://github.com/WikiWatershed","followers_url":"https://api.github.com/users/WikiWatershed/followers","following_url":"https://api.github.com/users/WikiWatershed/following{/other_user}","gists_url":"https://api.github.com/users/WikiWatershed/gists{/gist_id}","starred_url":"https://api.github.com/users/WikiWatershed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WikiWatershed/subscriptions","organizations_url":"https://api.github.com/users/WikiWatershed/orgs","repos_url":"https://api.github.com/users/WikiWatershed/repos","events_url":"https://api.github.com/users/WikiWatershed/events{/privacy}","received_events_url":"https://api.github.com/users/WikiWatershed/received_events","type":"Organization","site_admin":false},"repo":{"id":32742922,"name":"model-my-watershed","full_name":"WikiWatershed/model-my-watershed","owner":{"login":"WikiWatershed","id":8520008,"avatar_url":"https://avatars.githubusercontent.com/u/8520008?v=3","gravatar_id":"","url":"https://api.github.com/users/WikiWatershed","html_url":"https://github.com/WikiWatershed","followers_url":"https://api.github.com/users/WikiWatershed/followers","following_url":"https://api.github.com/users/WikiWatershed/following{/other_user}","gists_url":"https://api.github.com/users/WikiWatershed/gists{/gist_id}","starred_url":"https://api.github.com/users/WikiWatershed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WikiWatershed/subscriptions","organizations_url":"https://api.github.com/users/WikiWatershed/orgs","repos_url":"https://api.github.com/users/WikiWatershed/repos","events_url":"https://api.github.com/users/WikiWatershed/events{/privacy}","received_events_url":"https://api.github.com/users/WikiWatershed/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WikiWatershed/model-my-watershed","description":"The web application front end for Model My Watershed.","fork":false,"url":"https://api.github.com/repos/WikiWatershed/model-my-watershed","forks_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/forks","keys_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/teams","hooks_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/hooks","issue_events_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/issues/events{/number}","events_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/events","assignees_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/assignees{/user}","branches_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/branches{/branch}","tags_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/tags","blobs_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/git/refs{/sha}","trees_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/statuses/{sha}","languages_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/languages","stargazers_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/stargazers","contributors_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/contributors","subscribers_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/subscribers","subscription_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/subscription","commits_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/commits{/sha}","git_commits_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/git/commits{/sha}","comments_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/comments{/number}","issue_comment_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/issues/comments{/number}","contents_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/contents/{+path}","compare_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/merges","archive_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/downloads","issues_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/issues{/number}","pulls_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/pulls{/number}","milestones_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/milestones{/number}","notifications_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/labels{/name}","releases_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/releases{/id}","created_at":"2015-03-23T16:02:55Z","updated_at":"2015-07-16T03:33:25Z","pushed_at":"2015-09-08T17:00:58Z","git_url":"git://github.com/WikiWatershed/model-my-watershed.git","ssh_url":"git@github.com:WikiWatershed/model-my-watershed.git","clone_url":"https://github.com/WikiWatershed/model-my-watershed.git","svn_url":"https://github.com/WikiWatershed/model-my-watershed","homepage":null,"size":18024,"stargazers_count":3,"watchers_count":3,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":128,"forks":12,"open_issues":128,"watchers":3,"default_branch":"develop"}},"base":{"label":"jamesmcclain:feature/use-datahub","ref":"feature/use-datahub","sha":"71f877c11a678c1d9f0926681a79d9bce44419da","user":{"login":"jamesmcclain","id":11281373,"avatar_url":"https://avatars.githubusercontent.com/u/11281373?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesmcclain","html_url":"https://github.com/jamesmcclain","followers_url":"https://api.github.com/users/jamesmcclain/followers","following_url":"https://api.github.com/users/jamesmcclain/following{/other_user}","gists_url":"https://api.github.com/users/jamesmcclain/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesmcclain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesmcclain/subscriptions","organizations_url":"https://api.github.com/users/jamesmcclain/orgs","repos_url":"https://api.github.com/users/jamesmcclain/repos","events_url":"https://api.github.com/users/jamesmcclain/events{/privacy}","received_events_url":"https://api.github.com/users/jamesmcclain/received_events","type":"User","site_admin":false},"repo":{"id":36071249,"name":"model-my-watershed","full_name":"jamesmcclain/model-my-watershed","owner":{"login":"jamesmcclain","id":11281373,"avatar_url":"https://avatars.githubusercontent.com/u/11281373?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesmcclain","html_url":"https://github.com/jamesmcclain","followers_url":"https://api.github.com/users/jamesmcclain/followers","following_url":"https://api.github.com/users/jamesmcclain/following{/other_user}","gists_url":"https://api.github.com/users/jamesmcclain/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesmcclain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesmcclain/subscriptions","organizations_url":"https://api.github.com/users/jamesmcclain/orgs","repos_url":"https://api.github.com/users/jamesmcclain/repos","events_url":"https://api.github.com/users/jamesmcclain/events{/privacy}","received_events_url":"https://api.github.com/users/jamesmcclain/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jamesmcclain/model-my-watershed","description":"The web application front end for Model My Watershed.","fork":true,"url":"https://api.github.com/repos/jamesmcclain/model-my-watershed","forks_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/forks","keys_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/teams","hooks_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/hooks","issue_events_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/issues/events{/number}","events_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/events","assignees_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/assignees{/user}","branches_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/branches{/branch}","tags_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/tags","blobs_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/git/refs{/sha}","trees_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/statuses/{sha}","languages_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/languages","stargazers_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/stargazers","contributors_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/contributors","subscribers_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/subscribers","subscription_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/subscription","commits_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/commits{/sha}","git_commits_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/git/commits{/sha}","comments_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/comments{/number}","issue_comment_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/issues/comments{/number}","contents_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/contents/{+path}","compare_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/merges","archive_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/downloads","issues_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/issues{/number}","pulls_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/pulls{/number}","milestones_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/milestones{/number}","notifications_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/labels{/name}","releases_url":"https://api.github.com/repos/jamesmcclain/model-my-watershed/releases{/id}","created_at":"2015-05-22T12:30:46Z","updated_at":"2015-06-11T20:18:21Z","pushed_at":"2015-09-08T17:02:40Z","git_url":"git://github.com/jamesmcclain/model-my-watershed.git","ssh_url":"git@github.com:jamesmcclain/model-my-watershed.git","clone_url":"https://github.com/jamesmcclain/model-my-watershed.git","svn_url":"https://github.com/jamesmcclain/model-my-watershed","homepage":null,"size":15110,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/jamesmcclain/model-my-watershed/pulls/4"},"html":{"href":"https://github.com/jamesmcclain/model-my-watershed/pull/4"},"issue":{"href":"https://api.github.com/repos/jamesmcclain/model-my-watershed/issues/4"},"comments":{"href":"https://api.github.com/repos/jamesmcclain/model-my-watershed/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/jamesmcclain/model-my-watershed/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/jamesmcclain/model-my-watershed/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jamesmcclain/model-my-watershed/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/jamesmcclain/model-my-watershed/statuses/ebf38b869f6e261aefdbb817a2611e1082751bc1"}}}}