简体   繁体   English

使用 ARM 创建的 Azure DevOps SSH Linux VM

[英]Azure DevOps SSH Linux VM Created with ARM

I'm creating an Ubuntu Azure VM using an ARM template, this all works perfectly, but as part of my deployment process I need to copy Bash scripts to the VM and then execute them, this is turning out to be a pain.我正在使用 ARM 模板创建一个 Ubuntu Azure VM,这一切都很完美,但作为我部署过程的一部分,我需要将 Bash 脚本复制到 VM 然后执行它们,结果证明这很痛苦。

The Azure File Copy task only works on Windows VM's so thats out. Azure 文件复制任务仅适用于 Windows 虚拟机,所以就这样了。

The Copy files with SSH task only works with Service Connections, I cannot create a service connection when it's the pipeline that creates the VM so before it's run it doesn't exist to connect.使用 SSH 复制文件任务仅适用于服务连接,当它是创建 VM 的管道时,我无法创建服务连接,因此在运行之前它不存在连接。

I'm sure I can't be the first person with this problem.我敢肯定我不会是第一个遇到这个问题的人。 I have the IP address and user credentials to SSH, but no way of doing it as far as I can see.我有 SSH 的 IP 地址和用户凭据,但就我所见,没有办法做到这一点。 Anybody know how this can be done?有谁知道如何做到这一点?

If I got your question right, then you can upload your shell scripts to some Azure storage and You can put CLI for download those Bash scripts in Custom data.如果我的问题是正确的,那么您可以将您的 shell 脚本上传到某个 Azure 存储,并且您可以将 CLI 用于下载自定义数据中的那些 Bash 脚本。 So when your VMs would boot up, it will download Bash scripts and would execute.因此,当您的虚拟机启动时,它将下载 Bash 脚本并执行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure DevOps ARM 模板 adminPassword Windows VM - Azure DevOps ARM Template adminPassword Windows VM Azure Linux VM的SSH超时 - SSH timeout for Azure Linux VM SSH Key Linux VM ARM 模板的错误参考 Azure Key Vault Secret - Error Refrencine Azure Key Vault Secret for SSH Key Linux VM ARM Template Azure ARM Linux VM公共IP和Docker - Azure ARM Linux VM Public IP and Docker Trying to Update ssh key to existing user in azure linux vm whcih has been created using SSH Key Service via Azure portal - Trying to Update ssh key to existing user in azure linux vm whcih has been created using SSH Key Service via Azure portal 如何获得使用PowerShell创建的新Azure Linux VM的ssh主机密钥? - How can I get the ssh host key for a new Azure Linux VM created using PowerShell? 使用厨师创建的Linux azure vm在尝试引导甚至给出rsa文件时询问ssh密码? - linux azure vm created using chef asking ssh password while trying to bootstrap even rsa file is given? 无法在使用 Packer 创建的 Azure VM 中使用 SSH - Unable to SSH in Azure VM created with Packer 无法在 azure linux vm 中更新 ssh 密钥 - Failing to update ssh keys in azure linux vm SSH 到 Azure Windows VM 从 ZEDC9F0A5A5D5773387BF68E373647 VM 所需的步骤 - Steps required to SSH into Azure Windows VM from a Linux VM
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM