Coder Social home page Coder Social logo

aanufriyev / servicefabric-arm-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nmehlei/servicefabric-arm-template

0.0 1.0 0.0 12 KB

Example of ARM template for creating an Azure Service Fabric instance with dedicated premium data disks

C# 37.06% PowerShell 22.31% Shell 19.77% Ruby 20.87%

servicefabric-arm-template's Introduction

servicefabric-arm-template

Example of ARM template for creating an Azure Service Fabric instance with dedicated premium data disks

Add Data Disks to Template

See: https://github.com/nmehlei/servicefabric-arm-template/blob/master/template.json#L598-L608

"dataDisks": [
	{
		"diskSizeGB": 128,
		"lun": 0,
		"createOption": "Empty",
		"caching": "ReadOnly",
		"managedDisk": {
			"storageAccountType": "Premium_LRS"
		}
	}
]

Add Powershell Script to initialize new Data Disk

See: https://github.com/nmehlei/servicefabric-arm-template/blob/master/PrepareDisk.ps1

Get-Disk |
    Where PartitionStyle -eq 'Raw' |
    Select-Object -First 1 |
    Initialize-Disk -PartitionStyle MBR -PassThru |
    New-Partition -DriveLetter F -UseMaximumSize |
    Format-Volume -FileSystem NTFS -NewFileSystemLabel "Data" -Confirm:$false

This script has to be uploaded to a publicly accessible azure blob storage account.

Schedule invocation of Powershell Script

See: https://github.com/nmehlei/servicefabric-arm-template/blob/master/template.json#L438-L456

{
	"name": "[concat(parameters('vmNodeType0Name'),'_PrepareDisk')]",
	"properties": {
		"publisher": "Microsoft.Compute",
		"type": "CustomScriptExtension",
		"typeHandlerVersion": "1.9",
		"autoUpgradeMinorVersion": true,
		"settings": {
			"fileUris": [
				"[concat(parameters('scriptLocation'),'/PrepareDisk.ps1')]"
			]
		},
		"protectedSettings": {
			"commandToExecute": "powershell -ExecutionPolicy Unrestricted -File PrepareDisk.ps1",
			"storageAccountName": "[parameters('scriptStorageAccount')]",
			"storageAccountKey": "[parameters('scriptStorageAccountKey')]"
		}
	}
},

Move Service Fabric Config/Storage Directory to new Data Disk

See: https://github.com/nmehlei/servicefabric-arm-template/blob/master/template.json#L467-L478

"settings": {
	...
	"nodeTypeRef": "[parameters('vmNodeType0Name')]",
	"dataPath": "F:\\\\SvcFab",
	"durabilityLevel": "Silver",
	...
},

servicefabric-arm-template's People

Contributors

nmehlei avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.