azure - 如何使用 VSTS DSC 配置自动将软件安装到 Azure VM 上

标签 azure automation installation azure-devops dsc

全部,

我正在尝试弄清楚如何使用 VSTS DSC 配置将专门的 TrendMicro 软件安装到 Azure VM 上。我所需要的只是指出如何实现这一目标或建议的正确方向。我在这方面的经验很少,因此我们将不胜感激任何帮助。

谢谢

最佳答案

通过PowerShell DSC将软件安装到Azure VM,可以引用文档D eploy your application on virtual machine scale sets .

例如Install an app to a Windows VM with PowerShell DSC ,示例 powershell 脚本为:

# Define the script for your Desired Configuration to download and run
$dscConfig = @{
  "wmfVersion" = "latest";
  "configuration" = @{
    "url" = "https://github.com/Azure-Samples/compute-automation-configurations/raw/master/dsc.zip";
    "script" = "configure-http.ps1";
    "function" = "WebsiteTest";
  };
}

# Get information about the scale set
$vmss = Get-AzureRmVmss `
                -ResourceGroupName "myResourceGroup" `
                -VMScaleSetName "myScaleSet"

# Add the Desired State Configuration extension to install IIS and configure basic website
$vmss = Add-AzureRmVmssExtension `
    -VirtualMachineScaleSet $vmss `
    -Publisher Microsoft.Powershell `
    -Type DSC `
    -TypeHandlerVersion 2.24 `
    -Name "DSC" `
    -Setting $dscConfig

# Update the scale set and apply the Desired State Configuration extension to the VM instances
Update-AzureRmVmss `
    -ResourceGroupName "myResourceGroup" `
    -Name "myScaleSet"  `
    -VirtualMachineScaleSet $vmss

关于azure - 如何使用 VSTS DSC 配置自动将软件安装到 Azure VM 上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51290434/

相关文章:

dns - Multi-Tenancy DNS 设置 - 如何?

Eclipse 4.2 (Juno) 在 Ubuntu 12.04 (Precise) 上崩溃

oracle - 在Mac OS/X上安装Oracle Instantclient而不设置环境变量?

mysql - 如何修复mysql安装错误

使用 @CurrentInteration 时 Azure DevOps 查询错误

Azure Application Insights 将响应代码零标记为成功

azure - VS Code 智能感知不适用于某些 ARM 命令

automation - 如何使用 Windows 更新使 VM 快照树保持最新?

xml - 如何使 Azure API 管理(API 网关)CORS 策略动态化?

java - Selenium Webdriver + Java - Eclipse : java. lang.NoClassDefFoundError