克隆Azure服务到新环境
我们已经将流分析服务和数据工厂发布到产品。现在,我们必须在另一个新环境中克隆同一设置,请让我知道如何以最佳方式实现这一目标
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我们已经将流分析服务和数据工厂发布到产品。现在,我们必须在另一个新环境中克隆同一设置,请让我知道如何以最佳方式实现这一目标
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
您可以通过导出Azure Resource Manager模板来重新部署Azure流分析工作。
在导出模板之前,您必须首先在Visual Studio代码中打开现有的流分析作业。
要将作业导出到本地项目,请找到您希望在Azure门户中的Stream Analytics Explorer中导出的工作。从查询页面中,选择“ Visual Studio”中的“打开”。然后选择Visual Studio代码。
下一步是将作业脚本编译为Azure Resource Manager模板。在编译脚本之前,请确保您的作业至少具有一个输入和一个输出配置。如果未配置输入或输出,则需要首先配置输入和输出。
transformation.asaql
文件。右键单击
transformation.asaql
文件,然后选择ASA:从菜单中编译脚本。请注意,部署文件夹出现在您的流分析工作工作空间中。
探索
jobTemplate.json
文件,这是用于部署的Azure资源管理器模板。接下来,完成Azure Resource Manager模板参数文件。
打开jobtemplate.parameters.json文件,位于Visual Studio Code中的Stream Analytics作业工作空间中的部署文件夹中。
请注意,输入和输出密钥为空。用输入和输出资源的实际访问键替换为空值。
保存参数文件。
您已经准备好使用上一节中生成的Azure Resource Manager模板来部署Azure流分析作业。
在PowerShell窗口中,运行以下命令。请确保使用您的实际资源组名称来尝试 ResourceGroupName , TemplateFile ,以及
jobtemplate的完整文件路径。
来源:
You can redeploy an Azure Stream Analytics job by exporting the Azure Resource Manager template.
Before you can export a template, you must first open an existing Stream Analytics job in Visual Studio Code.
To export a job to a local project, locate the job you wish to export in the Stream Analytics Explorer in the Azure portal. From the Query page, select Open in Visual Studio. Then select Visual Studio Code.
The next step is to compile the job script to an Azure Resource Manager template. Before you compile the script, ensure that your job has at least one input and one output configured. If no input or output is configured, you need to configure the input and output first.
Transformation.asaql
file.Right-click the
Transformation.asaql
file and select ASA: Compile Script from the menu.Notice that a Deploy folder appears in your Stream Analytics job workspace.
Explore the
JobTemplate.json
file, which is the Azure Resource Manager template used to deploy.Next, complete the Azure Resource Manager template parameters file.
Open the JobTemplate.parameters.json file located in the Deploy folder of your Stream Analytics job workspace in Visual Studio Code.
Notice that the input and output keys are null. Replace the null values with the actual access keys for your input and output resources.
Save the parameters file.
You're ready to deploy your Azure Stream Analytics job using the Azure Resource Manager templates you generated in the previous section.
In a PowerShell window, run the following command. Be sure to reaplce the ResourceGroupName, TemplateFile, and TemplateParameterFile with your actual resource group name, and the complete file paths to the
JobTemplate.json
andJobTemplate.parameters.json
files in the Deploy Folder of your job workspace.Source: Export an Azure Stream Analytics job Azure Resource Manager template