【问题标题】:How do I create WebRole for Azure using command-line tools(SDK) for linux如何使用 Linux 的命令行工具 (SDK) 为 Azure 创建 WebRole
【发布时间】:2012-06-21 19:41:47
【问题描述】:

我正在使用 Ubuntu 并安装了适用于 Linux 的 Azure SDK 并使其正常工作。使用 Linux SDK 如何为 node.js 服务添加 Azure WebRole。

我指的是以下教程,但它只讨论了如何在 Windows 上使用 cmdlet 创建 WebRole

Node.js Cloud Service

还查看了以下链接,该链接解释了适用于 Linux/Mac 的 Azure 命令行,但我找不到任何使用 linux SDK 创建 WebRole 的命令

Windows Azure command-line tool for Mac and Linux

【问题讨论】:

    标签: azure


    【解决方案1】:

    您不能使用“Windows Azure command-line tool for Mac and Linux”在 Windows Azure 中创建 WEB ROLE(如果您指的是 Windows Azure Web Role),因为这些命令仅用于您的虚拟机 Linux(以及 Windows)。此外,上面的 Node.js Cloud Service 链接将在 Windows Azure 虚拟机中创建一个 Node.js Web 服务器,因此请确保您在此处尝试执行的操作。这在您的虚拟机中不起作用。

    但是,如果您想创建一个 Linux 虚拟机并在其上运行 Web 服务器,那么确定是否可以使用确切的命令,步骤如下:

    1. 创建一个 Linux VM(上传您自己的或create VM directly by Linux Gallery Image
    2. Setup Putty to login to your Linux VM
    3. 使用 info here 通过 Putty 命令会话安装您选择的 Web 服务器

    如果您在上述任何步骤中需要帮助,请告诉我。

    【讨论】:

    • 我试图使用 Windows Azure 上的站点功能来部署一个使用 git 发布的 node.js 应用程序。它需要配置 WebRole,Node.js Cloud Service 文章有一个创建 WebRole 的步骤,但使用的是 windows cmdlet。我认为 Linux SDK 应该提供等效的功能,并且正在寻找一个命令来做同样的事情。但看起来 Linux SDK 对管理角色/工作人员站点和配置的支持有限
    • 是的,你是对的。 Linux SDK主要提供管理虚拟机的命令。
    【解决方案2】:

    我检查了 Linux CLI (service.js) 的源代码,似乎无法通过命令行创建托管服务(其中包含您的 Web 角色)。

    唯一可用的操作是:

    • 列表
    • 删除[名称]
    • 门户[名称]

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-06-13
      • 1970-01-01
      • 2010-09-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-08
      相关资源
      最近更新 更多