How do I use web deploy to deploy sub site in Windows Azure - azure

I have a web role with multiple sites accessible using different port numbers.
e.g. (main site) http://site.cloudapp.net , (sub sites ) http://site.cloudapp.net:8080, http://site.cloudapp.net:8081
I can use web deploy to deploy the main site . How can I use web deploy to deploy the sub sites?

You can deploy to a sub-application by prefixing it with the parent site name. For example mysite/myapplication. ScottGu's blog has more details if you need them.
However, I'd be more concerned since you said you are doing this with an Azure web role which are deployed on virtual machines with ephemeral disks (non-persistent if the hardware fails or needs to be redeployed). If Azure re-deploys your web role to another VM your "web deployed" changes will be lost and the contents of your cspkg will be redeployed. If you really want to use web deploy your should consider using Azure Web Sites or Azure Virtual Machines, otherwise to ensure your changes are not lost you'll need to republish the full cspkg file and allow Azure to deploy the changes to all your instances.

Related

How many different ways are there to deploy a website under azure portal?

Good day dear community,
i have a smaller project where i need to search for different possibilities to deploy a website under azure portal.
Personally i found 4 different ways how to do it.
App services
App functions Serverless (which i dont understand how to deploy there a website)
Install a VM and then deploy a website
Use docker to deploy your code
Question:
Are there any more ways to deploy a website under azure and can somebody explain the deployment of websites with serverless as i dont understand how to publish a website there. i just managed to get the httptriggers and i am confused with that.
Thanks in advance
sorry for any spelling mistakes.
You can deploy to a website to a VM. But first you will have to setup the VM to be a web server. There are many different pre-configured images with either Linux or Windows OS. This will require you manage the OS of the VM.
An Azure App Service will abstract the OS and VM away from you. The OS will be managed for you and you can configure many settings through the Azure Portal. There are different plans that allow you to use more compute and/or memory. You can also setup Authentication through the portal. You can also elect to deploy you website inside a container to an App Service.
There are also Azure Function Apps which can be used. Azure Function Apps are not intended to serve as the backend to a website, but it can be. These are meant to serve only one purpose, not many like the backend of a whole website ( for example, you might use a different function app to serve content each page of a website instead of just one app service having multiple endpoints serving all pages of a website). With Azure function apps, you can deploy in a container or not in a container.
I am not sure what you mean by number 4, Container over docker. You can deploy a docker container an App Service or a Function App. You can deploy the container to docker hub or azure container registry (to name a couple), but that will not deploy your website so that it is accessible.

How do I set up an azure app service with the url of mysite.com/app1 and mysite.com/app2

I would like to set up an Azure AppServices in azure. I have multiple apps that I want to run under the same domain and the url to be applied as such. mysite.com/app1, mysite.com/app2, etc. I know I can do this under IIS but I am wanting to use Azure AppServices instead of using a virtual server that I will have to manage.
I have multiple apps that I want to run under the same domain and the url to be applied as such.
Per my understanding, you could configure multiple virtual directories and applications within a single Azure website. You could follow the steps below:
Set up the Virtual Directory or Application
Log into Azure Portal, choose your web app, click "SETTINGS > Application settings" and add the following configuration:
Deploy your application to Azure
You could use KUDU or other tools (e.g. FTP, etc.) for deploying your application.
Test:
Additionally, here is a tutorial about deploying multiple virtual directories to a single Azure Website, you could refer to it.
UPDATE:
I checked the Environment variables about APP_POOL_ID via kudu:
https://{your-appname}.scm.azurewebsites.net/Env.cshtml and remote to my azure web app using IIS Manager, and found the following settings:
For adding your custom domain for your azure web app, you could refer to this tutorial.
Add them in separate directories instead of root directories. When you add them in the root directories the app starts from mysite.com. But if you add them into different directories then it starts as mysite.com/dir1 and mysite.com/dir2

Add website to Azure Cloud Service

We are currently in the process of building a website on azure. At this moment I have a cloud service that is hosting my web api. Deploying to azure works like a charm.
Besides this project we have a pure HTML AngularJS project. I can publish this website as a WebApp. Though, is it possible to deploy it together with the web api?
You can deploy the second one as a Virtual Application/ Directory (Remember to check the Application check box):
You can use this link on how to publish to Root App as well as Virtual directory in your Azure subscription:
http://blogs.msdn.com/b/tomholl/archive/2014/09/22/deploying-multiple-virtual-directories-to-a-single-azure-website.aspx

How to deploy Azure Website with Virtual Application using VSO Continuous Deployment

I have a Microsoft Azure Website and a virtual application running under it that I have configured. I am able to deploy both the main web application and the virtual application successfully by right clicking on each project and selecting publish. The main web application deploys to the site root, and my virtual application deploys to its sub directory (in this case it's /Api).
We keep our code under source control in Visual Studio Online which you can connect to an Azure website for continuous deployment. However, when I run the build for the virtual application (Api) it deploys it to the root of the site and not to /Api.
I have a number of other cloud services and websites utilizing CD already. It's the virtual application part that is giving me trouble.
The out of the box deployment build only deploys a single application. In this case your site.
To deploy multiple applications you need to use the DefaultTemplate.12.xaml and create a PowerShell to do your deployment in the post-test script step.
This problem will be fixed by a new build system being developed by MSFT...

Access existing Azure Web Sites via Azure Cloud Service RDP

Given:
Couple of websites created using Azure Web Sites execution model.
No RDP access since Azure Web Sites doesn't provide it.
Possibility to install/create Cloud Service on Azure. Cloud Service
does have RDP access to its websites.
Question:
Will it be possible to access the existing websites via RDP on Cloud Service?
Assuming you had deployed your sites in Azure Cloud Services and enabled RD, you can very well look at the setup and config of your site(s) under it.
However if you make any changes, it may not be reflected to the setup as the Azure Cloud Services is non persistent and during any Data center activities like load balancing the fabric controller may just pull of your instance and re-deploy in someother instance. During this process all your changes will be lost and the original package of cscsf and cscfg will utilized during deployment.

Resources