Reg hosting php mysql application in windows Azure - azure

Our application is developed using PHP 5.2.14 and MySQL 5.1.41. One of our client wanted to host this in windows Azure.
We searched and understand from below links that we can host php application in cloud.
Host PHP in the Cloud with Windows Azure -
http://www.sitepoint.com/windows-azure-php/
Migrating from MySQL to SQL Azure Using SSMA -
http://blogs.msdn.com/b/ssma/archive/2011/03/23/migrating-from-mysql-to-sql-azure-using-ssma.aspx
We did not done this before. Please advise to proceed in a right way. Please advise what are the issues will come
Thanks

The usual route is this :
1/ Migrate your application to PHP 5.3
PHP 5.2 is deprecated and although it can run on Azure you'll be on your own when you encounter issues..
2/ Migrate the data to Sql Azure
The migration assistant is one way to go. Notice that Visual Studio 11 beta can update a lot of things on your Sql Azure Schema without loosing your data, so you may consider installing that as well.
3/ Update your code to use php_pdo_sqlsrv.dll or php_sqlsrv.dll
do NOT use the old mssql drivers for this. When you try to connect to your Sql Azure database don't forget that the user is really username#machine and not simply username
4/ Deploy to Azure
Once you have done all these on your local machine (you'll connect to Sql Azure from your dev box), you'll begin deploying to Azure. Don't do it before, you'll just waste your time.
5/ Fix extensions and permissions issues
6/ Replace local storage with blob storage or Azure storage when needed.

The link you talks about using eclispe plugin for deploying PHP application to Windows Azure. This plugin is very old and not based on Full IIS support in Windows Azure Web role. Now you should use Windows Azure SDK for PHP to package and deploy PHP application to Windows Azure. Please refer following link for details:
http://phpazure.codeplex.com
http://azurephp.interoperabilitybridges.com/articles/packaging-applications
regards,
Satish

Related

Can I still manage my SQL Server through the browser window in the New Azure Portal

In the older management portal I was able to do SQL Server database management tasks but in the new portal (green and blue) that functionality seems to be removed. In fact the older Azure portal does not seem to have that functionality more as the always dumps me to the add Silverlight screen (I have added 3 times).
I have a simple datafix but I can not get to the server from my current location.
This functionality has be deprecated and removed.
(http://yourservername.database.windows.net)
Azure SQL Database Management portal:
Cannot manage V12 servers.
ref: https://azure.microsoft.com/en-us/documentation/articles/sql-database-v12-plan-prepare-upgrade/
If your client is not on Windows see suggestion #01 below.
If you are on Windows probably a good route to managing your Azure database is to download the free SQL Server Management Studio (SSMS) from [ https://msdn.microsoft.com/library/mt238290.aspx ] . You wind up wired into your cloud based SQL Server same as you would with an on-premise.
CAVEAT - due to the hardening of Azure SQL Database on firewall rules, you may find yourself going to the Azure Portal a great deal to open the firewall between your local client and your Azure SQL Database.
SUGGESTION #01 - Create a 'dev vm' in Azure and install the SSMS into it. Azure <-> Azure connections do not get firewall dinged every time the client IP changes. Shut down the 'dev vm' when you aren't using the tools and save some $s. Great option for folks who don't use a Windows desktop as well.
SUGGESTION #02 - still want to run SSMS local and hate the firewall restriction. Open it from 0.0.0.0 to 255.255.255.255 . I've done this on occasion but only temporarily, and removed the rule very quickly after I was done.
Hope this helps. Healy in Tampa

Azure VM and SQL Azure

My web project uses an software, which need to be installed on destination PC. So, I have to use Azure VM and no way to use Azure Cloud Service, right?
Also, can I use SQL Azure with Virtual Machine?
You can install any third party software on Azure Web/Worker roles (Cloud Services), as long as the installer supports a quiet/unattemded install from a command line with switches. Learn more how to do this via StartUp tasks here.
As for Azure SQL Database - you can use with any combination of services. Even with on-premises only solution. You have to take care of Firewall rules.
Azure SQL Database tends to be much less expensive than a VM with SQL Server installed. It won't run on a VM but you can access an Azure SQL database from an VM or web application in the same way you access local databases - You just set the connection string to the Azure SQL connection string.
There is an excellent post that can help you with in order to understand how to configure customization with cloud services.
microsoft-azure-cloud-services-part-4-lifecycle-and-customization-of-your-vm
As the link explains there is nothing persisted on a cloud service VM but this is not a limitation instead a good practice which allows easy scaling out by adding more instances if required.
You can use Azure PaaS SQL just like a SQL server installed on a different server then your web server with some limitations. Please have a look at the link below from MSDN to understand these limitations.
sql-database-transact-sql-information

How to publish a website with sql local db database to azure using visual studio 2013

I have my website up and running on local server I want to published it to azure. I searched a lot but unable to do so however succeeded in publishing without database.Can any one provide a step by step guide how to published to azure and what tools to download from azure management portal.
Thanks.
Try this http://www.asp.net/mvc/overview/getting-started/database-first-development/publish-to-azure and let us know if you need more help. You will just need Visual Studio 2013.
You can't use localdb with Azure Websites.
That said, you can use localdb for development, but change the connection string on deployment to use some other database, such as SQL Azure (see http://azure.microsoft.com/blog/2013/07/17/windows-azure-web-sites-how-application-strings-and-connection-strings-work/)

Getting started with Microsoft Azure - local copy?

Is there any ability to install a "development environment" for Azure, or a local equivalent that supplies all the same APIs, storage methods etc?
The end game is to not pay for Azure while I'm developing.
Yes, Azure SDK and Tools come with a local emulation environment that closely resembles real Azure and allows one to do most of development without ever deploying a single bit to Azure.
Emulation is provided for Roles and Azure Storage (Tables, Blobs, Queues).
If you need SQL Azure, suggestion is to use regular SQL Server and closely stick to compatible functionality only.
Just go to the Windows Azure page to download the SDK and tools - the installation is streamlined using the Web Platform Installer.
The local simulation environment simulates blobs, tables, and queues, as well as compute instances (although as separate processes, not as separate VM instances). The APIs all work in the local simulation environment.
To use SQL Azure, you'd need a real account. Same thing for the AppFabric services.
Just so you know: you can get a completely free account for 30 days, with SQL Azure, AppFabric services, and a few compute instances. Go to www.windowsazurepass.com, and use promo code DPWE01.
EDIT: Agreed with Igor in his answer: you can develop with SQL Server and then push your database up to SQL Azure. The latest SQL Server Management Studio supports SQL Azure-compatible sql output scripts. As Igor points out, just stick to compatible SQL (which is a very large subset of SQL Server).
The SDK is the way to go, but note, deploying worker role instances can be quite a bit more complicated, but testing locally once the SDK is installed, is fairly straight forward.

How do I develop for Azure without using a live SQL Azure instance?

I have a BizSpark account and I get some Azure freebies from Microsoft. But, I'm forced to create a live SQL Azure database to use in my local development. This slows me down a bit because I have to read/write over the wire when I'm developing, and I must remain connected at all times.
Is there a way, or a technique, to build locally and have my deployments access the express edition of SQL Server on my machine? I'm using EF4 to access the database.
First of all, as a part of Bizspark, you get 3 SQL Azure databases for free. http://msdn.microsoft.com/en-us/subscriptions/ee461076.aspx
This will allow you to have 1 DB for testing, 1 for dev, and 1 for production
If this does not work out for you, you CAN develop on your local SQL Express and keep deploying your changes to SQL Azure as you deploy your application to Azure. There are two tools that help you here:
1) open-source SQL Azure Migration Wizard: http://sqlazuremw.codeplex.com/ -- we personally do not use this for deployments, so I am not super knowledgeable to comment on this. It is a decent tool to back your SQL Azure database.
2) You can use Red Gate's SQL Compare product, as of v9.0+, they support synchronizing cross SQL Azure and on-prem SQL servers. We use this for AzureWatch and are very happy. It is commercial product and is somewhat pricey.
HTH
+1 to Igorek's answer - plenty of good suggestions there.
In addition to his advice, if you are a BizSpark licensee then I suggest you deploy full SQL Server 2008 R2 to a local box and develop against that.
There are differences between full SQL Server and SQL Azure - you should read around to be aware of these - http://social.technet.microsoft.com/wiki/contents/articles/comparing-sql-server-with-sql-azure.aspx
As long as you are aware of the differences (especially the SQL Azure limitations) then migrating back to SQL Azure later, should be reasonable.

Resources