从 ARM 模板创建的 Web 应用程序 - 无法断开部署
Web App created from ARM template - can't disconnect deployment
我使用从 Azure 门户上生成的模板改编的模板以及同样来自 azure 门户的 powershell 脚本创建了一个 web 应用程序、应用程序计划和资源组。
它无法 link 我的 bitbucket 存储库或安装扩展,但在其他方面是成功的。
但是,如果我尝试在部署中心断开我的部署以手动连接到 Bitbucket,它只会显示三个点的忙碌动画,但从未完成。见附件截图:
下面是我的template.json(是的,我知道这很乱,我还在学习!):
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"sites_webapp_name": {
"defaultValue": "cdg-grav-demo01",
"type": "String"
},
"serverfarms_appplan_name": {
"defaultValue": "cus-box-appplan",
"type": "String"
},
"config_web_name": {
"defaultValue": "web",
"type": "String"
}
},
"variables": {},
"resources": [
{
"comments": "Serverfarm Size",
"type": "Microsoft.Web/serverfarms",
"sku": {
"name": "F1",
"tier": "Free",
"size": "F1",
"family": "F",
"capacity": 0
},
"kind": "app",
"name": "[parameters('serverfarms_appplan_name')]",
"apiVersion": "2016-09-01",
"location": "Central US",
"scale": null,
"properties": {
"name": "[parameters('serverfarms_appplan_name')]",
"workerTierName": null,
"adminSiteName": null,
"hostingEnvironmentProfile": null,
"perSiteScaling": false,
"reserved": false,
"targetWorkerCount": 0,
"targetWorkerSizeId": 0
},
"dependsOn": []
},
{
"comments": "Site Parameters",
"type": "Microsoft.Web/sites",
"kind": "app",
"name": "[parameters('sites_webapp_name')]",
"apiVersion": "2016-08-01",
"location": "Central US",
"scale": null,
"properties": {
"enabled": true,
"hostNameSslStates": [
{
"name": "[concat(parameters('sites_webapp_name'),'.azurewebsites.net')]",
"sslState": "Disabled",
"virtualIP": null,
"thumbprint": null,
"toUpdate": null,
"hostType": "Standard"
},
{
"name": "[concat(parameters('sites_webapp_name'),'.scm.azurewebsites.net')]",
"sslState": "Disabled",
"virtualIP": null,
"thumbprint": null,
"toUpdate": null,
"hostType": "Repository"
}
],
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('serverfarms_appplan_name'))]",
"reserved": false,
"siteConfig": null,
"scmSiteAlsoStopped": false,
"hostingEnvironmentProfile": null,
"clientAffinityEnabled": true,
"clientCertEnabled": false,
"hostNamesDisabled": false,
"containerSize": 0,
"dailyMemoryTimeQuota": 0,
"cloningInfo": null,
"httpsOnly": true
},
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', parameters('serverfarms_appplan_name'))]"
]
},
{
"comments": "Site Settings",
"type": "Microsoft.Web/sites/config",
"name": "[concat(parameters('sites_webapp_name'), '/', parameters('config_web_name'))]",
"apiVersion": "2016-08-01",
"location": "Central US",
"scale": null,
"properties": {
"numberOfWorkers": 1,
"defaultDocuments": [
"Default.htm",
"Default.html",
"Default.asp",
"index.htm",
"index.html",
"iisstart.htm",
"default.aspx",
"index.php",
"hostingstart.html"
],
"netFrameworkVersion": "v4.0",
"phpVersion": "7.2",
"pythonVersion": "",
"nodeVersion": "",
"linuxFxVersion": "",
"windowsFxVersion": null,
"requestTracingEnabled": false,
"remoteDebuggingEnabled": false,
"remoteDebuggingVersion": "VS2017",
"httpLoggingEnabled": false,
"logsDirectorySizeLimit": 35,
"detailedErrorLoggingEnabled": false,
"publishingUsername": "[concat('$',parameters('sites_webapp_name'))]",
"publishingPassword": null,
"appSettings": null,
"azureStorageAccounts": {},
"metadata": null,
"connectionStrings": null,
"machineKey": null,
"handlerMappings": null,
"documentRoot": null,
"scmType": "BitbucketGit",
"use32BitWorkerProcess": true,
"webSocketsEnabled": false,
"alwaysOn": false,
"javaVersion": null,
"javaContainer": null,
"javaContainerVersion": null,
"appCommandLine": "",
"managedPipelineMode": "Integrated",
"virtualApplications": [
{
"virtualPath": "/",
"physicalPath": "site\wwwroot",
"preloadEnabled": false,
"virtualDirectories": null
}
],
"winAuthAdminState": 0,
"winAuthTenantState": 0,
"customAppPoolIdentityAdminState": false,
"customAppPoolIdentityTenantState": false,
"runtimeADUser": null,
"runtimeADUserPassword": null,
"loadBalancing": "LeastRequests",
"routingRules": [],
"experiments": {
"rampUpRules": []
},
"limits": null,
"autoHealEnabled": false,
"autoHealRules": null,
"tracingOptions": null,
"vnetName": "",
"siteAuthEnabled": false,
"siteAuthSettings": {
"enabled": null,
"unauthenticatedClientAction": null,
"tokenStoreEnabled": null,
"allowedExternalRedirectUrls": null,
"defaultProvider": null,
"clientId": null,
"clientSecret": null,
"clientSecretCertificateThumbprint": null,
"issuer": null,
"allowedAudiences": null,
"additionalLoginParams": null,
"isAadAutoProvisioned": false,
"googleClientId": null,
"googleClientSecret": null,
"googleOAuthScopes": null,
"facebookAppId": null,
"facebookAppSecret": null,
"facebookOAuthScopes": null,
"twitterConsumerKey": null,
"twitterConsumerSecret": null,
"microsoftAccountClientId": null,
"microsoftAccountClientSecret": null,
"microsoftAccountOAuthScopes": null
},
"cors": null,
"push": null,
"apiDefinition": null,
"autoSwapSlotName": null,
"localMySqlEnabled": false,
"managedServiceIdentityId": null,
"xManagedServiceIdentityId": null,
"ipSecurityRestrictions": null,
"scmIpSecurityRestrictions": null,
"scmIpSecurityRestrictionsUseMain": null,
"http20Enabled": true,
"minTlsVersion": "1.2",
"ftpsState": "FtpsOnly",
"reservedInstanceCount": 0
},
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('sites_webapp_name'))]"
]
},
{
"comments": "Source Control",
"name": "[concat(parameters('sites_webapp_name'),'/SourceControl')]",
"type": "Microsoft.Web/sites/sourcecontrols",
"apiVersion": "2016-08-01",
"location": "Central US",
"properties": {
"repoUrl": "https://bitbucket.org/goldjg/cirrius-tech-blog",
"branch": "develop",
"isManualIntegration": false,
"deploymentRollbackEnabled": false,
"isMercurial": false,
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('sites_webapp_name'))]"
]
}
},
{
"comments": "Site Extensions",
"name": "[concat(parameters('sites_webapp_name'),'/ComposerExtension')]",
"type": "Microsoft.Web/sites/siteextensions",
"apiVersion": "2016-08-01",
"location": "Central US",
"properties": {
"id": "ComposerExtension",
"title": "Composer",
"type": "Gallery",
"extension_url": "[concat('https://',parameters('sites_webapp_name'),'.scm.azurewebsites.net/Composer/')]",
"project_url": "https://github.com/SyntaxC4-MSFT/ComposerExtension",
"icon_url": "http://www.siteextensions.net/Content/Images/packageDefaultIcon.png",
"license_url": "http://opensource.org/licenses/MIT",
"feed_url": null,
"installer_command_line_params": null,
"published_date_time": null,
"local_path": "D:\home\SiteExtensions\ComposerExtension",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('sites_webapp_name'))]"
]
}
}
]
}
这是我的 parameters.json 文件:
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"sites_webapp_name": {
"value": "IAC-DEMO-01"
},
"serverfarms_appplan_name": {
"value": "IACDEMO-Appplan"
},
"config_web_name": {
"value": "web"
}
}
}
在这种情况下,您必须按照以下步骤断开部署。
- 转到 https://resources.azure.com/,即转到 Azure 门户中新创建的应用服务资源,然后单击 'Resource explorer' 磁贴。
- 现在在 Resource Explorer 中,转到配置 -> web。
- 确保您处于 "Read/Write" 模式而不是 "Read only" 模式。
- 单击 "Edit" 更新 "web" JSON 文件。
- 现在将 "scmType" 键的值更改为 "None"。
- 点击"PUT"。
关于失败部分的注意事项是,据我所知,您的模板无法 link bitbucket 存储库,因为它找不到您的 bitbucket 存储库的源代码控制令牌。
希望对您有所帮助!!干杯!!
我使用从 Azure 门户上生成的模板改编的模板以及同样来自 azure 门户的 powershell 脚本创建了一个 web 应用程序、应用程序计划和资源组。
它无法 link 我的 bitbucket 存储库或安装扩展,但在其他方面是成功的。
但是,如果我尝试在部署中心断开我的部署以手动连接到 Bitbucket,它只会显示三个点的忙碌动画,但从未完成。见附件截图:
下面是我的template.json(是的,我知道这很乱,我还在学习!):
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"sites_webapp_name": {
"defaultValue": "cdg-grav-demo01",
"type": "String"
},
"serverfarms_appplan_name": {
"defaultValue": "cus-box-appplan",
"type": "String"
},
"config_web_name": {
"defaultValue": "web",
"type": "String"
}
},
"variables": {},
"resources": [
{
"comments": "Serverfarm Size",
"type": "Microsoft.Web/serverfarms",
"sku": {
"name": "F1",
"tier": "Free",
"size": "F1",
"family": "F",
"capacity": 0
},
"kind": "app",
"name": "[parameters('serverfarms_appplan_name')]",
"apiVersion": "2016-09-01",
"location": "Central US",
"scale": null,
"properties": {
"name": "[parameters('serverfarms_appplan_name')]",
"workerTierName": null,
"adminSiteName": null,
"hostingEnvironmentProfile": null,
"perSiteScaling": false,
"reserved": false,
"targetWorkerCount": 0,
"targetWorkerSizeId": 0
},
"dependsOn": []
},
{
"comments": "Site Parameters",
"type": "Microsoft.Web/sites",
"kind": "app",
"name": "[parameters('sites_webapp_name')]",
"apiVersion": "2016-08-01",
"location": "Central US",
"scale": null,
"properties": {
"enabled": true,
"hostNameSslStates": [
{
"name": "[concat(parameters('sites_webapp_name'),'.azurewebsites.net')]",
"sslState": "Disabled",
"virtualIP": null,
"thumbprint": null,
"toUpdate": null,
"hostType": "Standard"
},
{
"name": "[concat(parameters('sites_webapp_name'),'.scm.azurewebsites.net')]",
"sslState": "Disabled",
"virtualIP": null,
"thumbprint": null,
"toUpdate": null,
"hostType": "Repository"
}
],
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('serverfarms_appplan_name'))]",
"reserved": false,
"siteConfig": null,
"scmSiteAlsoStopped": false,
"hostingEnvironmentProfile": null,
"clientAffinityEnabled": true,
"clientCertEnabled": false,
"hostNamesDisabled": false,
"containerSize": 0,
"dailyMemoryTimeQuota": 0,
"cloningInfo": null,
"httpsOnly": true
},
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', parameters('serverfarms_appplan_name'))]"
]
},
{
"comments": "Site Settings",
"type": "Microsoft.Web/sites/config",
"name": "[concat(parameters('sites_webapp_name'), '/', parameters('config_web_name'))]",
"apiVersion": "2016-08-01",
"location": "Central US",
"scale": null,
"properties": {
"numberOfWorkers": 1,
"defaultDocuments": [
"Default.htm",
"Default.html",
"Default.asp",
"index.htm",
"index.html",
"iisstart.htm",
"default.aspx",
"index.php",
"hostingstart.html"
],
"netFrameworkVersion": "v4.0",
"phpVersion": "7.2",
"pythonVersion": "",
"nodeVersion": "",
"linuxFxVersion": "",
"windowsFxVersion": null,
"requestTracingEnabled": false,
"remoteDebuggingEnabled": false,
"remoteDebuggingVersion": "VS2017",
"httpLoggingEnabled": false,
"logsDirectorySizeLimit": 35,
"detailedErrorLoggingEnabled": false,
"publishingUsername": "[concat('$',parameters('sites_webapp_name'))]",
"publishingPassword": null,
"appSettings": null,
"azureStorageAccounts": {},
"metadata": null,
"connectionStrings": null,
"machineKey": null,
"handlerMappings": null,
"documentRoot": null,
"scmType": "BitbucketGit",
"use32BitWorkerProcess": true,
"webSocketsEnabled": false,
"alwaysOn": false,
"javaVersion": null,
"javaContainer": null,
"javaContainerVersion": null,
"appCommandLine": "",
"managedPipelineMode": "Integrated",
"virtualApplications": [
{
"virtualPath": "/",
"physicalPath": "site\wwwroot",
"preloadEnabled": false,
"virtualDirectories": null
}
],
"winAuthAdminState": 0,
"winAuthTenantState": 0,
"customAppPoolIdentityAdminState": false,
"customAppPoolIdentityTenantState": false,
"runtimeADUser": null,
"runtimeADUserPassword": null,
"loadBalancing": "LeastRequests",
"routingRules": [],
"experiments": {
"rampUpRules": []
},
"limits": null,
"autoHealEnabled": false,
"autoHealRules": null,
"tracingOptions": null,
"vnetName": "",
"siteAuthEnabled": false,
"siteAuthSettings": {
"enabled": null,
"unauthenticatedClientAction": null,
"tokenStoreEnabled": null,
"allowedExternalRedirectUrls": null,
"defaultProvider": null,
"clientId": null,
"clientSecret": null,
"clientSecretCertificateThumbprint": null,
"issuer": null,
"allowedAudiences": null,
"additionalLoginParams": null,
"isAadAutoProvisioned": false,
"googleClientId": null,
"googleClientSecret": null,
"googleOAuthScopes": null,
"facebookAppId": null,
"facebookAppSecret": null,
"facebookOAuthScopes": null,
"twitterConsumerKey": null,
"twitterConsumerSecret": null,
"microsoftAccountClientId": null,
"microsoftAccountClientSecret": null,
"microsoftAccountOAuthScopes": null
},
"cors": null,
"push": null,
"apiDefinition": null,
"autoSwapSlotName": null,
"localMySqlEnabled": false,
"managedServiceIdentityId": null,
"xManagedServiceIdentityId": null,
"ipSecurityRestrictions": null,
"scmIpSecurityRestrictions": null,
"scmIpSecurityRestrictionsUseMain": null,
"http20Enabled": true,
"minTlsVersion": "1.2",
"ftpsState": "FtpsOnly",
"reservedInstanceCount": 0
},
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('sites_webapp_name'))]"
]
},
{
"comments": "Source Control",
"name": "[concat(parameters('sites_webapp_name'),'/SourceControl')]",
"type": "Microsoft.Web/sites/sourcecontrols",
"apiVersion": "2016-08-01",
"location": "Central US",
"properties": {
"repoUrl": "https://bitbucket.org/goldjg/cirrius-tech-blog",
"branch": "develop",
"isManualIntegration": false,
"deploymentRollbackEnabled": false,
"isMercurial": false,
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('sites_webapp_name'))]"
]
}
},
{
"comments": "Site Extensions",
"name": "[concat(parameters('sites_webapp_name'),'/ComposerExtension')]",
"type": "Microsoft.Web/sites/siteextensions",
"apiVersion": "2016-08-01",
"location": "Central US",
"properties": {
"id": "ComposerExtension",
"title": "Composer",
"type": "Gallery",
"extension_url": "[concat('https://',parameters('sites_webapp_name'),'.scm.azurewebsites.net/Composer/')]",
"project_url": "https://github.com/SyntaxC4-MSFT/ComposerExtension",
"icon_url": "http://www.siteextensions.net/Content/Images/packageDefaultIcon.png",
"license_url": "http://opensource.org/licenses/MIT",
"feed_url": null,
"installer_command_line_params": null,
"published_date_time": null,
"local_path": "D:\home\SiteExtensions\ComposerExtension",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('sites_webapp_name'))]"
]
}
}
]
}
这是我的 parameters.json 文件:
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"sites_webapp_name": {
"value": "IAC-DEMO-01"
},
"serverfarms_appplan_name": {
"value": "IACDEMO-Appplan"
},
"config_web_name": {
"value": "web"
}
}
}
在这种情况下,您必须按照以下步骤断开部署。
- 转到 https://resources.azure.com/,即转到 Azure 门户中新创建的应用服务资源,然后单击 'Resource explorer' 磁贴。
- 现在在 Resource Explorer 中,转到配置 -> web。
- 确保您处于 "Read/Write" 模式而不是 "Read only" 模式。
- 单击 "Edit" 更新 "web" JSON 文件。
- 现在将 "scmType" 键的值更改为 "None"。
- 点击"PUT"。
关于失败部分的注意事项是,据我所知,您的模板无法 link bitbucket 存储库,因为它找不到您的 bitbucket 存储库的源代码控制令牌。
希望对您有所帮助!!干杯!!