Getting started with Azure

Microsoft Azure (formerly called Windows Azure) is the cloud service created by Microsoft for building, testing, deploying, and managing web applications and services through a global network of Microsoft-managed data centers. It provides SaaS, PaaS, and IaaS, and supports many different programming languages, tools, and frameworks, including both Microsoft-specific and third-party software and systems. All the examples in this book are developed in a virtual machine (VM) hosted in Azure. Since we also needed a Linux VM to demonstrate ASP.NET Core 2.0 cross-platform support, the Linux VM is also created and hosted in Azure. This is the best example to demonstrate how flexible and easy it is for developers to embrace and use Azure.

An obvious question that may come to your mind is: why use Azure and not Amazon's AWS or Google Cloud? Fair enough, I am completely biased on this one and I strongly believe Microsoft Azure is way ahead of its competitors in numerous parameters. Some them are highlighted in the following list:

  • Security compliance and trust: Azure has more comprehensive compliance coverage with more than 70 compliance offerings and is the first major cloud provider to contractually commit to the requirements of the General Data Protection Regulation (GDPR). To protect your organization, Azure embeds security, privacy, and compliance into its development methodology and has been recognized as the most trusted cloud for US government institutions.
  • Global presence with most regions: Azure has the largest number of regions in the world covered, with 42 announced Azure regions—more than any other cloud provider. You can choose the data center and region which is right for you and your customers, with the performance and support you need, where you need it.
  • Support for multiple development tools and language: When Satya Nadella said "Microsoft ♥ Linux", it gave a strong message to the world that Microsoft is actively listening to its customers and embracing open source at its core. The same strategy shows in the Microsoft cloud as well, which supports numerous tools, frameworks, and languages. Microsoft is the leading open source contributor on GitHub and actively supports multiple open source community projects.
  • Real hybrid cloud approach: Azure offers hybrid consistency everywhere from application development, security, identity management, and data platforms. This helps reduce the risk and cost of the hybrid cloud environment.
  • Unmatched artificial intelligence: It's never been easier to develop intelligent solutions that scale using Microsoft Cognitive services, bots, machine learning, and Blockchain as a Service (BaaS) capabilities that can be found only with Azure. 
  • Big data with advanced analytics: Azure Cosmos DB enables you to scale your application limitlessly with big data support. Then the advanced business analytic services provided by Azure make you go way higher than your competitors.
  • Manage and optimize cloud cost: With free Azure cost management, it is easy to optimize cloud resources and budget them within your allocated funds. 
  • IoT ready: You can quickly develop the most common IoT scenarios, such as remote monitoring, using the pre-configured solutions in the Azure IoT suite.
  • Unmatched developer productivity: Azure is developer-friendly, and as we will see in a short while, we can develop, deploy, and test our app in Azure from within Visual Studio or PowerShell.
A data center is a facility composed of networked computers and storage that businesses or other organizations use to organize, process, store, and disseminate large amounts of data. A business typically relies heavily upon the applications, services, and data contained within a data center, making it a focal point and critical asset for everyday operations.

Azure is an expanding network of data centers around the world. These data centers form regions. This provides us with the flexibility to use the region of our choice to deploy the resources/applications for the best performance. The following screenshot showing the Microsoft Azure website (https://azure.microsoft.com/en-us/) illustrates these different regions on the world map. We can see multiple regions in the United States, UK, Europe, India, and Japan. When we deploy an application, we need to select a region for the deployment. I might select a specific region to keep the application geographically close to me or my customers. I live in India, so I might use the West or Central or South India region for my development purposes. I can also deploy to multiple regions if I wanted some redundancy. The takeaway from this diagram is that Microsoft Azure is running millions of computer servers, physical machines that are spread around these regions around the world, and Microsoft ensures that these machines are up and running, healthy, and physically secure. We just need to leverage a portion of this enormous computing power to do our work:

Now that we have the fundamental concepts of the cloud (and Microsoft Azure) in place, let's get started using the Azure platform.

First of all, you will need to register your account with Azure. To do so, go to https://portal.azure.com/ and register with any of your Microsoft accounts, such as Hotmail, MSN, Outlook, or Live. At the time of writing this chapter, Azure offered the following great and free benefits when creating an account. These may vary by the time you read the book:

  • 12 months' free access to popular products. You also get 25 always free products.
  • A $200 credit to use on any Azure products for 30 days.
  • Azure uses credit card information only for identity verification and you are not charged until you change your subscription to a pay as you go subscription. If you work in a large enterprise or a Microsoft partner, or a BizSpark program or MSDN subscriber, you already get a subscription to Azure cloud resources.

Once you are registered, you will see a nice dashboard. This is the Azure management portal. The dashboard user interface keeps getting better and is updated from time to time, so by the time you read this chapter, the user interface may be different from what it is right now. The important thing to notice is that there is a left panel which lists all of the Azure services that you can use. First-time users should take the guided tour of Azure to get themselves familiar with the user interface as it is very rich in features. Let's have a quick look at the user interface. The following screenshot illustrates the Azure dashboard after you log in. We have marked the user interface with numbers so that we can see each of these items in reasonable depth:

Let's have a look at the different components:

  1. Hamburger button: Shows the hamburger menu on the left panel. This has the standard hamburger button behavior. When expanded, it shows the icon as well as a description of the various services that Azure provides. On collapse, it increases the real estate for the right column (where the Dashboard is showing up) as only icons are displayed in the collapsed left panel.
  2. New: Creates a new resource. On clicking, displays the resource that needs to be created from the Marketplace. You can also use this to view the wide variety of services in Azure Marketplace.
  1. Left panel hub displaying favorite Azure services: All your favorite or commonly used services/resources that Azure offers are displayed in this area that we call a hub. This is the place to go when you want to create or manage the resources that you own in Azure. Don't get confused with the word resource; just like a software developer is referred to as a resource when managers talk, everything that we can create from virtual machines to web apps, Redis Cache, and so on, are generally called resource. Well, there are so many Azure resources that not all of them can fit in the hub, so what can be shown are shown and the rest are shown under the item More Services.
  2. Dashboard on right panel: In the screenshot, this is displaying the Azure Dashboard from all the subscriptions. We can have two types of dashboard: private and shared. Shared dashboards can be shared with other users, while private is as the name suggests. The intent of the dashboard is to have quick access to the resources you use, so that you can view and manage them quickly.
  3. New dashboard: This presents an option to create a new dashboard where you can customize the tiles for resources to be shown in the way you want them to show up. You can pin, move, or resize the resource tiles the way you want.
  4. Edit dashboard: Enables you to edit the dashboard. You can remove a tile from the dashboard, or add a new one, or maybe just drag and change its position. You can make a tile smaller or larger as per your preference. 
  5. Share: Enables you to share the dashboard with other users. You can share the dashboard by publishing it as an Azure resource. Azure Role-Based Access Control (RBAC) will determine who has access to the dashboard. Access to individual tiles can differ from access to the dashboard itself.
  1. Fullscreen: Displays the portal full-screen.
  2. Clone: Clones the dashboard.
  3. Delete: Deletes the dashboard.
  4. Search: To search the resource/services you are looking for.
  5. Notifications: Clicking on this bell-like icon displays notifications and status updates, such as billing updates, resource start/stop/error notifications, and other information.
  6. Cloud Shell: Using this command prompt-like icon, you can select bash or PowerShell. You can change shells any time through the environment selector in the Cloud Shell toolbar. The most recently used environment will be the default for your next session.
  7. Settings: The gear icon represent settings in the current portal. It allows you to customize the portal settings, themes, language, and so on.
  8. Feedback: To share the feedback from the Azure portal with the Microsoft Azure product team.
  9. Help: To get help and support. You can create or track a support ticket and monitor the health of your Azure services and resources. You can also check the keyboard shortcuts, with a guided tour here.
  10. Account information: Switch directories, change your password, view permissions, submit an idea, or view your bill. 
  11. Service HealthPersonalized guidance and support when issues in Azure services affect you.
  12. MarketplaceDiscover, purchase, and manage add-ons and services from Microsoft partners.
  13. What's new: Keeps you updated with the latest and greatest information on Azure.
  14. Feedback: Same as Step 15.
  15. Azure classic portal: To view the old classic Azure portal, for old users of Azure who are comfortable with the old portal.
  16. Help + support: Same as Step 16.
  17. All resources: Displays all resources and services from the subscription that you are using. 

Though we have discussed and defined tiles here, please note that since the dashboard is customizable, you can choose to have a tile or remove it altogether. So, a few of the tiles may show / not show in your dashboard. The intent here is to make you aware of the portal. Also there are tiles numbered 25, 26, and 27 in the screenshot, which I have pinned after creating these resources (actually, Azure pins resource to the Dashboard as soon as you create it based on a setting). These tiles display the resources/services that I am using and their status. In the screenshot, 25 is a tile named DotNetCore2. It is a virtual machine and it has stopped. 26 shows a web app named testdecompression which is stopped as well. 27 is a web app named packtletschat, which is up and running. Hopefully, this discussion has got you started with the Azure management portal. Next we will create a virtual machine and web app in Azure and then see how we can deploy our ASP.NET Core 2.0 apps published in Azure. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset