dsolovay / Sitecore-Instance-Manager

Dans's fork for hacking out a SOLR feature.
MIT License
0 stars 1 forks source link

Deploy Sitecore Solr DLLs and dependencies #9

Closed dsolovay closed 8 years ago

dsolovay commented 9 years ago

As described here: http://www.dansolovay.com/2013/05/setting-up-solr-with-sitecore-7.html, step 10.

dsolovay commented 9 years ago

There are two elements of this task:

  1. Remove the DLLs from \Website\bin that are for IOC options other than the selected one, and
  2. Load IOC DLLs for selected IOC.

For 1, we can do two things: A. The manifest has file delete functionality, but does not all the ability to condition based on a variable. One option would be to add logic to the ProcessActions method in ConfigurationsActions.cs to skip commands based on a condition attribute:

  <editfile path="/Website/bin/AutoacContrib.SolrNet.dll" >  
      <delete condition="{IOC Action} != 'Autofac'" />
  </editefile>

This would require adding some condition parsing logic, unless there is another mechanism for selectively executing actions. Another alternative would be to write a class to handle this, but I would like to keep this behavior in configuration as much as possible.

For the IOC framework classes, like Castle.Windsor.dll, should we: A. Write a class to download these from nuget.org, and extract the appropriate DLL, We could have logic to pull the most recent stable package and extract the DLLs from the net40 folder. B. Include DLLs with SIM?

@AlenPelin, I'm looking to you for direction on these questions. Thanks!

dsolovay commented 9 years ago

I moved the conditional logic discussion over to a separate issue (#15), since it is a fundamental change in how the manifests work.

AlenPelin commented 9 years ago
  1. Do we really need to delete other dlls? What if we just keep them in the folder?
  2. I like idea B. to include necessary dlls in SIM so we don't need to write much code.
dsolovay commented 9 years ago

I'll give this a try. I thought we might have name conflicts, but it's worth testing. Is there a location where we should put the DLLs?

AlenPelin commented 9 years ago

I think we can pack all necessary dlls into single .zip file, add it to assembly as embedded resources and then use ApplicationManager.GetEmbeddedApp API (https://github.com/Sitecore/Sitecore-Instance-Manager/commit/0e445916396716fa403090d804d224b90e998b5e) to extract it to %APPDATA%\Sitecore\Sitecore Instance Manager\Temp folder.

dsolovay commented 9 years ago

Nice! I'll give this a try.

dsolovay commented 9 years ago

@AlenPelin I have an idea. We could add the IOC containers as NuGet references to SIM.Tool.csproj, and then use a build step to create the zip file. This will make it easy to update the IOC DLLs by using the NuGet update package option. This would require adding a build library like NANT that supports creating zip files from build tasks. (http://nant.sourceforge.net/release/0.85/help/tasks/zip.html)

I will create the zip by hand for now, but let me know if you want me to leverage NuGet.

AlenPelin commented 9 years ago

Lets keep as simple as possible and just create a zip once manually, add it as a resource and forget about it :)