{"id":155,"date":"2023-03-28T10:01:40","date_gmt":"2023-03-28T17:01:40","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/semantic-kernel\/?p=155"},"modified":"2023-08-07T10:40:11","modified_gmt":"2023-08-07T17:40:11","slug":"how-to-deploy-semantic-kernel-to-azure-in-minutes","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/agent-framework\/how-to-deploy-semantic-kernel-to-azure-in-minutes\/","title":{"rendered":"How to Deploy Semantic Kernel to Azure in Minutes"},"content":{"rendered":"<p><span style=\"font-size: 14pt;\"><strong>UPDATE<\/strong>: See the blog post: <a href=\"https:\/\/devblogs.microsoft.com\/semantic-kernel\/how-to-deploy-semantic-kernel-to-azure-as-a-web-application-service\/\">How to deploy Semantic Kernel to Azure as a web application service<\/a> on the easiest way to deploy Semantic Kernel to your Azure instance.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>If you have been following the <a href=\"https:\/\/aka.ms\/sk\/repo\">Semantic Kernel GitHub repo<\/a>, you have probably experimented with some of the examples and seen how powerful and flexible the platform is for adding intelligence to your own apps. You might be eager to take your Semantic Kernel skills to the next level and deploy our SDK to the cloud.<\/p>\n<p>&nbsp;<\/p>\n<p>In this blog post, I will show you how to deploy Semantic Kernel to Azure using Azure functions, a serverless computing service that lets you run code without managing servers or infrastructure. You will see how easy it is to set up Semantic Kernel as an Azure function. By the end of this tutorial, you will have a fully functional Semantic Kernel SDK running on Azure and ready to use in your own apps.<\/p>\n<p>&nbsp;<\/p>\n<p>Before we begin, make sure you have the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-vscode.vscode-node-azure-pack\">Azure Tools extension<\/a> for VS Code installed.<\/p>\n<p>If you already have a blank Azure Function running, you can skip past these setup screens.<\/p>\n<p>&nbsp;<\/p>\n<h3><strong>Creating an Azure Function from VS Code<\/strong><\/h3>\n<p>Go to the Azure Tools extension on the left rail and select your resource then <a href=\"https:\/\/learn.microsoft.com\/azure\/azure-functions\/functions-overview\">Function App<\/a>.\u00a0 Right click and select \u201c<em>Create Function App in Azure<\/em>\u201d.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/semantic-kernel\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_1.png\"><img decoding=\"async\" class=\"size-full wp-image-156 alignleft\" src=\"https:\/\/devblogs.microsoft.com\/semantic-kernel\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_1.png\" alt=\"Image SK AzureFx Image 1\" width=\"526\" height=\"331\" srcset=\"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_1.png 526w, https:\/\/devblogs.microsoft.com\/agent-framework\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_1-300x189.png 300w\" sizes=\"(max-width: 526px) 100vw, 526px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>After you select \u201c<em>Create Function App in Azure<\/em>\u201d you will be prompted to create a new Function App by entering in a unique name.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/semantic-kernel\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_2.png\"><img decoding=\"async\" class=\"size-large wp-image-157 alignleft\" src=\"https:\/\/devblogs.microsoft.com\/semantic-kernel\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_2.png\" alt=\"Image SK AzureFx Image 2\" width=\"624\" height=\"171\" srcset=\"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_2.png 624w, https:\/\/devblogs.microsoft.com\/agent-framework\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_2-300x82.png 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Continue to follow the prompts to select an <strong>Isolated<\/strong> runtime stack (.Net 7 Isolated or .Net 6 Isolated).<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/semantic-kernel\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_3.png\"><img decoding=\"async\" class=\"size-large wp-image-158 alignleft\" src=\"https:\/\/devblogs.microsoft.com\/semantic-kernel\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_3.png\" alt=\"Image SK AzureFx Image 3\" width=\"624\" height=\"213\" srcset=\"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_3.png 624w, https:\/\/devblogs.microsoft.com\/agent-framework\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_3-300x102.png 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Finally, select your region for deployment.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/semantic-kernel\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_4.png\"><img decoding=\"async\" class=\"size-large wp-image-159 alignleft\" src=\"https:\/\/devblogs.microsoft.com\/semantic-kernel\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_4.png\" alt=\"Image SK AzureFx Image 4\" width=\"624\" height=\"244\" srcset=\"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_4.png 624w, https:\/\/devblogs.microsoft.com\/agent-framework\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_4-300x117.png 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Now you will see that you have an Azure function deployed and ready in Azure.<\/p>\n<p><strong> <a href=\"https:\/\/devblogs.microsoft.com\/semantic-kernel\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_5.png\"><img decoding=\"async\" class=\"size-large wp-image-160 alignleft\" src=\"https:\/\/devblogs.microsoft.com\/semantic-kernel\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_5.png\" alt=\"Image SK AzureFx Image 5\" width=\"624\" height=\"143\" srcset=\"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_5.png 624w, https:\/\/devblogs.microsoft.com\/agent-framework\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_5-300x69.png 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/a><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h3><strong>Deploying Semantic Kernel SDK to your Azure Function <\/strong><\/h3>\n<p>To deploy Semantic Kernel to an Azure Function, start with selecting the KernelHttpServer folder from:<\/p>\n<p>samples &gt;&gt; dotnet &gt;&gt; KernelHttpServer<\/p>\n<p>Right click on the folder and select \u201c<em>Deploy to Function App\u2026<\/em>\u201d<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/semantic-kernel\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_6.png\"><img decoding=\"async\" class=\"size-large wp-image-161 alignleft\" src=\"https:\/\/devblogs.microsoft.com\/semantic-kernel\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_6.png\" alt=\"Image SK AzureFx Image 6\" width=\"461\" height=\"385\" srcset=\"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_6.png 461w, https:\/\/devblogs.microsoft.com\/agent-framework\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_6-300x251.png 300w\" sizes=\"(max-width: 461px) 100vw, 461px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>You will be guided to select a Subscription and then a resource.\u00a0 Select the one you created above or one you already created in the past.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/semantic-kernel\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_7.png\"><img decoding=\"async\" class=\"size-large wp-image-162 alignleft\" src=\"https:\/\/devblogs.microsoft.com\/semantic-kernel\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_7.png\" alt=\"Image SK AzureFx Image 7\" width=\"624\" height=\"208\" srcset=\"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_7.png 624w, https:\/\/devblogs.microsoft.com\/agent-framework\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_7-300x100.png 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>The process will run in in VS Code to deploy the Semantic Kernel SDK to the Azure Function.\u00a0 Once complete you can go to the <a href=\"https:\/\/portal.azure.com\/\">Azure Portal<\/a> to review the resource you just created.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/semantic-kernel\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_8.png\"><img decoding=\"async\" class=\"size-large wp-image-163 alignleft\" src=\"https:\/\/devblogs.microsoft.com\/semantic-kernel\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_8.png\" alt=\"Image SK AzureFx Image 8\" width=\"624\" height=\"269\" srcset=\"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_8.png 624w, https:\/\/devblogs.microsoft.com\/agent-framework\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_8-300x129.png 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>You can also try to run the Azure Function with Semantic Kernel SDK running in it from the portal.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/semantic-kernel\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_9.png\"><img decoding=\"async\" class=\"size-large wp-image-164 alignleft\" src=\"https:\/\/devblogs.microsoft.com\/semantic-kernel\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_9.png\" alt=\"Image SK AzureFx Image 9\" width=\"624\" height=\"291\" srcset=\"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_9.png 624w, https:\/\/devblogs.microsoft.com\/agent-framework\/wp-content\/uploads\/sites\/78\/2023\/03\/SK_AzureFx_Image_9-300x140.png 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>In just a few minutes you have deployed Semantic Kernel to Azure, and you can now start adding intelligence to your apps.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Next steps:<\/strong><\/p>\n<p>Join the community and let us know what you think:\u00a0<a href=\"https:\/\/aka.ms\/sk\/discord\" target=\"_blank\" rel=\"noopener\">https:\/\/aka.ms\/sk\/discord<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>UPDATE: See the blog post: How to deploy Semantic Kernel to Azure as a web application service on the easiest way to deploy Semantic Kernel to your Azure instance. &nbsp; If you have been following the Semantic Kernel GitHub repo, you have probably experimented with some of the examples and seen how powerful and flexible [&hellip;]<\/p>\n","protected":false},"author":111479,"featured_media":164,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-155","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-semantic-kernel"],"acf":[],"blog_post_summary":"<p>UPDATE: See the blog post: How to deploy Semantic Kernel to Azure as a web application service on the easiest way to deploy Semantic Kernel to your Azure instance. &nbsp; If you have been following the Semantic Kernel GitHub repo, you have probably experimented with some of the examples and seen how powerful and flexible [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/posts\/155","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/users\/111479"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/comments?post=155"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/posts\/155\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/media\/164"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/media?parent=155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/categories?post=155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/tags?post=155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}