DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Deploy a Service Fabric Cluster to Azure with .NET Framework 4.6

Deploy a Service Fabric Cluster to Azure with .NET Framework 4.6

Here's how to get started running a Service Fabric Cluster to Microsoft Azure.

Andrej Medic user avatar by
Andrej Medic
·
Jun. 28, 16 · Tutorial
Like (1)
Save
Tweet
Share
3.76K Views

Join the DZone community and get the full member experience.

Join For Free

For anyone working with Service Fabric and wishing to build a solution targeting the .NET Framework 4.6, deploying to Azure is a challenge given this version of the framework is not yet available in the default Windows Server 2012 image. 

To overcome the above limitation and to make the process as easy as possible, we'll employ a customised Azure Resource Manager (ARM) template which we'll first generate via the Azure Portal. 

To get started simply click here or search for Service Fabric Cluster in the Azure Marketplace.

As there is great guidance and content on Microsoft's Azure portal, I won't repeat the steps on Deploying a Service Fabric Cluster using an ARM template, but I will ask you to complete all the fields as you normally would (login, password, custom ports for http and https), but instead of pressing create and deploying your cluster, we'll opt to download the ARM template.

Opening the ARM template in Visual Code or your text editor of choice, search for the following JSON section:

"virtualMachineProfile": {
      "extensionProfile": {
         "extensions": [


Then add a custom script extension block with the following content:

{
   "name":"CustomScriptExtensionInstallNet46",
   "properties":{
      "publisher":"Microsoft.Compute",
      "type":"CustomScriptExtension",
      "typeHandlerVersion":"1.7",
      "autoUpgradeMinorVersion":false,
      "settings":{
         "fileUris":[
            "https://serviceprofiler.azurewebsites.net/content/downloads/InstallNetFx46.ps1"
         ],
         "commandToExecute":"powershell.exe -ExecutionPolicy Unrestricted -File InstallNetFx46.ps1"
      },
      "forceUpdateTag":"RerunExtension"
   }
},

Note, for additional security & flexibility self-host a copy of the InstallNetFx46.ps1 script file.


Download the ARM template — in my case I also rename the file to correspond to the environment targeted (for example AcmeServiceFabricUATCluster.json) and open a PowerShell window to the same folder. Then, issue the following commands, substituting the Acme values for your own:

Login-AzureRmAccount

Get-AzureRmSubscription –SubscriptionName "AcmeCorp" | Select-AzureRmSubscription

New-AzureRmResourceGroup -Name AcmeUAT -Location "West US"

New-AzureRmResourceGroupDeployment -Name AcmeUATDeployment -ResourceGroupName AcmeUAT -TemplateFile AcmeServiceFabricUATCluster.json

Enter the values requested such as password if executing interactively. Upon ARM completion, your Service Fabric nodes will now contain an installation of .NET Framework 4.6. How simple! The next step is to deploy your solution.

cluster azure Framework

Published at DZone with permission of Andrej Medic. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • How To Create a Failover Client Using the Hazelcast Viridian Serverless
  • Running Databases on Kubernetes
  • How To Select Multiple Checkboxes in Selenium WebDriver Using Java
  • DevOps for Developers: Continuous Integration, GitHub Actions, and Sonar Cloud

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: