{"action":"created","comment":{"url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/pulls/comments/126575747","pull_request_review_id":49070939,"id":126575747,"diff_hunk":"@@ -14,32 +14,56 @@\n # See the License for the specific language governing permissions and\n # limitations under the License.\n \n-export SERVER_IP=$1\n-export SERVER_PORT=$2\n-export DB_SERVER_IP=$3\n-export DB_PORT=$4\n-export DB_NAME=$5\n-export CPU_COUNT=$6\n+SERVER_IP=$1\n+SERVER_PORT=$2\n+DB_SERVER_IP=$3\n+DB_PORT=$4\n+DB_NAME=$5\n+CPU_COUNT=$6\n+IMAGE_NAME=\"\"  #if not set, workload uses image.jpeg by default\n \n+###################################################################################\n+# Check input arguments\n+###################################################################################\n if [ \"x$SERVER_IP\" = \"x\" ] || [ \"x$SERVER_PORT\" = \"x\" ] || [ \"x$DB_SERVER_IP\" = \"x\" ] || [ \"x$DB_PORT\" = \"x\" ] || [ \"x$DB_NAME\" = \"x\" ] || [ \"x$CPU_COUNT\" = \"x\" ] ; then\n     echo \"Argument(s) passed to container-startup script missing. Aborting the run\"\n     exit 1\n fi\n-#requires mongodb to be running at the specified DB_SERVER_IP and DB_PORT\n+###################################################################################\n+# Note: Requires mongodb to be running at the specified DB_SERVER_IP and DB_PORT ##\n DB_URL=mongodb://${DB_SERVER_IP}:$DB_PORT/$DB_NAME\n echo \"$SERVER_PORT:`date +\"%T.%3N\"`\"\n \n mkdir ./mongodb$DB_PORT.template\n mongod --bind_ip $SERVER_IP --dbpath ./mongodb$DB_PORT.template --port $DB_PORT  > /dev/null & \n-\n sleep 5\n \n-if [ $CPU_COUNT -eq 0 ]; then\n-\tdocker run -itd -p $SERVER_PORT:9000 --net node-dc-net -e DB_URL=$DB_URL --name cnodemongo-$SERVER_PORT inode-npm\n-else \n-\tdocker run -itd -p $SERVER_PORT:9000 --net node-dc-net -e DB_URL=$DB_URL -e CPU_COUNT=$CPU_COUNT --name cnodemongo-$SERVER_PORT inode-npm\n+###################################################################################\n+# Build list of docker aruments\n+###################################################################################\n+DOCKER_ARGS=\" -p ${SERVER_PORT}:9000 --name cnodemongo-${SERVER_PORT} \"\n+\n+if [ \"x${DB_URL}\" != \"x\" ]; then\n+  DOCKER_ARGS=\"$DOCKER_ARGS -e DB_URL=${DB_URL}\"\n+fi\n+\n+if [ \"x${CPU_COUNT}\" != \"x\" ] && [ ${CPU_COUNT} -ne 0 ]; then\n+  DOCKER_ARGS=\"$DOCKER_ARGS -e CPU_COUNT=${CPU_COUNT}\"\n fi\n \n+if [ \"x${IMAGE_NAME}\" != \"x\" ]; then\n+  DOCKER_ARGS=\"$DOCKER_ARGS -e IMAGE_NAME=${IMAGE_NAME}\"","path":"container-startup.sh","position":54,"original_position":54,"commit_id":"0a03fa29b9912e6385223960b111e6dee13dd1cd","original_commit_id":"0a03fa29b9912e6385223960b111e6dee13dd1cd","user":{"login":"egalli","id":860547,"avatar_url":"https://avatars3.githubusercontent.com/u/860547?v=3","gravatar_id":"","url":"https://api.github.com/users/egalli","html_url":"https://github.com/egalli","followers_url":"https://api.github.com/users/egalli/followers","following_url":"https://api.github.com/users/egalli/following{/other_user}","gists_url":"https://api.github.com/users/egalli/gists{/gist_id}","starred_url":"https://api.github.com/users/egalli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egalli/subscriptions","organizations_url":"https://api.github.com/users/egalli/orgs","repos_url":"https://api.github.com/users/egalli/repos","events_url":"https://api.github.com/users/egalli/events{/privacy}","received_events_url":"https://api.github.com/users/egalli/received_events","type":"User","site_admin":false},"body":"we should escape the image name just in case it has spaces\r\n```bash\r\n  DOCKER_ARGS=\"$DOCKER_ARGS -e IMAGE_NAME=\\\"${IMAGE_NAME}\\\"\"\r\n```","created_at":"2017-07-11T01:28:33Z","updated_at":"2017-07-11T01:35:58Z","html_url":"https://github.com/Node-DC/Node-DC-EIS/pull/42#discussion_r126575747","pull_request_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/Node-DC/Node-DC-EIS/pulls/comments/126575747"},"html":{"href":"https://github.com/Node-DC/Node-DC-EIS/pull/42#discussion_r126575747"},"pull_request":{"href":"https://api.github.com/repos/Node-DC/Node-DC-EIS/pulls/42"}}},"pull_request":{"url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/pulls/42","id":129803846,"html_url":"https://github.com/Node-DC/Node-DC-EIS/pull/42","diff_url":"https://github.com/Node-DC/Node-DC-EIS/pull/42.diff","patch_url":"https://github.com/Node-DC/Node-DC-EIS/pull/42.patch","issue_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/issues/42","number":42,"state":"open","locked":false,"title":"Simplified docker arguments","user":{"login":"uttampawar","id":8977402,"avatar_url":"https://avatars0.githubusercontent.com/u/8977402?v=3","gravatar_id":"","url":"https://api.github.com/users/uttampawar","html_url":"https://github.com/uttampawar","followers_url":"https://api.github.com/users/uttampawar/followers","following_url":"https://api.github.com/users/uttampawar/following{/other_user}","gists_url":"https://api.github.com/users/uttampawar/gists{/gist_id}","starred_url":"https://api.github.com/users/uttampawar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uttampawar/subscriptions","organizations_url":"https://api.github.com/users/uttampawar/orgs","repos_url":"https://api.github.com/users/uttampawar/repos","events_url":"https://api.github.com/users/uttampawar/events{/privacy}","received_events_url":"https://api.github.com/users/uttampawar/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-07-11T01:00:22Z","updated_at":"2017-07-11T01:35:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4577a438b2f3f2ba30d03ee8e701012c6de8a94f","assignee":null,"assignees":[],"requested_reviewers":[{"login":"priyankasprakash","id":23507564,"avatar_url":"https://avatars2.githubusercontent.com/u/23507564?v=3","gravatar_id":"","url":"https://api.github.com/users/priyankasprakash","html_url":"https://github.com/priyankasprakash","followers_url":"https://api.github.com/users/priyankasprakash/followers","following_url":"https://api.github.com/users/priyankasprakash/following{/other_user}","gists_url":"https://api.github.com/users/priyankasprakash/gists{/gist_id}","starred_url":"https://api.github.com/users/priyankasprakash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/priyankasprakash/subscriptions","organizations_url":"https://api.github.com/users/priyankasprakash/orgs","repos_url":"https://api.github.com/users/priyankasprakash/repos","events_url":"https://api.github.com/users/priyankasprakash/events{/privacy}","received_events_url":"https://api.github.com/users/priyankasprakash/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/pulls/42/commits","review_comments_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/pulls/42/comments","review_comment_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/issues/42/comments","statuses_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/statuses/0a03fa29b9912e6385223960b111e6dee13dd1cd","head":{"label":"uttampawar:master","ref":"master","sha":"0a03fa29b9912e6385223960b111e6dee13dd1cd","user":{"login":"uttampawar","id":8977402,"avatar_url":"https://avatars0.githubusercontent.com/u/8977402?v=3","gravatar_id":"","url":"https://api.github.com/users/uttampawar","html_url":"https://github.com/uttampawar","followers_url":"https://api.github.com/users/uttampawar/followers","following_url":"https://api.github.com/users/uttampawar/following{/other_user}","gists_url":"https://api.github.com/users/uttampawar/gists{/gist_id}","starred_url":"https://api.github.com/users/uttampawar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uttampawar/subscriptions","organizations_url":"https://api.github.com/users/uttampawar/orgs","repos_url":"https://api.github.com/users/uttampawar/repos","events_url":"https://api.github.com/users/uttampawar/events{/privacy}","received_events_url":"https://api.github.com/users/uttampawar/received_events","type":"User","site_admin":false},"repo":{"id":90675198,"name":"Node-DC-EIS","full_name":"uttampawar/Node-DC-EIS","owner":{"login":"uttampawar","id":8977402,"avatar_url":"https://avatars0.githubusercontent.com/u/8977402?v=3","gravatar_id":"","url":"https://api.github.com/users/uttampawar","html_url":"https://github.com/uttampawar","followers_url":"https://api.github.com/users/uttampawar/followers","following_url":"https://api.github.com/users/uttampawar/following{/other_user}","gists_url":"https://api.github.com/users/uttampawar/gists{/gist_id}","starred_url":"https://api.github.com/users/uttampawar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uttampawar/subscriptions","organizations_url":"https://api.github.com/users/uttampawar/orgs","repos_url":"https://api.github.com/users/uttampawar/repos","events_url":"https://api.github.com/users/uttampawar/events{/privacy}","received_events_url":"https://api.github.com/users/uttampawar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/uttampawar/Node-DC-EIS","description":"Node-DC-EIS (Node.js - Data Center - Employee Information Services) is the first in a series of upcoming workloads for modelling major use cases for Node.js in Data Center (Node-DC).  ","fork":true,"url":"https://api.github.com/repos/uttampawar/Node-DC-EIS","forks_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/forks","keys_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/teams","hooks_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/hooks","issue_events_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/issues/events{/number}","events_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/events","assignees_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/assignees{/user}","branches_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/branches{/branch}","tags_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/tags","blobs_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/git/refs{/sha}","trees_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/statuses/{sha}","languages_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/languages","stargazers_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/stargazers","contributors_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/contributors","subscribers_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/subscribers","subscription_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/subscription","commits_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/commits{/sha}","git_commits_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/git/commits{/sha}","comments_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/comments{/number}","issue_comment_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/issues/comments{/number}","contents_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/contents/{+path}","compare_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/merges","archive_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/downloads","issues_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/issues{/number}","pulls_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/pulls{/number}","milestones_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/milestones{/number}","notifications_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/labels{/name}","releases_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/releases{/id}","deployments_url":"https://api.github.com/repos/uttampawar/Node-DC-EIS/deployments","created_at":"2017-05-08T21:45:28Z","updated_at":"2017-05-08T21:45:30Z","pushed_at":"2017-07-11T00:56:23Z","git_url":"git://github.com/uttampawar/Node-DC-EIS.git","ssh_url":"git@github.com:uttampawar/Node-DC-EIS.git","clone_url":"https://github.com/uttampawar/Node-DC-EIS.git","svn_url":"https://github.com/uttampawar/Node-DC-EIS","homepage":"https://github.com/Node-DC/Node-DC-EIS","size":250,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Node-DC:master","ref":"master","sha":"72af2e74fd431b598f939c015fd8aab0d2989795","user":{"login":"Node-DC","id":23407809,"avatar_url":"https://avatars0.githubusercontent.com/u/23407809?v=3","gravatar_id":"","url":"https://api.github.com/users/Node-DC","html_url":"https://github.com/Node-DC","followers_url":"https://api.github.com/users/Node-DC/followers","following_url":"https://api.github.com/users/Node-DC/following{/other_user}","gists_url":"https://api.github.com/users/Node-DC/gists{/gist_id}","starred_url":"https://api.github.com/users/Node-DC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Node-DC/subscriptions","organizations_url":"https://api.github.com/users/Node-DC/orgs","repos_url":"https://api.github.com/users/Node-DC/repos","events_url":"https://api.github.com/users/Node-DC/events{/privacy}","received_events_url":"https://api.github.com/users/Node-DC/received_events","type":"Organization","site_admin":false},"repo":{"id":74612827,"name":"Node-DC-EIS","full_name":"Node-DC/Node-DC-EIS","owner":{"login":"Node-DC","id":23407809,"avatar_url":"https://avatars0.githubusercontent.com/u/23407809?v=3","gravatar_id":"","url":"https://api.github.com/users/Node-DC","html_url":"https://github.com/Node-DC","followers_url":"https://api.github.com/users/Node-DC/followers","following_url":"https://api.github.com/users/Node-DC/following{/other_user}","gists_url":"https://api.github.com/users/Node-DC/gists{/gist_id}","starred_url":"https://api.github.com/users/Node-DC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Node-DC/subscriptions","organizations_url":"https://api.github.com/users/Node-DC/orgs","repos_url":"https://api.github.com/users/Node-DC/repos","events_url":"https://api.github.com/users/Node-DC/events{/privacy}","received_events_url":"https://api.github.com/users/Node-DC/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Node-DC/Node-DC-EIS","description":"Node-DC-EIS (Node.js - Data Center - Employee Information Services) is the first in a series of upcoming workloads for modelling major use cases for Node.js in Data Center (Node-DC).  ","fork":false,"url":"https://api.github.com/repos/Node-DC/Node-DC-EIS","forks_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/forks","keys_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/teams","hooks_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/hooks","issue_events_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/issues/events{/number}","events_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/events","assignees_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/assignees{/user}","branches_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/branches{/branch}","tags_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/tags","blobs_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/git/refs{/sha}","trees_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/statuses/{sha}","languages_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/languages","stargazers_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/stargazers","contributors_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/contributors","subscribers_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/subscribers","subscription_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/subscription","commits_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/commits{/sha}","git_commits_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/git/commits{/sha}","comments_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/comments{/number}","issue_comment_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/issues/comments{/number}","contents_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/contents/{+path}","compare_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/merges","archive_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/downloads","issues_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/issues{/number}","pulls_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/pulls{/number}","milestones_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/milestones{/number}","notifications_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/labels{/name}","releases_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/releases{/id}","deployments_url":"https://api.github.com/repos/Node-DC/Node-DC-EIS/deployments","created_at":"2016-11-23T20:47:41Z","updated_at":"2017-06-29T23:42:09Z","pushed_at":"2017-07-11T01:00:23Z","git_url":"git://github.com/Node-DC/Node-DC-EIS.git","ssh_url":"git@github.com:Node-DC/Node-DC-EIS.git","clone_url":"https://github.com/Node-DC/Node-DC-EIS.git","svn_url":"https://github.com/Node-DC/Node-DC-EIS","homepage":"https://github.com/Node-DC/Node-DC-EIS","size":219,"stargazers_count":17,"watchers_count":17,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":9,"forks":10,"open_issues":9,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Node-DC/Node-DC-EIS/pulls/42"},"html":{"href":"https://github.com/Node-DC/Node-DC-EIS/pull/42"},"issue":{"href":"https://api.github.com/repos/Node-DC/Node-DC-EIS/issues/42"},"comments":{"href":"https://api.github.com/repos/Node-DC/Node-DC-EIS/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/Node-DC/Node-DC-EIS/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/Node-DC/Node-DC-EIS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Node-DC/Node-DC-EIS/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/Node-DC/Node-DC-EIS/statuses/0a03fa29b9912e6385223960b111e6dee13dd1cd"}}}}
{"actor":{"display_login":"egalli"}}