{"action":"created","comment":{"url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/pulls/comments/32242993","id":32242993,"diff_hunk":"@@ -12,17 +17,20 @@ fs.readFile('/etc/buildnumber', function(err, data) {\n \t\tbuildNumber = data.toString().trim();\n \t}\n \n-\tsidecar.initialize({\n-\t\t'cloud_stack': process.env.CLOUD_STACK,\n-\t\t'app': process.env.APP || 'sidecar',\n-\t\t'ip-address': process.env.IP_ADDRESS || os.networkInterfaces().eth0[0].address,\n-\t\t'app-port': process.env.PORT || '5000',\n-\t\t'proto': process.env.PROTO || 'http',\n-\t\t'hostname': process.env.HOSTNAME || os.hostname(),\n-\t\t'metadata': {\n-\t\t\t'version': process.env.VERSION || '0.0.1',\n-\t\t\t'build': buildNumber\n-\t\t}\n+\tSplunkCloudDynamicConfig.get_user_data(function(err, userdata) {\n+\t\tprocess.env.CLOUD_STACK = process.env.CLOUD_STACK || userdata.CLOUD_STACK;\n+\t\tsidecar.initialize({\n+\t\t\t'cloud_stack': process.env.CLOUD_STACK,\n+\t\t\t'app': process.env.APP || 'sidecar',\n+\t\t\t'ip-address': process.env.IP_ADDRESS || os.networkInterfaces().eth0[0].address,\n+\t\t\t'app-port': process.env.PORT || '5000',\n+\t\t\t'proto': process.env.PROTO || 'http',\n+\t\t\t'hostname': process.env.HOSTNAME || os.hostname(),\n+\t\t\t'metadata': {\n+\t\t\t\t'version': process.env.VERSION || '0.0.1',\n+\t\t\t\t'build': buildNumber","path":"bin/cli.js","position":40,"original_position":40,"commit_id":"825bd92797e19e7a1b1f8b9dcc1e677c0bc851c0","original_commit_id":"825bd92797e19e7a1b1f8b9dcc1e677c0bc851c0","user":{"login":"declanshanaghy","id":375100,"avatar_url":"https://avatars.githubusercontent.com/u/375100?v=3","gravatar_id":"","url":"https://api.github.com/users/declanshanaghy","html_url":"https://github.com/declanshanaghy","followers_url":"https://api.github.com/users/declanshanaghy/followers","following_url":"https://api.github.com/users/declanshanaghy/following{/other_user}","gists_url":"https://api.github.com/users/declanshanaghy/gists{/gist_id}","starred_url":"https://api.github.com/users/declanshanaghy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/declanshanaghy/subscriptions","organizations_url":"https://api.github.com/users/declanshanaghy/orgs","repos_url":"https://api.github.com/users/declanshanaghy/repos","events_url":"https://api.github.com/users/declanshanaghy/events{/privacy}","received_events_url":"https://api.github.com/users/declanshanaghy/received_events","type":"User","site_admin":false},"body":"Sidecar should be reporting the version from the health endpoint.","created_at":"2015-06-11T17:00:01Z","updated_at":"2015-06-11T17:00:01Z","html_url":"https://github.com/SplunkStorm/eureka-sidecar/pull/9#discussion_r32242993","pull_request_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/pulls/comments/32242993"},"html":{"href":"https://github.com/SplunkStorm/eureka-sidecar/pull/9#discussion_r32242993"},"pull_request":{"href":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/pulls/9","id":37417288,"html_url":"https://github.com/SplunkStorm/eureka-sidecar/pull/9","diff_url":"https://github.com/SplunkStorm/eureka-sidecar/pull/9.diff","patch_url":"https://github.com/SplunkStorm/eureka-sidecar/pull/9.patch","issue_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/issues/9","number":9,"state":"open","locked":false,"title":"AMI-1663 read userdata","user":{"login":"MatthaeusHarris","id":237536,"avatar_url":"https://avatars.githubusercontent.com/u/237536?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthaeusHarris","html_url":"https://github.com/MatthaeusHarris","followers_url":"https://api.github.com/users/MatthaeusHarris/followers","following_url":"https://api.github.com/users/MatthaeusHarris/following{/other_user}","gists_url":"https://api.github.com/users/MatthaeusHarris/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthaeusHarris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthaeusHarris/subscriptions","organizations_url":"https://api.github.com/users/MatthaeusHarris/orgs","repos_url":"https://api.github.com/users/MatthaeusHarris/repos","events_url":"https://api.github.com/users/MatthaeusHarris/events{/privacy}","received_events_url":"https://api.github.com/users/MatthaeusHarris/received_events","type":"User","site_admin":false},"body":"PLEASEREVIEW @declanshanaghy @cloudbuilder @cgaspardSplunk @nsamad \r\n\r\nIncorporates the get_user_data function recently merged into splunk_cloud_common_node to fetch the STACK_NAME from instance userdata\r\n\r\nAlso, I fixed some tests that were broken.","created_at":"2015-06-10T23:58:17Z","updated_at":"2015-06-11T17:00:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"274b18b824fffe20665faa399ab3a94524ceee27","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/pulls/9/commits","review_comments_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/pulls/9/comments","review_comment_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/issues/9/comments","statuses_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/statuses/825bd92797e19e7a1b1f8b9dcc1e677c0bc851c0","head":{"label":"SplunkStorm:AMI-1663_userdata","ref":"AMI-1663_userdata","sha":"825bd92797e19e7a1b1f8b9dcc1e677c0bc851c0","user":{"login":"SplunkStorm","id":373632,"avatar_url":"https://avatars.githubusercontent.com/u/373632?v=3","gravatar_id":"","url":"https://api.github.com/users/SplunkStorm","html_url":"https://github.com/SplunkStorm","followers_url":"https://api.github.com/users/SplunkStorm/followers","following_url":"https://api.github.com/users/SplunkStorm/following{/other_user}","gists_url":"https://api.github.com/users/SplunkStorm/gists{/gist_id}","starred_url":"https://api.github.com/users/SplunkStorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SplunkStorm/subscriptions","organizations_url":"https://api.github.com/users/SplunkStorm/orgs","repos_url":"https://api.github.com/users/SplunkStorm/repos","events_url":"https://api.github.com/users/SplunkStorm/events{/privacy}","received_events_url":"https://api.github.com/users/SplunkStorm/received_events","type":"Organization","site_admin":false},"repo":{"id":23802646,"name":"eureka-sidecar","full_name":"SplunkStorm/eureka-sidecar","owner":{"login":"SplunkStorm","id":373632,"avatar_url":"https://avatars.githubusercontent.com/u/373632?v=3","gravatar_id":"","url":"https://api.github.com/users/SplunkStorm","html_url":"https://github.com/SplunkStorm","followers_url":"https://api.github.com/users/SplunkStorm/followers","following_url":"https://api.github.com/users/SplunkStorm/following{/other_user}","gists_url":"https://api.github.com/users/SplunkStorm/gists{/gist_id}","starred_url":"https://api.github.com/users/SplunkStorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SplunkStorm/subscriptions","organizations_url":"https://api.github.com/users/SplunkStorm/orgs","repos_url":"https://api.github.com/users/SplunkStorm/repos","events_url":"https://api.github.com/users/SplunkStorm/events{/privacy}","received_events_url":"https://api.github.com/users/SplunkStorm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SplunkStorm/eureka-sidecar","description":"Node.js sidecar for Eureka service discovery microservice","fork":false,"url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar","forks_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/forks","keys_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/teams","hooks_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/hooks","issue_events_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/issues/events{/number}","events_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/events","assignees_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/assignees{/user}","branches_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/branches{/branch}","tags_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/tags","blobs_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/git/refs{/sha}","trees_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/statuses/{sha}","languages_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/languages","stargazers_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/stargazers","contributors_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/contributors","subscribers_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/subscribers","subscription_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/subscription","commits_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/commits{/sha}","git_commits_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/git/commits{/sha}","comments_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/comments{/number}","issue_comment_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/issues/comments{/number}","contents_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/contents/{+path}","compare_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/merges","archive_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/downloads","issues_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/issues{/number}","pulls_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/pulls{/number}","milestones_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/milestones{/number}","notifications_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/labels{/name}","releases_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/releases{/id}","created_at":"2014-09-08T18:22:30Z","updated_at":"2015-04-01T21:57:29Z","pushed_at":"2015-06-10T23:58:17Z","git_url":"git://github.com/SplunkStorm/eureka-sidecar.git","ssh_url":"git@github.com:SplunkStorm/eureka-sidecar.git","clone_url":"https://github.com/SplunkStorm/eureka-sidecar.git","svn_url":"https://github.com/SplunkStorm/eureka-sidecar","homepage":null,"size":636,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"SplunkStorm:master","ref":"master","sha":"572c53ad911c169e792bad625ae8077069be2efd","user":{"login":"SplunkStorm","id":373632,"avatar_url":"https://avatars.githubusercontent.com/u/373632?v=3","gravatar_id":"","url":"https://api.github.com/users/SplunkStorm","html_url":"https://github.com/SplunkStorm","followers_url":"https://api.github.com/users/SplunkStorm/followers","following_url":"https://api.github.com/users/SplunkStorm/following{/other_user}","gists_url":"https://api.github.com/users/SplunkStorm/gists{/gist_id}","starred_url":"https://api.github.com/users/SplunkStorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SplunkStorm/subscriptions","organizations_url":"https://api.github.com/users/SplunkStorm/orgs","repos_url":"https://api.github.com/users/SplunkStorm/repos","events_url":"https://api.github.com/users/SplunkStorm/events{/privacy}","received_events_url":"https://api.github.com/users/SplunkStorm/received_events","type":"Organization","site_admin":false},"repo":{"id":23802646,"name":"eureka-sidecar","full_name":"SplunkStorm/eureka-sidecar","owner":{"login":"SplunkStorm","id":373632,"avatar_url":"https://avatars.githubusercontent.com/u/373632?v=3","gravatar_id":"","url":"https://api.github.com/users/SplunkStorm","html_url":"https://github.com/SplunkStorm","followers_url":"https://api.github.com/users/SplunkStorm/followers","following_url":"https://api.github.com/users/SplunkStorm/following{/other_user}","gists_url":"https://api.github.com/users/SplunkStorm/gists{/gist_id}","starred_url":"https://api.github.com/users/SplunkStorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SplunkStorm/subscriptions","organizations_url":"https://api.github.com/users/SplunkStorm/orgs","repos_url":"https://api.github.com/users/SplunkStorm/repos","events_url":"https://api.github.com/users/SplunkStorm/events{/privacy}","received_events_url":"https://api.github.com/users/SplunkStorm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SplunkStorm/eureka-sidecar","description":"Node.js sidecar for Eureka service discovery microservice","fork":false,"url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar","forks_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/forks","keys_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/teams","hooks_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/hooks","issue_events_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/issues/events{/number}","events_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/events","assignees_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/assignees{/user}","branches_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/branches{/branch}","tags_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/tags","blobs_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/git/refs{/sha}","trees_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/statuses/{sha}","languages_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/languages","stargazers_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/stargazers","contributors_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/contributors","subscribers_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/subscribers","subscription_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/subscription","commits_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/commits{/sha}","git_commits_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/git/commits{/sha}","comments_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/comments{/number}","issue_comment_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/issues/comments{/number}","contents_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/contents/{+path}","compare_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/merges","archive_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/downloads","issues_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/issues{/number}","pulls_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/pulls{/number}","milestones_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/milestones{/number}","notifications_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/labels{/name}","releases_url":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/releases{/id}","created_at":"2014-09-08T18:22:30Z","updated_at":"2015-04-01T21:57:29Z","pushed_at":"2015-06-10T23:58:17Z","git_url":"git://github.com/SplunkStorm/eureka-sidecar.git","ssh_url":"git@github.com:SplunkStorm/eureka-sidecar.git","clone_url":"https://github.com/SplunkStorm/eureka-sidecar.git","svn_url":"https://github.com/SplunkStorm/eureka-sidecar","homepage":null,"size":636,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/pulls/9"},"html":{"href":"https://github.com/SplunkStorm/eureka-sidecar/pull/9"},"issue":{"href":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/issues/9"},"comments":{"href":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/SplunkStorm/eureka-sidecar/statuses/825bd92797e19e7a1b1f8b9dcc1e677c0bc851c0"}}}}