Azure Application Deployment and Management: Service Fabric Create and Manage a Local and Azure hosted Service Fabric Cluster and Application

Similar documents
Azure Security and Compliance Practical Exercises

Azure for On-Premises Administrators Practice Exercises

Microsoft Cloud Workshops. Microservices and Serverless Architecture - Developer Edition Leader Hackathon guide

Azure 209x Practical Exercises Overview

Microsoft Cloud Workshops. Enterprise-Ready Cloud Hackathon Leader Guide

Hands-On Lab. Windows Azure Virtual Machine Roles. Lab version: Last updated: 12/14/2010. Page 1

Databases in Azure Practical Exercises

Microsoft Azure Fundamentals: Azure identity Practical Exercises

PANZURA FREEDOM ARCHIVE QUICK START GUIDE STEP-BY-STEP INSTRUCTIONS FOR INSTALLING THE FREEDOM ARCHIVE FREE TRIAL PANZURA VM CLOUD CONTROLLER

Querying with Transact-SQL

Microsoft Cloud Workshop

Cisco ACI vcenter Plugin

Developing SQL Databases

LoadMaster for Azure Resource Manager. Feature Description

Remote Support 19.1 Web Rep Console

Community Edition Getting Started Guide. July 25, 2018

Getting Started with the Ed-Fi ODS and Ed-Fi ODS API

Provisioning Databases

Veriato Recon / 360. Version 9.0.3

Remote Support Web Rep Console

Hands-on Lab Manual. Introduction. Dell Storage Hands-on Lab Instructions. Estimated Completion Time: 30 minutes. Audience. What we will be doing

Student Lab Manual MS100.1x: Office 365 Management

Setup Guide for AD FS 3.0 on the Apprenda Platform

Using vrealize Operations Tenant App as a Service Provider

Azure Developer Immersion Getting Started

Azure Developer Immersions Application Insights

Developing Microsoft Azure Solutions

VMware AirWatch Integration with RSA PKI Guide

Azure Virtual Machines Practice Exercises

Table of Contents. Configure and Manage Logging in to the Management Portal Verify and Trust Certificates

AirWatch Mobile Device Management

CloudHealth. AWS and Azure On-Boarding

DEPLOYING A 3SCALE API GATEWAY ON RED HAT OPENSHIFT

Adobe Marketing Cloud Bloodhound for Mac 3.0

Installing and Configuring vcloud Connector

Developing Intelligent Apps

Entrust Connector (econnector) Venafi Trust Protection Platform

VMware AirWatch Integration with SecureAuth PKI Guide

VMware Skyline Collector Installation and Configuration Guide. VMware Skyline Collector 2.0

Communication. Identity

VMware Skyline Collector Installation and Configuration Guide. VMware Skyline 1.4

Configuring ApplicationHA in VMware SRM 5.1 environment

Two factor authentication for Microsoft Remote Desktop Web Access

New World ERP-eSuite

Deploying the Cisco Tetration Analytics Virtual Appliance in Microsoft Azure

VMware AirWatch: Directory and Certificate Authority

Using Blackboard Drive to upload/manage content in Blackboard Learn

Workspace ONE UEM Integration with RSA PKI. VMware Workspace ONE UEM 1810

VMware AirWatch - Workspace ONE, Single Sign-on and VMware Identity Manager

Table of Contents HOL-1757-MBL-6

Azure Developer Immersions API Management

Using Microsoft Azure Active Directory MFA as SAML IdP with Pulse Connect Secure. Deployment Guide

We start by providing you with an overview of the key feature of the IBM BPM Process Portal.

DBXL AZURE INSTALLATION GUIDE

Installing Cisco MSE in a VMware Virtual Machine

Processing Big Data with Hadoop in Azure HDInsight

Processing Big Data with Hadoop in Azure HDInsight

Setting Up the Server

Index. Chaminda Chandrasekara 2017 C. Chandrasekara, Beginning Build and Release Management with TFS 2017 and VSTS, DOI /

DaDaDocs for Microsoft Dynamics 365 Administrator Guide

Ansible Tower Quick Setup Guide

Setup Guide: TeraVM on Microsoft Azure. TeraVM Version 11.4

Check Point vsec for Microsoft Azure

Colligo Console. Administrator Guide

Course CLD221x: Enabling Office 365 Clients

Locate your Advanced Tools and Applications

ncrypted Cloud works on desktops and laptop computers, mobile devices, and the web.

Installation Guide Revision B. McAfee Cloud Workload Security 5.0.0

Create a pfsense router for your private lab network template

271 Waverley Oaks Rd. Telephone: Suite 206 Waltham, MA USA

Amazon AppStream 2.0: SOLIDWORKS Deployment Guide

AutomaTech Application Note July 2015

Mission Guide: Office 365 OneDrive

EASYHA SQL SERVER V1.0

Deliver and manage customer VIP POCs. The lab will be directed and provide you with step-by-step walkthroughs of key features.

IT Access Portal User Guide (Employees)

How-to Guide: Tenable.io for Microsoft Azure. Last Updated: November 16, 2018

Module 3 Remote Desktop Gateway Estimated Time: 90 minutes

Table of Contents. VMware AirWatch: Technology Partner Integration

Introduction & Navigation

BlueMix Hands-On Workshop Lab A - Building and Deploying BlueMix Applications

IBM WebSphere Java Batch Lab

VMware Workspace ONE UEM VMware AirWatch Cloud Connector

Module 1 Web Application Proxy (WAP) Estimated Time: 120 minutes

Developing Microsoft Azure Solutions (70-532) Syllabus

VMware AirWatch Cloud Connector Guide ACC Installation and Integration

How-to Guide: Tenable Nessus for Microsoft Azure. Last Updated: April 03, 2018

Xton Access Manager GETTING STARTED GUIDE

Student Lab Manual MS101.1x: Microsoft 365 Security Management

Load Balancing VMware Workspace Portal/Identity Manager

vrealize Operations Manager Customization and Administration Guide vrealize Operations Manager 6.4

Deploy Oracle Spatial and Graph Map Visualization Component to Oracle Cloud

Introduction to the Azure Portal

This quick reference guide is designed for consumers of the Program Dashboard and provides details on how to: Log in

Chime for Lync High Availability Setup

SUREedge Migrator Installation Guide for Amazon AWS

OAM 2FA Value-Added Module (VAM) Deployment Guide

Silver Peak EC-V and Microsoft Azure Deployment Guide

VPN Solutions for Zerto Virtual Replication to Azure. IPSec Configuration Guide

Docker on Windows Server 2016

Transcription:

Azure Application Deployment and Management: Service Fabric Create and Manage a Local and Azure hosted Service Fabric Cluster and Application Overview This course includes optional practical exercises where you can try out the techniques demonstrated in the course for yourself. This guide lists the steps for the individual practical exercises. See the Practical Exercises > Overview page in your course for information about getting started. You do not need an Azure subscription to complete the first exercise. However, you will need an Azure Subscription to complete the subsequent exercises. If you already have an Azure subscription you can use in a test or practice environment, you can use that, otherwise there are details available on the Practical Exercises > Overview page to help you set up a free trial account. There is also a step by step video available to walk you through this process at the beginning of the course in the Welcome > Start Here section, called "Setting up a Free Microsoft Azure 30-day Trial"

Practical Exercise: Install Service Fabric Explorer In this exercise, you will install the Service Fabric explorer on your local machine. You do not need a Microsoft Azure subscription for the first two practical exercises. 1. Navigate to the relevant page for your operating system Setup your development environment for Windows Setup your development environment for Linux Setup your development environment for Mac Follow the installation steps and notes for here to ensure you have the latest information and bits, as well as comments and Q and A. The steps here will involve getting any pre-requisites and 2. For Mac and Linux scenarios, the steps on the above pages show you how to create the local cluster. For Windows machines to create a local Service Fabric cluster proceed to steps 3 to 6. 3. On your windows box, locate the Service Fabric icon in the system trey, right click it and notice the available options in the context menu. 4. Select Setup Local Cluster > 5 Node 5. You should receive a notification saying that it is being created and it may take a few minutes. Once complete you will receive another message saying it is complete. 6. Once ready, again in the Service Fabric icon context menu, select Manage local Cluster. 7. Note some particular features present b The endpoint address leading with http://localhost:19080... c The refresh rate settings d The Cluster details in the left hand side containing

Applications: This should be empty as no apps have been deployed at this stage Node: There should be 5 nodes System: For a local Service fabric environment there should be ClusterManagerService, FailoverManagerService, FaultAnalysisService and NamingService Note that as you click through these elements the endpoint address changes in the windows display according to the section you click 8. If you click the Cluster at the top of the tree in the left hand pane you will return back to the dashboard view 9. Click the Settings icon in the top right hand side and in the Choose a theme section select the alternative theme and notice the change in the dashboard view, from black to white themed dashboard. Choose your preferred theme. 10. If you click Microsoft Azure in the top left hand side of the explorer window, a new window will launch attempting to launch into your Azure subscription to allow you directly access your Azure Service Cluster. Notice and click on the other options for Privacy and Cookies and Suggest an improvement. Scroll through existing suggestions and feel free to submit any new ideas for improving Service Fabric. 11. Spend some time to click around the remainder of the dashboard and the various elements available within it.

Practical Exercise: Deploy an Application to a local Service Fabric Cluster In this exercise you will deploy a sample application to the local Service Fabric cluster and view the deployment in Service Fabric Explorer. Prerequisites Before working on this lab, you must have: Visual Studio 2015 with Update 3 (14.0.25420.1) and Service Fabric SDK v2.3.301.9590. If you are using a different version of Visual Studio or the Service Fabric SDK there may be differences between what is documented in this lab and what you are presented with. See Prepare you development environment for information on how to install a development environment on your machine. 1. Open Visual Studio with elevated privileges by pressing the Start ( ) button on the keyboard and typing Visual Studio, then run Visual Studio by right clicking and choosing Run as Administrator. Visual Studio must be run using elevated privileges because it must interact with the Service Fabric runtime. 2. Select File New Project 3. Go to Cloud and choose Service Fabric Application

4. Enter Voting for the Name and Solution name fields and then click OK 5. In Service Templates choose Stateless Web API and enter VotingService for the service name. Click OK.

6. Visual Studio will create a solution containing two projects, Voting and VotingService. The Voting project is the Service Fabric project containing: a. A reference to the VotingService project b. ApplicationPackageRoot folder containing the ApplicationManifest.xml file describing your Service Fabric application c. ApplicationParameters folder containing deployment parameters for local (Local.1Node.xm and Local.5Node.xmll) and cloud (Cloud.xml) deployments. In this lab we ll only use the Local.5Node.xml parameters d. PublishProfiles containing deployment profiles for local (Local.1Node.xml and Local.5Node.xml) and cloud (Cloud.xml) deployments. The Cloud profile is used to publish to Azure e. Scripts containing the scripts used for deploying the application to the cluster f. Packages.config used to indicate the packages associated with this application The VotingService project contains the stateless service implementation and contains: a. Controllers folder containing the controllers for this project. An initial controller named ValuesController.cs has been generated b. PackageRoot folder containing the service configuration and ServiceManifest.xml

c. OwinCommunicationsListener.cs contains the ICommunicationListener implementation based on the Owin HTTP hosting framework d. Program.cs which is the host executable of the stateless service e. ServiceEventSource.cs contains the class used for diagnostic events f. Startup.cs containing the application server startup configuration g. VotingService.cs contains the classed implementing the stateless voting service 1. At this point, you have a functioning service that can be hosted within Service Fabric. 2. In Visual Studio in the Solution Explorer pane on the right hand side, right click the solution Voting and in the context menu select Publish 3. In the Publish Service Fabric Application dialogue box, for the Target profile: drop down box select PublishProfiles\Local.5Node.xml Note that the Application Parameters File: changes to match the Target profile selection you made. 4. Set the Connection Endpoint: Local Cluster and click Publish 5. Notice the output as the package is created in the Output window, then published to the local cluster. 6. Switch to the Servicer Fabric Explorer 7. Notice the VotingType application being deployed under the Applications node. 8. As you click through the sun nodes under applications notice the change in available tabs in the main dashboard central page including ESSENTIALS, DETAILS, DEPLOYMENTS, CLUSTER MAP, METRICS and MANIFEST 9. On the Cluster node, click the METRICS tab and select the Show system metrics box. Click and view each item that is now available. 10. Under Nodes, hover the mouse along the edge so the left pane view and notice the appearance of ellipsis, three dots, for each node as you do so. Click the _Node_0 ellipsis and notice the available options 11. Do the same for the Cluster node and notice which options have ellipsis available for additional possible actions. 12. Return to the Cluster node and notice the options and details available on this page, most notable being the dashboard view of number of Applications, number of Nodes and Upgrades in Progress.

Practical Exercise: Create an Azure hosted Service Fabric Cluster In this exercise, you will sign in to the new Azure Portal and create an Azure hosted Service Fabric Cluster. You will need an Azure subscription to complete this exercise. You will also need to obtain some security information that is required as part of the Service Fabric Cluster, namely Azure Key Vault details, a Certificate URL and the certificate Thumbprint. The first sections of this exercise will be covering those prerequisite items so we have them ready when we go to create out cluster. Create Key Vault There are several way sot do this but we will do via the Azure Portal to show you some of its components and allow you to visualize it within Azure. 1. Go to the azure Portal http://portal.azure.com and sign in using your subscription credentials 2. Click the + sign in the left had pane to create a new item and type Key Vault 3. Select Key Vault from the resultant options and read the explanations about Key Vault and click Create 4. On Create Key Vault blade us the below values. You can use your own if you wish, just ensure you document them for later use and connection

b Name: asfckv c Subscription: < Your own subscription> d Resource Group: Create new and using name keyvault_rg e Location: < Your nearest datacenter location> 5. Take the remaining default values and click Create 6. Open up your newly created Key Vault asfckv 7. Go to Key Vault Settings > Properties and copy the Resource ID value to a.txt file or somewhere easily accessible, the resource ID should look something like the below /subscriptions/6e9a285a-37ea-40e6-b2fc- 28539051852e/resourceGroups/keyvault_rg/providers/Microsoft.KeyVault/vaults/asfckv 8. Enable for Deployment and use with Service Fabric Cluster by going to Advanced access policies and enabling the checkbox Enable Access to Azure Virtual Machines for deployment. Create Self Signed Certificate to place in Key Vault for use in Service Fabric Cluster We now need a certificate available in the Key Vault foe use in our Service Fabric Cluster, and we need to obtain its ID value as well as its Thumbprint. You could obtain a signed certificate by a trusted entity, or we will just create a self-signed certificate. There are several ways to generate a certificate and we will do so using PowerShell, and there are steps available on the Create a Service Fabric cluster by using Azure Resource Manager page, which the below steps are based around, that you can reference and may be useful if you run into any errors. 1. There are scripts available on GitHub to specifically help with uploading a certificate to Key vault and getting the information we need. There is a PowerShell module and also a script to use on Linux. We will use PowerShell in this scenario, but use the Linux scripts if they are relevant to your environment.

2. Go to GitHub https://github.com/chackdan/service-fabric and click Clone or download to download the Service fabric repository of files to a local folder call C:\ServiceFabricFiles (You can use an alternative location if you wish) 3. Extract the files and place the ServiceFabricRPHelpers.psm1 inside the System.Fabric.CSMTemplate folder 4. Open the PowerShell ISE with administrative privileges 5. At the PowerShell command prompt go to the System.Fabric.CSMTemplate folder location cd 'C:\Service Fabric\Service-Fabric-master\Service-Fabricmaster\Scripts\ServiceFabricRPHelpers\System.Fabric.CSMTemplate' 6. Import the PowerShell module by running the command and ensure the module imports correctly. You can check the module by ensuring no errors appeared and by running the command get-module and viewing the listed modules, making sure ServiceFabricRPHelpers module is listed Import-module.\ServiceFabricRPHelpers.psm1 7. Run the command Login-AzureRMAccount and enter your credentials when prompted to connect to your azure subscription account details 8. Run the below in the PowerShell ISE i.e. highlight the variables first and hit F8 to load the variables, then highlight the command and hit F8 to run the command. You will be prompted for a password, type the value password and hit enter $ResouceGroup = "keyvault_rg" #the resource created when create your key vault earlier $VaultName = "asfckv" #the Key Vault you created earlier $SubID = "<your subscription ID" # your Azure subscription guid $locationregion = "<your closest datacenter" # i.e. west Europe, east US etc $newcertname = "asfckv_cert" #any name you want to call the new certificate $dnsname = "www.mycluster.westeurope.mydomain.com" #The certificate's subject name must match the domain used to access the Service Fabric cluster. $localcertpath = "C:\MyCertificates" # location where you want the.pfx to be stored Invoke-AddCertToKeyVault -SubscriptionId $SubID -ResourceGroupName $ResouceGroup - Location $locationregion -VaultName $VaultName -CertificateName $newcertname - CreateSelfSignedCertificate -DnsName $dnsname -OutputPath $localcertpath 9. The command will return three values for CertificateThumbprint, SourceVault, and CertificateURL. Copy these values for use later. The following is just to show you where the certificate was placed in Azure and where you can get the Certificate URL details from Key Vault. 10. Return to Azure Key Vault

11. Go to Settings > Secrets and verify the certificate you just created, i.e. asfckv_cert or whatever name you called it, is present. Double click it and double click again on it in the next blade 12. Notice the Secret Identifier; this should be the same value as the CertificateURL that the PowerShell command returned. 13. The thumbprint value would need to be pulled directly from the generated pfx file, which was place in a local store. If you wish to view that look at the.pfx file properties. Create an Azure hosted Service Fabric Cluster 1. Go to the azure Portal http://portal.azure.com and sign in using your subscription credentials if you have not already done so. 2. Open Service Fabric Cluster 3. Read the general description of the service, and click the Documentation, Service Overview and Pricing details and browse through them later when you have time. The latest details about the service will be available via these sources. Also, as you create the Azure Service Fabric and move through the blades read the explanations for the various fields when they are available, to help you gain a clearer understanding on the various fields as you go. Click Create. 4. In the Basics blade enter the following information, use your own values if you wish or if you receive an errors whilst entering the below, and click OK b Cluster name: asfc c Operating System: Windows d Username: asfcadmin

e Password: Pa$$w0rd01 f Subscription: <Your own subscription> g Resource group: Create new h New resource group name: asfc_rg i Location: < your nearest datacenter location> 5. On the Cluster Configuration blade enter the values b Node type count: 1 c Node type 1 (Primary) iv > Node type configuration blade: 1 Node type name: nodetype1 2 Durability Tier: Bronze 3 Virtual machine size: D1_V2 Standard 4 Reliability Tier: Silver 5 Initial VM Scale set capacity: 5 d Check the Configure advanced settings checkbox and view the explanations and available options. Do not enter any values and click OK e Note also the Fabric version settings, leave the default values 6. Take the remaining default values in the Cluster configuration blade and click OK 7. On the Security mode ensure Secure is selected and enter the values Source key vault: <your value noted from earlier i.e. like /subscriptions/6e9a285a-37ea-40e6-b2fc- 28539051852e/resourceGroups/keyvault_rg/providers/Microsoft.KeyVault/vaul ts/asfckv> Certificate URL: < your value noted from earlier i.e. like https://asfckv.vault.azure.net:443/secrets/githubcert/c0bb3bad12fa4719bd7f61 b29f3610cc> Certificate thumbprint: <your value noted from earlier i.e. like D5329CBC3803AFBD1D73CF02261F2F0A953B6947> 8. Check the Configure Advanced settings checkbox and note the additional options available including secondary certs, admin client, read-only client, and Azure AD. Leave the default values and click OK.

9. Verify the Validation passed message appears 10. Click the link to Download template and in the template window note the script being available in different flavours such as ARM template, Azure CLI, PowerShell,.NET and Ruby 11. Download and save locally for future use. 12. Return to the Summary blade and click Create 13. It should take between 10 to 20 minutes to deploy 14. Once deployed look through the asfc settings that are available, going through each one noting the available options, such as Activity log, Access Control (Identity and Access Management (IAM)), and the various RBAC roles that are available Diagnose and Solve problems > listing solutions to common problems, as well as support links Node types and node > listing endpoint details as well as Upgrade and Fault domain info Fabric Upgrades > settings to manage upgrades Properties > client connection endpoint details, cluster ID, etc Note your endpoint Etc Return to the overview section and copy the Service Fabric Explorer link listed i.e. it should look something like the below https://asfc.westeurope.cloudapp.azure.com:19080/explorer 15. Click on the Service Fabric Explorer URL that you copied from Azure Service Fabric 16. View the certificate when prompted to do so and verify it is the certificate you generated and uploaded earlier. 17. Install the Certificate the Trusted Root Certificate Authorities cert repository 18. When prompted to verify yourself, choose the certificate you generated earlier and uploaded to Key Vault and Click OK 19. Depending on your browser type the steps may be slightly different but you should point to the certificate you generated earlier for your verification.

20. If you are prompted, click to Allow the application access your private key 21. The browser should then continue to the Azure Service Fabric cluster. 22. You should be able to browse through the dashboard, view the Applications, Nodes, and System values 23. Notice you have two additional System items now that weren t present on the local cluster which are available on the hosted cluster, i.e. ImageStoreService and UpgradeService 24. Spend some time to browse around the explorer, if you have time open a local explorer and compare local explorer view to that connecting to the Azure endpoint. There is very little difference. 25. Also, take some time to compare the Azure Portal view and the Explorer view. Which one best suits your needs? Practical Exercise: Deploy Application to an Azure hosted Service Fabric Cluster In this exercise, you will deploy an application to an Azure hosted Service Fabric Cluster 1. Return to Visual Studio and the Voting project you created earlier 2. In Solution Explorer right click the Voting application and select Publish 3. In the Publish Service Fabric Application enter the following settings Target profile: PublishProfiles\Cloud.xml Sign In: Provide your Azure Subscription sign in details, you may be prompted for two factor authentication as well.

Connection Endpoint: the Azure Service Fabric Cluster connection Endpoint should be available i.e. depending on the values you used it should be something like asfc.westeurope.cloudapp.azure.com:19000 Application Parameters File: ApplicationParameters\Cloud.xml Accept the default values for the remainder of the settings. 4. Click Publish 5. Follow the values in the output windows at the bottom and verify the package is create and published successfully. 6. Return to the Azure Portal and the Service Fabric Cluster 7. Go to the Overview section and note the application goes from 0 to 1 8. Click on the Application and see values for it related to health state, status, version etc 9. Open the Service Fabric Explorer again and connect to the Azure Service fabric Instance. It should involve changing the address in the browser From http://localhost:19080/explorer/index.html#/ To something like https://asfc.westeurope.cloudapp.azure.com:19080/explorer/index.html#/appty pe/votingtype/app/voting 10. Note the presence of 5 nodes and 1 application 11. Click through the various settings. It is possible to view the application via the portal or the Service Fabric Explorer 12. Note that there is really no difference in publishing application to the local cluster to the Azure Service Fabric cluster. It primarily involves having the subscription details, and the endpoint being available

Practical Exercise: Upgrade a Deployed Azure Service Fabric Application In this exercise, you will upgrade a deployed azure Service Fabric Application. 1. Return to Visual Studio 2. In Solution Explorer Right click on the Voting application you deployed earlier and select Publish 3. Ensure the Publish Service Fabric Application settings are as Target profile: PublishProfiles\Cloud.xml Sign In: Provide your Azure Subscription sign in details, you may be prompted for two factor authentication as well. Connection Endpoint: the Azure Service Fabric Cluster connection Endpoint should be available i.e. depending on the values you used it should be something like asfc.westeurope.cloudapp.azure.com:19000 Application Parameters File: ApplicationParameters\Cloud.xml Accept the default values for the remainder of the settings 4. Check the Upgrade the Application checkbox 5. Click the Manifest Versions button 6. Expand VotingServicePkg, there should be 4 values available now for both Current Version and New Version 7. Change all New Version values to 2.0.1 and click Save 8. Click Publish 9. Follow the output and verify the package is generated and published successfully 10. Go to the Service Fabric Explorer that is connected to your Azure Service fabric App and then Cluster\Applications\VotingType\fabric:/Voting 11. In the Upgrade in Progress, notice the graphical display, which tells you, which gives you individual node upgrade progress as they change from black, to blue to green.

12. Go to the Azure Portal, notice the status says Upgrading, and the version still remains at 1.0.0 13. When complete both the Azure portal and the Service Fabric Explorer should display 1 Application, at version 2.0.1, 5 Nodes and all should be healthy. 14. Follow the instructions to move your mouse over the blank area under the progress bar.