How to go serverless with long running functions

Welcome Forums General PowerShell Q&A How to go serverless with long running functions

Viewing 3 reply threads
  • Author
    Posts
    • #178584
      Participant
      Topics: 9
      Replies: 25
      Points: 152
      Helping Hand
      Rank: Participant

      Hi all,

      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:

      1. 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)
      2. Would Azure Automation be a better choice than Azure Functions.

      Google has only led me to articles about smaller scripts/tasks...

       

      Thanks in advance...

    • #180414
      Moderator
      Topics: 3
      Replies: 172
      Points: 906
      Helping Hand
      Rank: 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.

    • #183042
      Participant
      Topics: 9
      Replies: 25
      Points: 152
      Helping Hand
      Rank: Participant

      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.

       

      • #183171
        Moderator
        Topics: 3
        Replies: 172
        Points: 906
        Helping Hand
        Rank: Major Contributor

        Then you can spin up a PowerShell Container Instance (ACI) in Azure and run it on on-demand.

        Thank you.

    • #183384
      Participant
      Topics: 9
      Replies: 25
      Points: 152
      Helping Hand
      Rank: Participant

      That is actually a pretty good idea. I hadn't thought about that as an option. I will definitely try looking into that.

Viewing 3 reply threads
  • The topic ‘How to go serverless with long running functions’ is closed to new replies.