Downloading and installing Service Fabric

You will have to install and set up a local Service Fabric cluster on your PC before you can create and test Service Fabric applications.

Getting ready

We will download and install the software development kit (SDK) from the Azure site. This will allow us to create a local Service Fabric cluster on your local development machine.

How to do it…

  1. From the Microsoft Azure site, download the SDK and access other resources, such as documentation, via the Service Fabric learning path, from https://azure.microsoft.com/en-us/documentation/learning-paths/service-fabric/:
    How to do it…
  2. You will need to accept the license terms before the installation begins:
    How to do it…
  3. The web platform installer then starts downloading the Microsoft Azure Service Fabric runtime. Allow this process to complete:
    How to do it…
  4. After the download has completed, the install process will begin:
    How to do it…
  5. When the installation has completed, the following products would have been installed, which is also evident in the following screenshot:
    • Microsoft Azure Service Fabric Runtime
    • Microsoft Azure Service Fabric Core SDK Preview
    • Microsoft Azure Service Fabric Visual Studio 2015 Tools Preview
    • Microsoft Azure Service Fabric SDK Preview
    How to do it…
  6. The next task is to open PowerShell as the administrator. In the Windows 10 Start menu, type the word PowerShell, and the search will immediately return the desktop application as a result. Right-click on the desktop application and select Run as administrator from the context menu:
    How to do it…
  7. Once Windows PowerShell has opened up, run the Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force -Scope CurrentUser command. The reason for this is that Service Fabric uses PowerShell scripts for the creation of the local development cluster. It is also used for the deployment of Visual Studio developed apps. Running this command prevents Windows from blocking those scripts:
    How to do it…
  8. Next, create the local Service Fabric cluster. Enter the & "$ENV:ProgramFilesMicrosoft SDKsService FabricClusterSetupDevClusterSetup.ps1" command.

    This will create the local cluster needed to host Service Fabric applications:

    How to do it…
  9. After the cluster is created, PowerShell will start the service:
    How to do it…
  10. The process might take several minutes. Be sure to let it complete:
    How to do it…
  11. Once the naming service is ready, you can close PowerShell:
    How to do it…
  12. To view the created cluster, you can navigate to http://localhost:19080/Explorer on your local machine.

    This will give you a snapshot of the cluster's health and state. It will also show any applications running in the cluster:

    How to do it…

How it works…

As you can see, the Service Fabric cluster is essential for creating and running applications created in Visual Studio. This will allow us to test applications directly on your local machine before publishing them to the cloud.

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

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