[英]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.