Pre-Requisite: Once you receive the Lab Environment details after clicking on Launch Lab, perform the following task given below before starting with the main lab guide
Synopsis: In this exercise, you will set up your environment for use in the rest of the hands-on lab. You should follow all the steps provided in the Before the hands-on lab section to prepare your environment before attending the hands-on lab.
IMPORTANT: Most Azure resources require unique names. Throughout these steps, you will see the word "SUFFIX" as part of resource names. You should replace this with your Microsoft alias, initials, or other value to ensure the resource is uniquely named.
In this task, you will provision the Service Fabric Cluster in Azure.
-
In the Azure portal, select +Create a Resource, then type "Service Fabric" into the Search the Marketplace box. Select Service Fabric Cluster from the results.
-
On the Service Fabric Cluster blade, select Create.
-
On the Basics blade of the Create Service Fabric cluster screen, enter the following:
-
Cluster name: Enter contosoeventssf-SUFFIX, replacing SUFFIX with your alias, initials, or another value to make the name unique (indicated by a green check in the text box).
-
Operating system: Set to UbuntuServer 16.04 LTS
-
Username: Enter holuser.
-
Password: Enter Password.1!!
-
Subscription: Select the subscription you are using for this lab.
-
Resource Group: Select Create new, and enter hands-on-lab for the resource group name. You can add -SUFFIX, if needed to make resource group name unique. This is the resource group you will use for all resources you create for this hands-on lab.
-
Location: Select the region to use. Select the closest region to your current location.
-
Select OK.
- On the Cluster configuration blade, set the following:
-
Node type count: Select 1.
-
Node type 1 (Primary): Select to configure required settings. On the Node type configuration blade enter:
-
Node type name: Enter Web.
-
Durability tier: Leave Bronze selected.
-
Virtual machine size: Select a VM size of D1_V2 Standard and select Select on the Choose a size blade.
-
Single node cluster: Leave unchecked.
-
Initial VM scale set capacity: Leave set to 5.
-
Custom endpoints: Enter 8082, 8083. This will allow the microservices to be accessible through the cluster.
-
Configure advanced settings: Leave unchecked.
-
Select OK on the Node type configuration blade.
-
Select OK on the Cluster configuration blade.
-
- On the Security blade, you can provide security settings for your cluster. This configuration is completed up front, cannot be changed later. Set the following:
-
Configuration Type: Leave "Basic" selected.
-
Key vault: Select to configure required settings. On the Key vault configuration blade select "Create a new vault".
-
On the "Create key vault" configuration blade enter:
-
Select "Create" on the Create key vault configuration blade. Wait for the key vault deployment to complete.
-
When the key vault deployment completes you will return to the Security configuration blade. You will see a warning that the key vault is not enabled for deployment. Follow these steps to resolve the warning:
-
Choose "Edit access policies for hands-on-lab-SUFFIX".
-
In the Access policies configuration blade, choose the link "Click to show advanced access policies".
-
Check the "Enable access to Azure Virtual Machines for deployment" checkbox.
-
Choose "Save". When the key vault update completes, close the Access policies blade.
-
Enter hands-on-lab-SUFFIX as the certificate name. Then choose OK on the Security configuration blade.
-
-
On the Summary blade, review the summary, and select Create to begin provisioning the new cluster.
-
It can take up to 30 minutes or more to provision your Service Fabric Cluster. You can move on to the next task while you wait.
Note: If you experience errors related to lack of available cores, you may have to delete some other compute resources, or request additional cores to be added to your subscription, and then try this again.
In this task, you will install Docker for Windows on your Lab VM.
-
On your Lab VM, open a browser and navigate to: https://download.docker.com/win/stable/Docker%20for%20Windows%20Installer.exe.
-
If prompted, select Save File to download the installer on the Lab VM.
-
When finished, open the folder where the file was downloaded.
-
Double-click the Docker for Windows Installer.exe file in order to run the installer.
-
Follow the instructions to install the application.
-
Once the Docker for Windows installation completes, select the Close and log out button. This action will log out the current session.
-
Reconnect to the LabVM virtual machine by repeating the step 5 in Task 3.
-
When prompted, select Ok on the Docker Desktop dialog box that asks you if you want to enable Hyper-V and Containers features. This action will restart the virtual machine.
-
Reconnect to the LabVM virtual machine by repeating the step 5 in Task 3.
-
Wait for Docker for Windows to start. You can see its status on the icon in the tray bar. When Docker starts successfully, it will display the Welcome window.
In this task, you will install the latest Service Fabric SDK for Visual Studio on your Lab VM.
-
On your Lab VM, open a browser, and navigate to: https://docs.microsoft.com/azure/service-fabric/service-fabric-get-started.
-
Scroll down on the page to the Install the SDK and tools section and select Install the Microsoft Azure Service Fabric SDK under the To use Visual Studio 2017 heading. Regardless of the heading, it can be installed on Visual Studio 2019.
-
Run the downloaded executable and select Install in the Web Platform Installer screen.
-
On the Prerequisites screen, select I Accept.
-
Select Finish when the install completes.
-
Select Exit on the Web Platform installer to close it.
-
Restart the VM to complete the installation and start the local Service Fabric cluster service.
When you create a new Service Fabric Cluster using the portal, a secure cluster is deployed. In order to later on be able to make use of it, a certificate setup is required.
In this task, you will download the required certificate and install it on your Lab VM.
-
In the Azure portal, navigate to the Resource Group you created previously and where you created the Key vault that supports the cluster.
-
Select the key vault from the list of resources in the resource group.
-
Under the Settings category in the menu, select Certificates and then select the existing certificate.
-
Select the Current Version of the existing certificate.
-
In the certificate information blade, select Download in PFX/PEM format and save the certificate.
-
Copy the downloaded certificate into the Lab VM.
-
On the Lab VM, double-click the copied certificate to initiate its installation. Select Local Machine as the Store Location and select Next.
-
Select Next.
-
Select Next.
-
Select Next.
-
Select Finish.
-
When the import finishes successfully, select OK.
-
On the Lab VM, double-click the copied certificate once again to initiate its installation. Select Current User as the Store Location and select Next.
-
Select Next.
-
Select Next.
-
Select Next.
-
Select Finish.
-
When the import finishes successfully, select OK.
You should follow all steps provided before performing the Hands-on lab.