-
Notifications
You must be signed in to change notification settings - Fork 161
Azure Spring Cloud support(preview)
Notice: Spring Cloud support is still in alpha stage, UI and functionality may be changed or removed in the stable release.
-
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)
- 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.
You may get the alpha bits for :
- IntelliJ 2019.3.4 : azure-toolkit-for-intellij-2019.3.zip
- JDK 1.8
- Maven 3.5.0+
- IntelliJ IDEA (2019.2.4)
- 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
- In the plugin configuration dialog, click the Install Plugin from Disk and select the right zip file you downloaded from Bits section.
- Click Restart IDE to restart Intellj IDEA.
- 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
-
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
- cd into gs-spring-boot\complete
- 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.
-
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.
-
Right click your project in IntelliJ Project explorer, select Azure -> Deploy to Azure Spring Cloud
- 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.
- 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.
- Click the Azure Explorer button at left side bar and sign-in to Azure
- Find the Spring Cloud node and double click.
-
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.
-
Right click the app you have just created. Select Show Properties, you will see the property view for app.
- 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.
- 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.
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
TODO