CSDEF and CSPKG file for Azure Website - azure

Am new to Azure and Websites.
On Boarded to Azure Cloud Services with CSPKG file.
Am looking to create a package for Websites from the Build and use it later to deploy in my Azure Subscription.
Was wondering if i can have CSPKG file for a Website and how to generate it.
Or is there a better way to package your Azure Website contents ( Without knowing the target where it will be deployed).
Please Note: I am aware of FTP, GIT and Deploy directly from Visual Studio.
Want to know the process of getting the package out of MSBuild without targets and Deployment.
Thanks,
Pradeep.

Azure Websites does not support CSPKG.
An alternate approach would be a WebDeploy package.

Related

How to access DLLs in a PaaS WebApp?

I would like to run ILSpy on one of my DLLs to verify code is running on a deployment slot and unable to figure out how to retrieve the DLLs from my PaaS WebApp.
As all mentioned above, If we want to get the published files from the Azure WebApp, we could use the Kudu tool to do that easily.
More info about Azure website file structure, we could refer to this document. If you want to know more about Azure WebApp, you could refer to Azure WebApp Sandbox.

How to deploy NodeJS project to Azure websites?

We have a NodeJs project we are building with TeamCity, then using FTP, uploading the built files to our Azure web app (.azurewebsites). The project contains thousands of files, so the FTP upload times are very slow (takes a very long time). We would prefer to package the build as a ZIP file, then upload the ZIP with FTP (much faster). However, how do we unzip the ZIP file on Azure using script?
Or is there a better way to deploy our build to our Azure web app?
NOTES:
This is an Azure web app service, does not live on a VM
Our process needs to be automated with script to support CI/CD
Deployments with Git and other repos are not feasible
You can use the Kudu API or MsBuild to deploy an app (web app or Function) to Azure App service. The deployment is usually done in 2 parts:
Deploy the app service using ARM templates
Deploy the code/App using one of these methods
If you're using VSTS, there are templates for both steps and make it a 2min process to setup. If you're not using VSTS, the Kudu API is he best way to solve the problem.
You can find more information here : https://github.com/projectkudu/kudu/wiki/REST-API
You can also use the Azure PowerShell Management cmdlets to achieve the same. However, this is at the moment only supported on Windows

How do I protect a target Directory in Azure from deployment

I am using VS Team Services to build and deploy my Asp.net MVC application to Azure. When the application is running, users can upload files to a directory.
The problem is that when I run a new build and deploy task in Team Services it overwrites or deletes the files that were uploaded by my users.
It seems like Team Services erases the target location before it does the deployment.
Is there a way in Team Services to tell it not to delete a specific directory when it is deploying an update to the application?
If I cant do that then is there a way to automate the copying of the original files before the deployment, then write them back after the deployment?
I've been searching google most of the day and cant seem to find an answer.
Thanks
Tony
I believe there is a better approach. Your user data should be saved to Azure blob storage, not uploaded to the web deployment location.
Here is a good getting started tutorial on using Azure storage: https://learn.microsoft.com/en-us/azure/storage/storage-dotnet-how-to-use-blobs
It is not recommended for user files to be stored in the same directory as the web site. Even if you simply load them into file storage on your VM, it should be in its own location.
There is Remove Additional Files at Destination option in Additional Deployment Options of Azure App Service Deploy step/task.
So If you check this option, it will delete additional files on AzureRM Web APP otherwise, it won’t delete additional files.

Azure publishing profile to deploy to multiple cloud services at once

I want to deploy one Azure application package (.cspkg) with N different configuration files(.cscfg) to the cloud.
I know that Visual Studio makes it easy to publish packages with "publish profiles" (.azurePubxml) however I still could not figure out how can I automate deployment of N cloud services all using same app package.
Is it possible? I don't want to go down Powershell route as it's tedious to write a good script and I don't want to mess with uploading cspkg blob etc. Is there an easier way to deploy an app with different cscfgs at once?
Publish-AzureServiceProject does most of the work for you - but you would need to write your own script to swap out the correct configuration file.

Azure Web Role Deployment

I have a Web Role in Azure that is under development. I would like to make a package that can be published and tested in staging environment without the help of Visual Studio. Is there a way to publish if just the package is provided?
You can use cspack to actually create the package, but from your question it sounds more like you are asking can you publish an already created package. The answer is yes.
There are multiple ways to do this and I'll provide three:
1) The management portal: you can deploy a package if you have the cspkg and csconfig files. Under the Cloud Services you can select a cloud service and select to deploy to the production or staging slot. You can also do this as part of creating a new cloud service in the portal. http://www.windowsazure.com/en-us/manage/services/cloud-services/how-to-create-and-deploy-a-cloud-service/
2) You can use Windows Azure PowerShell and CLI command line tools to deploy an already packaged deployment. In fact, you can also automate packaging and deploying. http://msdn.microsoft.com/en-us/library/windowsazure/jj883943.aspx
3) Using a tool like Cerebrata's Azure Management Studio you can also deploy already created packages : http://www.cerebrata.com/products/azure-management-studio/features
In additiont to being able to deploy an already created package, for Cloud Services you can also wire up to the hosted TFS service and have it deploy your web app when you do a check in. http://www.windowsazure.com/en-us/develop/net/common-tasks/publishing-with-tfs/

Resources