Book Image

Building Hybrid Clouds with Azure Stack

Book Image

Building Hybrid Clouds with Azure Stack

Overview of this book

Azure Stack is all about creating fewer gaps between on-premise and public cloud application deployment. Azure Stack is the logical progression of Microsoft Cloud Services to create a true hybrid cloud-ready application. This book provides an introduction to Azure Stack and the cloud-first approach. Starting with an introduction to the architecture of Azure Stack, the book will help you plan and deploy your Azure Stack. Next, you will learn about the network and storage options in Azure Stack and you'll create your own private cloud solution. Finally, you will understand how to integrate public cloud using the third-party resource provider. After reading the book, you will have a good understanding of the end-to-end process of designing, offering, and supporting cloud solutions for enterprises or service providers.
Table of Contents (19 chapters)
Title Page
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Using Azure Stack


Azure Stack provides the same features for connectivity as Azure itself, so we have the following:

  • Azure Stack Portal
  • PowerShell commandlets
  • Azure CLI
  • API

Depending on what you need, you should use one or more of them to work with Azure Stack.

Azure Stack Portal

The most general way to use Azure Stack is the Portal. This is the UI and it provides more than 95 percent of all features, including RBAC. Depending on whether you are an administrator or a generic user, you will have different features available in the portal, but you always use the same portal.

The portal looks like this after a new installation:

As you can see, the portal looks almost exactly like Azure's and provides the same usability. It's quite easy and intuitive to use from the end user's perspective. You don't need to train your users in general, they could just start with the same experience they hopefully already have from Azure.

PowerShell commandlets

The second way to communicate with Azure Stack is PowerShell. With the wide range of PowerShell commandlets (cmdlets), everything is possible. From the administration point of view, it is always the better choice to use PowerShell, because it is reusable and redoable, and each script is a documentation itself.

The steps to enable PowerShell are as follows:

  1. Enter the following command to check for installed PowerShell modules:
Get-PSRepository
  1. Install the AzureRM module:
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201
      -Force
  1. Verify the installation status:
Get-Command -Module AzureRM.AzureStackAdmin
  1. Now you can start over with AzureRM PowerShell commands. Connecting to Azure Stack using PowerShell should look like this:
$AADUserName='YourAADAccount@Yourdomain'$AADPassword='YourAADPassword'|ConvertTo-SecureString -Force
      -AsPlainText$AADCredential=New-Object PSCredential($AADUserName,$AADPassword)$AADTenantID = "YourAADDomain"Add-AzureRmEnvironment -Name "Azure Stack" `-ActiveDirectoryEndpoint 
      ("https://login.windows.net/$AADTenantID/") `-ActiveDirectoryServiceEndpointResourceId
      "https://azurestack.local-api/" `-ResourceManagerEndpoint ("https://api.azurestack.local/") `-GalleryEndpoint ("https://gallery.azurestack.local:30016/") `-GraphEndpoint "https://graph.windows.net/"$env = Get-AzureRmEnvironment 'Azure Stack'Add-AzureRmAccount -Environment $env -Credential $AADCredential
      - VerboseGet-AzureRmSubscription -SubscriptionName "youroffer" |
      Select-AzureRmSubscriptionGet-AzureRmResource

Simple, isn't it?

Application programming interface

The third option to connect to and work with Azure Stack is the API, which is again the same with Azure Stack as with Azure.

Instructions to install the Azure Software Development Kit (SDK) can be found at https://azure.microsoft.com/en-us/downloads/.

The next step is the big choice: which SDK platform should be used. The following ones are available:

From development perspective, nearly everything is possible. In general, the most popular tool is Microsoft Visual Studio, and the developing language, .NET.

Coding for Azure Stack is always a development project. In general, you do not use it for daily tasks. You should use it for integrating Azure Stack into existing web shops or other solutions. In general, it's always a make or buy decision.

Custom portal for Azure Stack

Creating your own custom portal always means a huge investment and an ongoing process of supporting each update being installed on Azure Stack itself. Each service you would like to offer to your customers with the custom solution needs to be developed. This means that the developers need to understand the API, the way Azure Stack works, and how to code against this solution. From real-world project experiences, I know a custom portal is possible using the APIs, but the question should be more like, whether it is worth it, taking into account the amount of money that needs to be spent in the form of development hours and manpower.

Azure Stack CLI

Finally, the Azure Stack command-line interface is a toolset that can be installed on Azure Stack. It is available for Windows, Mac, and Linux.

Note

The download locations are as follows: Windows: http://aka.ms/azstack-windows-cliMac: http://aka.ms/azstack-mac-cliLinux: http://aka.ms/azstack-linux-cli

Tools for Azure Stack

As Azure Stack is a solution in a box, the first question when talking about tools for Azure Stack is "where do I have to install them to be supported?". The answer, MAS-CON01, because it is the management VM. A wide variety of tools are provided that help with the administration of Azure Stack.

  • Visual Studio: Visual Studio, including the Azure SDK, is a must have for creating and modifying ARM templates. You can download it from https://www.visualstudio.com.
  • AzCopy: AzCopy is a command-line utility for copying data to and from Azure BLOB, file, and table storage with optimal performance. You can copy data from one object to another within or between storage accounts. As Azure Stack behaves in the same way, you can just use the same EXE for running it against itself.
  • Azure storage emulator: The Microsoft Azure storage emulator provides a local environment that emulates the Azure storage services for development purposes. This tool is suitable for testing an application against storage services locally without connecting to Azure or Azure Stack.
  • Azure storage explorer: If you need a solution to connect to and browse for Azure storage, it is available for various OSes: