- This topic has 4 replies, 2 voices, and was last updated 3 months, 1 week ago by
September 20, 2019 at 11:26 am #178584
I am looking at getting some PowerShell scripts that run on on-prem servers into Azure as serverless scripts.
Some of them are pretty lengthy, and would run for much longer than the 5 minute limit that Azure Functions have (AFAIK)...
While I could potentially split the scripts into smaller chunks, they will mostly, I suspect, go over 5 minutes.
They largely collect data from our environment, Storage & VMWare stuff, and then write it to Azure Tables and CSVs.
My questions essentially are:
- where are there any good resources for taking long running on-prem scripts and going serverless? Most Azure Function articles I can find are more about alerting you to stuff, or posting to twitter (Brandon Olin's article on that is probably the best I've read)
- Would Azure Automation be a better choice than Azure Functions.
Google has only led me to articles about smaller scripts/tasks...
Thanks in advance...
September 30, 2019 at 7:14 am #180414ModeratorTopics: 3Replies: 172Points: 906Rank: Major Contributor
If I understand correctly, you are working on an inventory job where it pulls the data from various environments across your organisation. If so I would suggest going with the push method instead of the pull method.
Not sure how you are connecting your cloud environment either by express route or site to site VPN, it is ideally a good approach to collect the stats within the localhost and then push them to any central repository on cloud or on-prem instead of running a single job hours together.
October 15, 2019 at 8:20 pm #183042
Thanks for your response.
What you're describing is what we are currently doing, but we were hoping to run it in Azure, with a view to getting rid of the script servers.
October 16, 2019 at 8:20 am #183171ModeratorTopics: 3Replies: 172Points: 906Rank: Major Contributor
Then you can spin up a PowerShell Container Instance (ACI) in Azure and run it on on-demand.
October 16, 2019 at 10:08 pm #183384
That is actually a pretty good idea. I hadn't thought about that as an option. I will definitely try looking into that.
- The topic ‘How to go serverless with long running functions’ is closed to new replies.