{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/issues/1137","repository_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/issues/1137/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/issues/1137/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/issues/1137/events","html_url":"https://github.com/GoogleCloudPlatform/gcloud-node/pull/1137","id":136758355,"number":1137,"title":"compute: implement autoscaler","user":{"login":"stephenplusplus","id":723048,"avatar_url":"https://avatars.githubusercontent.com/u/723048?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenplusplus","html_url":"https://github.com/stephenplusplus","followers_url":"https://api.github.com/users/stephenplusplus/followers","following_url":"https://api.github.com/users/stephenplusplus/following{/other_user}","gists_url":"https://api.github.com/users/stephenplusplus/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenplusplus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenplusplus/subscriptions","organizations_url":"https://api.github.com/users/stephenplusplus/orgs","repos_url":"https://api.github.com/users/stephenplusplus/repos","events_url":"https://api.github.com/users/stephenplusplus/events{/privacy}","received_events_url":"https://api.github.com/users/stephenplusplus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/labels/cla:%20yes","name":"cla: yes","color":"009800"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/labels/compute","name":"compute","color":"4386FA"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/labels/patch","name":"patch","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2016-02-26T17:21:16Z","updated_at":"2016-03-07T16:30:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/pulls/1137","html_url":"https://github.com/GoogleCloudPlatform/gcloud-node/pull/1137","diff_url":"https://github.com/GoogleCloudPlatform/gcloud-node/pull/1137.diff","patch_url":"https://github.com/GoogleCloudPlatform/gcloud-node/pull/1137.patch"},"body":"For #1073\r\n\r\nImplements Autoscaler support.\r\n\r\n#### To Dos\r\n\r\n- [x] Docs\r\n- [x] Tests\r\n  - [x] System\r\n    - [x] Figure out how to create an instance group before the tests run\r\n  - [x] Unit\r\n    - [x] autoscaler.js\r\n    - [x] index.js\r\n    - [x] zone.js\r\n\r\nCreating an autoscaler...\r\n```js\r\n// Easy way\r\nvar config = {\r\n  coolDown: 30,\r\n  cpu: 80,\r\n  loadBalance: 40,\r\n  maxReplicas: 5,\r\n  minReplicas: 0,\r\n  target: 'instance-group-name'\r\n};\r\n\r\n// Hard (but supported) way\r\nvar config = {\r\n  autoscalingPolicy: {\r\n    coolDownPeriodSec: 30,\r\n    cpuUtilization: {\r\n      utilizationTarget: 0.8\r\n    },\r\n    loadBalancingUtilization: {\r\n      utilizationTarget: 0.4\r\n    },\r\n    maxNumReplicas: 5,\r\n    minNumReplicas: 0\r\n  },\r\n  target: 'https://content.googleapis.com/compute/v1/projects/{PROJECT_ID}/zones/{ZONE_ID}/instanceGroupMangers/instance-group-name'\r\n};\r\n\r\nvar zone = compute.zone('us-central1-a');\r\nzone.createAutoscaler('autoscaler-namer', config, function(err, operation, autoscaler, apiResponse) {\r\n  // ...\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/issues/comments/193331497","html_url":"https://github.com/GoogleCloudPlatform/gcloud-node/pull/1137#issuecomment-193331497","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/issues/1137","id":193331497,"user":{"login":"callmehiphop","id":1707267,"avatar_url":"https://avatars.githubusercontent.com/u/1707267?v=3","gravatar_id":"","url":"https://api.github.com/users/callmehiphop","html_url":"https://github.com/callmehiphop","followers_url":"https://api.github.com/users/callmehiphop/followers","following_url":"https://api.github.com/users/callmehiphop/following{/other_user}","gists_url":"https://api.github.com/users/callmehiphop/gists{/gist_id}","starred_url":"https://api.github.com/users/callmehiphop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/callmehiphop/subscriptions","organizations_url":"https://api.github.com/users/callmehiphop/orgs","repos_url":"https://api.github.com/users/callmehiphop/repos","events_url":"https://api.github.com/users/callmehiphop/events{/privacy}","received_events_url":"https://api.github.com/users/callmehiphop/received_events","type":"User","site_admin":false},"created_at":"2016-03-07T16:30:30Z","updated_at":"2016-03-07T16:30:30Z","body":"I just pulled your latest commit! It helped, lol."}}