public override bool OnStart() { ServicePointManager.DefaultConnectionLimit = 12; //base.OnStart(); try { silo = new OrleansAzureSilo(); Trace.TraceInformation("CityPowerSilo start ....."); //string appRoot = Environment.GetEnvironmentVariable("RoleRoot"); //appRoot = Path.Combine(appRoot + @"\", @"approot\"); //Trace.TraceInformation("APPROOT = " + appRoot); //string configFileName = Path.Combine(appRoot, "OrleansConfiguration.xml"); //Trace.TraceInformation("Config file name = " + configFileName); //var r = System.IO.File.OpenText(configFileName); //OrleansConfiguration cfg = new OrleansConfiguration(r); return silo.Start(RoleEnvironment.DeploymentId, RoleEnvironment.CurrentRoleInstance); } catch(Exception ex) { Trace.TraceError("Startsilo FAILED : " + ex.ToString()); return false; } }
public override bool OnStart() { silo = new OrleansAzureSilo(); var success = silo.Start(RoleEnvironment.DeploymentId, RoleEnvironment.CurrentRoleInstance); return(success); }
public override bool OnStart() { Trace.WriteLine("OrleansAzureSilos-OnStart called", "Information"); Trace.WriteLine("OrleansAzureSilos-OnStart Initializing config", "Information"); // 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. RoleEnvironment.Changing += RoleEnvironmentChanging; Trace.WriteLine("OrleansAzureSilos-OnStart Initializing diagnostics", "Information"); DiagnosticMonitorConfiguration diagConfig = ConfigureDiagnostics(); // Start the diagnostic monitor. // The parameter references a connection string specified in the service configuration file // that indicates the storage account where diagnostic information will be transferred. // If the value of this setting is "UseDevelopmentStorage=true" then logs are written to development storage. DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString", diagConfig); Trace.WriteLine("OrleansAzureSilos-OnStart Starting Orleans silo", "Information"); orleansAzureSilo = new OrleansAzureSilo(); bool ok = base.OnStart(); if (ok) { ok = orleansAzureSilo.Start(RoleEnvironment.DeploymentId, RoleEnvironment.CurrentRoleInstance); } Trace.WriteLine("OrleansAzureSilos-OnStart Orleans silo started ok=" + ok, "Information"); return(ok); }
public override bool OnStart() { // Do other silo initialization – for example: Azure diagnostics, etc silo = new OrleansAzureSilo(); return(silo.Start(RoleEnvironment.DeploymentId, RoleEnvironment.CurrentRoleInstance)); }
public override bool OnStart() { // Do other silo initialization – for example: Azure diagnostics, etc silo = new OrleansAzureSilo(); return silo.Start(RoleEnvironment.DeploymentId, RoleEnvironment.CurrentRoleInstance); }
bool SetupSilo() { var siloEndpoint = RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["OrleansSiloEndpoint"]; HubGateway.LocalEndPoint = siloEndpoint.IPEndpoint; silo = new OrleansAzureSilo(); return(silo.Start(RoleEnvironment.DeploymentId, RoleEnvironment.CurrentRoleInstance)); }
public override bool OnStart() { // Set the maximum number of concurrent connections ServicePointManager.DefaultConnectionLimit = 12; silo = new OrleansAzureSilo(); silo.Start(RoleEnvironment.DeploymentId, RoleEnvironment.CurrentRoleInstance); return(base.OnStart()); }
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. bool result = base.OnStart(); _silo = new OrleansAzureSilo(); result &= _silo.Start(RoleEnvironment.DeploymentId, RoleEnvironment.CurrentRoleInstance); Trace.TraceInformation("CloudSilo has been started"); return(result); }
private static void InitSilo(string[] args) { SiloHost.silo = new OrleansAzureSilo(); var siloConfiguration = new OrleansConfiguration(); siloConfiguration.Load(new StringReader(args[0])); SiloHost.siloStartResult = silo.Start( deploymentId: RoleEnvironment.DeploymentId, myRoleInstance: RoleEnvironment.CurrentRoleInstance, config: siloConfiguration); SiloHost.orleansSiloTask = Task.Factory.StartNew(() => { SiloHost.silo.Run(); }); }
bool SetupSilo() { var siloEndpoint = RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["OrleansSiloEndpoint"]; HubGateway.LocalEndPoint = siloEndpoint.IPEndpoint; silo = new OrleansAzureSilo(); return silo.Start(RoleEnvironment.DeploymentId, RoleEnvironment.CurrentRoleInstance); }
public override bool OnStart() { Trace.WriteLine("OrleansAzureSilos-OnStart called", "Information"); Trace.WriteLine("OrleansAzureSilos-OnStart Initializing config", "Information"); // 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. RoleEnvironment.Changing += RoleEnvironmentChanging; SetupEnvironmentChangeHandlers(); Trace.WriteLine("OrleansAzureSilos-OnStart Initializing diagnostics", "Information"); DiagnosticMonitorConfiguration diagConfig = ConfigureDiagnostics(); // Start the diagnostic monitor. // The parameter references a connection string specified in the service configuration file // that indicates the storage account where diagnostic information will be transferred. // If the value of this setting is "UseDevelopmentStorage=true" then logs are written to development storage. DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString", diagConfig); Trace.WriteLine("OrleansAzureSilos-OnStart Starting Orleans silo", "Information"); orleansAzureSilo = new OrleansAzureSilo(); bool ok = base.OnStart(); if (ok) { ok = orleansAzureSilo.Start(RoleEnvironment.DeploymentId, RoleEnvironment.CurrentRoleInstance); } Trace.WriteLine("OrleansAzureSilos-OnStart Orleans silo started ok=" + ok, "Information"); return ok; }