Вы находитесь на странице: 1из 23

Microservices and Serverless

Day One: Lab

Copyright @2012-19, CloudThat Technologies Private Limited, All Rights Reserved. Do not copy or distribute
Copyright @2012-19, CloudThat Technologies Private Limited, All Rights Reserved. Do not copy or distribute
About the Author
Shivam Sharma
Subject Matter Expert: Cloud, CloudThat Technologies

Shivam has been involved in various large and complex projects with global clients. He has
experience in Blockchain, Machine learning and Microsoft Infrastructure technology stack
including Azure Stack, Widows Azure Pack, Office 365, EMS, Lync, Exchange, System Center,
Windows servers, designing Active Directory and managing various domain services, including
Hyper-V virtualization. He also holds working experience in AWS and Big data platforms. Having
core training and consulting experience, and is involved in delivering training to corporate and
individuals on cutting edge technologies.

He is a Microsoft Certified Trainer, Microsoft certified solution expert for cloud platform and
infrastructure, Microsoft certified solution developer for azure platform.

Copyright @2012-19, CloudThat Technologies Private Limited, All Rights Reserved. Do not copy or distribute
Copyright @2012-19, CloudThat Technologies Pvt. Ltd. All Rights Reserved.

The contents of this course, its modules, and its related materials, including handouts to
participants, are Copyright @2012-19, CloudThat Technologies, Pvt. Ltd.

1. If you are using this curriculum, you are agreeing to comply with and be bound by the
following terms and conditions of use, which together with our privacy policy govern
‘CloudThat Technologies’ relationship with the participant in relation to this curriculum.
2. No part of this curriculum may be reproduced, stored in a retrieval system, or transmitted,
in any form or by any means, electronic, mechanical, recording or otherwise, without the
prior written permission of CloudThat Technologies Private Limited. Please note that the
content in this curriculum is protected under copyright law.
3. The content of this curriculum cannot use in part or whole for conducting any form of
training without written consent of CloudThat Technologies. The content of this guide is
provided for informational use only and is subject to change without notice and should not
be rendered as a commitment by CloudThat Technologies. CloudThat Technologies
assumes no responsibility or liability for any errors or inaccuracies that may appear in the
informational content contained in this curriculum.
4. Please remember this curriculum contains material, which is owned by or licensed to us,
any existing artwork, or images that you may want to include in your project may be
protected under copyright law. The unauthorized incorporation of such material into your
new work could be a violation of the rights of the copyright owner. Please be sure to
obtain any permission required from the copyright owner.
5. Any references to company names in sample files are for demonstration purposes only and
are not intended to refer to any actual organization. Please remember that use of any
information of this curriculum is entirely at the personal expense of the participant for
which CloudThat Technologies will not be liable. The participant is responsible for ensuring
that any products, services, or information available through this curriculum meet their
specific requirements.
6. All trademarks reproduced in this curriculum, which is not the property of, or licensed to
the operator, are acknowledged in the curriculum. From time to time, this curriculum may
also include links to other websites. These links are provided for the participant’s
convenience to provide further information. They do not signify that CloudThat endorses
the website(s). CloudThat has no responsibility for the content of the linked website(s).
7. Unauthorized use of this curriculum will give a right to CloudThat Technologies to a claim
for damages and/or be a criminal offense.

Copyright @2012-19, CloudThat Technologies Private Limited, All Rights Reserved. Do not copy or distribute
Table of Index

LAB 1: DEPLOY A SERVICE FABRIC APPLICATION TO A CLUSTER IN AZURE 7

TASK 1: CREATING A WINDOWS VM 7


TASK 2: VISUAL STUDIO 2017 ENVIRONMENT SETUP 10
TASK 3: INSTALLATION OF MICROSOFT AZURE SERVICE FABRIC SDK 13
TASK 4 DEPLOYING APPLICATION 16
TASK 5: PUBLISH THE CLUSTER TO AZURE 18
TASK 6: DEPLOYING THE APPLICATION TO CLUSTER 22

Copyright @2012-19, CloudThat Technologies Private Limited, All Rights Reserved. Do not copy or distribute
Copyright @2012-19, CloudThat Technologies Private Limited, All Rights Reserved. Do not copy or distribute
Lab 1: Deploy a Service Fabric application to a cluster in Azure

Lab 1: Deploy a Service Fabric application to a cluster in Azure


Task 1: Creating a Windows VM

1. Login into Azure Portal


2. Click Virtual machines and select Add

3. Enter the details as shown below


a) Subscription: choose your subscription
b) Resource Group: Click on Create new and enter a unique name for the same
c) Virtual machine name: windows
d) Region: East US
e) Availability options: No infrastructure redundancy required
f) Image: Windows 10 Pro Version 1809
g) Size: use default settings
h) Enter a username and password

7
Lab 1: Deploy a Service Fabric application to a cluster in Azure

4. Inbound Port rules


a) select Allow selected ports and select HTTP, HTTPS, RDP
b) Click Review + create

5. After the validations are passed Click Create and wait for the deployment to finish

8
Lab 1: Deploy a Service Fabric application to a cluster in Azure

6. After the deployment is complete click on Go to resources

7. Click on connect and Download RDP File

9
Lab 1: Deploy a Service Fabric application to a cluster in Azure

8. Enter the password that was created during configuration of windows VM and click OK

Task 2: Visual Studio 2017 Environment Setup

1. Download Visual Studio from the below link run the setup file

http://bit.do/vstudio2017

10
Lab 1: Deploy a Service Fabric application to a cluster in Azure

2. Execute the .exe and follow the instruction

3. After clicking continue, a window will popup with Visual Studio Installer in Progress

11
Lab 1: Deploy a Service Fabric application to a cluster in Azure

4. Select the ASP.Net and Web development, Azure development workloads and click
install

5. Visual Studio 2017 Community edition will be installed

Note: Installation may take up to 15-20 mins

12
Lab 1: Deploy a Service Fabric application to a cluster in Azure

6. Click on Sign and provide the Azure account details

Task 3: Installation of Microsoft Azure Service Fabric SDK


1. Download the Service Fabric SDK from the below link and install the .exe. File by
following the on-screen instructions

http://bit.ly/cloudthat-fabric-SDK

13
Lab 1: Deploy a Service Fabric application to a cluster in Azure

2. Accept the terms and agreements

3. After the installation is completed, click on Finish

14
Lab 1: Deploy a Service Fabric application to a cluster in Azure

4. Enable PowerShell script execution


Service Fabric uses Windows PowerShell scripts for creating a local development cluster
and for deploying applications from Visual Studio. By default, Windows blocks these
scripts from running. To enable them, you must modify your PowerShell execution
policy. Open PowerShell as an administrator and enter the following command

5. Install Git using the below mention link and follow the on-screen instruction

http://bit.do/gitwindows

6. Clone the example application from the example repository by executing the below
command in Git Bash

git clone https://github.com/Azure-Samples/service-


fabric-dotnet-quickstart.git

15
Lab 1: Deploy a Service Fabric application to a cluster in Azure

Task 4 Deploying Application

1. Open Visual Studio as Administrator

2. Create a Project in Visual Studio, File → open → Project/Solution, select the previously
cloned project (Voting.sln)

3. Select the solution File, then Click Open

16
Lab 1: Deploy a Service Fabric application to a cluster in Azure

4. Press F5, to start building the code, wait until the application build process is complete

Note: It may take up to 5-10 minutes to finish

5. Open browser and the below link

localhost:8080

6. To manage/ View service fabrics nodes visit the below link

localhost:19080/Explorer/index.html#/system/ap
ps

17
Lab 1: Deploy a Service Fabric application to a cluster in Azure

Task 5: Publish the cluster to Azure

1. In Solution Explorer on the right-hand side select Voting, and click Publish to deploy it
into Azure

2. Choose your Azure account

18
Lab 1: Deploy a Service Fabric application to a cluster in Azure

3. In Connection Endpoint, select Create New Cluster. If you are deploying to an existing
cluster, select the cluster endpoint from the list. The Create Service Fabric Cluster dialog
opens

4. Enter the following details


a) Cluster name mytestcluster
b) Select your subscription,
c) Location East US 2
d) Number of cluster nodes 3
e) Resource Group: select a new resource group and enter a unique for the same
f) Click Next

19
Lab 1: Deploy a Service Fabric application to a cluster in Azure

5. In the Certificate tab, enter the password and output path for the cluster Certificate. A
self-signed certificate is created as a PFX file and saved to the specified output path

6. In the VM Detail tab, enter the User name and Password for the cluster admin account.
Select the Virtual machine image for the cluster nodes and the Virtual machine size for
each cluster node. Click the Advanced tab

20
Lab 1: Deploy a Service Fabric application to a cluster in Azure

7. In Advanced tab, allow the following ports


a) 80, 83, 8080, click on Create

8. Cluster creation is in process, wait until the process is complete

21
Lab 1: Deploy a Service Fabric application to a cluster in Azure

Task 6: Deploying the Application to Cluster

1. In Solution Explorer, right-click on Voting and select Publish. The Publish dialog box
appears. In Connection Endpoint, select the endpoint for the cluster you created in the
previous step. For example, "mytestcluster.eastasia.cloudapp.azure.com:19000". If you
select Advanced Connection Parameters, the certificate information should be auto-
filled

2. Select Publish

3. Once the build and deployment is successful, you should see the following output

22
Lab 1: Deploy a Service Fabric application to a cluster in Azure

4. Open the below link in the browser

http://<clustername>.<region>.cloudapp.azure.com:8080

23

Вам также может понравиться