public void Run() { var args = new string[0]; var siloArgs = SiloArgs.ParseArguments(args); this.siloHost = new SiloHost(siloArgs.SiloName, Config); this.siloHost.LoadOrleansConfig(); if (this.siloHost == null) { SiloArgs.PrintUsage(); throw new ArgumentNullException(nameof(siloHost)); } try { this.siloHost.InitializeOrleansSilo(); if (this.siloHost.StartOrleansSilo()) { Console.WriteLine($"Successfully started Orleans silo '{this.siloHost.Name}' as a {this.siloHost.Type} node."); } else { throw new OrleansException($"Failed to start Orleans silo '{this.siloHost.Name}' as a {this.siloHost.Type} node."); } } catch (Exception exc) { this.siloHost.ReportStartupError(exc); Console.Error.WriteLine(exc); throw new OrleansException($"Failed to start Orleans silo '{this.siloHost.Name}' as a {this.siloHost.Type} node.", exc); } }
public OrleansHostWrapper(ClusterConfiguration config, string[] args) { var siloArgs = SiloArgs.ParseArguments(args); if (siloArgs == null) { return; } if (siloArgs.DeploymentId != null) { config.Globals.DeploymentId = siloArgs.DeploymentId; } _siloHost = new SiloHost(siloArgs.SiloName, config); _siloHost.LoadOrleansConfig(); // todo: use xml config instead. var props = new Dictionary <string, string> { ["Database"] = "orleanssandbox", ["ConnectionString"] = "enter your mongoDB connection string here" }; config.Globals.RegisterStorageProvider <MongoDbStorageProvider>("MongoDBStorage", props); }
public OrleansHostWrapper(ClusterConfiguration config, string[] args) { var siloArgs = SiloArgs.ParseArguments(args); if (siloArgs == null) { return; } if (siloArgs.DeploymentId != null) { config.Globals.DeploymentId = siloArgs.DeploymentId; } siloHost = new SiloHost(siloArgs.SiloName, config); siloHost.LoadOrleansConfig(); }