Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WASB support #161

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/MBrace.Azure/Configuration/Arguments.fs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ type private AzureArguments =
| Runtime_Topic of topic_name:string
// Blob Storage
| Runtime_Container of container:string
| User_Data_Container of container:string
| Assembly_Container of container:string
| Cloud_Value_Container of container:string
// Table Storage
Expand Down Expand Up @@ -63,7 +62,6 @@ type private AzureArguments =
| Runtime_Queue _ -> "Specifies the work item queue name in the ServiceBus."
| Runtime_Topic _ -> "Specifies the work item topic name in the ServiceBus."
| Runtime_Container _ -> "Specifies the blob container name used for persisting MBrace cluster data."
| User_Data_Container _ -> "Specifies the blob container name used for persisting MBrace user data."
| Assembly_Container _ -> "Specifies the blob container name used for persisting Assembly dependencies."
| Cloud_Value_Container _ -> "Specifies the blob container name used for persisting CloudValue dependencies."
| Runtime_Table _ -> "Specifies the table name used for writing MBrace cluster entries."
Expand Down Expand Up @@ -128,7 +126,6 @@ type ArgumentConfiguration =
yield Runtime_Topic config.WorkItemTopic

yield Runtime_Container config.RuntimeContainer
yield User_Data_Container config.UserDataContainer
yield Assembly_Container config.AssemblyContainer
yield Cloud_Value_Container config.CloudValueContainer

Expand Down Expand Up @@ -166,7 +163,6 @@ type ArgumentConfiguration =
parseResult.IterResult(<@ Runtime_Topic @>, fun t -> config.WorkItemTopic <- t)

parseResult.IterResult(<@ Runtime_Container @>, fun c -> config.RuntimeContainer <- c)
parseResult.IterResult(<@ User_Data_Container @>, fun c -> config.UserDataContainer <- c)
parseResult.IterResult(<@ Assembly_Container @>, fun c -> config.AssemblyContainer <- c)
parseResult.IterResult(<@ Cloud_Value_Container @>, fun c -> config.CloudValueContainer <- c)

Expand Down
6 changes: 0 additions & 6 deletions src/MBrace.Azure/Configuration/Configuration.fs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ type Configuration(storageConnectionString : string, serviceBusConnectionString

// Default Blob Storage Containers
let mutable runtimeContainer = "mbraceruntimedata"
let mutable userDataContainer = "mbraceuserdata"
let mutable cloudValueContainer = "mbracecloudvalue"
let mutable assemblyContainer = "mbraceassemblies"

Expand Down Expand Up @@ -109,11 +108,6 @@ type Configuration(storageConnectionString : string, serviceBusConnectionString
with get () = runtimeContainer
and set rc = Validate.containerName rc ; runtimeContainer <- rc

/// Azure Storage container used for user data.
member __.UserDataContainer
with get () = userDataContainer
and set udc = Validate.containerName udc ; userDataContainer <- udc

/// Azure Storage container used for Vagabond assembly dependencies.
member __.AssemblyContainer
with get () = assemblyContainer
Expand Down
9 changes: 4 additions & 5 deletions src/MBrace.Azure/Runtime/Client.fs
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,10 @@ type AzureCluster private (manager : ClusterManager, faultPolicy : FaultPolicy o
/// <param name="force">Ignore active workers. Defaults to false.</param>
/// <param name="reactivate">Reactivate configuration. Defaults to true.</param>
[<CompilerMessage("Using 'Reset' may cause unexpected behavior in clients and workers.", 445)>]
member this.ResetAsync([<O;D(null:obj)>]?deleteQueues : bool, [<O;D(null:obj)>]?deleteRuntimeState : bool, [<O;D(null:obj)>]?deleteLogs : bool,
[<O;D(null:obj)>]?deleteUserData : bool, [<O;D(null:obj)>]?deleteAssemblyData : bool, [<O;D(null:obj)>]?force : bool, [<O;D(null:obj)>]?reactivate : bool) : Async<unit> =
member this.ResetAsync([<O;D(null:obj)>]?deleteQueues : bool, [<O;D(null:obj)>]?deleteRuntimeState : bool, [<O;D(null:obj)>]?deleteLogs : bool, [<O;D(null:obj)>]?deleteAssemblyData : bool, [<O;D(null:obj)>]?force : bool, [<O;D(null:obj)>]?reactivate : bool) : Async<unit> =

manager.ResetCluster(?deleteQueues = deleteQueues, ?deleteRuntimeState = deleteRuntimeState, ?deleteLogs = deleteLogs,
?deleteUserData = deleteUserData, ?deleteAssemblyData = deleteAssemblyData,
?deleteAssemblyData = deleteAssemblyData,
?force = force, ?reactivate = reactivate)

/// <summary>
Expand All @@ -202,11 +201,11 @@ type AzureCluster private (manager : ClusterManager, faultPolicy : FaultPolicy o
/// <param name="force">Ignore active workers. Defaults to false.</param>
/// <param name="reactivate">Reactivate configuration. Defaults to true.</param>
[<CompilerMessage("Using 'Reset' may cause unexpected behavior in clients and workers.", 445)>]
member this.Reset([<O;D(null:obj)>]?deleteQueues : bool, [<O;D(null:obj)>]?deleteRuntimeState : bool, [<O;D(null:obj)>]?deleteLogs : bool, [<O;D(null:obj)>]?deleteUserData : bool,
member this.Reset([<O;D(null:obj)>]?deleteQueues : bool, [<O;D(null:obj)>]?deleteRuntimeState : bool, [<O;D(null:obj)>]?deleteLogs : bool,
[<O;D(null:obj)>]?deleteAssemblyData : bool, [<O;D(null:obj)>]?force : bool, [<O;D(null:obj)>]?reactivate : bool) : unit =

this.ResetAsync(?deleteQueues = deleteQueues, ?deleteRuntimeState = deleteRuntimeState, ?deleteLogs = deleteLogs,
?deleteUserData = deleteUserData, ?deleteAssemblyData = deleteAssemblyData,
?deleteAssemblyData = deleteAssemblyData,
?force = force, ?reactivate = reactivate)
|> Async.RunSync

Expand Down
5 changes: 0 additions & 5 deletions src/MBrace.Azure/Runtime/ClusterId.fs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ type ClusterId =

/// Runtime blob container.
RuntimeContainer : string
/// User data container.
UserDataContainer : string
/// Vagabond Assembly Container.
VagabondContainer : string
/// CloudValue Persist Container.
Expand Down Expand Up @@ -74,7 +72,6 @@ type ClusterId =
do!
[|
this.DeleteTable this.UserDataTable
this.DeleteContainer this.UserDataContainer
this.DeleteContainer this.CloudValueContainer
|]
|> Async.Parallel
Expand Down Expand Up @@ -124,7 +121,6 @@ type ClusterId =
createTable this.RuntimeLogsTable

createContainer this.RuntimeContainer
createContainer this.UserDataContainer
createContainer this.CloudValueContainer
createContainer this.VagabondContainer
|]
Expand Down Expand Up @@ -160,7 +156,6 @@ type ClusterId =
RuntimeContainer = appendVersionAndSuffixId configuration.RuntimeContainer
VagabondContainer = configuration.AssemblyContainer
CloudValueContainer = appendVersionAndSuffixId configuration.CloudValueContainer
UserDataContainer = appendSuffixId configuration.UserDataContainer

RuntimeTable = appendVersionAndSuffixId configuration.RuntimeTable
RuntimeLogsTable = appendVersionAndSuffixId configuration.RuntimeLogsTable
Expand Down
10 changes: 2 additions & 8 deletions src/MBrace.Azure/Runtime/ClusterManager.fs
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,11 @@ type ClusterManager =
member r.InitTopicMonitor(?currentWorker : IWorkerId) = TopicMonitor.Create(r.WorkerManager, r.WorkQueue, r.Logger, ?currentWorker = currentWorker)

/// Resets the cluster store state with supplied parameters
member r.ResetCluster(?deleteQueues : bool, ?deleteRuntimeState : bool, ?deleteLogs : bool, ?deleteUserData : bool,
?deleteAssemblyData : bool, ?force : bool, ?reactivate : bool) = async {
member r.ResetCluster(?deleteQueues : bool, ?deleteRuntimeState : bool, ?deleteLogs : bool, ?deleteAssemblyData : bool, ?force : bool, ?reactivate : bool) = async {

let deleteQueues = defaultArg deleteQueues true
let deleteRuntimeState = defaultArg deleteRuntimeState true
let deleteLogs = defaultArg deleteLogs true
let deleteUserData = defaultArg deleteUserData false
let deleteAssemblyData = defaultArg deleteAssemblyData false
let force = defaultArg force false
let reactivate = defaultArg reactivate true
Expand All @@ -86,10 +84,6 @@ type ClusterManager =
logger.LogWarningf "Deleting system log Table %A." clusterId.RuntimeLogsTable
do! clusterId.ClearRuntimeLogs()

if deleteUserData then
logger.LogWarningf "Deleting UserData Container %A and Table %A." clusterId.UserDataContainer clusterId.UserDataTable
do! clusterId.ClearUserData()

if deleteAssemblyData then
logger.LogWarningf "Deleting Vagabond Container %A." clusterId.VagabondContainer
do! clusterId.ClearVagabondData()
Expand Down Expand Up @@ -121,7 +115,7 @@ type ClusterManager =
do! clusterId.InitializeAllStoreResources(maxRetries = 20, retryInterval = 3000)

logger.LogInfof "Creating MBrace storage primitives"
let fileStore = BlobStore.Create(clusterId.StorageAccount, defaultContainer = clusterId.UserDataContainer)
let fileStore = BlobStore.Create(clusterId.StorageAccount)
let atomProvider = TableAtomProvider.Create(clusterId.StorageAccount, defaultTable = clusterId.UserDataTable)
let dictionaryProvider = TableDictionaryProvider.Create(clusterId.StorageAccount)
let queueProvider = ServiceBusQueueProvider.Create(clusterId.ServiceBusAccount)
Expand Down
Loading