{"id":2689,"date":"2017-01-09T00:08:10","date_gmt":"2017-01-08T15:08:10","guid":{"rendered":"http:\/\/tech.akat.info\/?p=2689"},"modified":"2017-01-09T00:10:12","modified_gmt":"2017-01-08T15:10:12","slug":"azure-cli-%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%81%9f","status":"publish","type":"post","link":"https:\/\/tech.akat.info\/?p=2689","title":{"rendered":"azure-cli \u4f7f\u3063\u3066\u307f\u305f"},"content":{"rendered":"<p><a href=\"https:\/\/docs.microsoft.com\/ja-jp\/azure\/xplat-cli-install\">Azure CLI \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a>\u304c\u308f\u304b\u308a\u3084\u3059\u304b\u3063\u305f\u3002<br \/>\n\u3053\u306e\u9806\u756a\u901a\u308a\u306b\u5b9f\u65bd\u3057\u305f\u3002<\/p>\n<h1>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h1>\n<pre class=\"brush: plain; title: @debian9; notranslate\" title=\"@debian9\">\r\n# apt-get install nodejs nodejs-legacy\r\n# nodejs --version\r\nv4.6.1\r\n# curl -L https:\/\/npmjs.org\/install.sh | sh\r\n# npm --version\r\n4.0.5\r\n# npm install -g azure-cli\r\n# azure --version\r\n0.10.8 (node: 4.6.1)\r\n# azure help\r\n...\r\nSelect y to enable data collection :(y\/n)n\r\n...\r\ninfo:    Executing command help\r\ninfo:             _    _____   _ ___ ___\r\ninfo:            \/_\\  |_  \/ | | | _ \\ __|\r\ninfo:      _ ___\/ _ \\__\/ \/| |_| |   \/ _|___ _ _\r\ninfo:    (___  \/_\/ \\_\\\/___|\\___\/|_|_\\___| _____)\r\ninfo:       (_______ _ _)         _ ______ _)_ _\r\ninfo:              (______________ _ )   (___ _ _)\r\ninfo:\r\ninfo:    Microsoft Azure: Microsoft's Cloud Platform\r\n\r\n### \u30a2\u30c3\u30d7\u30c7\u30fc\u30c8 ###\r\n# npm update -g azure-cli\r\n<\/pre>\n<h1>\u4e88\u6e2c\u5909\u63db\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b<\/h1>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# lv \/root\/azure.completion.sh\r\n# echo 'source ~\/azure.completion.sh' &gt;&gt; ~\/.bash_profile\r\n<\/pre>\n<h1>\u30ed\u30b0\u30a4\u30f3\u3059\u308b<\/h1>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# azure login\r\n...\r\ninfo:    To sign in, use a web browser to open the page https:\/\/aka.ms\/devicelogin and enter the code XXXXXX to authenticate.\r\n### \u30d6\u30e9\u30a6\u30b6\u3067\u4e0a\u8a18URL\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u30b3\u30fc\u30c9\u3092\u5165\u529b\u3059\u308b\u3068\u30ed\u30b0\u30a4\u30f3\u3055\u308c\u308b ###\r\n\r\n# azure account list\r\ninfo:    Executing command account list\r\ndata:    Name                                           Id                                    Current  State\r\ndata:    ---------------------------------------------  ------------------------------------  -------  -------\r\ndata:    BizSpark-2018\u5e744\u6708\u307e\u3067-\u6708\u984d\u4e0a\u96501\u4e075\u5343\u5186\u76f8\u5f53\u00d736\u30f6\u6708(\u6700\u592754\u4e07\u5186\u76f8\u5f53)  xxx-xxx-xxx-xxx  true     Enabled\r\ninfo:    account list command OK\r\n<\/pre>\n<h1>\u4eee\u60f3\u30de\u30b7\u30f3\u3092\u8d77\u52d5\u3059\u308b<\/h1>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# azure vm list kali\r\n...\r\ndata:    ResourceGroupName  Name  ProvisioningState  PowerState      Location  Size\r\ndata:    -----------------  ----  -----------------  --------------  --------  ---------------\r\ndata:    kali               kali  Succeeded          VM deallocated  westus    Standard_DS1_v2\r\n\r\n# azure vm show kali kali\r\n...\u4eee\u60f3\u30de\u30b7\u30f3\u306e\u8a73\u7d30\u304c\u8868\u793a\u3055\u308c\u308b...\r\ndata:    Storage Profile:\r\ndata:      Image reference:\r\ndata:        Publisher                   :kali-linux\r\ndata:        Offer                       :kali-linux\r\ndata:        Sku                         :kali\r\ndata:        Version                     :latest\r\n\r\n# azure vm start kali kali\r\n...\r\ninfo:    vm start command OK\r\n\r\n### \u30b7\u30e3\u30c3\u30c8\u30c0\u30a6\u30f3\u3059\u308b(\u3053\u306e\u307e\u307e\u3060\u3068\u8ab2\u91d1\u304c\u767a\u751f\u3059\u308b\u305f\u3081deallocate\u3067\u505c\u6b62\u3059\u308b) ###\r\n# azure vm stop kali kali\r\n...\r\ninfo:    vm stop command OK\r\n\r\n# azure vm deallocate kali kali\r\n...\r\ninfo:    vm deallocate command OK\r\n<\/pre>\n<h1>\u30a2\u30ab\u30a6\u30f3\u30c8\u60c5\u5831\u3092\u524a\u9664\u3059\u308b<\/h1>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# azure account clear\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Azure CLI \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u308f\u304b\u308a\u3084\u3059\u304b\u3063\u305f\u3002 \u3053\u306e\u9806\u756a\u901a\u308a\u306b\u5b9f\u65bd\u3057\u305f\u3002 \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb # apt-get install nodejs nodejs-legacy # nodejs &#8211;version v4.6 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[24],"tags":[],"_links":{"self":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/2689"}],"collection":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2689"}],"version-history":[{"count":2,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/2689\/revisions"}],"predecessor-version":[{"id":2691,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/2689\/revisions\/2691"}],"wp:attachment":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2689"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2689"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}