Deploy Azure Package from my own WPF App - azure

I am creating a little utility app for some of my Azure work and i would love to make it possible to deploy a azure package from within my tool.
I have a package that have been created from Visual studio and i can manual deploy it or deploy it from within VS 2012.
Anyone who know a guide or can tell me how i would deploy it from my own application?

Yes, you can do that. Everything you see as far as deployment is concerned in VS is backed by a REST API. So you could essentially write a WPF application which is a wrapper over these REST API. There're two things you would need to do:
Upload Package files to blob storage: This would be the 1st thing you would need to do. You could make use of storage client library or implement REST API for uploading package files to blob storage.
Implement "Create Deployment" Service Management API function: Take a look at the functionality here: http://msdn.microsoft.com/en-us/library/windowsazure/ee460813.aspx. Once you have uploaded the package file in blob storage (and got the blob URI), you could invoke this functionality.

As far as I know there is no API wrapper / SDK available that covers full functionality on managing Storage Accounts, Deployments etc. yet. You can use the Windows Azure Management REST API though.
In order to use this API you need to have a valid management certificate in the subscription you want to manage and sign all REST calls to the Management API with it. There should be sufficient information about how to do so in the link above.
HTH

Related

Deploying an WebAPI project (including swagger) into Azure Function

I know that the Azure function supports HTTP trigger and we can write a function that can be exposed like an API. I'm looking for an option to host a complete C# WebAPI project (multiple Rest endpoints including swagger definition) into a single Azure function.
Is this feasible? and supported? I see this scenario is completely supported in AWS Lambda. Where we can deploy a whole WebAPI project into a single lambda. Here is the demo of
the same.
I have watched the provided Video and I observed the same functionality is also available in Azure Functions.
As Direct way is not available like publishing the Web API to the Functions but migration of Web API to Functions is possible if the Web API is authenticated with any option like Open API, etc and using the APIM Service we can manage all the operations in it.
And as per the Microsoft Update, Startup.csand program.cs is unified to the program.cs file. So, I have added the required swagger configuration code in the file program.cs and tested it, working successful locally.
Another approach is you can call the Web APIs from Azure Functions securely, here is one of my approaches along with few other ways to do it.
Refer to #VovaBilyachat alternative solution on publishing .NET Core Web API to Azure that provides the glimpse of using Containers instead Functions.

Best Approach : Azure Web Apps ( Static HTML sites )

For a particular customer, the IT team do not approve OneDrive and Box as source deploy repo. Box, Dropbox etc anyways is not fully supported for syncronizing using Azure functions as the API are at File events and not on folder events.
What would be the various alternatives, where customer staffs could work on 'n' static HTML sites by each BU team, deploy easily to Azure Storage using explorer or sort and how to have this update the webapp or webapp point to this Azure storage file share location ( whichever is easy and feasible )
Please suggest me any case studies or alternatives that I could explore for this scenario.
For a particular customer, the IT team do not approve OneDrive and Box as source deploy repo.
A sensible bunch.
Please suggest me any case studies or alternatives that I could explore for this scenario.
Why not a private repo in GitHub Business?
It even has drag and drop now (a la Dropbox).
You could deploy to Azure Storage using Storage Explorer:
http://storageexplorer.com/
Another options:
1-Write a simple c# console app that will use Azure SDK to deploy files to your Azure Storage Account. (You can use FileSystemWatcher to monitor a network folder, for example)
2-setup a CD infrasctructure using TeamCity (or any other tool), and during the after build call a script that will publish to your Azure Storage Account.
3-Take a look on Azure Files:
http://social.technet.microsoft.com/wiki/contents/articles/33258.azure-file-storage-on-premises-folder-sync.aspx
4-Use AZCopy: https://azure.microsoft.com/en-us/documentation/articles/storage-use-azcopy/ (not sure if it has a way to detect that the file already exists and is the same on Storage Account)
5-Take a look on Sync Framework. The page is a little outdated, but it seems that there's support for Azure: https://msdn.microsoft.com/en-us/library/mt763483.aspx

How to determine, find, install and reference a proper Azure SDK package?

I am trying to properly install Azure SDK, reference it and build an application based on it.
Firstly, I am not sure if I need to install Azure SDK on top of what comes with Visual Studio 2015.
Secondly, when I visit the following url, I fall into a "rabbit hole":
https://azure.microsoft.com/en-us/documentation/articles/dotnet-sdk/
… it refers me to a bunch of fragmented installs here:
https://azure.microsoft.com/en-us/downloads/
…. When I choose “Client libraries” in above url I get the following options: more than 100 of them!! :
https://www.nuget.org/packages?q=windowsazureofficial
My application needs to use Azure Service Bus and Azure storage. How do I determine what exactly is required and what is the best way to find and install them?
With a number of fragmented packages, I think there should be a flow chart help me to determine the packages required.
Thank you,
i would suggest you to use Web Platform Installer instead of direct download this-and-that package. WPI is much more convenient, and it installs everything needed.
For Azure SB, you will need NuGet package.
For Azure Storage, if you need to test it against your local storage first instead of trying to connect to the Azure one, you can install Azure SDK using Web Platform Installer - it will install you the Azure Storage Emulator. Details.
Azure SDK, however, is a very useful piece of software when developing for the Azure.
My application needs to use Azure Service Bus and Azure storage. How
do I determine what exactly is required and what is the best way to
find and install them?
If all you need is client libraries for Azure Service Bus and Azure Storage, you can download appropriate Nuget packages from here:
Azure Storage: http://www.nuget.org/packages/WindowsAzure.Storage/
Azure Service Bus: http://www.nuget.org/packages/WindowsAzure.ServiceBus/
If there're other packages you would need, simply search for those on Nuget's website. For example, if I need Azure AD .Net library, I would simply search for Azure Active Directory.
For Azure Storage, there's a local storage emulator that gets installed along with the SDK. However you can download just the storage emulator from here: https://azure.microsoft.com/en-us/downloads/?sdk=net (search for Azure Storage Emulator on this page).
Please note that there's no local service bus emulator at this point of time.
A Note About SDK
Azure SDK is pretty comprehensive (so is Azure) and includes tools and libraries for you to build and manage different kinds of applications that can be deployed in Azure. As Alex mentioned in his answer, going down Web Platform Installer is the easiest as it installs everything for you that is included in the SDK.
However you can also pick the components of SDK based on your project's requirements and install them individually. For example, when you go to this link: https://www.microsoft.com/en-us/download/details.aspx?id=51657, you will see all the components that constitute SDK 2.9. On this page, when you click download button you will be able to select components that want to download based on your project's requirements.

Use azure media service / server with xamarin

Have anyone used azure media service with xamarin. I am trying to make an portable library which can upload / retrieves video asseset from a standard azure media server. However I am not able to install the nuget package into my project.
Can anyone point me in the right direction
I don't think the default azure media libary is a portable library therefore you cannot add it to your portable library project.
You could however implement this using the available rest documentation.
Media Services Rest Api
We've done something similar for access to blob storage. To avoid having to reference all the azure storage libraries in all our projects.

Azure Websites Dropbox Sync from API

I have been looking through the C# and Rest API's for the Microsoft Azure web sites but I cannot find a way of executing the drop box sync command that can be done through the azure portal. Is this possible from an API that any one knows of?
There is support for deploying a WebDeploy file to a Website using PowerShell, so there must be a corresponding API for it.
If you download the publish settings for the website, you'll se that it has a PublishUrl which is the WebDeploy endpoint for the server, along with a msdeploySite, which is your unique site on the server. A WepDeploy file is nothing more than a fancy zip (AFAIK), so by digging into this it should be possible to come up with something which can talk to the webdeploy endpoint and thereby publish.
I don't think that API is something Microsoft publishes though, so you might have to dig deep.

Resources