November Happy Hour will be moved to Thursday December 5th.

Creating a module package with EPiServer CMS 6 R2

Vote:
 

Hi everyone!

Starte to fiddle around with making a package installation for a module, I have come across some issues and questions tho.

(http://labs.episerver.com/en/Blogs/Fredrik-Tjarnberg/Dates/112488/12/Module-Installation-EPiServer-CMS-5-R2---Getting-started/)

1. To update episerver.config and web.config.xmlupdate, I would imagine that one creates a episerver.config.xmlupdate and adds
<File Id="XmlFileUpdate" Name="episerver.config.xmlupdate" Source="$(sys.SOURCEFILEDIR)"/>

It does nothing to transform the files tho.

Example web.config.xmlupdate:

<modifications>
<add path="/configuration/epi:episerver/epi:dynamicContent/epi:controls">
<add description="Dynamic content 1" name="Dynamic content 1" type="Namespace.DynamicContent1" ___keyAttributes="name" />
<add description="Dynamic content 2" name="Dynamic content 2" type="Namespace.DynamicContent2" ___keyAttributes="name" />
</add>

 

2. Getting variables from from user input in EPiServer Deployment center

In the mirroring module from EPiServer, it's possible to fetch user input and then use those variables. Is this possible with Wix? How does one do this? 
https://dl.dropbox.com/u/13492395/mirroring.png

 

Thanks  for your input :)

 

#59997
Jul 10, 2012 11:55
Vote:
 

1. You are using namespace in your modification file: <add path="/configuration/epi:episerver/epi:dynamicContent/epi:controls">. The namespace should be specified when this modification is being applied. 

How do you apply that xmlupdates? Do you use any PowerShell commandlet? Probably you don;t have to create separate xmlupdate files for each target file.

 

2. Following approach can be used for modules that requires complex deployment logic:

    1. Create installation wizards UI that can be used to collect user input.
    2. Create PowerShell script to install module on specific site. In this script you implement module deployment on specific site. You can instantiate UI wizards to display to user for input, copy module files on site, update config files, etc.
    3. Create Wix installer that contains module resources, assemblies and installation artifacts like scripts, xml modification files, etc.

Then user runs your installer it should copy all that stuff to modules directory in EPiServer installation folder, something like this C:\Program Files\EPiServer\CMS\version\Install\Modules\YourModuleName.
User can run Deployment Center and install the module on specific site running one of your PowerShell installation scripts that should be displayed in Deployment Center.

See more about Deployment Center, tasks  and scripts: http://world.episerver.com/Documentation/Items/Tech-Notes/EPiServer-CMS-6/EPiServer-CMS-6-R2/EPiServer-Deployment-Center/

You can consider another approach if you don't need complex deployment logic and UI. You can create simple ZIP module package with all your content and xml modifications, as it is described here. The article is about CMS 5, but it is still possible to install module from a compressed in CMS 6 Deployment Center.

#60000
Edited, Jul 10, 2012 13:05
Vote:
 

You can specify namespace for episerver.config updates as follows when you are using commandlets and EPiServer PowerShell snapin:

Update-EPiXmlFile -TargetFilePath "path to your web.config file" -ModificationFilePath "path to your xmlupdate file" -Namespaces "epi=http://EPiServer.Configuration.EPiServerSection;ms=urn:schemas-microsoft-com:asm.v1"

      

Note that target file is web.config.

#60001
Edited, Jul 10, 2012 13:14
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.