ProjectNami / projectnami

WordPress powered by Microsoft SQL Server
http://projectnami.org
Other
270 stars 138 forks source link

Deploy To Azure not working #444

Open srowat opened 3 years ago

srowat commented 3 years ago

We are looking at creating a third ProjectNami website but the Deploy to Azure button does not appear to be working. Can this be fixed or are there instructions for how to accomplish the same setup manually?

machielbrinkman commented 3 years ago

Manual instructions are in issue: Unable to find Project Nami in Azure Market Place - Azure Portal #393

One extra step I found today that is necessary on the SQL Server: Set "Allow Azure services and resources to access this server" to Yes.

It would be nice to have this on the project site or in the readme, instead of an open issue.

patrickebates commented 3 years ago

Just getting caught up on this thread. I'm wondering if there has been a change to the default config of the SQL instance. Used to be that allowing Azure services was on by default.

srowat commented 3 years ago

I feel like I'm missing something really simple, but I cannot get it to work when installing manually. My two previous experiences installing Project Nami have been via the Deploy to Azure button and I've never installed Project Nami or WordPress manually before.

I'm receiving the following error when I navigate to the website:

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

I followed the instructions in the above-mentioned issue, including adding ProjectNami.UTF8 = 1 to the Application Settings before connecting to Git.

I created the Web App (App Service) with the following configuration:

Stack = .NET .NET version = ASP.NET v4.8 Platform = 32 Bit Managed pipeline version = Integrated FTP state = All allowed HTTP version = 1.1 Web sockets = Off Always on = Off ARR affinity = On

Any assistance you can provide is greatly appreciated.

patrickebates commented 3 years ago

Make sure that you have a PHP stack enabled as well. That's the first thing I see.

srowat commented 3 years ago

Thank you, thank you, thank you. I've been fighting with this for days so you can't imagine how excited I am right now. I knew it would be something simple that I overlooked. I appreciate your help. I will document the manual process thoroughly for future reference.

machielbrinkman commented 3 years ago

Nice you got it working. But the deployment button still doesn't work, it appears MS has changed something: https://deploy.azure.com/ doesn't exist anymore. @patrickebates The functionality has moved to the portal, see: https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/deploy-to-azure-button

I managed to deploy PN with the following url: https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FProjectNami%2Fprojectnami%2Fmaster%2Fazuredeploy.json Not all fields where clear what is was, so it took me a few attempts. Some work on the template has to be done...

patrickebates commented 3 years ago

Looks like they finally did something that we asked for years ago, which was directly integrate it with the Azure account and portal. Strange that we didn't get any updates warning us about this. Guess they must have ended that email group. Also doesn't help when almost everyone that we worked with in the past on this setup no longer works for MS...

I need to see if this will now allow for the selection of an existing App Service Plan and an existing SQL instance. Both of those were on our wish list as well.

As you said, some serious work on the template has to be done...

margusj commented 3 years ago

For the folks still struggling with manual deployment.

  1. create web app in Azure portal (NB! select Windows based app service plan) and stack as PHP (I was using latest 7.4)
  2. create smallest/dummy Azure SQL DB (that will create a SQL server for you as well)
  3. under newly create app service, go to Deployment Center tab and create new connection to External Git (add repo url and branch), save it and it will deploy the code (check the status under Logs tab).
  4. If deployment status shows succeed, open app URL and proceed with installation - it will ask DB details.

it really takes 10-15 min to set that up.