简体   繁体   中英

Deploy Cloud Service from Azure Storage

I have a Cloud Service Package file and a Service Configuration file uploaded on Azure File Storage. Now, I want to write a C# code to pull the files from the storage and upload it to the Cloud Service Staging Deployment and eventually run it as a WebJob.

I was able to achieve this using Powershell script ( Publish-AzureServiceProject ) on my local machine (with both the package and service file on my local machine) but faced issues while running it as a WebJob. Apparently, Azure PS commands are not completely supported on Azure Webjobs / Websites.

Could someone let me know how to achieve this using C#.

As far as I known, there are two methods to achieve your requirements.

  1. using powershell commands and encapsulated powershell command using c#. Please refer this document about how to use Powershell to deployment cloud service. You can write code into ps file and call it using C# code.

  2. using REST API to create Cloud service and Deploy your package. Please refer to these methods: create cloud service and Create Deployment

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM