question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

custom_script_files option doesn't seem to work

See original GitHub issue

Hi there - I was trying to upload a script file to my vm using the custom_script_files option as follows:

    let myVm = vm {
        name vmResourceName
        username vmUsername
        vm_size Vm.Standard_B2s
        operating_system (Vm.makeLinuxVm "0001-com-ubuntu-server-focal" "canonical" "20_04-lts")
        os_disk 64 Vm.Premium_LRS
        diagnostics_support
        domain_name_prefix (Some vmHostname) 
        custom_script_files [ "https://gist.githubusercontent.com/blablabla/setup-vm.sh" ]
    }

but the script file URI doesn’t make it to the ARM template file.
Does it work only with Windows VMs…? Am I missing something?

(Thanks for Farmer btw, it’s a pretty handy project!)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
isaacabrahamcommented, Aug 24, 2020

If you’re happy with this error message i.e. it would have explained to you what to do, I’ll merge it in. https://github.com/CompositionalIT/farmer/pull/321/files#diff-d1f245ce5e20f91fe6c13181aac49db3R126

1reaction
pviotticommented, Aug 24, 2020

ok, thanks for the explanation! I’ll try again.

The reason why the two commands are separate is because you could simply pass the entire command in the custom_script rather than in files that you call.

makes sense. (I also got confused because if you search for “script to run upon deployment on Azure vm”, you find this page that talks about an inline script that has to be supplied base64 encoded…)

I’m going to add a validation error so that if you supply files but no script, we fail fast with a sane error message.

sounds good. I’d also suggest to expand a bit the docs (maybe add an ad-hoc example) (maybe I will submit a PR…).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Setting a custom script path in the preferences doesnt seem to ...
Can someone help me with the custom script path. I've entered my custom path in the preferences, and ensured it has the same...
Read more >
Allow or prevent custom script - SharePoint in Microsoft 365
On the Settings page in the SharePoint admin center, to accept the custom script settings as they appear, select OK, and enable cross-site...
Read more >
javascript file not working when linked from HTML
so I feel(and hope) this is pretty simple. I am new to javascript and am trying to get this working. When I link...
Read more >
Can't add script component...
Basically it seems if it is renamed 2 times somehow system cannot find the file dont know why - bug probably. This seemed...
Read more >
Why won't sonarr run this custom script? - Help & Support
I'm trying to run a custom script on ubuntu 16.04 and it seems like something is messing up inside of sonarr. It tries...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found