Changeset 9508 for branches/OaaS
- Timestamp:
- 05/22/13 15:29:15 (12 years ago)
- Location:
- branches/OaaS
- Files:
-
- 16 added
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OaaS/HeuristicLab 3.3 Services.sln
r9253 r9508 67 67 EndProject 68 68 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.Optimization.ControllerService.Tests", "HeuristicLab.Services.Optimization.ControllerService.Tests\HeuristicLab.Services.Optimization.ControllerService.Tests.csproj", "{D6DD768C-707C-415A-B9F8-C1F7668F8560}" 69 EndProject 70 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.Optimization.Scaler", "HeuristicLab.Services.Hive.Scaler\HeuristicLab.Services.Optimization.Scaler.csproj", "{D03B1A10-9C88-4C4B-BCCF-4F98CDE863D3}" 69 71 EndProject 70 72 Global … … 346 348 {D6DD768C-707C-415A-B9F8-C1F7668F8560}.Release|x86.ActiveCfg = Release|x86 347 349 {D6DD768C-707C-415A-B9F8-C1F7668F8560}.Release|x86.Build.0 = Release|x86 350 {D03B1A10-9C88-4C4B-BCCF-4F98CDE863D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 351 {D03B1A10-9C88-4C4B-BCCF-4F98CDE863D3}.Debug|Any CPU.Build.0 = Debug|Any CPU 352 {D03B1A10-9C88-4C4B-BCCF-4F98CDE863D3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 353 {D03B1A10-9C88-4C4B-BCCF-4F98CDE863D3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 354 {D03B1A10-9C88-4C4B-BCCF-4F98CDE863D3}.Debug|x64.ActiveCfg = Debug|Any CPU 355 {D03B1A10-9C88-4C4B-BCCF-4F98CDE863D3}.Debug|x86.ActiveCfg = Debug|Any CPU 356 {D03B1A10-9C88-4C4B-BCCF-4F98CDE863D3}.Release|Any CPU.ActiveCfg = Release|Any CPU 357 {D03B1A10-9C88-4C4B-BCCF-4F98CDE863D3}.Release|Any CPU.Build.0 = Release|Any CPU 358 {D03B1A10-9C88-4C4B-BCCF-4F98CDE863D3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 359 {D03B1A10-9C88-4C4B-BCCF-4F98CDE863D3}.Release|Mixed Platforms.Build.0 = Release|Any CPU 360 {D03B1A10-9C88-4C4B-BCCF-4F98CDE863D3}.Release|x64.ActiveCfg = Release|Any CPU 361 {D03B1A10-9C88-4C4B-BCCF-4F98CDE863D3}.Release|x86.ActiveCfg = Release|Any CPU 348 362 EndGlobalSection 349 363 GlobalSection(SolutionProperties) = preSolution 350 364 HideSolutionNode = FALSE 351 365 EndGlobalSection 366 GlobalSection(ExtensibilityGlobals) = postSolution 367 EnterpriseLibraryConfigurationToolBinariesPath = packages\Unity.2.1.505.2\lib\NET35;packages\Unity.Interception.2.1.505.2\lib\NET35;packages\EnterpriseLibrary.Common.5.0.505.0\lib\NET35;packages\EnterpriseLibrary.WindowsAzure.Autoscaling.5.0.1118.2\lib\NET4;packages\EnterpriseLibrary.WindowsAzure.Autoscaling.5.0.1118.2\DesignTime 368 EndGlobalSection 352 369 EndGlobal -
branches/OaaS/HeuristicLab.Clients.Hive.Slave.Azure/ServiceConfiguration.Cloud.cscfg
r9371 r9508 4 4 <Instances count="1" /> 5 5 <ConfigurationSettings> 6 <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="ADJUST_ME" /> 7 <Setting name="HiveServerAddress" value="http://optimization1.cloudapp.net/HiveService.svc" /> 6 <!--Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" />--> 7 <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=ADJUST_ME;AccountKey=ADJUST_ME" /> 8 <Setting name="HiveServerAddress" value="http://optimization.cloudapp.net/HiveService.svc" /> 8 9 <Setting name="HiveServerCertifcateEncodedValue" value="ADJUST_ME" /> 10 <Setting name="HiveServerUsername" value="ADJUST_ME" /> 11 <Setting name="HiveServerPassword" value="ADJUST_ME" /> 12 <Setting name="HiveGroup" value="TESTAZURE" /> 9 13 </ConfigurationSettings> 14 <Certificates> 15 </Certificates> 10 16 </Role> 11 17 </ServiceConfiguration> -
branches/OaaS/HeuristicLab.Clients.Hive.Slave.Azure/ServiceConfiguration.Local.cscfg
r9371 r9508 6 6 <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" /> 7 7 <Setting name="HiveServerAddress" value="http://127.0.0.1:81/HiveService.svc" /> 8 <!--Setting name="HiveServerAddress" value="http://optimization1.cloudapp.net/HiveService.svc" />--> 8 9 <Setting name="HiveServerCertifcateEncodedValue" value="ADJUST_ME" /> 10 <Setting name="HiveServerUsername" value="ADJUST_ME" /> 11 <Setting name="HiveServerPassword" value="ADJUST_ME" /> 12 <Setting name="HiveGroup" value="TESTAZURE" /> 9 13 </ConfigurationSettings> 14 <Certificates> 15 </Certificates> 10 16 </Role> 11 17 </ServiceConfiguration> -
branches/OaaS/HeuristicLab.Clients.Hive.Slave.Azure/ServiceDefinition.build.csdef
r8251 r9508 17 17 <Setting name="HiveServerAddress" /> 18 18 <Setting name="HiveServerCertifcateEncodedValue" /> 19 <Setting name="HiveServerUsername" /> 20 <Setting name="HiveServerPassword" /> 21 <Setting name="HiveGroup" /> 19 22 </ConfigurationSettings> 20 23 </WorkerRole> -
branches/OaaS/HeuristicLab.Clients.Hive.Slave.Azure/ServiceDefinition.csdef
r8251 r9508 8 8 <Setting name="HiveServerAddress" /> 9 9 <Setting name="HiveServerCertifcateEncodedValue" /> 10 <Setting name="HiveServerUsername" /> 11 <Setting name="HiveServerPassword" /> 12 <Setting name="HiveGroup" /> 10 13 </ConfigurationSettings> 11 14 </WorkerRole> -
branches/OaaS/HeuristicLab.Clients.Hive.Slave.AzureClient/3.3/HeuristicLab.Clients.Hive.Slave.AzureClient-3.3.csproj
r8243 r9508 39 39 </PropertyGroup> 40 40 <ItemGroup> 41 <Reference Include="HeuristicLab.Clients.Hive-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 42 <SpecificVersion>False</SpecificVersion> 43 <HintPath>..\..\bin\HeuristicLab.Clients.Hive-3.3.dll</HintPath> 44 </Reference> 45 <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 46 <SpecificVersion>False</SpecificVersion> 47 <HintPath>..\..\bin\HeuristicLab.Common-3.3.dll</HintPath> 48 </Reference> 49 <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 50 <SpecificVersion>False</SpecificVersion> 51 <HintPath>..\..\bin\HeuristicLab.Core-3.3.dll</HintPath> 52 </Reference> 41 53 <Reference Include="Microsoft.WindowsAzure.Configuration, Version=1.7.0.0, Culture=neutral, processorArchitecture=MSIL"> 42 54 <HintPath>..\packages\Microsoft.WindowsAzure.ConfigurationManager.1.7.0.0\lib\net35-full\Microsoft.WindowsAzure.Configuration.dll</HintPath> … … 50 62 <Reference Include="System.Core" /> 51 63 <Reference Include="System.Data.Services.Client" /> 64 <Reference Include="System.Runtime.Serialization" /> 52 65 <Reference Include="System.Xml.Linq" /> 53 66 <Reference Include="System.Data.DataSetExtensions" /> … … 58 71 <ItemGroup> 59 72 <Compile Include="Constants.cs" /> 73 <Compile Include="HiveHelper.cs" /> 60 74 <Compile Include="Properties\AssemblyInfo.cs" /> 61 75 <Compile Include="WorkerRole.cs" /> -
branches/OaaS/HeuristicLab.Clients.Hive.Slave.AzureClient/3.3/WorkerRole.cs
r9375 r9508 34 34 35 35 public class WorkerRole : RoleEntryPoint { 36 private Core core;36 private HeuristicLab.Clients.Hive.SlaveCore.Core core; 37 37 private Thread coreThread; 38 38 … … 43 43 try { 44 44 LogError(new Exception("Starting Run()...")); 45 core = new Core(false);45 core = new HeuristicLab.Clients.Hive.SlaveCore.Core(false); 46 46 47 47 string hiveServerAddress = RoleEnvironment.GetConfigurationSettingValue(HiveServerAddressSetting); … … 55 55 coreThread = new Thread(core.Start); 56 56 coreThread.Start(); 57 58 WcfService.Instance.Connected += new EventHandler((sender, e) => { 59 HiveHelper.RegisterSlaveToGroup(RoleEnvironment.GetConfigurationSettingValue("HiveGroup")); 60 }); 57 61 58 62 LogError(new Exception("Run(): Core started successfullly")); -
branches/OaaS/HeuristicLab.Clients.Hive/3.3/ConcurrentTaskDownloader.cs
r9363 r9508 35 35 private Semaphore downloadSemaphore; 36 36 private Semaphore deserializeSemaphore; 37 private IHiveServiceLocator locator; 37 38 38 public ConcurrentTaskDownloader(int concurrentDownloads, int concurrentDeserializations) { 39 public ConcurrentTaskDownloader(int concurrentDownloads, int concurrentDeserializations) : this(concurrentDownloads, concurrentDeserializations, HiveServiceLocator.Instance) { 40 } 41 42 public ConcurrentTaskDownloader(int concurrentDownloads, int concurrentDeserializations, IHiveServiceLocator locator) { 39 43 downloadSemaphore = new Semaphore(concurrentDownloads, concurrentDownloads); 44 this.locator = locator; 40 45 deserializeSemaphore = new Semaphore(concurrentDeserializations, concurrentDeserializations); 41 46 } … … 70 75 Task t = null; 71 76 HiveClient.TryAndRepeat(() => { 72 t = HiveServiceLocator.Instance.CallHiveService(s => s.GetTask((Guid)taskId));77 t = locator.CallHiveService(s => s.GetTask((Guid)taskId)); 73 78 }, Settings.Default.MaxRepeatServiceCalls, "Failed to download task."); 74 79 return t; … … 85 90 if (abort) return null; 86 91 HiveClient.TryAndRepeat(() => { 87 result = HiveServiceLocator.Instance.CallHiveService(s => s.GetTaskData(task.Id));92 result = locator.CallHiveService(s => s.GetTaskData(task.Id)); 88 93 }, Settings.Default.MaxRepeatServiceCalls, "Failed to download task data."); 89 94 } -
branches/OaaS/HeuristicLab.Clients.Hive/3.3/HiveClient.cs
r9363 r9508 74 74 set { isAllowedPrivileged = value; } 75 75 } 76 77 private IHiveServiceLocator serviceLocator; 78 public IHiveServiceLocator ServiceLocator 79 { 80 get { 81 if (serviceLocator == null) 82 serviceLocator = HiveServiceLocator.Instance; 83 return serviceLocator; 84 } 85 set { serviceLocator = value; } 86 } 87 76 88 #endregion 89 90 77 91 78 92 private HiveClient() { … … 107 121 108 122 try { 109 IsAllowedPrivileged = HiveServiceLocator.Instance.CallHiveService((s) => s.IsAllowedPrivileged());123 IsAllowedPrivileged = ServiceLocator.CallHiveService((s) => s.IsAllowedPrivileged()); 110 124 111 125 jobs = new HiveItemCollection<RefreshableJob>(); 112 var jobsLoaded = HiveServiceLocator.Instance.CallHiveService<IEnumerable<Job>>(s => s.GetJobs());126 var jobsLoaded = ServiceLocator.CallHiveService<IEnumerable<Job>>(s => s.GetJobs()); 113 127 114 128 foreach (var j in jobsLoaded) { … … 144 158 #region Store 145 159 public static void Store(IHiveItem item, CancellationToken cancellationToken) { 160 Store(item, cancellationToken, HiveServiceLocator.Instance); 161 } 162 163 public static void Store(IHiveItem item, CancellationToken cancellationToken, IHiveServiceLocator locator) { 146 164 if (item.Id == Guid.Empty) { 147 165 if (item is RefreshableJob) { 148 HiveClient.Instance.UploadJob((RefreshableJob)item, cancellationToken );166 HiveClient.Instance.UploadJob((RefreshableJob)item, cancellationToken, locator); 149 167 } 150 168 if (item is JobPermission) { 151 169 var hep = (JobPermission)item; 152 hep.GrantedUserId = HiveServiceLocator.Instance.CallHiveService((s) => s.GetUserIdByUsername(hep.GrantedUserName));170 hep.GrantedUserId = locator.CallHiveService((s) => s.GetUserIdByUsername(hep.GrantedUserName)); 153 171 if (hep.GrantedUserId == Guid.Empty) { 154 172 throw new ArgumentException(string.Format("The user {0} was not found.", hep.GrantedUserName)); 155 173 } 156 HiveServiceLocator.Instance.CallHiveService((s) => s.GrantPermission(hep.JobId, hep.GrantedUserId, hep.Permission));174 locator.CallHiveService((s) => s.GrantPermission(hep.JobId, hep.GrantedUserId, hep.Permission)); 157 175 } 158 176 } else { 159 177 if (item is Job) 160 HiveServiceLocator.Instance.CallHiveService(s => s.UpdateJob((Job)item)); 161 } 162 } 178 locator.CallHiveService(s => s.UpdateJob((Job)item)); 179 } 180 } 181 163 182 public static void StoreAsync(Action<Exception> exceptionCallback, IHiveItem item, CancellationToken cancellationToken) { 183 StoreAsync(exceptionCallback, item, cancellationToken, HiveServiceLocator.Instance); 184 } 185 186 public static void StoreAsync(Action<Exception> exceptionCallback, IHiveItem item, CancellationToken cancellationToken, IHiveServiceLocator locator) { 164 187 var call = new Func<Exception>(delegate() { 165 188 try { 166 Store(item, cancellationToken );189 Store(item, cancellationToken, locator); 167 190 } 168 191 catch (Exception ex) { … … 180 203 #region Delete 181 204 public static void Delete(IHiveItem item) { 205 Delete(item, HiveServiceLocator.Instance); 206 } 207 208 public static void Delete(IHiveItem item, IHiveServiceLocator locator) { 182 209 if (item.Id == Guid.Empty && item.GetType() != typeof(JobPermission)) 183 210 return; 184 211 185 212 if (item is Job) 186 HiveServiceLocator.Instance.CallHiveService(s => s.DeleteJob(item.Id));213 locator.CallHiveService(s => s.DeleteJob(item.Id)); 187 214 if (item is RefreshableJob) { 188 215 RefreshableJob job = (RefreshableJob)item; … … 190 217 job.StopResultPolling(); 191 218 } 192 HiveServiceLocator.Instance.CallHiveService(s => s.DeleteJob(item.Id));219 locator.CallHiveService(s => s.DeleteJob(item.Id)); 193 220 } 194 221 if (item is JobPermission) { 195 222 var hep = (JobPermission)item; 196 HiveServiceLocator.Instance.CallHiveService(s => s.RevokePermission(hep.JobId, hep.GrantedUserId));223 locator.CallHiveService(s => s.RevokePermission(hep.JobId, hep.GrantedUserId)); 197 224 } 198 225 item.Id = Guid.Empty; … … 219 246 220 247 public static void StartJob(Action<Exception> exceptionCallback, RefreshableJob refreshableJob, CancellationToken cancellationToken) { 248 StartJob(exceptionCallback, refreshableJob, cancellationToken, HiveServiceLocator.Instance); 249 } 250 251 public static void StartJob(Action<Exception> exceptionCallback, RefreshableJob refreshableJob, CancellationToken cancellationToken, IHiveServiceLocator locator) { 221 252 HiveClient.StoreAsync( 222 253 new Action<Exception>((Exception ex) => { 223 254 refreshableJob.ExecutionState = ExecutionState.Prepared; 224 255 exceptionCallback(ex); 225 }), refreshableJob, cancellationToken );256 }), refreshableJob, cancellationToken, locator); 226 257 refreshableJob.ExecutionState = ExecutionState.Started; 227 258 } 228 259 229 260 public static void PauseJob(RefreshableJob refreshableJob) { 230 HiveServiceLocator.Instance.CallHiveService(service => { 261 PauseJob(refreshableJob, HiveServiceLocator.Instance); 262 } 263 264 public static void PauseJob(RefreshableJob refreshableJob, IHiveServiceLocator locator) { 265 locator.CallHiveService(service => { 231 266 foreach (HiveTask task in refreshableJob.GetAllHiveTasks()) { 232 267 if (task.Task.State != TaskState.Finished && task.Task.State != TaskState.Aborted && task.Task.State != TaskState.Failed) … … 238 273 239 274 public static void StopJob(RefreshableJob refreshableJob) { 240 HiveServiceLocator.Instance.CallHiveService(service => { 275 StopJob(refreshableJob, HiveServiceLocator.Instance); 276 } 277 278 public static void StopJob(RefreshableJob refreshableJob, IHiveServiceLocator locator) { 279 locator.CallHiveService(service => { 241 280 foreach (HiveTask task in refreshableJob.GetAllHiveTasks()) { 242 281 if (task.Task.State != TaskState.Finished && task.Task.State != TaskState.Aborted && task.Task.State != TaskState.Failed) … … 248 287 249 288 public static void ResumeJob(RefreshableJob refreshableJob) { 250 HiveServiceLocator.Instance.CallHiveService(service => { 289 ResumeJob(refreshableJob, HiveServiceLocator.Instance); 290 } 291 292 public static void ResumeJob(RefreshableJob refreshableJob, IHiveServiceLocator locator) { 293 locator.CallHiveService(service => { 251 294 foreach (HiveTask task in refreshableJob.GetAllHiveTasks()) { 252 295 if (task.Task.State == TaskState.Paused) { … … 262 305 private static object jobCountLocker = new object(); 263 306 private static object pluginLocker = new object(); 264 private void UploadJob(RefreshableJob refreshableJob, CancellationToken cancellationToken) { 307 private void UploadJob(RefreshableJob refreshableJob, CancellationToken cancellationToken) 308 { 309 UploadJob(refreshableJob, cancellationToken, HiveServiceLocator.Instance); 310 } 311 312 private void UploadJob(RefreshableJob refreshableJob, CancellationToken cancellationToken, IHiveServiceLocator locator) { 265 313 try { 266 314 refreshableJob.IsProgressing = true; … … 269 317 var resourceIds = new List<Guid>(); 270 318 foreach (var resourceName in resourceNames) { 271 Guid resourceId = HiveServiceLocator.Instance.CallHiveService((s) => s.GetResourceId(resourceName));319 Guid resourceId = locator.CallHiveService((s) => s.GetResourceId(resourceName)); 272 320 if (resourceId == Guid.Empty) { 273 321 throw new ResourceNotFoundException(string.Format("Could not find the resource '{0}'", resourceName)); … … 282 330 // upload Job 283 331 refreshableJob.Progress.Status = "Uploading Job..."; 284 refreshableJob.Job.Id = HiveServiceLocator.Instance.CallHiveService((s) => s.AddJob(refreshableJob.Job));332 refreshableJob.Job.Id = locator.CallHiveService((s) => s.AddJob(refreshableJob.Job)); 285 333 bool isPrivileged = refreshableJob.Job.IsPrivileged; 286 refreshableJob.Job = HiveServiceLocator.Instance.CallHiveService((s) => s.GetJob(refreshableJob.Job.Id)); // update owner and permissions334 refreshableJob.Job = locator.CallHiveService((s) => s.GetJob(refreshableJob.Job.Id)); // update owner and permissions 287 335 refreshableJob.Job.IsPrivileged = isPrivileged; 288 336 cancellationToken.ThrowIfCancellationRequested(); … … 294 342 // upload plugins 295 343 refreshableJob.Progress.Status = "Uploading plugins..."; 296 this.OnlinePlugins = HiveServiceLocator.Instance.CallHiveService((s) => s.GetPlugins());344 this.OnlinePlugins = locator.CallHiveService((s) => s.GetPlugins()); 297 345 this.AlreadyUploadedPlugins = new List<Plugin>(); 298 Plugin configFilePlugin = HiveServiceLocator.Instance.CallHiveService((s) => UploadConfigurationFile(s, onlinePlugins));346 Plugin configFilePlugin = locator.CallHiveService((s) => UploadConfigurationFile(s, onlinePlugins)); 299 347 this.alreadyUploadedPlugins.Add(configFilePlugin); 300 348 cancellationToken.ThrowIfCancellationRequested(); … … 306 354 foreach (HiveTask hiveTask in refreshableJob.HiveTasks) { 307 355 var task = TS.Task.Factory.StartNew((hj) => { 308 UploadTaskWithChildren(refreshableJob.Progress, (HiveTask)hj, null, resourceIds, jobCount, totalJobCount, configFilePlugin.Id, refreshableJob.Job.Id, refreshableJob.Log, refreshableJob.Job.IsPrivileged, cancellationToken );356 UploadTaskWithChildren(refreshableJob.Progress, (HiveTask)hj, null, resourceIds, jobCount, totalJobCount, configFilePlugin.Id, refreshableJob.Job.Id, refreshableJob.Log, refreshableJob.Job.IsPrivileged, cancellationToken, locator); 309 357 }, hiveTask); 310 358 task.ContinueWith((x) => refreshableJob.Log.LogException(x.Exception), TaskContinuationOptions.OnlyOnFaulted); … … 347 395 } 348 396 397 private void UploadTaskWithChildren(Progress progress, HiveTask hiveTask, HiveTask parentHiveTask, IEnumerable<Guid> groups, int[] taskCount, int totalJobCount, Guid configPluginId, Guid jobId, ILog log, bool isPrivileged, CancellationToken cancellationToken) 398 { 399 UploadTaskWithChildren(progress, hiveTask, parentHiveTask, groups, taskCount, totalJobCount, configPluginId, jobId, log, isPrivileged, cancellationToken, HiveServiceLocator.Instance); 400 } 401 349 402 /// <summary> 350 403 /// Uploads the given task and all its child-jobs while setting the proper parentJobId values for the childs 351 404 /// </summary> 352 405 /// <param name="parentHiveTask">shall be null if its the root task</param> 353 private void UploadTaskWithChildren(Progress progress, HiveTask hiveTask, HiveTask parentHiveTask, IEnumerable<Guid> groups, int[] taskCount, int totalJobCount, Guid configPluginId, Guid jobId, ILog log, bool isPrivileged, CancellationToken cancellationToken ) {406 private void UploadTaskWithChildren(Progress progress, HiveTask hiveTask, HiveTask parentHiveTask, IEnumerable<Guid> groups, int[] taskCount, int totalJobCount, Guid configPluginId, Guid jobId, ILog log, bool isPrivileged, CancellationToken cancellationToken, IHiveServiceLocator locator) { 354 407 taskUploadSemaphore.WaitOne(); 355 408 bool semaphoreReleased = false; … … 376 429 if (!cancellationToken.IsCancellationRequested) { 377 430 lock (pluginLocker) { 378 HiveServiceLocator.Instance.CallHiveService((s) => hiveTask.Task.PluginsNeededIds = PluginUtil.GetPluginDependencies(s, this.onlinePlugins, this.alreadyUploadedPlugins, plugins));431 locator.CallHiveService((s) => hiveTask.Task.PluginsNeededIds = PluginUtil.GetPluginDependencies(s, this.onlinePlugins, this.alreadyUploadedPlugins, plugins)); 379 432 } 380 433 } … … 389 442 if (!cancellationToken.IsCancellationRequested) { 390 443 if (parentHiveTask != null) { 391 hiveTask.Task.Id = HiveServiceLocator.Instance.CallHiveService((s) => s.AddChildTask(parentHiveTask.Task.Id, hiveTask.Task, taskData));444 hiveTask.Task.Id = locator.CallHiveService((s) => s.AddChildTask(parentHiveTask.Task.Id, hiveTask.Task, taskData)); 392 445 } else { 393 hiveTask.Task.Id = HiveServiceLocator.Instance.CallHiveService((s) => s.AddTask(hiveTask.Task, taskData, groups.ToList()));446 hiveTask.Task.Id = locator.CallHiveService((s) => s.AddTask(hiveTask.Task, taskData, groups.ToList())); 394 447 } 395 448 } … … 406 459 var task = TS.Task.Factory.StartNew((tuple) => { 407 460 var arguments = (Tuple<HiveTask, HiveTask>)tuple; 408 UploadTaskWithChildren(progress, arguments.Item1, arguments.Item2, groups, taskCount, totalJobCount, configPluginId, jobId, log, isPrivileged, cancellationToken );461 UploadTaskWithChildren(progress, arguments.Item1, arguments.Item2, groups, taskCount, totalJobCount, configPluginId, jobId, log, isPrivileged, cancellationToken, locator); 409 462 }, new Tuple<HiveTask, HiveTask>(child, hiveTask)); 410 463 task.ContinueWith((x) => log.LogException(x.Exception), TaskContinuationOptions.OnlyOnFaulted); … … 421 474 422 475 #region Download Experiment 423 public static void LoadJob(RefreshableJob refreshableJob) { 476 public static void LoadJob(RefreshableJob refreshableJob) 477 { 478 LoadJob(refreshableJob, HiveServiceLocator.Instance); 479 } 480 481 public static void LoadJob(RefreshableJob refreshableJob, IHiveServiceLocator locator) 482 { 424 483 var hiveExperiment = refreshableJob.Job; 425 484 refreshableJob.IsProgressing = true; … … 434 493 // fetch all task objects to create the full tree of tree of HiveTask objects 435 494 refreshableJob.Progress.Status = "Downloading list of tasks..."; 436 allTasks = HiveServiceLocator.Instance.CallHiveService(s => s.GetLightweightJobTasksWithoutStateLog(hiveExperiment.Id));495 allTasks = locator.CallHiveService(s => s.GetLightweightJobTasksWithoutStateLog(hiveExperiment.Id)); 437 496 totalJobCount = allTasks.Count(); 438 497 439 498 refreshableJob.Progress.Status = "Downloading tasks..."; 440 downloader = new TaskDownloader(allTasks.Select(x => x.Id) );499 downloader = new TaskDownloader(allTasks.Select(x => x.Id), locator); 441 500 downloader.StartAsync(); 442 501 … … 501 560 502 561 public static ItemTask LoadItemJob(Guid jobId) { 503 TaskData taskData = HiveServiceLocator.Instance.CallHiveService(s => s.GetTaskData(jobId)); 562 return LoadItemJob(jobId, HiveServiceLocator.Instance); 563 } 564 565 public static ItemTask LoadItemJob(Guid jobId, IHiveServiceLocator locator) { 566 TaskData taskData = locator.CallHiveService(s => s.GetTaskData(jobId)); 504 567 try { 505 568 return PersistenceUtil.Deserialize<ItemTask>(taskData.Data); … … 526 589 527 590 public static HiveItemCollection<JobPermission> GetJobPermissions(Guid jobId) { 528 return HiveServiceLocator.Instance.CallHiveService((service) => { 591 return GetJobPermissions(jobId, HiveServiceLocator.Instance); 592 } 593 594 public static HiveItemCollection<JobPermission> GetJobPermissions(Guid jobId, IHiveServiceLocator locator) { 595 return locator.CallHiveService((service) => { 529 596 IEnumerable<JobPermission> jps = service.GetJobPermissions(jobId); 530 597 foreach (var hep in jps) { -
branches/OaaS/HeuristicLab.Clients.Hive/3.3/TaskDownloader.cs
r9363 r9508 78 78 } 79 79 80 public TaskDownloader(IEnumerable<Guid> jobIds ) {80 public TaskDownloader(IEnumerable<Guid> jobIds, IHiveServiceLocator locator) { 81 81 this.taskIds = jobIds; 82 this.taskDownloader = new ConcurrentTaskDownloader<ItemTask>(Settings.Default.MaxParallelDownloads, Settings.Default.MaxParallelDownloads );83 this.taskDownloader.ExceptionOccured += new EventHandler<EventArgs<Exception>>(taskDownloader_ExceptionOccured); 82 this.taskDownloader = new ConcurrentTaskDownloader<ItemTask>(Settings.Default.MaxParallelDownloads, Settings.Default.MaxParallelDownloads, locator); 83 this.taskDownloader.ExceptionOccured += new EventHandler<EventArgs<Exception>>(taskDownloader_ExceptionOccured); 84 84 this.results = new Dictionary<Guid, HiveTask>(); 85 85 } -
branches/OaaS/HeuristicLab.Services.Optimization.Controller/Azure/DAL.cs
r9395 r9508 225 225 } 226 226 227 //private Experiment Convert(ExperimentEntity entity, string entityJson) {228 // // TODO: Read the whole experiment, not just the names!229 // var exp = new Experiment() { Name = entity.RowKey.Split('_')[1] };230 // foreach (var scenarioName in entity.Algorithms.Split(','))231 // exp.Algorithm.Add(new Algorithm() { Name = scenarioName });232 // return exp;233 //}234 235 227 public IEnumerable<Model.Experiment> GetExperiments(string user, bool namesOnly=false) { 236 228 TableServiceContext serviceContext = TableClient.GetDataServiceContext(); -
branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/HLMapper.cs
r9166 r9508 37 37 public static DoubleMatrix ConvertToDoubleMatrix(Parameter parameter) { 38 38 var matrix = parameter.Value as DecimalMatrix; 39 // TODO: Check for empty matrices 39 40 if (matrix.Value.Length == 0 || matrix.Value[0].Length == 0) { 41 return new DoubleMatrix(new double[0, 0]); 42 } 43 40 44 double[,] data = new double[matrix.Value.Length, matrix.Value[0].Length]; 41 45 for (int i=0; i < matrix.Value.Length; i++) { -
branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/HiveScenarioManager.cs
r9395 r9508 81 81 82 82 public bool DispatchExperiment(User user, Model.Experiment exp, JobExecutionDetails details) { 83 // TODO: Determine how to build a tree of IAlgorithm84 83 // For now the experiment will be flatened for execution 85 84 HeuristicLab.Optimization.Experiment hiveExperiment = new HeuristicLab.Optimization.Experiment(exp.Name); … … 94 93 var entry = stack.Pop(); 95 94 // handle current entry 96 97 // TODO: Store scenario name in entry.Child.Mapper when saving98 95 foreach (var child in entry.Children) { 99 96 // This is a template experiment; … … 215 212 } 216 213 job.HiveTasks.Add(new OptimizerHiveTask(exp)); 217 var service = ConfigureHive(user); 218 219 // TODO: Fix HiveClient class to be not dependent on singleton HiveServiceLocator!!! 220 HiveServiceLocator.Instance.Username = user.Username; 221 HiveServiceLocator.Instance.Password = user.Password; 222 HiveServiceLocator.Instance.EndpointConfigurationName = Configuration.HiveEndpointName; 223 HiveClient.Store(job, new CancellationToken()); 214 215 var locator = ConfigureHive(user); 216 HiveClient.Store(job, new CancellationToken(), locator); 224 217 225 218 job.StopResultPolling(); … … 277 270 taskIds.Add(task.Id); 278 271 } 279 280 // TODO: Fix problems with the HiveServiceLocater singleton!!! 281 HiveServiceLocator.Instance.Username = user.Username; 282 HiveServiceLocator.Instance.Password = user.Password; 283 HiveServiceLocator.Instance.EndpointConfigurationName = Configuration.HiveEndpointName; 284 TaskDownloader downloader = new TaskDownloader(taskIds); 272 273 TaskDownloader downloader = new TaskDownloader(taskIds, ConfigureHive(user)); 285 274 downloader.StartAsync(); 286 275 while (!downloader.IsFinished) { … … 291 280 } 292 281 } 293 //var experiment = dal.JobDao.FindByJobId(user.Username, id);294 282 295 283 IDictionary<Guid, HiveTask> hiveTasks = downloader.Results; … … 330 318 return runs; 331 319 } 332 333 //TODO: We might need images / +++334 320 335 321 private Parameter MapHiveDataType(string name, IItem item) { … … 341 327 var result = new Parameter(); 342 328 result.Type = ParameterType.String; 343 //TODO: How shall we handle dll specific datatypes?344 //if (item is PathTSPTour) {345 // var tour = item as PathTSPTour;346 //}347 //else348 329 if (item is IStringConvertibleValue) { 349 330 var value = (item as IStringConvertibleValue).GetValue(); … … 440 421 result.Value = new HeuristicLab.Services.Optimization.ControllerService.Model.StringValue() { Name = name, Value = item.ItemName != null ? item.ItemName + " (Cannot be displayed properly as string)" : "Cannot be displayed properly as string" }; 441 422 } 442 // TODO: Add workaround for TSP443 423 return result; 444 424 } … … 541 521 542 522 public Model.Task GetTaskData(User u, string jobId, string taskId) { 543 ConfigureHive(u); 544 HiveServiceLocator.Instance.Username = u.Username; 545 HiveServiceLocator.Instance.Password = u.Password; 546 HiveServiceLocator.Instance.EndpointConfigurationName = Configuration.HiveEndpointName; 547 TaskDownloader downloader = new TaskDownloader(new List<Guid>(){Guid.Parse(taskId)}); 523 TaskDownloader downloader = new TaskDownloader(new List<Guid>(){Guid.Parse(taskId)}, ConfigureHive(u)); 548 524 downloader.StartAsync(); 549 525 while (!downloader.IsFinished) { … … 583 559 // push all elements to dictionary 584 560 foreach (var task in jobTasks) { 585 // TODO: Crawl children + parent and create hierarchy!586 561 var children = serviceLocator.CallHiveService<IEnumerable<HeuristicLab.Clients.Hive.LightweightTask>>(s => s.GetLightweightChildTasks(Guid.Parse(jobId), true, true)); 587 562 foreach (var child in children) { -
branches/OaaS/HeuristicLab.Services.Optimization.Controller/HeuristicLab.Services.Optimization.ControllerService.csproj
r9350 r9508 177 177 <Compile Include="Interfaces\IScenarioManager.cs" /> 178 178 <Compile Include="Interfaces\Model\ControllerModel.cs" /> 179 <Compile Include="Logging\TableStorageTraceListener.cs" /> 179 180 <Compile Include="Mockup\MockupDAL.cs" /> 180 181 <Compile Include="Mockup\MockupScenarioManager.cs" /> -
branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/IControllerService.cs
r9395 r9508 8 8 9 9 namespace HeuristicLab.Services.Optimization.ControllerService { 10 /// <summary> 11 /// The ControllerService represents the entry point of 12 /// the OaaS backend. It contains all possible operations 13 /// of OaaS. 14 /// </summary> 10 15 [ServiceContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)] 11 16 public interface IControllerService { 17 /// <summary> 18 /// Retrieves all available scenarios, including all 19 /// their information. 20 /// </summary> 21 /// <returns>All scenarios</returns> 12 22 [OperationContract] 13 23 IEnumerable<OptimizationScenario> GetOptimizationScenarios(); 14 24 25 /// <summary> 26 /// Returns the names of all scenarios. This doesn't load 27 /// parameters or other scenario specific data. 28 /// </summary> 29 /// <returns> 30 /// The names of the scenarios, 31 /// e. g. ["Benchmark Algorithm", "Genetic Algorithm - TSP"] 32 /// </returns> 15 33 [OperationContract] 16 34 IEnumerable<string> GetOptimizationScenarioNames(); 17 35 36 /// <summary> 37 /// Retrieves a scenario by a given name including all of 38 /// it's data. 39 /// </summary> 40 /// <param name="name"> 41 /// The scenario to lookup, e. g. "Benchmark Algorithm" 42 /// </param> 43 /// <returns></returns> 18 44 [OperationContract] 19 45 OptimizationScenario GetOptimizationScenarioByName(string name); 20 46 47 /// <summary> 48 /// Schedules a scenario for certain user. 49 /// </summary> 50 /// <param name="user">The user which wants to execute a scenario.</param> 51 /// <param name="scenario">The scenario to execute.</param> 52 /// <param name="details">The title of the job, the number of repititions of the scenario and the group of the job.</param> 53 /// <returns>true, if the scenario has been successfully scheduled.</returns> 21 54 [OperationContract] 22 55 bool ScheduleOptimizationScenario(User user, OptimizationScenario scenario, JobExecutionDetails details); 23 56 57 /// <summary> 58 /// Schedules an experiment for a certain user. 59 /// </summary> 60 /// <param name="user">The user which wants to execute a scenario.</param> 61 /// <param name="experiment">The name of the experiment to schedule.</param> 62 /// <param name="details">The title of the job, the number of repititions of the experiment and the group of the job.</param> 63 /// <returns></returns> 24 64 [OperationContract] 25 65 bool ScheduleExperiment(User user, string experiment, JobExecutionDetails details); 26 66 67 /// <summary> 68 /// Returns all available jobs of a user. 69 /// </summary> 70 /// <param name="user">The user to query the jobs for.</param> 71 /// <returns>All jobs for a certain user.</returns> 27 72 [OperationContract] 28 73 IEnumerable<Job> GetJobs(User user); 29 74 75 /// <summary> 76 /// Retrievs a job by it's id. 77 /// </summary> 78 /// <param name="user">The owner of the job.</param> 79 /// <param name="id">The id of the job.</param> 80 /// <returns>The job with the given user and id.</returns> 30 81 [OperationContract] 31 82 Job GetJob(User user, string id); 32 83 84 /// <summary> 85 /// Deletes a job of a user. 86 /// </summary> 87 /// <param name="user">The owner of the job.</param> 88 /// <param name="id">The job to delete.</param> 89 /// <returns>true, if the job has been deleted.</returns> 33 90 [OperationContract] 34 91 bool DeleteJob(User user, string id); 35 92 93 /// <summary> 94 /// Returns the results of a job including the input parameters and result parameters. 95 /// </summary> 96 /// <param name="user">The owner of the job.</param> 97 /// <param name="id">The id of the job.</param> 98 /// <returns>The result and input parameters of the job.</returns> 36 99 [OperationContract] 37 100 IList<Model.Run> GetJobResults(User user, string id); 38 101 102 /// <summary> 103 /// Adds a new scenario to the system. This has to include a valid scenario xml representing all necessary inputs 104 /// for the new scenario and a scenario mapper which is capable of converting the OaaS-scenario-model into the 105 /// hive specific version. 106 /// Note: This method might be only usable by an underlying hive data access layer. 107 /// </summary> 108 /// <param name="user">The owner of the scenario (must have administrator privileges).</param> 109 /// <param name="scenarioXml">The new scenario to upload.</param> 110 /// <param name="scenarioMapper">The converter between OaaS-model and hive model.</param> 111 /// <returns>true, if the scenario has been successfully saved.</returns> 39 112 [OperationContract] 40 113 bool AddHiveScenario(User user, string scenarioXml, string scenarioMapper); 41 114 115 /// <summary> 116 /// Deletes a stored scenario including its xml and mapper. 117 /// </summary> 118 /// <param name="user">An administrator of the system.</param> 119 /// <param name="scenarioName">The name of the scenario.</param> 120 /// <returns>true, if the scenario has been deleted.</returns> 42 121 [OperationContract] 43 122 bool DeleteHiveScenario(User user, string scenarioName); 44 123 124 /// <summary> 125 /// Stores an experiment which is a tree of experiments and scenarios. 126 /// This method will schedule the experiment, if it contains job details. 127 /// </summary> 128 /// <param name="user">The owner of the experiment.</param> 129 /// <param name="experiment">The experiment including all of it's details.</param> 130 /// <returns>If scheduled it will return the job id. In every other case null will be returned.</returns> 45 131 [OperationContract] 46 132 string SaveExperiment(User user, Experiment experiment); 47 133 134 /// <summary> 135 /// Returns the names of the experiments for a certain user. 136 /// </summary> 137 /// <param name="user">The owner of the experiments.</param> 138 /// <returns>A list of experiment names.</returns> 48 139 [OperationContract] 49 140 IEnumerable<string> GetExperimentNames(User user); 50 141 142 /// <summary> 143 /// Returns all experiments. If "namesOnly" is false, the experiments include all of their details. 144 /// </summary> 145 /// <param name="user">The owner of the experiments.</param> 146 /// <param name="namesOnly">If true, returns only a list of experiments where only the Name parameter is set.</param> 147 /// <returns></returns> 51 148 [OperationContract] 52 149 IEnumerable<Experiment> GetExperiments(User user, bool namesOnly = false); 53 150 151 /// <summary> 152 /// TODO 153 /// </summary> 154 /// <param name="user"></param> 155 /// <param name="experiment"></param> 156 /// <returns></returns> 54 157 [OperationContract] 55 158 bool DeleteExperiment(User user, string experiment); -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/experiment.controller.js
r9335 r9508 36 36 loadingDialog.render(); 37 37 // send experiment to server 38 experimentModel.save({}, { success: function () { 39 loadingDialog.setLoading(false); 40 loadingDialog.text('Experiment successfully saved!'); 41 loadingDialog.render(); 42 if (availableExperiments) 43 availableExperiments.fetch({ cache: false, success: function (itm) { 44 selectableGroup.render(); 45 } 46 }); 47 } 38 experimentModel.save({}, { 39 success: function () { 40 loadingDialog.setLoading(false); 41 loadingDialog.text('Experiment successfully saved!'); 42 loadingDialog.render(); 43 if (availableExperiments) 44 availableExperiments.fetch({ cache: false, success: function (itm) { 45 selectableGroup.render(); 46 } 47 }); 48 }, 49 error: function (model, response, options) { 50 loadingDialog.setLoading(false); 51 loadingDialog.text('Failed to save Experiment - Please log off an and on and try again!'); 52 loadingDialog.render(); 53 } 48 54 }); 49 55 //loadingDialog.close(); -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/experiment.view.js
r9350 r9508 816 816 }, 817 817 render: function () { 818 if (this.model.models.length == 0) 819 return; 820 818 821 var self = this; 819 822 var ele = $(_.template($('#runcollection_template').html(), {})); … … 1039 1042 } else { 1040 1043 var valueProvider = _.find(this.model.models[i].get('results'), function (itm) { return itm.Name == self.bubbleSelect.val(); }); 1041 if (!valueProvider) 1044 if (!valueProvider) 1042 1045 valueProvider = _.find(this.model.models[i].get('params'), function (itm) { return itm.Name == self.bubbleSelect.val(); }); 1043 1046 1044 if (!valueProvider) { 1047 if (!valueProvider) { 1045 1048 size = this.options.bubbleSize; 1046 1049 } else { -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/job.controller.js
r9395 r9508 2 2 my.JobVisualExtensionListener = function (model, element) { 3 3 var extension = new OAAS_MODEL.VisualExtension({ id: model.get('algorithmName') }); 4 extension.fetch({ cache: true, success: function () { 5 //eval extension.js -> execute addVisualExtension(model, element): 6 var js = extension.get('ScenarioJs'); 7 if (js != null) { 8 (function (model, element) { 9 addExtension = undefined; 10 eval(js); 11 if (addExtension) 12 addExtension(model, element); 13 } (model, element)); 4 extension.fetch({ cache: true, 5 success: function () { 6 //eval extension.js -> execute addVisualExtension(model, element): 7 var js = extension.get('ScenarioJs'); 8 if (js != null) { 9 (function (model, element) { 10 addExtension = undefined; 11 eval(js); 12 if (addExtension) 13 addExtension(model, element); 14 } (model, element)); 15 } 16 }, 17 error: function (model, response, options) { 18 14 19 } 15 }16 20 }); 17 21 }, … … 35 39 var lv = new OAAS_VIEW.LoadingView({ el: $('#jobDetails'), model: 'Loading results of job...' }); 36 40 lv.render(); 37 runList.fetch({ cache: false, success: function () { 38 $('#jobDetails').empty(); 39 var div = $('<div/>').appendTo($('#jobDetails')); 40 var rv = new OAAS_VIEW.ResultView({ model: runList, el: div }); 41 listener.listenTo(rv, 'renderVisualExtension', my.JobVisualExtensionListener); 42 rv.render(); 43 var av = new OAAS_VIEW.AccordionView({ el: div }); 44 av.render(); 45 } 41 runList.fetch({ cache: false, 42 success: function () { 43 $('#jobDetails').empty(); 44 var div = $('<div/>').appendTo($('#jobDetails')); 45 if (runList.models && runList.models.length == 0) { 46 $('<p/>').text('No job results available!').appendTo(div); 47 return; 48 } 49 // else draw the result view 50 var rv = new OAAS_VIEW.ResultView({ model: runList, el: div }); 51 listener.listenTo(rv, 'renderVisualExtension', my.JobVisualExtensionListener); 52 rv.render(); 53 var av = new OAAS_VIEW.AccordionView({ el: div }); 54 av.render(); 55 }, 56 error: function (model, response, options) { 57 $('#jobDetails').empty(); 58 var lv = new OAAS_VIEW.LoadingView({ el: $('#jobDetails'), model: 'Error during retrieval!' }); 59 lv.render(); 60 } 46 61 }); 47 62 }); -
branches/OaaS/HeuristicLab.Services.Optimization.Web/HeuristicLab.Services.Optimization.Web.csproj
r9370 r9508 120 120 <Content Include="Content\experiment.view.js" /> 121 121 <Content Include="Content\ExperimentSupport.js" /> 122 <Compile Include="Binders\ AlgorithmJsonAttribute.cs" />122 <Compile Include="Binders\ExperimentJsonAttribute.cs" /> 123 123 <Compile Include="Controllers\AccountController.cs" /> 124 124 <Compile Include="Controllers\AdminController.cs" /> -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/_Layout.cshtml
r9335 r9508 13 13 <script src="@Url.Content("~/Scripts/jquery-ui-1.9.2.min.js")" type="text/javascript"></script> 14 14 <script src="@Url.Content("~/Scripts/modernizr-1.7.min.js")" type="text/javascript"></script> 15 <script src="@Url.Content("~/Content/Styling.js")" type="text/javascript"></script>16 15 17 16 <!--[if lt IE 9]><script language="javascript" type="text/javascript" src="/Content/jqplot/src/excanvas.js"></script><![endif]--> -
branches/OaaS/HeuristicLab.Services.Optimization/HeuristicLab.Services.Optimization.ccproj
r8817 r9508 38 38 </ItemGroup> 39 39 <ItemGroup> 40 <ProjectReference Include="..\HeuristicLab.Services.Hive.Scaler\HeuristicLab.Services.Optimization.Scaler.csproj"> 41 <Name>HeuristicLab.Services.Optimization.Scaler</Name> 42 <Project>{d03b1a10-9c88-4c4b-bccf-4f98cde863d3}</Project> 43 <Private>True</Private> 44 <RoleType>Worker</RoleType> 45 <RoleName>HeuristicLab.Services.Optimization.Scaler</RoleName> 46 <UpdateDiagnosticsConnectionStringOnPublish>True</UpdateDiagnosticsConnectionStringOnPublish> 47 </ProjectReference> 40 48 <ProjectReference Include="..\HeuristicLab.Services.Hive.WebRole\HeuristicLab.Services.Hive.WebRole.csproj"> 41 49 <Name>HeuristicLab.Services.Hive.WebRole</Name> -
branches/OaaS/HeuristicLab.Services.Optimization/ServiceConfiguration.Cloud.cscfg
r9371 r9508 1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <ServiceConfiguration serviceName="HeuristicLab.Services.Optimization" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="1" osVersion="*" schemaVersion="2012-05.1.7"> 3 <Role name="HeuristicLab.Services.Hive.WebRole">4 <Instances count="1" />5 <ConfigurationSettings>6 <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="ADJUST_ME" />7 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" />8 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="ADJUST_ME" />9 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="ADJUST_ME" />10 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="ADJUST_ME" />11 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled" value="true" />12 </ConfigurationSettings>13 <Certificates>14 <Certificate name="ADJUST_ME" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" />15 <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" />16 </Certificates>17 </Role>18 3 <Role name="HeuristicLab.Services.Optimization.Web"> 19 4 <Instances count="1" /> 20 5 <ConfigurationSettings> 21 <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value=" ADJUST_ME"/>6 <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=ADJUST_ME;AccountKey=ADJUST_ME"/> 22 7 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" /> 23 8 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="hive" /> 24 9 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="ADJUST_ME" /> 25 10 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="ADJUST_ME" /> 26 <Setting name="Cloudia.WindowsAzure.Storage" value=" ADUST_ME" />11 <Setting name="Cloudia.WindowsAzure.Storage" value="DefaultEndpointsProtocol=https;AccountName=ADJUST_ME;AccountKey=ADJUST_ME" /> 27 12 <Setting name="HiveEndpointName" value="WSHttpBinding_Remote_IHiveService" /> 28 13 <Setting name="ControllerEndpointName" value="WSHttpBinding_Remote_IControllerService" /> … … 30 15 <Certificates> 31 16 <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" /> 32 <Certificate name="ADJUST_ME" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" /> 17 <Certificate name="localhost" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" /> 18 </Certificates> 19 </Role> 20 <Role name="HeuristicLab.Services.Optimization.Scaler"> 21 <Instances count="1" /> 22 <ConfigurationSettings> 23 <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=ADJUST_ME;AccountKey=ADJUST_ME" /> 24 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" /> 25 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="hive" /> 26 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="ADJUST_ME" /> 27 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="ADJUST_ME" /> 28 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled" value="true" /> 29 <Setting name="StorageConnectionString" value="DefaultEndpointsProtocol=https;AccountName=ADJUST_ME;AccountKey=ADJUST_ME" /> 30 <Setting name="TraceTable" value="ScalerTraceTable" /> 31 <Setting name="TraceTableEnabled" value="false" /> 32 </ConfigurationSettings> 33 <Certificates> 34 <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" /> 35 <Certificate name="Azure Service Management" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" /> 36 </Certificates> 37 </Role> 38 <Role name="HeuristicLab.Services.Hive.WebRole"> 39 <Instances count="1" /> 40 <ConfigurationSettings> 41 <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=ADJUST_ME;AccountKey=ADJUST_ME" /> 42 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" /> 43 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="hive" /> 44 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="ADJUST_ME" /> 45 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="ADJUST_ME" /> 46 </ConfigurationSettings> 47 <Certificates> 48 <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" /> 49 <Certificate name="localhost" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" /> 33 50 </Certificates> 34 51 </Role> -
branches/OaaS/HeuristicLab.Services.Optimization/ServiceConfiguration.Local.cscfg
r9371 r9508 1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <ServiceConfiguration serviceName="HeuristicLab.Services.Optimization" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="1" osVersion="*" schemaVersion="2012-05.1.7"> 3 <Role name="HeuristicLab.Services.Optimization.Web"> 4 <Instances count="1" /> 5 <ConfigurationSettings> 6 <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" /> 7 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" /> 8 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="hive" /> 9 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="ADJUST_ME" /> 10 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="ADJUST_ME" /> 11 <Setting name="Cloudia.WindowsAzure.Storage" value="DefaultEndpointsProtocol=https;AccountName=ADJUST_ME;AccountKey=ADJUST_ME" /> 12 <Setting name="HiveEndpointName" value="WSHttpBinding_Local_IHiveService" /> 13 <Setting name="ControllerEndpointName" value="WSHttpBinding_Local_IControllerService" /> 14 </ConfigurationSettings> 15 <Certificates> 16 <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" /> 17 <Certificate name="localhost" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" /> 18 </Certificates> 19 </Role> 20 <Role name="HeuristicLab.Services.Optimization.Scaler"> 21 <Instances count="1" /> 22 <ConfigurationSettings> 23 <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=ADJUST_ME;AccountKey=ADJUST_ME" /> 24 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" /> 25 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="hive" /> 26 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="ADJUST_ME" /> 27 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="ADJUST_ME" /> 28 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled" value="true" /> 29 <Setting name="StorageConnectionString" value="DefaultEndpointsProtocol=https;AccountName=ADJUST_ME;AccountKey=ADJUST_ME" /> 30 <Setting name="TraceTable" value="ScalerTraceTable" /> 31 <Setting name="TraceTableEnabled" value="true" /> 32 </ConfigurationSettings> 33 <Certificates> 34 <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" /> 35 <Certificate name="Azure Service Management" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" /> 36 </Certificates> 37 </Role> 3 38 <Role name="HeuristicLab.Services.Hive.WebRole"> 4 39 <Instances count="1" /> … … 9 44 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="ADJUST_ME" /> 10 45 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="ADJUST_ME" /> 11 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled" value="true" />12 </ConfigurationSettings>13 <Certificates>14 <Certificate name="ADJUST_ME" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" />15 <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" />16 </Certificates>17 </Role>18 <Role name="HeuristicLab.Services.Optimization.Web">19 <Instances count="1" />20 <ConfigurationSettings>21 <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" />22 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" />23 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="hive" />24 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="ADJUST_ME" />25 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="ADJUST_ME" />26 <Setting name="Cloudia.WindowsAzure.Storage" value="ADJUST_ME" />27 <Setting name="HiveEndpointName" value="WSHttpBinding_Local_IHiveService" />28 <Setting name="ControllerEndpointName" value="WSHttpBinding_Local_IControllerService" />29 46 </ConfigurationSettings> 30 47 <Certificates> 31 48 <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" /> 32 <Certificate name=" ADJUST_ME" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" />49 <Certificate name="localhost" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" /> 33 50 </Certificates> 34 51 </Role> -
branches/OaaS/HeuristicLab.Services.Optimization/ServiceDefinition.build.csdef
r9363 r9508 10 10 --> 11 11 <ServiceDefinition name="HeuristicLab.Services.Optimization" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2012-05.1.7"> 12 <WebRole name="HeuristicLab.Services.Hive.WebRole" vmsize="Small">13 <Sites>14 <Site name="Web">15 <Bindings>16 <Binding name="HttpIn" endpointName="HttpIn" />17 </Bindings>18 </Site>19 </Sites>20 <Endpoints>21 <InputEndpoint name="HttpIn" protocol="http" port="80" localPort="80" />22 </Endpoints>23 <Imports>24 <Import moduleName="Diagnostics" />25 <Import moduleName="RemoteAccess" />26 <Import moduleName="RemoteForwarder" />27 </Imports>28 <LocalResources>29 <LocalStorage name="HeuristicLab.Services.Hive.WebRole.svclog" sizeInMB="1000" cleanOnRoleRecycle="false" />30 </LocalResources>31 <Certificates>32 <Certificate name="localhost" storeLocation="LocalMachine" storeName="My" />33 </Certificates>34 <Contents>35 <Content destination=".\">36 <SourceDirectory path="rcf/Debug/HeuristicLab.Services.Hive.WebRoleContent\" />37 </Content>38 </Contents>39 </WebRole>40 12 <WebRole name="HeuristicLab.Services.Optimization.Web" vmsize="Small"> 41 13 <Sites> … … 62 34 </ConfigurationSettings> 63 35 </WebRole> 36 <WorkerRole name="HeuristicLab.Services.Optimization.Scaler" vmsize="Small"> 37 <Runtime executionContext="elevated" /> 38 <Imports> 39 <Import moduleName="Diagnostics" /> 40 <Import moduleName="RemoteAccess" /> 41 <Import moduleName="RemoteForwarder" /> 42 </Imports> 43 <ConfigurationSettings> 44 <Setting name="StorageConnectionString" /> 45 <Setting name="TraceTable" /> 46 <Setting name="TraceTableEnabled" /> 47 </ConfigurationSettings> 48 <Certificates> 49 <Certificate name="Azure Service Management" storeLocation="CurrentUser" storeName="My" /> 50 </Certificates> 51 </WorkerRole> 52 <WebRole name="HeuristicLab.Services.Hive.WebRole" vmsize="Small"> 53 <Sites> 54 <Site name="Web"> 55 <Bindings> 56 <Binding name="Endpoint1" endpointName="Endpoint1" /> 57 </Bindings> 58 </Site> 59 </Sites> 60 <Endpoints> 61 <InputEndpoint name="Endpoint1" protocol="http" port="80" /> 62 </Endpoints> 63 <Imports> 64 <Import moduleName="Diagnostics" /> 65 <Import moduleName="RemoteAccess" /> 66 </Imports> 67 <Certificates> 68 <Certificate name="localhost" storeLocation="LocalMachine" storeName="My" /> 69 </Certificates> 70 <Contents> 71 <Content destination=".\"> 72 <SourceDirectory path="rcf/Debug/HeuristicLab.Services.Hive.WebRoleContent\" /> 73 </Content> 74 </Contents> 75 </WebRole> 64 76 </ServiceDefinition> -
branches/OaaS/HeuristicLab.Services.Optimization/ServiceDefinition.csdef
r9166 r9508 1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <ServiceDefinition name="HeuristicLab.Services.Optimization" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2012-05.1.7"> 3 <WebRole name="HeuristicLab.Services.Hive.WebRole" vmsize="Small">4 <Sites>5 <Site name="Web">6 <Bindings>7 <Binding name="HttpIn" endpointName="HttpIn" />8 </Bindings>9 </Site>10 </Sites>11 <Endpoints>12 <InputEndpoint name="HttpIn" protocol="http" port="80" localPort="80" />13 </Endpoints>14 <Imports>15 <Import moduleName="Diagnostics" />16 <Import moduleName="RemoteAccess" />17 <Import moduleName="RemoteForwarder" />18 </Imports>19 <LocalResources>20 <LocalStorage name="HeuristicLab.Services.Hive.WebRole.svclog" sizeInMB="1000" cleanOnRoleRecycle="false" />21 </LocalResources>22 <Certificates>23 <Certificate name="localhost" storeLocation="LocalMachine" storeName="My" />24 </Certificates>25 </WebRole>26 3 <WebRole name="HeuristicLab.Services.Optimization.Web" vmsize="Small"> 27 4 <Sites> … … 48 25 </ConfigurationSettings> 49 26 </WebRole> 27 <WorkerRole name="HeuristicLab.Services.Optimization.Scaler" vmsize="Small"> 28 <Runtime executionContext="elevated" /> 29 <Imports> 30 <Import moduleName="Diagnostics" /> 31 <Import moduleName="RemoteAccess" /> 32 <Import moduleName="RemoteForwarder" /> 33 </Imports> 34 <ConfigurationSettings> 35 <Setting name="StorageConnectionString" /> 36 <Setting name="TraceTable" /> 37 <Setting name="TraceTableEnabled" /> 38 </ConfigurationSettings> 39 <Certificates> 40 <Certificate name="Azure Service Management" storeLocation="CurrentUser" storeName="My" /> 41 </Certificates> 42 </WorkerRole> 43 <WebRole name="HeuristicLab.Services.Hive.WebRole" vmsize="Small"> 44 <Sites> 45 <Site name="Web"> 46 <Bindings> 47 <Binding name="Endpoint1" endpointName="Endpoint1" /> 48 </Bindings> 49 </Site> 50 </Sites> 51 <Endpoints> 52 <InputEndpoint name="Endpoint1" protocol="http" port="80" /> 53 </Endpoints> 54 <Imports> 55 <Import moduleName="Diagnostics" /> 56 <Import moduleName="RemoteAccess" /> 57 </Imports> 58 <Certificates> 59 <Certificate name="localhost" storeLocation="LocalMachine" storeName="My" /> 60 </Certificates> 61 </WebRole> 50 62 </ServiceDefinition> -
branches/OaaS/packages/repositories.config
r9254 r9508 1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <repositories> 3 <repository path="..\HeuristicLab.Services.Hive.Scaler\packages.config" /> 4 <repository path="..\HeuristicLab.Services.Hive.WebRole\packages.config" /> 5 <repository path="..\HeuristicLab.Services.Optimization.Controller\packages.config" /> 3 6 <repository path="..\HeuristicLab.Services.Optimization.Web\packages.config" /> 4 <repository path="..\HeuristicLab.Services.Optimization.Controller\packages.config" />5 7 </repositories>
Note: See TracChangeset
for help on using the changeset viewer.