-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy path0-provision-azure-cluster.csx
More file actions
89 lines (53 loc) · 2.38 KB
/
Copy path0-provision-azure-cluster.csx
File metadata and controls
89 lines (53 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*** hide ***/
#load "config/AzureCluster.csx"
using MBrace.Azure;
using MBrace.Azure.Management;
// IMPORTANT:
// Before running this tutorial, make sure that you install binding redirects to FSharp.Core
// on your C# Interactive executable. To do this, find "InteractiveHost.exe" in your Visual Studio 2015 Installation.
// From your command prompt, enter the following command:
//
// explorer.exe /select, %programfiles(x86)%\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies\InteractiveHost.exe
//
// Find the file "config/InteractiveHost.exe.config" that is bundled in the C# tutorial folder and place it next to InteractiveHost.exe.
// Now, reset your C# Interactive session. You are now ready to start using your C# REPL.
/**
# Provisioning your cluster using C# interactive
If using a locally simulated cluster(via ThespianCluster.csx) you can ignore this tutorial.
In this tutorial you learn how you can use the[MBrace.Azure.Management](https://www.nuget.org/packages/MBrace.Azure) library
to provision an MBrace cluster using C# Interactive. In order to proceed, you will need
to[sign up](https://azure.microsoft.com/en-us/pricing/free-trial/) for an Azure subscription. Once signed up,
[download your publication settings file](https://manage.windowsazure.com/publishsettings).
Before proceeding, please go to `AzureCluster.fsx` and set your azure authentication data and deployment preferences.
Once done, we can reload the script.
*/
#load "config/AzureCluster.csx"
/**
Now let's create a new cluster by calling
*/
var deployment = Config.ProvisionCluster();
/**
We can track the provisioning progress of the cluster by calling
*/
deployment.ShowInfo();
/**
Provisioning can take some time(approximately 5 minutes).
Once done, you can now connect to your cluster as follows:
*/
var cluster = Config.GetCluster();
cluster.ShowWorkers();
/**
You can now run any of the subsequent tutorials and examples in your Azure cluster.
## Modifying the cluster
You can resize the cluster by calling
*/
Config.ResizeCluster(newVmCount: 20);
/**
When done, it is important to make sure that the cluster has been deprovisioned
*/
Config.DeleteCluster();
/**
## Summary
In this tutorial, you've learned how to provision an MBrace clusters running on Azure using MBrace.Azure.Management.
You are now ready to proceed with further samples to learn more about the MBrace programming model.
*/