Skip to content

Azure Spring Cloud support(preview)

Andy Xu(devdiv) edited this page Apr 9, 2020 · 10 revisions

Notice: Spring Cloud support is still in alpha stage, UI and functionality may be changed or removed in the stable release.

New Feature for Azure Spring Cloud

  • Manage Azure Spring Cloud project dependencies

  • Manage Azure Spring Cloud apps in Azure Explorer

    • Create/Delete/Start/Stop/Restart
    • Assign/un-assign public endpoint
    • Update environment variables
    • Update JVM options
    • View app properties
  • Deploying apps from current project

  • Monitoring and troubleshooting apps

    • Getting public url
    • Getting test endpoint
    • Instance status(shown in app properties view)

Known Issues

  • Cluster level configuration is not available, such as create/delete Azure Spring Cloud, revoke test key and manage config server
  • Update app level configuration is not supported, like instance count, cpu, memory and java version.
  • Streaming log is available in app properties view by clicking instance row, the entire cell is clickable.

Preview Bits:

You may get the alpha bits for :

Prerequisites

Installation

  1. Open IntelliJ Welcom dialog(if you have opened a project previously, open File -> Close Project to show the welcome dialog), Select Configure and Plugins to open the plugin configuration dialog

image

  1. In the plugin configuration dialog, click the Install Plugin from Disk and select the right zip file you downloaded from Bits section.

image

  1. Click Restart IDE to restart Intellj IDEA.

image

Steps in this tutorial

  • Open gs-spring-boot project
  • Deploy to Azure Spring Cloud
  • Open Azure Spring Cloud app in Azure Explorer
  • Navigate in browser
  • Add Azure specific dependencies
  • Show streaming logs
Open gs-spring-boot project
  1. Download and unzip the source repository for this toturial, or clone it using Git: git clone https://github.com/spring-guides/gs-spring-boot.git
  2. cd into gs-spring-boot\complete
  3. Open IntelliJ Welcome dialog, select Import Project to open the import wizard, select complete folder, and then choose Maven as the importer, proceed with default settings by clicking next and then finish the import wizard, wait for some while why intellij are downloading dependencies.

image image

Deploy to Azure Spring Cloud
  1. Before deploy to Azure, you need to sign-in with your azure account, and choose the subscription as you want, see this tutorial to get more details of sign-in your account.

  2. Right click your project in IntelliJ Project explorer, select Azure -> Deploy to Azure Spring Cloud

image

  1. Select the right subscription and cluster you want, and then select Create app... and input an unique name like gs-spring-boot-azure for the app.

image

  1. Start the deploy by clicking Run Button. The plugin will run mvn package on the project first and then create the new app and deploy the jar generated by package step.

image

Open Azure Spring Cloud app in Azure Explorer
  1. Click the Azure Explorer button at left side bar and sign-in to Azure

image

  1. Find the Spring Cloud node and double click.

image

  1. Wait a few seconds and you will see all Azure Spring Cloud Clusters in the tree, double click the cluster you just created app to, wait a few seconds for the loading, you will be able to see the new app you just created.

  2. Right click the app you have just created. Select Show Properties, you will see the property view for app.

image

Navigate in browser
  1. In the property view, you will see 'N/A' in the URL, this is because by default the public endpoint is not enabled, you can assign endpoint which can be accessed publicly by clicking Assign endpoint button.

image

  1. Wait a few seconds for the Assign endpoint operation, you will see the URL field is showing a clickable link. Click this link will open a browser and show you the message Greetings from Spring Boot.

image

Add Azure specific dependencies

You need to read this tutorial for Azure specific dependencies, to simplify the steps to configure dependencies, this plugin provides the dependency management for you. Open the pom.xml file in Intellij, right click on the editor, select Add Azure Spring Cloud dependency menu, wait a few minutes for the dependency resolving, it will update your pom.xml file with the compatible latest version mentioned in this tutorial

image

Show streaming logs

TODO