How to publish a Web Application to another persons azure subscription - azure

I currently have a Web Application and SQL Database instance published on my own personal Azure trial subscription. However the app is now finished and I want to hand ownership over to the person I am creating it for. So I want to publish it to his Azure subscription, so he can look after billing, monitor, and have ownership of the application etc.
I asked him to add me as a user to his account, and now I see his company name listed as a 'Directory' from the portals home page (along with my Default Directory, my Web App, and my SQL Database). I don't know how to proceed from here. I want to be able to Publish it from Visual Studio 2013 - then run my code first migrations to create the database, all to a location that his company and not me is responsible for.
Is my approach to this wrong? In a general sense, how do you develop a test application (and test it in Azure) and publish it for someone else on Azure?
The first comment on the question is sort of what I am trying to achieve:
Transfer all data from my account to another in the same Azure subscription
"What do you mean by from my account to another in the same Azure subscription? Normally I have seen folks want to move data from one subscription to another one (say from Dev Subscription to Prod Subscription)."
But if I just transfer the app I wouldn't be able to make changes in VS and re-publish it, for example.
EDIT:
I found this article on Migrating an enterprise web app to an Azure service. Would it be possible to Publish the app to my local dev machine (with local database), then use the Migration Assistance to move it to Azure? Obviously to do this I would need my clients Microsoft ID and password to log into his subscription which is not ideal.

You will first want to make sure that the subscription appears in your "Subscription list" in the top right corner and is selected.
I am assuming you have connected your VS with your Azure subscription and are able to publish your app to your subscription from here, and that the new subscription is "missing" from your selection. But now you have been added to a new subscription but have not updated VS. Remove and readd Azure Subscriptions from VS. This should require you to log into Azure, and should pull updated account information.
Now when you Deploy your app, you will be able to select which Subscription you want to deploy it into.

Related

Freelancer's method of setting up azure systems

I am setting up some simple Azure services for a company that does not have an IT team yet. My three goals are
The company has to use the Azure portal minimally. The owner is not tech-oriented.
The company can add billing information for the subscription themselves without having to give me all that information.
I can eventually transfer ownership of the azure entity (directory? tenant?) to an IT team.
I cannot find the answer online because all the documentation is oriented towards an IT that works for the company as opposed to freelancer. I am currently using my personal Microsoft account but am able to get a company Microsoft account if needed via their parent organization (which does have IT). Using my personal account, I've created a new tenant then switched to that directory. In that directory I've attempted to add a subscription but it switches me back to my default directory. If I switch to the new directory again, I get the error "In order to view your eligible offers, please click here to switch your directory to {my account}.onmicrosoft.com"
I would appreciate an in-depth answer as I am not familiar with the administration side of Azure.

vsts Build agent access to a specific team?

In order to not be restricted to 4h of build /month, in VSTS we have bought an hosted build agent for us Team (We can see it in Azure portal).
But how restrict the access to the other teams ?
In the Agent Queues i see nothing to do that...
For the same team project, you can’t do it.
For different team projects, the user with Administrator role of agent pool and project collection can create new queue. So you can remove these permissions for others and delete the Hosted queue from related team project. With this way, they can’t use Hosted queue.
BTW, there isn’t the time restrict once buy a Hosted pipeline.

How To Tell What Subscription a Visual Studio Azure Wep App Will Be Published To

Given a VS web app project that has an existing Azure publish profile is there a way to tell what subscription the selected publish profile will publish the app to? We have such so many subscriptions it's quite time consuming to to use the portals poor blade interface to locate which subscription the app is in. Even opening the SCM site it seems apps know nothing about it's subscription.
As I know, we don't need Azure subscription information to publish our project. What we need is contentPath, ComputerName, UserName& Password when you use msdeploy. The following is the parameters that used to deploy:
.\msdeploy.exe -verb:sync -source:contentPath='E:\code' -dest:contentPath='sub2',ComputerName='https://waws-prod-sn1-047.ftp.azurewebsites.windows.net/msdeploy.axd?site=sub2',UserName='$sub2',Password='key',AuthType='Basic'
If we published project to Azure, we have no easy way to see which subscription it belongs to. I suggest you submit a voice at Azure feedback forum.

Settings up Team Services build to deploy to Azure Web App

I'm trying to create a build in Team Services (Visual Studio Online) but am having a few issues.
My first step is to create a new build and I've selected the template Deployment -> Azure Web App
Then in the build step for Azure Deployment I need to select my Azure subscription. This list is currently empty so I select Manage to add a new one.
Following the instructions here I try to add a new endpoint but it says to select the one called 'Azure' but in my list I've got 'Azure Classic' and 'Azure Resource Manager'. Which one should I use?
I've tried 'Azure Resource Manager' and used the details to generate service key etc using the Powershell script as said in the previous link. Now the status just stay at 'Connecting to service using Service Principal' and is not selectable in the list.
How do I get Team Services to see my Azure subscription?
I must say, I've found the documentation for this a bit lacking in that a lot of the Microsoft sites still use the classic portal or older versions for the sites.
Starting from the end of your question, one of the reasons of that is that some functionality is not available yet on the new portal. As far as i know, all of the functionality should migrate to the new portal in a future.
For Azure Web App, please add the New Service Endpoint using classic mode (and i prefer to do that using certificate - very simple). Then, when adding the web site as the build step (for example), select your added subscription and you should be good to go.

Change Azure Website Subscription

I had a free trial with windows azure, I was out of the country and it ran out.
I have now upgraded to a pay-as-you-go account. All good.
However, my previous websites still run off my old subscription, is there any way to reactivate these websites using my new pay-as-you-go subscription?
If you upgraded the existing free account versus opened a new pay-as-you-go account, this should have been a seamless transition.
You can contact support - use the Billing Questions option and then select Transfer Subscription, and they should be able to help you.
Alternatively, of course, you could redeploy your assets to the new subscription.
I created a "Billing" ticket with microsoft. There is a type of ticket as you go through their wizard specifically for this. They were able to upgrade my "Free Trial" to the pay as you go AFTER i had let the free trial expire. The downside was that all my virtual machines were deleted. It did however give me access to my websites and storage without any problem. I was able to recreate all the VM's using the storage vhd's.
My experience on this is that I just redeploy to a new website I created under new subscription. I didn't find a way to move them over to new subscription.
You can move SQL Azure to new subscription, but not website. To move SQL Azure to new subscription, you will need to use old Azure portal management. Follow this step:
http://blogs.msdn.com/b/windowsazure/archive/2012/03/07/moving-sql-azure-servers-between-subscriptions.aspx
Note that you are moving the server where the database lives. So, if you have more than one DB in the same server, everything will be moved.
You can move Azure SQL DB from one subscription to another on https://manage.windowsazure.com
Both subscriptions should in the same Default Directory. If they are in different directories then select:
Subscriptions
Manage subscriptions/directory
Select subscription and click "Edit" at the bottom.
Choose directory where other subscription and click "Next".
When both subscriptions in the same directory.
Choose "SQL Databases"
Select proper server
and in Quick Glance you should see "Change subscription"
The documentation in the link stack247 posted is now outdated. To change the target subscription for a database, you have to change the target subscription of the server for the database. There are several ways to navigate to the server, but here is just one example:
Click on the database tab
Click on the name of the database you want to change
In the dashboard view, click on the link to the server in the quick glance section. This is on the bottom right corner of the view.
In the dashboard view, click on the Change Subscription link in the quick glance section. This is on the right side of the view.
Change the Target Subscription, and click the check button.
As far as changing the subscription for a website or cloud service, I would do what is recommended above; and republish the website or cloud service. When you publish, change the settings to target a different subscription by clicking on the previous button.
---------Update----------
If you have a bunch of assets that need to be moved to another account, create a ticket with the Azure helpdesk. You will have to do the above and switch out the accounts for the databases/servers, but Microsoft is able to run a script on their end that moves everything. Depending on the size of your assets, it may take a little longer. Fortunately for me, it was only a day to move everything. I would recommend doing this instead of publishing everything a second time.
https://manage.windowsazure.com/?getsupport=true
All the solutions mentioned above are now outdated.
In the https://portal.azure.com/,
For SQL Servers, go in the "SQL Servers" menu, select the server to change. In the Overview, click on the Edit button, located right to the name of the subscription.
For WebApps, go to the "App Service plans" menu, select your plan, click on the Resource Group and in the Overview, click on the Edit button, located right to the name of the subscription.

Resources