[[PageOutline]] = Azure = * 註冊 Azure - https://azure.microsoft.com/zh-tw/ * 安裝 Azure CLI - https://azure.microsoft.com/zh-tw/documentation/articles/xplat-cli-install/ == Azure 術語與觀念 == * Azure 建立和處理資源的部署模型有二種: 資源管理員和傳統 * 傳統的文件入口:https://azure.microsoft.com/zh-tw/documentation/articles/virtual-machines-command-line-tools/ * Microsoft 建議大部分的新部署使用 Resource Manager model。(常看到的 ARM 縮寫,指的就是 Azure Resource Manager) * 資源管理員文件入口:https://azure.microsoft.com/zh-tw/documentation/articles/xplat-cli-azure-resource-manager/ == Azure 操作與管理 == * Docker Hub - https://hub.docker.com/r/microsoft/azure-cli/ * azure-cli 的 github - https://github.com/azure/azure-xplat-cli * 在 Docker主機中,執行: {{{ docker run -it microsoft/azure-cli }}} * 安裝好 Azure CLI 之後,您就能從命令列使用者介面 (Bash、終端機及命令提示字元等) 中執行 azure 命令。例如,若要執行 [說明] 命令,請輸入下列命令: {{{ azure help }}} * 若要查看您所安裝的 Azure CLI 版本,請輸入下列命令: {{{ azure --version }}} * 參考 https://azure.microsoft.com/zh-tw/documentation/articles/xplat-cli-connect/ 完成帳號綁定 * 因為使用的是 0.9.10 以後的版本,所以直接使用 `azure login` {{{ root@azure:~# azure --version 0.9.19 (node: 4.2.4) root@azure:~# azure login info: Executing command login -info: To sign in, use a web browser to open the page https://aka.ms/devicelogin. Enter the code G*K*N*D*L to authenticate. /info: Added subscription Free Trial info: Setting subscription "Free Trial" as default + info: login command OK }}} * 檢查 account 狀態 {{{ root@azure:~# azure account list info: Executing command account list data: Name Id Current State data: ---------- ------------------------------------ ------- ------- data: Free Trial #################################### true Enabled info: account list command OK }}}