We’ve had first class support for JAVA in Azure for quite some time, and there are thousands of developers and ISV’s already running their JAVA workloads in Azure. Over the last few years, IntelliJ IDEA has become a popular tool among JAVA developers to the point that many of the enterprise developers and partners we work with require Azure tooling inside IntelliJ IDEA (similar to what we have for Eclipse).
Today, the MS Open Tech team released a new set of tools for IntelliJ IDEA that expands upon their support of JAVA developers. With the MS Open Tech Tools plugin you can debug and deploy Java application from IntelliJ.
In this blog, I will walk you through deploying a JAVA application directly from IntelliJ IDEA to Azure.
Before we begin, you will need to acquire the MS Open Tech Tools plugin from the JetBrains plugin repository, Alternatively, you can also download binaries from GitHub (https://github.com/MSOpenTech/msopentech-tools-for-intellij) as well
Open the IntelliJ IDEA and navigate to Filesà Settings and look for Plugins and then click on Browse Repositories
Select the plugin by searching for MS Open Tech Tools plugin, install the plugin and restart the IDE. You are now setup to deploy your JAVA applications to Azure.
Now let’s look at how to build and publish a simple JAVA Web Application to Azure.
Navigate to File –>New Project –>Web Application –>JSF
Use the built-in JAVA EE Web Module program that comes with IntelliJ IDEA.
Expend the project and navigate to index.jsp and write some HTML code.
Now that it is ready, we will configure the application to publish/deploy to Azure. With the installation of the Azure plugin, new tools are available to configure and deploy to Azure. Select ‘publish to Azure’.
Follow the instructions on the wizard.
Select ‘Web Server’ (i.e. tomcat) for local emulator, and add recently created JAVA application war file
Run the application locally to check that it works.
All good? Publish the application to Azure. Right click on the Azure project that is created and select ‘Publish to Azure’. If you don’t have a subscription, you can sign up for a free trial here (http://azure.microsoft.com/en-us/pricing/free-trial/)
Import Azure PUBLISHSETTINGS file and point to it
Select a role on which to deploy the application, as well as the staging or production environment.
Hit ‘publish’ and the application will be deployed to Azure.
Please note that this is alpha release and our intention is to share this early work that we are doing for IntelliJ IDEA developers. Below is the list of scenarios that we support, as well as the limitations.
· Run in Azure Emulator locally on your PC
· Add additional Java applications to your deployment (as WAR files)
· Configure deployment components for more advanced deployment configurations
· Configure Azure storage accounts for your deployments to use
· Publish your project to Microsoft Azure
· Supported application servers – Tomcat, Jetty, GlassFish, JBoss
· Enable sticky sessions (session affinity)
· Supports both Community and Ultimate Editions
· Plugin Works only on Windows (No Mac, Linux support)
· Requires Java 7 at minimum
· Alpha” preview state – work in progress, incomplete functionally compared to Azure Toolkit for Eclipse