In this part of series, we will deploy the application that we created on the previous tutorial to Azure using the portal.

Architecture

I — Create a Resource Group

  1. Connect to Azure Portal: https://portal.azure.com/
  2. Click on <Resource groups> and click on <+ Create> button
  • Subscription: Select your Azure subscription
  • Resource group: Enter the resource group name. For example: “azure-spring-mssql-rg”
  • Region: Select a Region from the list. Make sure to select the same region for all next resources. For Example: France Central
  • Click on <Review + Create>

3. Now, you can find the newly created resource group in the <Resource Groups> list.


In this tutorial, we will create and deploy a simple spring boot application based on Java 11 and using MsSql database.

Prerequisites

I — Create the application

First create the spring boot application, to do this, two options are presented:

  • From command line using curl:
$> curl https://start.spring.io/starter.tgz -d dependencies=web,data-jpa,sqlserver,h2,lombok,azure-support -d baseDir=azure-spring-mssql-tutorial -d bootVersion=2.4.5.RELEASE -d javaVersion=11 | tar -xzvf –


Hello everyone, in this part of tutorial we will deploy our Java based on spring boot application to Azure using the Azure CLI.

I — Install Azure CLI

Go to Install the Azure CLI and install the CLI based on your operating system.

After the installation, open a command line and run the following command to connect to Azure:

$> az login

A pop-up will appear, then you can enter your email and password to connect to your microsoft account.

If the connection is successful, you should see all the subscriptions that you have access to.

If you already have Azure CLI installed, you can…

Anas BENSTITOU

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store