{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixops/issues/269","repository_url":"https://api.github.com/repos/NixOS/nixops","labels_url":"https://api.github.com/repos/NixOS/nixops/issues/269/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixops/issues/269/comments","events_url":"https://api.github.com/repos/NixOS/nixops/issues/269/events","html_url":"https://github.com/NixOS/nixops/pull/269","id":57823695,"number":269,"title":"Azure Backend","user":{"login":"Phreedom","id":62577,"avatar_url":"https://avatars.githubusercontent.com/u/62577?v=3","gravatar_id":"","url":"https://api.github.com/users/Phreedom","html_url":"https://github.com/Phreedom","followers_url":"https://api.github.com/users/Phreedom/followers","following_url":"https://api.github.com/users/Phreedom/following{/other_user}","gists_url":"https://api.github.com/users/Phreedom/gists{/gist_id}","starred_url":"https://api.github.com/users/Phreedom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Phreedom/subscriptions","organizations_url":"https://api.github.com/users/Phreedom/orgs","repos_url":"https://api.github.com/users/Phreedom/repos","events_url":"https://api.github.com/users/Phreedom/events{/privacy}","received_events_url":"https://api.github.com/users/Phreedom/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":61,"created_at":"2015-02-16T16:21:57Z","updated_at":"2016-03-11T07:45:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/NixOS/nixops/pulls/269","html_url":"https://github.com/NixOS/nixops/pull/269","diff_url":"https://github.com/NixOS/nixops/pull/269.diff","patch_url":"https://github.com/NixOS/nixops/pull/269.patch"},"body":"WIP.\r\n\r\nCurrently you have to build and register a nixos bootstrap image by hand.\r\n\r\nA sample deployment:\r\n```\r\nlet\r\n  # change this as necessary or wipe and use ENV vars\r\n  credentials = {\r\n    subscriptionId = \"f1ce4500-ab06-495a-8d59-a7cfe9e46dae\";\r\n    certificatePath = \"path/mycert.pem\";\r\n  };\r\nin\r\n{\r\n\r\n  resources.azureAffinityGroups.testAG = credentials // {\r\n    location = \"West US\";\r\n    label = \"who needs this?\";\r\n    description = \"random\";\r\n  };\r\n\r\n  resources.azureReservedIPAddresses.testIP = credentials // {\r\n    location = \"West US\";\r\n  };\r\n\r\n  resources.azureReservedIPAddresses.debugIP = credentials // {\r\n    location = \"West US\";\r\n  };\r\n\r\n  resources.azureHostedServices.testHS = {resources,...}: credentials // {\r\n    #location = \"West US\";\r\n    affinityGroup = resources.azureAffinityGroups.testAG;\r\n    label = \"who needs this?\";\r\n  };\r\n\r\n  resources.azureStorages.testS = {resources,...}: credentials // {\r\n    name = \"mystorage\";\r\n    location = \"West US\";\r\n    label = \"who cares\";\r\n    description = \"asdfafa\";\r\n  };\r\n\r\n  resources.azureBlobContainers.testBC =  {resources,...}: credentials // {\r\n    name = \"mycontainer\";\r\n    storage = resources.azureStorages.testS;\r\n    acl = \"blob\";\r\n  };\r\n\r\n  resources.azureBlobs.testblob =  {resources,...}: credentials // {\r\n    container = resources.azureBlobContainers.testBC;\r\n    contentType = \"text/plain\";\r\n    filePath = \"path/blob.html\";\r\n  };\r\n\r\n  machine = { resources, ...}: {\r\n    networking.firewall.allowPing = true;\r\n    deployment.targetEnv = \"azure\";\r\n    deployment.azure = credentials // {\r\n      ipAddress = resources.azureReservedIPAddresses.testIP;\r\n      storage = resources.azureStorages.testS;\r\n      hostedService = resources.azureHostedServices.testHS;\r\n      rootDiskImage = \"nixos\";\r\n      rootDiskUrl = \"http://mystorage.blob.core.windows.net/mycontainer/machine-root\";\r\n    };\r\n\r\n  };\r\n\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/NixOS/nixops/issues/comments/195237715","html_url":"https://github.com/NixOS/nixops/pull/269#issuecomment-195237715","issue_url":"https://api.github.com/repos/NixOS/nixops/issues/269","id":195237715,"user":{"login":"LiliDeng","id":10083705,"avatar_url":"https://avatars.githubusercontent.com/u/10083705?v=3","gravatar_id":"","url":"https://api.github.com/users/LiliDeng","html_url":"https://github.com/LiliDeng","followers_url":"https://api.github.com/users/LiliDeng/followers","following_url":"https://api.github.com/users/LiliDeng/following{/other_user}","gists_url":"https://api.github.com/users/LiliDeng/gists{/gist_id}","starred_url":"https://api.github.com/users/LiliDeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LiliDeng/subscriptions","organizations_url":"https://api.github.com/users/LiliDeng/orgs","repos_url":"https://api.github.com/users/LiliDeng/repos","events_url":"https://api.github.com/users/LiliDeng/events{/privacy}","received_events_url":"https://api.github.com/users/LiliDeng/received_events","type":"User","site_admin":false},"created_at":"2016-03-11T07:45:13Z","updated_at":"2016-03-11T07:45:13Z","body":"the same issue happen can't ssh vm after shutdown, then start from portal. "}}