私はAzureでの開発に非常に慣れておらず、Service BusがUIからメッセージを受信し、メッセージイベントがソリューションのさまざまなポイントでAzure(オンデマンド)Webジョブを開始する既存のAzureクラウドソリューションに取り組んでいます。
ソリューションのほとんどの部分をASEでホストしており、代わりにASEからKubernetes(AKS)に移行する予定です(現時点では、OSとしてWindowsを使用してAKSをセットアップし、試してみました)。
What options are there for moving Web Jobs off ASE and onto AKS? Does the OS have a bearing on the options? Can the WebJobs SDK be installed in the AKS cluster to run WebJobs (and are they executable from Service Bus for example)? I know you can setup scheduled Jobs, but what would be the equivalent for on-demand web jobs (long running processes).
Any advice much appreciated. We have a similar migration of Azure Functions, but I think if I can understand how to shift Web Jobs, the Functions will naturally follow the same path.
Having spent more time on this, here's some information which has helped me (you can see from the question above that there are gaps in my understanding, building my knowledge up slowly and publishing in case its useful for others).
Moving WebJobs off ASE - this is not as straight forward as my question implies. Essentially, the WebJobs themselves output an exe and the required libs, similar to the output of a command line app. The WebJobs (their code) run a "JobHost" in the Main method, which has a host waiting for triggers to run the jobs within. Looks very similar to me in how WCF services would have been hosted in a Windows Service a few years back.
With that in mind, first, the WebJob .exe can be run on the local host OS. As we are using .net Framework version of WebJobs, we can only deploy to Windows (maybe with Mono it is possible to run on Linux, but for now I'm saying Windows only to keep things simple). Had we built the WebJobs using .net Core then arguably they could have been to a Windows or Linux host OS.
Secondly, we want to "containerise" the compiled output of a WebJob - so a docker image needs to be built containing the WebJob and dependencies, so it can be deployed into a cluster (this is the point I'm currently at and trying to define the docker file). Read more about Docker Containers here.
Thirdly, the cluster itself. I'd mentioned AKS. There are other options, such as Service Fabric but it's a Microsoft proprietary SDK, so maybe best to steer clear for now. You can deploy your docker image containing your WebJob .exe (and libs) to your cluster as you need. The cluster can manage scaling of your containers as required. NOTE: you can run Minikube locally which helps get to grips
これは高レベルの説明ですが、上記の私の質問を明確にし、私が有用だと思ったいくつかの情報を提供します。うまくいけば、DevOpsを信頼している他の人を助けてください!:)
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加