Azure Developer Guide

    This e-book is written by developers for developers. It describes the basics of the Azure platform, its capabilities for developers and organizations, and ways to use them effectively.

    In the second half of the guide are scenarios, such as a tour of the portal Azure and the creation of a virtual machine. It also describes the development and deployment of a web application on the Node.js platform with a MongoDB database. We will look at typical tasks, such as CI / CD, intermediate environments, scaling and monitoring. And finally, you will learn how to create a server part for your mobile applications, providing authentication and offline synchronization.

    Today we publish part of the first chapter of this book. You can download the full version for free at the link .



    Table of contents


    • Azure Developer Guide - 1;
    • Getting started with Azure - 12;
    • The introduction of intellectual functions in the application - 27;
    • Application Protection - 33;
    • Where and how to deploy Azure services - 36;
    • Azure Walkthrough - 40;
    • Using Azure Marketplace - 60.

    Introduction


    The benefits of cloud computing are described in a variety of books, articles, documents, blogs, and other sources, and you can easily find Zettabytes of information on the technical side of this issue. However, before you start a detailed study, you need to answer a few simple questions: why should I switch to cloud technologies, what will this transition give me, my team and my company?

    Information technology is a benefit, not a burden


    Cloud computing can be used as a service. What do we mean by this? For clarity, consider one of the daily services - electricity.

    Today, hardly anyone will say that installing mini-generators near each house and company is an effective way to distribute electricity. We used to just turn on the light and do what we need. Obviously, you will not acquire, install and maintain all the electrical equipment necessary to power your home or office. Instead, you buy electricity from a local power company every month, without thinking about generating it, capital costs, servicing equipment, or repairing it after a hurricane. You just press a button and go about your business.

    If you are not worried about how electricity gets into your home, why should you care about how the computing resources and services you use in the cloud are provided? Leave it to others. First of all, storage, computing and network resources transferred to the cloud are convenient to consume - no more difficult than turning on the lights. In this case, you pay only for consumed resources in the same way as you pay for the consumed electricity in your home.

    Apart from our analogy, we see that the cloud offers many other significant benefits to IT processes, such as scalability and the ability to use intelligent services such as search and face recognition in applications, and much more.

    Calculations as a service


    Azure cloud services can be represented as a computing model as a service. Of course, Azure offers much more software and services than the local electricity supplier, so it is sometimes difficult to clearly define cloud computing. Some claim that the cloud is simply the use of someone else's computers. This statement is technically true, but the cloud means much more.

    The cloud is a system that provides reliable, robust, intelligent services and computing resources on an unlimited, expandable, global scale.

    So, to summarize:

    Cloud and Azure provide services to help you perform many tasks: from simple ones, such as adding a search to an application, to more complex ones, such as implementing a continuous integration (CI) process and continuous deployment (CD). You can conveniently and quickly automatically configure your database and push notifications for mobile devices. These are just a few examples of standard tasks that developers had to perform many times before, but now they are available as a service. Such services can be used almost effortlessly - no more difficult than pushing the switch button! In this case, you can focus on the unique elements of your application: functions that are of real value to users.

    In addition to services, the cloud provides computing resources in the form of virtual machines (VMs), containers, databases, etc. Thanks to them, you can host applications or provide complete infrastructure to its users.

    Cloud services and resources are incredibly reliable and stable: the probability of their failure tends to zero. After all, the cloud has intellectual capabilities - it is restored by itself. So, Azure data centers are distributed around the world and use tens of thousands of servers. If one server fails, the other takes over its functions. If the entire data center fails (which is highly unlikely), the next one will turn into work instead. All this was made possible thanks to the enormous scale of the cloud.

    One of the most convincing arguments in favor of the cloud is the possibility of almost unlimited vertical scaling of services and resources. This is almost impossible when using local resources, unless you are willing to spend huge sums on capital equipment and maintenance personnel. In addition, the cloud provides the possibility of global scaling. Cloud services are available around the world and can be effectively provided to users regardless of location. It also allows you to store your data where you need it.

    Perhaps the most important feature of cloud services and resources is that they can be minimized while demand decreases. Going back to our electricity supply analogy, if you have a lot of friends and relatives at a party, you turn on the lights at home and in the yard, often use a microwave, listen to music and, as a rule, consume more electricity. But when the holiday is over and the guests have left, the power consumption and the cost of it return to normal levels. The same happens when using the cloud and Azure: you only pay for the resources actually spent, and not for those that you may need during a surge in demand.

    MORE INFORMATION To learn more about the Azure portal and create your first virtual machine, visit the page .

    In addition to wide scalability, ready-to-use intelligent services and efficient pay as you consume, the cloud provides enhanced security.

    The cloud is used around the clock by millions of people around the world, and, of course, a lot of intruders are trying to attack it. Authoritative and experienced cloud service providers, such as Microsoft, can distinguish the behavior of ordinary users from the actions of intruders. This means that we are able to protect you from both the most common and unique attacks. Intelligent monitoring tools, machine learning algorithms and artificial intelligence help cloud service providers detect and block attacks in real time.

    Thanks to many years of experience in providing protection and support for large-scale traffic, as well as the best security experts in the industry, the cloud environment has now become much more secure than any local data center.

    For more information To learn more about how Azure protects your applications and data, see the sections How Azure Security Center detects DDoS attacks using cyber threat intelligence, Azure Security Overview and How Microsoft fights cybercrime .

    We briefly reviewed the reasons for the transition to cloud technology and Azure. Now let's explore the main components of the cloud, their purpose and place in the general scheme.

    Types of cloud computing deployments


    The cloud offers products and services at several levels, such as infrastructure as a service (IaaS) and platform as a service (PaaS). However, before proceeding to their consideration, let us dwell on three main types of clouds: public, private and hybrid. These terms are rapidly entered into modern technical jargon. Let's find out what they mean.

    Public cloud


    Using a public cloud model, you do not own the equipment - your cloud provider is responsible for its acquisition and maintenance. The public cloud provides services and computing resources that you also do not own, but that you can use with a provider. The supplier maintains everything in working condition and ensures compliance with service level agreements (SLA). You pay for what you use, not for what you own.

    Private cloud


    Using a private cloud, you own all of the equipment, or at least have complete control over it. The equipment on which services are executed and your data is stored is located in your local data center. Obviously, total control is very expensive: you need to acquire and maintain all the equipment. You pay for what you own, not for what you use.

    But how to deploy a private cloud in a traditional local data center? You will be helped by a unique solution Azure Stack, which is designed to work in such an environment. In general, the Azure Stack is your own ready-made Azure instance that can be run in local data centers.

    Running services in a private cloud is not equivalent to running them in a local data center. Azure Stack offers all the benefits of Azure, including intelligent services that you can use in your applications — all within your local data center. Thus, if for any security or management reasons you need to run certain processes in the local data center, you can still use all the benefits of Azure and the cloud.

    Hybrid cloud


    As the name implies, a hybrid cloud is a combination of public and private clouds. You can work with public cloud services that use the resources of your private cloud, and vice versa. For example, in Azure, you can run applications in Azure Web Apps Service, which connects to a local database using Azure hybrid connections. This opens up many possibilities. You choose the location for your applications and data, while maintaining the benefits of intelligent cloud services.

    Azure provides solutions for all types of cloud computing deployments. This allows companies to flexibly use Azure anywhere in any way and determine the degree of control over their applications and data.

    Types of cloud computing


    Within cloud computing, you can divide services and resources by type. There are many definitions of various types of cloud computing. These types differ in the ratio of the degree of control and responsibilities, as well as the amount of time and effort you spend on creating business benefits for your company or customers. Figure 1-1 and 1-2 show how we define the types of cloud computing for Azure.


    Figure 1. Types of cloud computing


    Figure 2. Examples of cloud solutions

    Infrastructure as a service


    Using the Infrastructure as a Service (IaaS) model, you are responsible for everything except equipment. In turn, Azure is responsible for the equipment: solid-state drives (SSD), network cables, routers, power supplies, backup generators, cooling systems, etc. This category includes the following Azure services: virtual machines, virtual networks and containers.

    You are responsible for everything else: your application, patches of the operating system (OS), setting up logical networks and even updating antivirus programs on machines. This means that you retain full control over these components. However, it also means that you need to spend a lot of time and effort on supporting services and resources, so you have less time to create business benefits for major software products.

    Platform as a service


    Using the platform as a service (PaaS) model, you are responsible for your application and its configuration, and Azure for your operating system and equipment. As seen in Figure 1-1, PaaS is an abstraction layer located above IaaS. Compared to IaaS, you have far fewer responsibilities, but less direct control over your equipment. PaaS categories include Azure App Service, Azure SQL Database, Redis Cache for Azure and Azure Batch.

    Thanks to PaaS, you can not only place your application, but also use additional built-in features: push notifications for mobile devices (using the Azure mobile application service) and automatic database tuning (using the Azure SQL database).

    You deploy and configure your application, as well as choose a basic server configuration, such as scaling the price level or the number of instances on which the application runs. Your application runs on the server, but you are not responsible for the operation of this server and do not control it. This means that you can devote much more time to creating business benefits for your application and less time to server maintenance.

    Try Create an application based on Node.js from a MongoDB database on the Azure platform using step-by-step instructions on the page .

    Function as a service


    Using the “function as a service” model, you are responsible only for your application and business logic. You don’t have to worry about scaling, operating system and hardware. FaaS is sometimes called serverless computing. Services in the FaaS category include Azure, Azure Logic Apps, and Azure Event Grid.

    In FaaS, you only need to form business logic or create an application and run it. Scaling occurs automatically. One of the significant benefits of FaaS is that you pay for the resources you use, only when the function is executed, and not for the service that is always active and waiting to be used.

    However, FaaS not only allows you to place an application, but also connects your logic with triggers and sources. External sources, such as Azure or WebHooks storage service queues, can initiate Azure or Logic Apps functions and provide them with data for processing. You do not have to create activation logic or set up an infrastructure to connect external data stores or services. This means that you can focus on your logic and the functions used by your customers.

    Software as a service


    Using the software as a service (SaaS) model, you are only setting up the software. SaaS provides the highest level of abstraction among the types of cloud computing. SaaS services include Azure Cognitive Services and Azure oT Suite. Office 365 is another example of a SaaS Azure solution set that contains robust business applications such as Microsoft Word, Excel, PowerPoint, and many others. And they are all available without the need for installation and maintenance.

    In the SaaS model, the software is ready for use immediately after you configure it according to your preferences. You do not have to create software, and also think about deployment, scaling, operating systems and hardware.



    Download the full version of the book for free and study it at the link below.

    Download

    Also popular now: