更新我的hubot项目后,它不再在Azure上运行.我可以在OS X和Windows上本地运行干净的副本,但在Azure上我收到以下错误
错误无法加载适配器松弛 - 错误:找不到模块'hubot'
在本地,我安装了节点6.9.1和npm 3.10.9.Azure分别使用版本6.9.0和3.10.8.
不幸的是,我还没弄清楚如何收集更多信息,因为节点应用程序似乎没有达到产生任何更详细输出的程度.
该项目和Azure网站最初是在去年创建的,在我更新了npm依赖项和节点版本后开始失败.但是,在恢复到节点4.x和npm 2.x或节点0.10.x或npm 1.x后,我仍然得到相同的错误.
这是我很大程度上未经修改的hubot项目,它可以重现错误.README包含我将其部署到Azure的步骤.
任何见解将不胜感激
的package.json
...
"dependencies": {
"coffee-script": "^1.11.1",
"hubot": "^2.19.0",
"hubot-diagnostics": "0.0.1",
"hubot-google-images": "^0.2.6",
"hubot-google-translate": "^0.2.0",
"hubot-help": "^0.2.0",
"hubot-maps": "0.0.2",
"hubot-pugme": "^0.1.0",
"hubot-rules": "^0.1.1",
"hubot-scripts": "^2.17.2",
"hubot-shipit": "^0.2.0",
"hubot-slack": "^4.2.1"
},
...
Run Code Online (Sandbox Code Playgroud)
hubot
在package.json中的依赖项中列出 - 如果不是,它将无法在本地运行.我知道kudu运行npm install --production
,所以我确定它是依赖项而不是devDependencies.
Gary Liu - MSFT能够对原因有所了解并提供了一种解决方法,但为什么hubot-slack: 4.+
在其他地方运行时不能在Azure上运行?
正在寻找一种从 3 个单独的 github 存储库部署到 azure web 应用程序的方法。存储库之一是主网站,另外两个是其他项目使用的公共库。我们希望部署从所有三个存储库下拉到一个工件目录中,运行 msbuild 并将工件复制到 wwwroot。
我假设我需要一个自定义的 .deployment 文件和一个 kudu 批处理文件。但是我找不到任何关于如何从多个 github 存储库中下拉的示例。
编辑:拼写
我需要修改我的 Azure Web 应用程序文件的内容,例如 Web.config 和文本文件。使用 Kudu 命令行 API,我可以使用以下内容创建目录或处理对象:
$username = "`$myuser"
$password = "mypass"
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $username,$password)))
$apiUrl = "https://mywebapp.scm.azurewebsites.net/api/command"
$commandBody = @{
command = "md D:\home\site\wwwroot\newDirectory"
}
Invoke-RestMethod -Uri $apiUrl -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} -Method POST -ContentType "application/json" -Body (ConvertTo-Json $commandBody) | Out-Null
Run Code Online (Sandbox Code Playgroud)
如何通过 Kudu Command API 修改文件?我的理想状态是使用以下内容通过命令行 API 执行 PowerShell:
powershell -Command "(gc myFile.txt) -replace 'foo', 'bar' | Out-File myFile.txt"
Run Code Online (Sandbox Code Playgroud)
当我在 Kudu 界面的 CMD 调试控制台中输入此命令时,上述命令有效,但我需要通过 API 调用它。我尝试了以下方法:
$username = "`$myuser"
$password = "mypass"
$base64AuthInfo …
Run Code Online (Sandbox Code Playgroud) 我正在尝试建立一个网页,在其中我需要显示按日期过滤的网络作业的历史记录。
根据Webjobs API提供的信息,我调用了https:// {sitename} .scm.azurewebsites.net / api / triggeredwebjobs / {job name} / history,该查询仅返回前50个结果。
还有另一种方法可以根据特定日期检索历史数据。
理想情况下,.deployment
当我的代码被推送到scm Kudu站点时,我想在我的应用程序中声明代码或文件,以便安装或更新特定的Site Extensions.这可能吗?
具体来说,我希望将Microsoft.ApplicationInsights.AzureWebSites
站点扩展作为我部署的所有站点的一部分自动安装,而无需手动浏览到scm站点并从库中安装它.
如果在调试控制台中的Kudu中的Microsoft Azure中输入"yes",它会挂起无限循环:
D:\home> yes
y
y
y
y
...
Run Code Online (Sandbox Code Playgroud)
为什么?
我正在使用Visual Studio Code开发ASP.NET Core 1.0应用程序,我不能/不会使用Visual Studio IDE中的内置发布工具.我有这个工作的ASP.NET 5 RC1(dnx-clr-win-x86.1.0.0-rc1-update1),但我不知道如何更新到ASP.NET Core 1.0,工具似乎没有尚未更新.
对于ASP.NET 5 RC1,我使用azure-cli包生成一个deploy.cmd文件,其中包含以下命令:
azure site deploymentscript --aspNet5 .\server\project.json -p .\server --aspNet5Version "1.0.0-rc1-update1" --aspNet5Runtime clr --aspNet5Architecture x86
Run Code Online (Sandbox Code Playgroud)
我得到了以下deploy.cmd
文件:
@if "%SCM_TRACE_LEVEL%" NEQ "4" @echo off
:: ----------------------
:: KUDU Deployment Script
:: Version: 1.0.6
:: ----------------------
:: Prerequisites
:: -------------
:: Verify node.js installed
where node 2>nul >nul
IF %ERRORLEVEL% NEQ 0 (
echo Missing node.js executable, please install node.js, if already installed make sure it can …
Run Code Online (Sandbox Code Playgroud) 我正在制定 Azure Functions 消费计划,并尝试按照此 stackoverflow 答案中的指南进行操作:https : //stackoverflow.com/a/43984890/6700475
如何执行第 2 步,即“打开 Kudu 控制台”?我试过了:
还有另一种打开 Kudu 控制台的方法,它适用于 Azure 功能的消费计划吗?
(我需要这个的原因是我有一个需要部署到 Azure 函数的 Python 函数,但它在 python 工作器中因这个问题而失败,而且我没有 Docker:https : //github.com/Azure/azure -functions-python-worker/issues/367 )
我有一个托管在 Azure 中的 Web 应用程序,文件wwwroot
夹中包含一些文件。我在 之外还有其他人wwwroot
,实际上在components
同级调用的目录中。
到目前为止,我一直在使用 Kudu 控制台手动更新文件,将 ZIP 文件放入components
. 我已经开始将我的流程转移到 Azure Pipelines;我设法配置了一个构建管道,该管道自动生成并压缩文件/工件以放入components
.
现在我正在尝试配置发布管道以将文件从构建部署到components
. 问题是我无法在默认情况下或从 Marketplace 中找到允许我将目标路径配置为的任务components
;wwwroot
默认情况下,它们都针对部署。
是否有任何类型的任务或脚本来实现这一目标?
这是我第一次面对使用 Azure Pipelines 设置 CI/CD,也许我忽略了一些东西。
kudu azure-devops azure-pipelines azure-pipelines-release-pipeline azure-webapps
我有两个 asp.net core 应用程序,它们都通过 github 集成直接部署到各自的 azure 网站。一个站点有自定义域,而另一个站点则没有。
\n\n当最初在两个站点上配置集成时,它们最初失败并出现与空间相关的警告。所以我将网站扩展为基本网站(1 个小网站)。我不知道\n为什么我需要这样做,因为这两个应用程序都远远小于 1G,我相信共享网络应用程序有一个限制。(我本地硬盘上的两个站点分别是117M和120M)
\n\n因此,我有两个网站共享相同的服务计划,即每月 \xc2\xa341,而不是让一个网站免费,另一个网站每月共享 \xc2\xa37(因为它需要自定义域) )
\n\n如果我尝试缩小服务计划,则会出现以下错误。(按预期进行编辑)
\n\n{\n"authorization": null,\n"caller": null,\n"channels": null,\n"claims": {},\n"correlationId": null,\n"description": "Failed to update App Service plan defaultserviceplan: {\\"Code\\":\\"Conflict\\",\\"Message\\":\\"Storage usage quota exceeded. Cannot update or delete a server farm.\\",\\"Target\\":null,\\"Details\\":[{\\"Message\\":\\"Storage usage quota exceeded. Cannot update or delete a server farm.\\"},{\\"Code\\":\\"Conflict\\"},{\\"ErrorEntity\\":{\\"ExtendedCode\\":\\"11006\\",\\"MessageTemplate\\":\\"Storage usage quota exceeded. Cannot update or delete a server farm.\\",\\"Parameters\\":[],\\"InnerErrors\\":[],\\"Code\\":\\"Conflict\\",\\"Message\\":\\"Storage usage quota exceeded. Cannot update or delete a server farm.\\"}}],\\"Innererror\\":null}",\n"eventDataId": null,\n"eventName": null,\n"eventSource": null,\n"category": null,\n"eventTimestamp": "Wed Jun …
Run Code Online (Sandbox Code Playgroud) kudu ×11
azure ×9
cmd ×2
asp.net ×1
asp.net-core ×1
azure-devops ×1
azure-pipelines-release-pipeline ×1
iisnode ×1
node.js ×1
powershell ×1