App Service is used to quickly build, deploy and scale web apps. It is a fully managed platform with built-in infrastructure maintenance, security patching and scaling. It has built-in CI/CD integration and zero-downtime deployments. It is used to host web applications, REST APIs, and mobile back ends. App Service supports ASP.NET, ASP.NET Core, Java, Ruby, Node.js, PHP, or Python. It automatically patches and maintains the OS and language frameworks. It supports Continuous Deployment with Git, Team Foundation Server, GitHub and DevOps.

App Service plans are billed on a per-second basis. To know about its pricing, click here.

Before we create an App Service, let’s understand a few terms.

  1. Runtime Stack: It defines the technology stack used to develop the app.
  2. Deployment center: The Deployment Center is a centralized place for all the deployment methods for configuring continuous integration/continuous deployment.
  3. App Service Plan:  It defines a set of computing resources for a web app to run. 

We can deploy an app using Azure CLI and Azure Portal.

In this article, we will create an App Service and deploy a sample Java Application in it using the Azure Portal. We will manually deploy the sample app on the FTP Server which will be provided by the App Service itself. The FTP/S endpoint for our app is already active, no configuration is necessary to enable FTP/S deployment.

Pre-requisites

  1. Azure Account (Create if you don’t have one). 
  2. FTP Client.

What will we do?

  1. Login to Azure.
  2. Create a Web App Service.

Login to Azure

Click here to go Azure portal and click on Portal.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/02/echo/screenshot_2020-06-13_at_80825_pm.png62015c2d343eb.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="468" loading="lazy" src="data:image/svg xml,” width=”750″>

Use your credentials to log in to the account.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/02/echo/screenshot_2020-06-13_at_80831_pm.png62015c2d5c0b8.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="468" loading="lazy" src="data:image/svg xml,” width=”750″>

You will see the main page as follows once you successfully login to your account. Click on 3 lines near “Microsoft Azure” in the upper left-hand corner of the Azure portal to show the portal menu.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/02/echo/screenshot_2020-06-13_at_80921_pm.png62015c2dcc62a.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="468" loading="lazy" src="data:image/svg xml,” width=”750″>

Create an App Service

Click on “All Services” in the left panel.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/02/echo/screenshot_2020-06-13_at_80929_pm.png62015c2e2ef42.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="468" loading="lazy" src="data:image/svg xml,” width=”750″>

Under “Web”, click on App Services.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/02/echo/screenshot_2020-06-13_at_80953_pm.png62015c2e49ba9.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="347" loading="lazy" src="data:image/svg xml,” width=”750″>

You will see the main dashboard of App Services, here click on “Add”.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/02/echo/screenshot_2020-06-13_at_81003_pm.png62015c2eb8fea.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="255" loading="lazy" src="data:image/svg xml,” width=”750″>

Under Basics, create a Resource Group if you don’t have it in your account. Give a name to the app service, this name must be globally unique and no 2 App Services across Azure can have the same name.

Here we will be uploading a sample Java Application so select Publish as Code and Runtime as Tomcat 8.5 under Java 8.

Select the region in which you want to create the App Service, here we have “Central US”.

Click on “Next: Monitoring” to proceed.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/02/echo/screenshot_2020-06-13_at_81113_pm.png62015c2f6bf81.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="468" loading="lazy" src="data:image/svg xml,” width=”750″>

Click on “Tags” with the default configuration here.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/02/echo/screenshot_2020-06-13_at_81125_pm.png62015c2fc6438.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="161" loading="lazy" src="data:image/svg xml,” width=”750″>

Add tags of your choice, here we have “environment: test”. 

Click on “Review create”.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/02/echo/screenshot_2020-06-13_at_81136_pm.png62015c3066fe2.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="175" loading="lazy" src="data:image/svg xml,” width=”750″>

Click on “Create” if you don’t get any errors.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/02/echo/screenshot_2020-06-13_at_81153_pm.png62015c30c8bd3.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="468" loading="lazy" src="data:image/svg xml,” width=”750″>

In a few minutes, the App Service will be ready.

Click in Resource Group “test-rg” to go to the Resource Group under which we have created the App Service.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/02/echo/screenshot_2020-06-13_at_81330_pm.png62015c30e63ca.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="242" loading="lazy" src="data:image/svg xml,” width=”750″>

Click on the App Service we have just created.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/02/echo/screenshot_2020-06-13_at_104834_pm.png62015c315f36d.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="468" loading="lazy" src="data:image/svg xml,” width=”750″>

Here, you can find the details of the App Service.Advertisement

Copy the URL and access it in the browser.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/02/echo/screenshot_2020-06-13_at_104843_pm.png62015c31f31eb.jpg" ezimgfmt="rs rscb5 src ng ngcb5" loading="lazy" src="data:image/svg xml,”>

When you hit the URL, you will see the default webpage for the service we created. 

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/02/echo/screenshot_2020-06-13_at_104857_pm.png62015c3291de5.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="468" loading="lazy" src="data:image/svg xml,” width=”750″>

To deploy a sample app click on “Deployment center”, then click on FTP and then Dashboard.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/02/echo/screenshot_2020-06-13_at_104950_pm.png62015c32d24c3.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="468" loading="lazy" src="data:image/svg xml,” width=”750″>

You will see the credentials to log in to the FTP server where the sample app can be copied. Do not share these credentials with anyone.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/02/echo/screenshot_2020-06-13_at_105013_pm.png62015c3363652.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="468" loading="lazy" src="data:image/svg xml,” width=”750″>

If you do not have a sample app, you can down the one from here. This is a Java Application that will print “Hello World” on the browser. Download this file on your system before you upload it to the FTP Server.

Copy the sample app at  “https://www.howtoforge.com/site/wwwroot/webapps” in the FTP Server using the FTP Client. Here, FileZilla is used as an FTP Client.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/02/echo/screenshot_2020-06-13_at_105504_pm.png62015c33b024b.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="468" loading="lazy" src="data:image/svg xml,” width=”750″>

Now hit the same URL of the app service and you can see that the sample app has been deployed successfully.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/02/echo/screenshot_2020-06-13_at_105515_pm.png62015c33cc132.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="65" loading="lazy" src="data:image/svg xml,” width=”750″>

When you no longer need the App Service, you can delete it by deleting the resource group itself if it does not have other resources in it.

ConclusionHow to create an App Service on Azure Cloud linux

In this article, we saw the steps to create a Java App Service and deployed a sample application in it.

We saw how to deploy the sample app using FTP Server.