Spring Boot App on Microsoft Azure
I would like to know if it's possible to deploy a spring boot application with MySQL database to the azure cloud. I couldn't find any instructions or tutorials.
Yes; Create the web-app on the azure portal (tomcat or Jetty) (info) create the war file from spring boot using your gradle/maven build scripts (info) upload to Azure using the FTP options (info) & this And you are done - it will be served on the default URL..
In additional to general information about java web apps, there's some Spring Boot-specific info in the Azure documentation: https://azure.microsoft.com/en-us/documentation/articles/web-sites-java-custom-upload/#springboot In order to get a Springboot application running you need to upload your JAR or WAR file and add the following web.config file. The web.config file goes into the wwwroot folder. In the web.config adjust the arguments to point to your JAR file, in the following example the JAR file is located in the wwwroot folder as well. <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <handlers> <add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" /> </handlers> <httpPlatform processPath="%JAVA_HOME%\bin\java.exe" arguments="-Djava.net.preferIPv4Stack=true -Dserver.port=%HTTP_PLATFORM_PORT% -jar "%HOME%\site\wwwroot\my-web-project.jar""> </httpPlatform> </system.webServer> </configuration>
This worked for me with an Azure API-App: Create the API-App in Azure Create the war file from Spring Tool Suite (File -> Export -> Web -> War-File) or via maven build Name the war file "ROOT.war" Put it in a folder "webapps" Push the webapps-folder and the containing war to a git repository Add the git repository to the Api-App Deployment Options in Azure If the App is setup correctly (correct Java and Tomcat version selected), the war should be extracted automatically. Additionally you can add a web.config file (parallel to the webapps folder), for more configuration options. If the ROOT.war is not extracted, try removing the existing ROOT folder.
If you are looking at general Azure IAAS (Infrastructure as a service) part, then this question should not arise, since it is as good as any other IAAS offerring from other cloud service providers like Amazon. It can pretty much run anything, and yes, including Spring boot applications If you are talking about a micro-service based hosting through Service fabric, question will be interesting, since Service fabric in itself provides the micro service hosting part and a plug and play there will be interesting.
Is it secure to pass the DB query to AzureML as a global parameter?
How do I install software as a startup task in Service Fabric?
.Net Core - Azure Application Insights not showing exceptions
How to configure SSL on MS Azure in Virtual Machines (classic) setup
Networkservice.NSPluginConnectionFailedexception: the remote server returned an error 409 conflict
Azure: How to ssh to a vm in a resource group with several ubuntu vms
Azure web role - Disable Tls 1.0
HttpContext.Session empty after app is published on Service Fabric cluster
What are the DAC endpoints for the Azure UK Datacentres?
Azure storage table records filtering advice
Azure Batch Pool Start up task to download resource file from Blob FileShare
Import data to Analytics in Azure Application Insights
Why does Get-AzureStorageAccount give me different Endpoints than I see on the Azure Console?
“Parameter x-ms-client-principal-name is null or empty” when deploying a Function App with Source Control link in VSTS
Using Azure WebJobs for on demand responses