public override void Run() { var config = new ClusterConfiguration(); config.StandardLoad(); // Configure storage providers silo = new AzureSilo(); bool ok = silo.Start(RoleEnvironment.DeploymentId, RoleEnvironment.CurrentRoleInstance, config); silo.Run(); // Call will block until silo is shutdown Trace.TraceInformation("OrleansAzureSilos is running"); try { this.RunAsync(this.cancellationTokenSource.Token).Wait(); } finally { this.runCompleteEvent.Set(); } }
public override void Dispose() { if (host == null) return; host.Stop(); host = null; cluster.Dispose(); }
internal AzureClusterActorSystem(ClusterConfigurator cluster, string deploymentId, string connectionString) { ClusterActorSystem.Current = this; this.cluster = cluster; this.deploymentId = deploymentId; this.connectionString = connectionString; host = new AzureSilo(); }
public override bool OnStart() { // Set the maximum number of concurrent connections ServicePointManager.DefaultConnectionLimit = 12; this.cloudSilo = new AzureSilo(); var success = this.cloudSilo.Start(); return success; }
public override void Run() { var config = new ClusterConfiguration(); config.StandardLoad(); // It is IMPORTANT to start the silo not in OnStart but in Run. // Azure may not have the firewalls open yet (on the remote silos) at the OnStart phase. silo = new AzureSilo(); bool isSiloStarted = silo.Start(config); silo.Run(); // Call will block until silo is shutdown }
public override bool OnStart() { // Set the maximum number of concurrent connections ServicePointManager.DefaultConnectionLimit = 12; Trace.WriteLine("Starting Role Entry Point"); silo = new AzureSilo(); return silo.Start(RoleEnvironment.DeploymentId, RoleEnvironment.CurrentRoleInstance); }
public override bool OnStart() { // Set the maximum number of concurrent connections ServicePointManager.DefaultConnectionLimit = 12; // For information on handling configuration changes // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357. silo = new AzureSilo(); return silo.Start(); }
public async void ValidateConfiguration_IncorrectKey() { var serviceRuntime = new TestServiceRuntimeWrapper(); serviceRuntime.DeploymentId = "bar"; serviceRuntime.Settings["DataConnectionString"] = "DefaultEndpointsProtocol=https;AccountName=orleanstest;AccountKey=IncorrectKey"; serviceRuntime.InstanceName = "name"; var config = AzureSilo.DefaultConfiguration(serviceRuntime); config.AddMemoryStorageProvider(); AzureSilo orleansAzureSilo = new AzureSilo(serviceRuntime); bool ok = await orleansAzureSilo.ValidateConfiguration(config); Assert.False(ok); }
public async void ValidateConfiguration_InvalidConnectionString() { var serviceRuntime = new TestServiceRuntimeWrapper(); serviceRuntime.DeploymentId = "bar"; serviceRuntime.Settings["DataConnectionString"] = "InvalidConnectionString"; serviceRuntime.InstanceName = "name"; var config = AzureSilo.DefaultConfiguration(serviceRuntime); config.AddMemoryStorageProvider(); AzureSilo orleansAzureSilo = new AzureSilo(serviceRuntime); bool ok = await orleansAzureSilo.ValidateConfiguration(config); Assert.False(ok); }
public async void ValidateConfiguration_Startup() { Skip.IfNot(StorageEmulator.TryStart(), "This test explicitly requires the Azure Storage emulator to run"); var serviceRuntime = new TestServiceRuntimeWrapper(); serviceRuntime.DeploymentId = "foo"; serviceRuntime.Settings["DataConnectionString"] = "UseDevelopmentStorage=true"; serviceRuntime.InstanceName = "name"; var config = AzureSilo.DefaultConfiguration(serviceRuntime); config.AddMemoryStorageProvider(); AzureSilo orleansAzureSilo = new AzureSilo(serviceRuntime); bool ok = await orleansAzureSilo.ValidateConfiguration(config); Assert.True(ok); }
public override void Run() { Trace.TraceInformation("OrleansDemo.Worker is running"); try { _silo = new AzureSilo(); _silo.Start(); _silo.Run(); } finally { this.runCompleteEvent.Set(); } }
/// <summary> /// The on start. /// </summary> /// <returns> /// The <see cref="bool"/>. /// </returns> public override bool OnStart() { // Note that you need to do this :) // Note that you need to do this :) // Note that you need to do this :) // Also check out AzureTableJournalProvider, for actual use. JournalProviderManager.Manager.GetProviderDelegate = (_, __) => new AzureTableJournalProvider("UseDevelopmentStorage=true", JsonSerializationSettings.JsonConfig); this.silo = new AzureSilo(); var ok = base.OnStart(); if (ok) { ok = this.silo.Start(); } return ok; }
public override void Run() { Trace.WriteLine("OrleansAzureSilos-Run entry point called", "Information"); Trace.WriteLine("OrleansAzureSilos-OnStart Starting Orleans silo", "Information"); var config = AzureSilo.DefaultConfiguration(); config.AddMemoryStorageProvider(); // First example of how to configure an existing provider Example_ConfigureExistingStorageProvider(config); Example_ConfigureNewStorageProvider(config); Example_ConfigureNewBootstrapProvider(config); // It is IMPORTANT to start the silo not in OnStart but in Run. // Azure may not have the firewalls open yet (on the remote silos) at the OnStart phase. orleansAzureSilo = new AzureSilo(); bool ok = orleansAzureSilo.Start(config); Trace.WriteLine("OrleansAzureSilos-OnStart Orleans silo started ok=" + ok, "Information"); orleansAzureSilo.Run(); // Call will block until silo is shutdown }
internal AzureClusterActorSystem(ClusterConfigurator cluster) { ClusterActorSystem.Current = this; this.cluster = cluster; host = new AzureSilo(); }