用于部署 WebJobs 的 Azure ARM 模板 [英] Azure ARM Templates to deploy WebJobs

查看:27
本文介绍了用于部署 WebJobs 的 Azure ARM 模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家,

有人可以帮助我使用 ARM 模板部署 WebJobs 吗?

Could anyone please help me on deploying WebJobs using ARM Templates ?

谢谢,拉贾拉姆.

推荐答案

A 模板共享 by David Ebbo 展示了如何使用 Arm 模板部署 Webjobs.

A template shared by David Ebbo shows how to deploy Webjobs using Arm Templates.

在此模板中,触发的 webjob 链接到由同一模板部署的网站.webjob 是 jobCollection 的一部分.此 jobCollection 使用dependsOn"节点链接到其父网站.

In this template, a triggered webjob is linked to a website deployed by the same template. A webjob is a part of a jobCollection. This jobCollection is linked to it's parent website using the "dependsOn" node.

{
  "apiVersion": "2014-08-01-preview",
  "name": "[parameters('jobCollectionName')]",
  "type": "Microsoft.Scheduler/jobCollections",
  "dependsOn": [
    "[resourceId('Microsoft.Web/Sites', parameters('siteName'))]"
  ],
  "location": "[parameters('siteLocation')]",
  "properties": {
    "sku": {
      "name": "standard"
    },
    "quota": {
      "maxJobCount": "10",
      "maxRecurrence": {
        "Frequency": "minute",
        "interval": "1"
      }
    }
  },
  "resources": [
    {
      "apiVersion": "2014-08-01-preview",
      "name": "DavidJob",
      "type": "jobs",
      "dependsOn": [
        "[resourceId('Microsoft.Scheduler/jobCollections', parameters('jobCollectionName'))]"
      ],
      "properties": {
        "startTime": "2015-02-10T00:08:00Z",
        "action": {
          "request": {
            "uri": "[concat(list(resourceId('Microsoft.Web/sites/config', parameters('siteName'), 'publishingcredentials'), '2014-06-01').properties.scmUri, '/api/triggeredjobs/MyScheduledWebJob/run')]",
            "method": "POST"
          },
          "type": "http",
          "retryPolicy": {
            "retryType": "Fixed",
            "retryInterval": "PT1M",
            "retryCount": 2
          }
        },
        "state": "enabled",
        "recurrence": {
          "frequency": "minute",
          "interval": 1
        }
      }
    }
  ]
}

问候,

这篇关于用于部署 WebJobs 的 Azure ARM 模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆