Skip to content
This repository has been archived by the owner on Feb 13, 2021. It is now read-only.

Provisioner type azure-custom-script-extension should support folder upload #54

Open
mohitarora opened this issue Mar 15, 2015 · 9 comments
Labels

Comments

@mohitarora
Copy link

Provisioner type azure-custom-script-extension only uploads files from distr_src_path. It should support folder upload as well.

Not sure if that is possible because Azure Custom Script Extension doesn't seem to support folders.

@paulmey
Copy link
Member

paulmey commented Mar 16, 2015

I'll take a look and see if I can come up with a fix...

@mohitarora
Copy link
Author

Any update on this? Can this be supported?

@vladimir-shcherbakov
Copy link
Contributor

The provisioner is able to upload both file and folder code ref
You just need to use a path to a folder instead of a path to a file like in the example

@mohitarora
Copy link
Author

Folder is not uploaded, only files at the first level of a folder are uploaded.

https://github.com/MSOpenTech/packer-azure/blob/master/packer/communicator/azureVmCustomScriptExtension/communicator.go#L429

What we were expecting that folder will be uploaded as is with hierarchy maintained. Can that be supported?

@paulmey
Copy link
Member

paulmey commented Mar 25, 2015

@mohitarora : It's software... almost anything can be supported. PR's are welcome or you can also wait for someone else to fix it. 😉

@vladimir-shcherbakov
Copy link
Contributor

The provisioner uploads data to an Azure storage temporary container and container is able to store files not folder hierarchy. As a workaround - you can pack you folder structure into a zip archive.

@paulmey
Copy link
Member

paulmey commented Mar 25, 2015

It's a good workaround, but still... The Packer file provisoner uses this capability of the communicator to get files and directories uploaded onto the machine itself. So the current behavior doesn't match that expectation.

P.S. The puppet plugin requires this to work as well.

@paulmey
Copy link
Member

paulmey commented Oct 18, 2015

hmmm, GitHub broken? notification says @nzspambot commented "@paulmey packer-azure expects only one custom-script provisioner entry that's slightly annoying; is there plans to allow more than one?", but I don't see it here.
Yes, there is a plan to fix that, which includes switching to WinRM for script execution and fixing file/directory upload.

@nzspambot
Copy link

@paulmey um yeah wtf? cool thanks on that; good to know 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants