You are not logged in.
Pages: 1
Hi!
Currently we are moving to Azure and we found Azure AppServices. This kind of SaaS services can manage backend-webapplications made with .NET, PHP, NodeJS and JAVA. I'm curious if mORMot backend servers can be deployed on this platform. We are going to try the deployment.
Somebody deployed code in this platform?
Offline
AFAIK, you'll need a Virtual Machine running Windows or Linux. AppServices is for "managed code" only.
Offline
Actually I think you asked yourself in your question - "...made with .NET, PHP, NodeJS and JAVA." Obviously Delphi is not in the list.
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
Great!
I guess you are using powershell access to the instance.
But IIRC such Azure instances don't have local persistence: whatever you wrote locally may disappear if the VM manager moves your virtual instance to another hardware...
So you should use remote storage for any persistence...
Worth adding to the framework documentation, once proven.
Offline
Did!
We are using autoscalable Azure App Services (not VM's).
What do you need to know about this?
- You have an sandbox enviorment with an IIS acting like a proxy. ex. x.x.x.x:80 -> 127.0.0.1:25000
- You do not control any machine or VM.
- You can control vertical and horizontal scalability.
- You can't do administrative actions on your server.
- Every console out on your program will be flushed on log file.
- Your application needs to accept parameters (paramstr[1] -> TCP port forwarded by IIS)
- You need to bind server on 127.0.0.1 with paramstr[1]
(Only works with non-based HTTPApiServer because you have an IIS-Proxy above)
Here are the instructions :
- Compile your custom .exe HTTP server
- Upload exe to /site/wwwroot folder
- Generate a webconfig file at /site/wwwroot folder with the next content :
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<remove name="httpplatformhandler" />
<add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified"/>
</handlers>
<httpPlatform stdoutLogEnabled="true" stdoutLogFile=".\YOUREXE.log" startupTimeLimit="20" processPath="%HOME%\site\wwwroot\YOUR EXE" arguments="%HTTP_PLATFORM_PORT%"/>
</system.webServer>
</configuration>
- Restart azure AppService instance
- Open a HTTP/s request to your service
- Voilà
Last edited by turrican (2017-04-28 11:22:43)
Offline
Great!
I guess you are using powershell access to the instance.
You can access via powershell or HTTP panel.
But IIRC such Azure instances don't have local persistence: whatever you wrote locally may disappear if the VM manager moves your virtual instance to another hardware...
So you should use remote storage for any persistence...
Yes, no local persistence. But I don't need persistence at all... I am doing a (Delphi/Assembler Mega optimized) HTTP Image Converter and I want to deploy it to Azure with AppServices (not VM)
VM's are more expensive, hard to scale and deploy.
Worth adding to the framework documentation, once proven
Of course! this is a big deal for Azure DevOps!
Offline
Great input!
MS reference documentation:
https://azure.microsoft.com/en-us/blog/ … for-iis-8/
https://www.iis.net/learn/extensions/ht … -reference
https://technet.microsoft.com/en-us/lib … 25371.aspx
As an alternative, the executable may check the environment variable HTTP_PLATFORM_PORT, and use it instead of paramstr(1).
Offline
As an alternative, the executable may check the environment variable HTTP_PLATFORM_PORT, and use it instead of paramstr(1).
Not at all. HTTP_PLATFORM_PORT is not a enviroment variable... I tried to do and nothing found.
PS D:\home> echo %HTTP_PLATFORM_PORT%
MS is hiding things and wants you code in .NET and popular languajes like JS with Node. But no... I continue to do things natively with C++ and Object Pascal.
Last edited by turrican (2017-04-28 11:46:24)
Offline
Not at all. HTTP_PLATFORM_PORT is not a enviroment variable... I tried to do and nothing found.
So MS documentation is plain wrong.
Not the first time it is not accurate, though...
Offline
You two are wrong... I will upload the instructions when I finished the deployment. But I did it.
That's great to know. Thanks.
Although, I full CentOS VM with SSD for database persistence is still cheaper.
Last edited by afarias (2017-04-28 18:10:32)
Offline
Yes, I agree with afarias, it's great to know about that!
BTW, this service is not very cheap, the pricing page is here:
https://azure.microsoft.com/en-us/prici … p-service/
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
More documentation here : https://github.com/projectkudu/kudu/wik … pp-sandbox
Last edited by turrican (2017-05-03 13:49:36)
Offline
Pages: 1