Reputation: 55798
Question: What is the way for deploying Play app to the Windows Azure Cloud Services
(not the Virtual Machine)?
Background: I need to deploy small application to the Azure and I'd like to do that with common dist
packaging method (it creates folder with all required *.jar
files + start script that can be run on any system with the JDK installed). Need to add that I wouldn't like to use Starter Kit for Java
+ WAR packaging as... I'm working on mac-os so I would need to buy/lean next machine with Windows just for this one task (The Kit works on Win only).
Unfortunately I have no experience with Azure's services. If I mixed things too much or if it's impossible without WAR + Kit please let me also know ;)
Upvotes: 4
Views: 2779
Reputation: 2145
As far as I know, Cloud Service (PaaS) package can only be made from Windows, so currently Windows machine is a requirement.
Visual Studio is probably the easiest tool to create your own Cloud Service but you will need to learn VS and non standard way to make Azure app. This can be quite an investment.
You can do cmd installed and started application (not only WAR base Java EE application) from the Azure plugin in Eclipse. If you already know Eclipse this can be a quick way to build a Cloud Service Package.
If you chose the Eclipse way, you can build your own application image this way:
When you understand how it works, you should try to make your Azure package more flexible by putting the archive in Blob support and download them during start up. This will increase development efficiency trust me. In a second step you can make the start-up script configurable by downloading some other script or configuration file you can specify in the ServiceConfiguration.csfg file allowing you to limit the boot of you Windows machine...
Upvotes: 1
Reputation: 24895
For the Devoxx conference here in Belgium, Steve Marx created a Scala app with the Play framework that runs on Windows Azure. Instead of using the Starter Kit for Java, this uses packageanddeploy (simple scaffold that packages an Azure app).
Read through his blog post 'Using Scala and the Play Framework in Windows Azure' or take a look at the project on github.
But there's one little issue, this also uses the cspack.exe for which I think there's no alternative on Mac. cspack is used to create a package you'll deploy to Windows Azure. Now I don't think this is a show stopper.
In his blog post, Steve talks about the WorkerRole\downloadstuff.ps1 file that downloads Java and the Play framework. You could extend it to also download your application (packed in a zip file). This way, your package will be very static (just a few scripts, which will download the acutal application), and you won't need to run cspack each time you want to deploy.
Now if you don't want to buy a Windows machine, you could do the following:
Upvotes: 5