{"action":"created","comment":{"url":"https://api.github.com/repos/NetSys/quilt/pulls/comments/66200013","id":66200013,"diff_hunk":"@@ -123,16 +144,50 @@ func (clst *azureCluster) Boot(bootSet []Machine) error {\n \t}\n \n \tfor _, m := range bootSet {\n-\t\tname := \"quilt-\" + uuid.NewV4().String()\n-\t\tif err := clst.instanceNew(name, m.Size, m.Region, cloudConfigUbuntu(m.SSHKeys, \"wily\")); err != nil {\n+\t\t// One storage account is needed per region\n+\t\tif err := clst.configureStorageAccount(m.Region); err != nil {\n \t\t\treturn err\n \t\t}\n-\t}\n \n+\t\tspf := network.SubnetPropertiesFormat{\n+\t\t\tAddressPrefix: &vnetSubnetAddressPrefix,\n+\t\t}\n+\n+\t\tsubnetID := fmt.Sprintf(\n+\t\t\t\"/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/\"+\n+\t\t\t\t\"virtualNetworks/%s/subnets/%s\",\n+\t\t\tclst.subscriptionID,\n+\t\t\tresourceGroup,\n+\t\t\tvnetName,\n+\t\t\tsubnetName)\n+\n+\t\tsubnet := network.Subnet{\n+\t\t\tName:       &subnetName,\n+\t\t\tProperties: &spf,\n+\t\t\tID:         &subnetID,\n+\t\t}\n+\n+\t\tif err := clst.configureVirtualNetwork(subnet, m.Region); err != nil {\n+\t\t\treturn err\n+\t\t}\n+\n+\t\tvmName := \"quilt-\" + uuid.NewV4().String()\n+\t\tosDiskName := vmName + \"-osdisk\"\n+\t\tnicName := vmName + \"-nic\"\n+\n+\t\tif err := clst.configureNetworkInterface(nicName, subnet, m.Region); err != nil {\n+\t\t\treturn err\n+\t\t}\n+\n+\t\tcloudConfig := cloudConfigUbuntu(m.SSHKeys, \"wily\")","path":"provider/azure.go","position":233,"original_position":233,"commit_id":"6015ee7f9b03fd8a2efa984e29c2959b72fefbab","original_commit_id":"6015ee7f9b03fd8a2efa984e29c2959b72fefbab","user":{"login":"ejj","id":620438,"avatar_url":"https://avatars.githubusercontent.com/u/620438?v=3","gravatar_id":"","url":"https://api.github.com/users/ejj","html_url":"https://github.com/ejj","followers_url":"https://api.github.com/users/ejj/followers","following_url":"https://api.github.com/users/ejj/following{/other_user}","gists_url":"https://api.github.com/users/ejj/gists{/gist_id}","starred_url":"https://api.github.com/users/ejj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejj/subscriptions","organizations_url":"https://api.github.com/users/ejj/orgs","repos_url":"https://api.github.com/users/ejj/repos","events_url":"https://api.github.com/users/ejj/events{/privacy}","received_events_url":"https://api.github.com/users/ejj/received_events","type":"User","site_admin":false},"body":"Pull this outside of the loop.","created_at":"2016-06-08T06:45:30Z","updated_at":"2016-06-08T06:45:30Z","html_url":"https://github.com/NetSys/quilt/pull/420#discussion_r66200013","pull_request_url":"https://api.github.com/repos/NetSys/quilt/pulls/420","_links":{"self":{"href":"https://api.github.com/repos/NetSys/quilt/pulls/comments/66200013"},"html":{"href":"https://github.com/NetSys/quilt/pull/420#discussion_r66200013"},"pull_request":{"href":"https://api.github.com/repos/NetSys/quilt/pulls/420"}}},"pull_request":{"url":"https://api.github.com/repos/NetSys/quilt/pulls/420","id":72125875,"html_url":"https://github.com/NetSys/quilt/pull/420","diff_url":"https://github.com/NetSys/quilt/pull/420.diff","patch_url":"https://github.com/NetSys/quilt/pull/420.patch","issue_url":"https://api.github.com/repos/NetSys/quilt/issues/420","number":420,"state":"open","locked":false,"title":"azure: Switch to Azure Resource Manager from classic manager","user":{"login":"ZhongtianWang","id":4529189,"avatar_url":"https://avatars.githubusercontent.com/u/4529189?v=3","gravatar_id":"","url":"https://api.github.com/users/ZhongtianWang","html_url":"https://github.com/ZhongtianWang","followers_url":"https://api.github.com/users/ZhongtianWang/followers","following_url":"https://api.github.com/users/ZhongtianWang/following{/other_user}","gists_url":"https://api.github.com/users/ZhongtianWang/gists{/gist_id}","starred_url":"https://api.github.com/users/ZhongtianWang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZhongtianWang/subscriptions","organizations_url":"https://api.github.com/users/ZhongtianWang/orgs","repos_url":"https://api.github.com/users/ZhongtianWang/repos","events_url":"https://api.github.com/users/ZhongtianWang/events{/privacy}","received_events_url":"https://api.github.com/users/ZhongtianWang/received_events","type":"User","site_admin":false},"body":"Before this patch, each vm was not booted in the same virtual network, and we are not taking adventage of private IPs. In this patch, we migrated from classic manager to Azure Resource Manager, as classic manager does not support the current model well.\r\n\r\nThis should close #318, close #368","created_at":"2016-06-01T05:48:11Z","updated_at":"2016-06-08T06:45:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1f2019c56f45d7601cf4a69194374392f34a6027","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/NetSys/quilt/pulls/420/commits","review_comments_url":"https://api.github.com/repos/NetSys/quilt/pulls/420/comments","review_comment_url":"https://api.github.com/repos/NetSys/quilt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NetSys/quilt/issues/420/comments","statuses_url":"https://api.github.com/repos/NetSys/quilt/statuses/6015ee7f9b03fd8a2efa984e29c2959b72fefbab","head":{"label":"ZhongtianWang:azure","ref":"azure","sha":"6015ee7f9b03fd8a2efa984e29c2959b72fefbab","user":{"login":"ZhongtianWang","id":4529189,"avatar_url":"https://avatars.githubusercontent.com/u/4529189?v=3","gravatar_id":"","url":"https://api.github.com/users/ZhongtianWang","html_url":"https://github.com/ZhongtianWang","followers_url":"https://api.github.com/users/ZhongtianWang/followers","following_url":"https://api.github.com/users/ZhongtianWang/following{/other_user}","gists_url":"https://api.github.com/users/ZhongtianWang/gists{/gist_id}","starred_url":"https://api.github.com/users/ZhongtianWang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZhongtianWang/subscriptions","organizations_url":"https://api.github.com/users/ZhongtianWang/orgs","repos_url":"https://api.github.com/users/ZhongtianWang/repos","events_url":"https://api.github.com/users/ZhongtianWang/events{/privacy}","received_events_url":"https://api.github.com/users/ZhongtianWang/received_events","type":"User","site_admin":false},"repo":{"id":59855058,"name":"quilt","full_name":"ZhongtianWang/quilt","owner":{"login":"ZhongtianWang","id":4529189,"avatar_url":"https://avatars.githubusercontent.com/u/4529189?v=3","gravatar_id":"","url":"https://api.github.com/users/ZhongtianWang","html_url":"https://github.com/ZhongtianWang","followers_url":"https://api.github.com/users/ZhongtianWang/followers","following_url":"https://api.github.com/users/ZhongtianWang/following{/other_user}","gists_url":"https://api.github.com/users/ZhongtianWang/gists{/gist_id}","starred_url":"https://api.github.com/users/ZhongtianWang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZhongtianWang/subscriptions","organizations_url":"https://api.github.com/users/ZhongtianWang/orgs","repos_url":"https://api.github.com/users/ZhongtianWang/repos","events_url":"https://api.github.com/users/ZhongtianWang/events{/privacy}","received_events_url":"https://api.github.com/users/ZhongtianWang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ZhongtianWang/quilt","description":"Quilt","fork":true,"url":"https://api.github.com/repos/ZhongtianWang/quilt","forks_url":"https://api.github.com/repos/ZhongtianWang/quilt/forks","keys_url":"https://api.github.com/repos/ZhongtianWang/quilt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ZhongtianWang/quilt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ZhongtianWang/quilt/teams","hooks_url":"https://api.github.com/repos/ZhongtianWang/quilt/hooks","issue_events_url":"https://api.github.com/repos/ZhongtianWang/quilt/issues/events{/number}","events_url":"https://api.github.com/repos/ZhongtianWang/quilt/events","assignees_url":"https://api.github.com/repos/ZhongtianWang/quilt/assignees{/user}","branches_url":"https://api.github.com/repos/ZhongtianWang/quilt/branches{/branch}","tags_url":"https://api.github.com/repos/ZhongtianWang/quilt/tags","blobs_url":"https://api.github.com/repos/ZhongtianWang/quilt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ZhongtianWang/quilt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ZhongtianWang/quilt/git/refs{/sha}","trees_url":"https://api.github.com/repos/ZhongtianWang/quilt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ZhongtianWang/quilt/statuses/{sha}","languages_url":"https://api.github.com/repos/ZhongtianWang/quilt/languages","stargazers_url":"https://api.github.com/repos/ZhongtianWang/quilt/stargazers","contributors_url":"https://api.github.com/repos/ZhongtianWang/quilt/contributors","subscribers_url":"https://api.github.com/repos/ZhongtianWang/quilt/subscribers","subscription_url":"https://api.github.com/repos/ZhongtianWang/quilt/subscription","commits_url":"https://api.github.com/repos/ZhongtianWang/quilt/commits{/sha}","git_commits_url":"https://api.github.com/repos/ZhongtianWang/quilt/git/commits{/sha}","comments_url":"https://api.github.com/repos/ZhongtianWang/quilt/comments{/number}","issue_comment_url":"https://api.github.com/repos/ZhongtianWang/quilt/issues/comments{/number}","contents_url":"https://api.github.com/repos/ZhongtianWang/quilt/contents/{+path}","compare_url":"https://api.github.com/repos/ZhongtianWang/quilt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ZhongtianWang/quilt/merges","archive_url":"https://api.github.com/repos/ZhongtianWang/quilt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ZhongtianWang/quilt/downloads","issues_url":"https://api.github.com/repos/ZhongtianWang/quilt/issues{/number}","pulls_url":"https://api.github.com/repos/ZhongtianWang/quilt/pulls{/number}","milestones_url":"https://api.github.com/repos/ZhongtianWang/quilt/milestones{/number}","notifications_url":"https://api.github.com/repos/ZhongtianWang/quilt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ZhongtianWang/quilt/labels{/name}","releases_url":"https://api.github.com/repos/ZhongtianWang/quilt/releases{/id}","deployments_url":"https://api.github.com/repos/ZhongtianWang/quilt/deployments","created_at":"2016-05-27T18:26:14Z","updated_at":"2016-05-27T18:26:34Z","pushed_at":"2016-06-06T17:51:43Z","git_url":"git://github.com/ZhongtianWang/quilt.git","ssh_url":"git@github.com:ZhongtianWang/quilt.git","clone_url":"https://github.com/ZhongtianWang/quilt.git","svn_url":"https://github.com/ZhongtianWang/quilt","homepage":"","size":14856,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"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":"NetSys:master","ref":"master","sha":"69a177561e3aa385b40f3c3a8a36ca1990c0ec43","user":{"login":"NetSys","id":3665805,"avatar_url":"https://avatars.githubusercontent.com/u/3665805?v=3","gravatar_id":"","url":"https://api.github.com/users/NetSys","html_url":"https://github.com/NetSys","followers_url":"https://api.github.com/users/NetSys/followers","following_url":"https://api.github.com/users/NetSys/following{/other_user}","gists_url":"https://api.github.com/users/NetSys/gists{/gist_id}","starred_url":"https://api.github.com/users/NetSys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NetSys/subscriptions","organizations_url":"https://api.github.com/users/NetSys/orgs","repos_url":"https://api.github.com/users/NetSys/repos","events_url":"https://api.github.com/users/NetSys/events{/privacy}","received_events_url":"https://api.github.com/users/NetSys/received_events","type":"Organization","site_admin":false},"repo":{"id":43390663,"name":"quilt","full_name":"NetSys/quilt","owner":{"login":"NetSys","id":3665805,"avatar_url":"https://avatars.githubusercontent.com/u/3665805?v=3","gravatar_id":"","url":"https://api.github.com/users/NetSys","html_url":"https://github.com/NetSys","followers_url":"https://api.github.com/users/NetSys/followers","following_url":"https://api.github.com/users/NetSys/following{/other_user}","gists_url":"https://api.github.com/users/NetSys/gists{/gist_id}","starred_url":"https://api.github.com/users/NetSys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NetSys/subscriptions","organizations_url":"https://api.github.com/users/NetSys/orgs","repos_url":"https://api.github.com/users/NetSys/repos","events_url":"https://api.github.com/users/NetSys/events{/privacy}","received_events_url":"https://api.github.com/users/NetSys/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NetSys/quilt","description":"Quilt","fork":false,"url":"https://api.github.com/repos/NetSys/quilt","forks_url":"https://api.github.com/repos/NetSys/quilt/forks","keys_url":"https://api.github.com/repos/NetSys/quilt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NetSys/quilt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NetSys/quilt/teams","hooks_url":"https://api.github.com/repos/NetSys/quilt/hooks","issue_events_url":"https://api.github.com/repos/NetSys/quilt/issues/events{/number}","events_url":"https://api.github.com/repos/NetSys/quilt/events","assignees_url":"https://api.github.com/repos/NetSys/quilt/assignees{/user}","branches_url":"https://api.github.com/repos/NetSys/quilt/branches{/branch}","tags_url":"https://api.github.com/repos/NetSys/quilt/tags","blobs_url":"https://api.github.com/repos/NetSys/quilt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NetSys/quilt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NetSys/quilt/git/refs{/sha}","trees_url":"https://api.github.com/repos/NetSys/quilt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NetSys/quilt/statuses/{sha}","languages_url":"https://api.github.com/repos/NetSys/quilt/languages","stargazers_url":"https://api.github.com/repos/NetSys/quilt/stargazers","contributors_url":"https://api.github.com/repos/NetSys/quilt/contributors","subscribers_url":"https://api.github.com/repos/NetSys/quilt/subscribers","subscription_url":"https://api.github.com/repos/NetSys/quilt/subscription","commits_url":"https://api.github.com/repos/NetSys/quilt/commits{/sha}","git_commits_url":"https://api.github.com/repos/NetSys/quilt/git/commits{/sha}","comments_url":"https://api.github.com/repos/NetSys/quilt/comments{/number}","issue_comment_url":"https://api.github.com/repos/NetSys/quilt/issues/comments{/number}","contents_url":"https://api.github.com/repos/NetSys/quilt/contents/{+path}","compare_url":"https://api.github.com/repos/NetSys/quilt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NetSys/quilt/merges","archive_url":"https://api.github.com/repos/NetSys/quilt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NetSys/quilt/downloads","issues_url":"https://api.github.com/repos/NetSys/quilt/issues{/number}","pulls_url":"https://api.github.com/repos/NetSys/quilt/pulls{/number}","milestones_url":"https://api.github.com/repos/NetSys/quilt/milestones{/number}","notifications_url":"https://api.github.com/repos/NetSys/quilt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NetSys/quilt/labels{/name}","releases_url":"https://api.github.com/repos/NetSys/quilt/releases{/id}","deployments_url":"https://api.github.com/repos/NetSys/quilt/deployments","created_at":"2015-09-29T19:52:32Z","updated_at":"2016-06-03T20:22:34Z","pushed_at":"2016-06-08T04:41:11Z","git_url":"git://github.com/NetSys/quilt.git","ssh_url":"git@github.com:NetSys/quilt.git","clone_url":"https://github.com/NetSys/quilt.git","svn_url":"https://github.com/NetSys/quilt","homepage":"","size":19674,"stargazers_count":9,"watchers_count":9,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":132,"forks":8,"open_issues":132,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NetSys/quilt/pulls/420"},"html":{"href":"https://github.com/NetSys/quilt/pull/420"},"issue":{"href":"https://api.github.com/repos/NetSys/quilt/issues/420"},"comments":{"href":"https://api.github.com/repos/NetSys/quilt/issues/420/comments"},"review_comments":{"href":"https://api.github.com/repos/NetSys/quilt/pulls/420/comments"},"review_comment":{"href":"https://api.github.com/repos/NetSys/quilt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NetSys/quilt/pulls/420/commits"},"statuses":{"href":"https://api.github.com/repos/NetSys/quilt/statuses/6015ee7f9b03fd8a2efa984e29c2959b72fefbab"}}}}
{"actor":{"display_login":"ejj"}}