Platform Deployment

Moving Parts

Before you can run you business services you need to create an instance of the Business Platform itself - create a Service Fabric cluster and deploy Business Platform applications to the cluster:

  1. Service Manager application - a web frontend Service Fabric Application providing UI for the management of all services deployed to the cluster.
  2. One or more Service Hosts applications - each is a Service Fabric Application providing hosts for your Node.js business services.

All parts should be deployed to a Service Fabric cluster, local or in Azure cloud.

During development process you’ll most likely use the local development cluster which you can create after installing Service Fabric SDK.

Before you get a working system you need to go through a set of deployment and configuration steps.
Don't worry, we have created all necessary PowerShell scripts for you. Just follow the instructions.

After you deploy Service Manager and Service Hosts packages to a Service Fabric cluster, you’ll get a working system ready to host your Node.js services wrapped in Code Packages.

Deployment process

A typical deployment scenario involves running a PowerShell script which configures target cluster and deploys Service Fabric applications for the Service Manager and one or more Service Hosts.

Prerequisites

Before you run provided PoweShell scripts make sure your computer meets the software prerequisites outlined below. Note: Provided instructions and scripts are for Windows platform.
1. Azure PowerShell

Azure PowerShell provides a set of cmdlets that use the Azure Resource Manager model for managing your Azure resources. Read this article which explains the steps to install the Azure PowerShell modules in a Windows environment using PowerShellGet.

2. OpenSSL

To process cluster certificate needed to communicate with the Service Fabric cluster, provided scripts use OpenSSL software developed by the OpenSSL Project.
One of the places where you can download setup package for Windows platform is slproweb.com/products/Win32OpenSSL.html

Deployment to a new cluster in Azure

The setup script creates a new Service Fabric cluster in Microsoft Azure cloud, deploys and configures Service Manager and Service Hosts applications.

  1. Download installation package from the GitHub repository SupercondActor/platform-deployment-cloud
  2. In the “/src” folder locate the PowerShell script CreateNewCluster_DeployApps.ps1
  3. Optionally, take a look at the parameters inside the script, you might want to change some of them (see detailed description here), though the script can be run “as-is” with default parameters.
  4. Run this PowerShell script
    • You’ll be asked to login into your Azure account. If you have multiple Azure subscriptions the script will ask you to select one.
    • Wait about 40 minutes until your Azure cluster gets created and Business Platform applications are deployed and configured.
Pay attention to the text displayed after the script completes - it shows Platform URL and may provide important instructions if additional steps are needed.

Deployment to an existing cluster in Azure

The setup script deploys and configures Service Manager and Service Host applications to an existing cluster in Azure.

  1. Download installation package from the GitHub repository SupercondActor/platform-deployment-cloud
  2. In the “/src” folder locate the PowerShell script ExistingCluster_DeployApps.ps1
  3. Open the script in any editor and enter required parameters:
    • $clusterName - the name of your existing Service Fabric cluster (e.g. ‘mycluster123’).
    • $groupName - the name of the Azure resource group where your cluster is installed (e.g. ‘mycluster-group’).
    • $certPfxFile - full local path to the cluster admin certificate .pfx file (e.g. ‘c:\tests\mycluster123cert.pfx’).
    • $certPassword - the password for the cluster admin certificate
  4. Run this PowerShell script
    • You’ll be asked to login into your Azure account. If you have multiple Azure subscriptions the script will ask you to select one.
    • Wait about 20 minutes until your Azure cluster gets configured and Business Platform applications are deployed.
Pay attention to the text displayed after the script completes - it shows Platform URL and may provide important instructions if additional steps are needed.

Deployment to a local development cluster

The setup script deploys and configures Service Manager and Service Host applications to the Local Service Fabric cluster.

Creating Local Service Fabric cluster

  1. Install Service Fabric SDK.
  2. In the Programs locate and start “Service Fabric Local Cluster Manager”.
  3. Right-click the cluster icon in the taskbar notification area, select “Setup Local Cluster”, select “5 Node”.
  4. Wait several minutes until local cluster is created.
    You can double-click the cluster icon to display Local Cluster UI.

Installing Business Platform to the Local cluster

  1. Download installation package from the GitHub repository SupercondActor/platform-deployment-local
  2. In the “/src” folder locate the PowerShell script DeployAppsToLocalCluster.ps1
  3. Optionally, take a look at the parameters inside the script, you might want to change some of them (see detailed description here), though the script can be run “as-is” with default parameters.
  4. Run this PowerShell script
    • You’ll be asked to login into your Azure account. This is required to configure authentication. If you have multiple Azure subscriptions the script will ask you to select one.
    • Wait a minute until your local cluster gets configured and Business Platform applications are deployed.
Pay attention to the text displayed after the script completes - it shows Platform URL and may provide important instructions if additional steps are needed.