Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run a Delphi 6 executable on Windows Azure cloud platform (need tutorial/sample)?

I've been reading up on Windows Azure cloud services lately. The problem I'm running into is that the Microsoft documentation is very Visual Studio centric. The second main source of tutorials/samples are based on the PHP for Azure environment. Neither of those use case scenarios fits my needs. I have a very rough idea of the configuration files and packages involved with creating an image that is compatible with a Azure VM, but I don't want to waste a lot of time figuring out the exact syntax/setup needed to get a simple Delphi 6 EXE that waits for HTTP requests on a port and returns documents without the help of IIS. I believe that my app would be classified as that of a Worker Role providing an HTTP endpoint.

Can someone point me to a simple tutorial that can show me how to do this without bringing VS, IIS, or PHP for Azure into the discussion?

Any tips/docs on being able to do remote desktop access in this scenario would be appreciated too, if it's possible to use RDP in this case.

like image 316
Robert Oschler Avatar asked Jul 03 '11 17:07

Robert Oschler


1 Answers

If you want to run a custom executable, AFAIK you have two options:

  1. Create a Worker role, and "Run" the custom EXE from some C# code. You can run it with Process.Start. What you need to do (or what we are doing with this example) is that we have an executable on our blob storage and we download it on worker role start. You will need Visual Studio to do this though. Keep in mind, the underlying machine is still a classic Windows Server 2008 (or R2) machine so you can save things in your local storage etc.
  2. Create a VM role - we have a blog post coming up on how to do that, but in general, you have a base image; which is a classic Windows Server installation, and it's run in the cloud. You can setup services, etc. and servers to be run on start. Each time you provision a new instance, a copy of this VHD is deployed and started.

IMPORTANT: in both of these case, you DO NOT have state. That means any logs, etc., are lost if you do not sync them to some sort of permanent storage (e.g. blob storage).

I would opt for option #1. If you need more info, let me know, I'll be happy to help if I can.

EDIT: I forgot to mention, we store our custom log data in a VHD mounted drive that's stored on blob storage - gives the application the feeling it's writing to a standard disk.

like image 94
Anže Vodovnik Avatar answered Nov 16 '22 02:11

Anže Vodovnik