0

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.

The Azure File Copy task only works on Windows VM's so thats out.

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.

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. Anybody know how this can be done?

riQQ
  • 9,878
  • 7
  • 49
  • 66
matt_lethargic
  • 2,706
  • 1
  • 18
  • 33
  • Maybe you can consider using [FTP upload task](https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/ftp-upload?view=azure-devops). – Pod Mo Dec 23 '19 at 12:24

1 Answers1

0

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. So when your VMs would boot up, it will download Bash scripts and would execute.

Vikas Saini
  • 1,124
  • 3
  • 11
  • 24
  • I've seen that you can do this, but I thought the point in ARM was that it was a self contained way to deploy resources to a resource group, with the way suggested I would then need another ARM template that creates another resource group with a storage account and copy the files into that. Now I've all of a sudden got two release pipelines and my service is no longer independently deploy-able. Or I could have just one release pipeline that has a CLI script to create a storage account, but then I could just do away with ARM altogether and write it all in a script! – matt_lethargic Dec 18 '19 at 10:00