jeudi 26 octobre 2017

Develop multi-platform and connected Apps and Deploy on Azure


PaaS allows companies, developers to focus only on applications and services and not infrastructure. PaaS provides all the services needed to create, code, deploy and run websites, mobile services, and more.
The real challenge of the Cloud is no longer infrastructure but services and mobile applications. It is now a question of conforming to a new paradigm of application, that of the "3rd platform" defined by IDC ( the foundations of a modern application must be based on the Cloud, the mobility, exploit the Big Data and comprise social mechanics.
The Azure PaaS has evolved a lot since the first services. It meets the challenges of Apps.
It offers integration and openness unique in the market. This offer, Azure App Service, is based on 4 essential pillars detailed below: Web Apps, Mobile Apps, Logic Apps and API Apps. Not to mention the developer dimension: SDKs, APIs, openness to multiple languages, connection with all major SaaS market, etc.
And we will never forget that it includes :
  • Functions that offers you the possibility to run a code-on-demand without managing any related infrastructure, it's a "Serverless Compute Service".
  • Containerized Apps where you can deploy an open source container like Kubernetes and Docker.
  • Service Fabric dedicated to the distributed systems where you can package, deploy even manage them.
Now, with the IDE Visual Studio 2017 where it is included all that you need to start and deploy any application on Azure.
Let's say that we have Cloud Pattern and Architecture that let you build cloud application to ensure the scalability of your Apps and especially the resistant to failure.

Building the Sample

In our sample, we will upload a simple project ASP.NET Web API Core 2.0 where we integrated the EF Core 2.0 on Azure Apps.
The sample that we will deploy it is in the Marketplace:

Our sample is a simple Asp.NET Web API Core 2.0 that manage Blogs. (CRUD), it integrates EF Core 2.0 and Swagger to display the REST APIs.

1- From Visual Studio 2017

We compile in release mode, we right-click on the project in Solution Explorer after we select Publish....
We select Create new profile if we didn't initialize any settings :
In the Publish dialog, we select Microsoft Azure App Service, we select Create New and we click OK
In this part:
  • We type the Name of the App, that should be a unique name.
  • We select a subscription.
  • We select New... for the resource group and enter a name for the new Resource Group.
  • We select App Service Plan or we can create a new Plan.
  • Finally, we click on Create button... for the app service plan and select a location near you.
We have to select the Services tab to create a new database. after we select the green + icon to create a new SQL Database.
After we will configure our database by defining the Server Name, the Administrator Username, the Administrator Password.
When we confirm, we get this interface again :
We will click on Settings to continue configuring the deploy.
We click on Validate Connection to test our communication if it's established or not. After we will choose Settings to be able to check if the connection string of the database if selected or not.
After we will click on Publish.
Note that we have to do this instruction on Azure ( link our Web application with the database :
If we don't have a ConnectionString, we have to Add it.

2- Using FTP: Filezilla for example

We will create in this part our App service and the SQL Server Database in Azure Portal (
After we will use FTP/deployment username, FTP hostname and the password used in Azure.

0 commentaires:

Enregistrer un commentaire