Is it possible to build a sitecore data package from command line, or outside of a web context? i.e. using nant - msbuild

The Sitecore package wizard can be used to build a package containing data and files for the local Sitecore instance.
Is it possible to build a Sitecore package (items only, files are not required) from the command line, or otherwise outside the context of a website? The idea is to use Nant to create a Sitecore data package. I'm aware of Hedgehog TDS, but this question is aimed at what can be done with the existing Sitecore api.

You should take a look at the Sitecore.Install.PackageGenerator class in the Sitecore.Kernel to see how you may go about creating traditional Sitecore packages.
However, you are looking to do this outside of a website context. How do you plan on getting items into the package if you don't have access to the Sitecore web site in which they exist? Before you try to create a package on your CI server I would think you would need to get the Sitecore items into source control so that you can work with them.
I think you have two real options here.
Roll your own solution, leveraging serialization APIs, for getting Sitecore items into source control and moving between environments
Hedgehog Development's Team Development for Sitecore
For more information on Sitecore serialization please check out the Sitecore Serialization Guide. Specifically, check out how Sitecore envisions you use "Sitecore Serialization with a Source Control System"
Also, do some digging around for others who have rolled their own solution around serialization. For instance, http://mcore.wordpress.com/2009/03/17/sitecore-serialization-for-version-control/

As skolima suggested... I've implemented and explained a solution using Sitecore Powershell Console here: http://blog.najmanowicz.com/2011/12/19/continuous-deployment-in-sitecore-with-powershell/

The PowerShell Console for Sitecore could be possibly extended for such scenarios (or simply scripted).

Check this link:
http://www.webdatasource.com/2011/08/exporting-and-importing-packages-from-sitecore-through-code-using-sitecore-api/
It describes a solution of creating and installing Sitecore packages using the API.

Check out Sitecore Courier Shared Source module. It compares two folders with serialized items and creates a diff package.
You can also browse the sources as an example of Sitecore.Update API usage.

Related

Migrating sitecore 7.1 search to sitecore 8.0

I am supposed to migrate a website from Sitecore 7.1 to 8.0
I am mainly concerned with Lucene Search and indexing part of search functionality which is to be migrated as well.
I just need a heads-up for errors and bugs for the same and a question (for which no answer was found on web) is that will the search functionality be severely affected by the migration? what care should be taken while migrating?
Any helpful and relevant links are appreciated.
From what comes into my mind, there were certain changes in search configuration
contentSearch/configuration/defaultIndexConfiguration/analyzer
has moved to:
contentSearch/indexConfigurations/defaultLuceneIndexConfiguration/analyzer
there were also changes in ContentSearch namespaces
Also check EncodedNameReplacements setting for media library as it may break some of your links.
If you are using modules - check modules compatibility table by this link https://kb.sitecore.net/articles/541788 as some of them may not yet be available for 8.0. Sitecore.Kernel is now on .NET 4.5 so please keep .NET version updgrade in mind as well
I usually get two clean installations with following versions and check configuration changes in diff tool, where applicable, you may find this practice helpful as well.
Please go carefully through upgrade notes from Sitecore and consider if they have to be performed on your solution. Official upgrade notes to 8.0 can be found here https://dev.sitecore.net/en/Downloads/Sitecore_Experience_Platform/8_0/Sitecore_Experience_Platform_8_0.aspx (but you may need SDN account to access that)
Some other useful references:
https://theagilecoder.wordpress.com/2015/03/09/keystone-considerations-when-upgrading-to-sitecore-7-5-or-sitecore-8/
http://laubplusco.net/quick-tip-upgrading-sitecore-fast-easy/
http://www.velir.com/blog/index.php/2015/06/25/the-art-of-the-sitecore-upgrade/

VSTO version 40820 download link

Where I can download VSTO Office Runtime version 10.0.40820?
I need link for this specific version, NOT for the newest one (http://go.microsoft.com/fwlink/?LinkId=158918).
Why I need this specific version? I created custom InstallShield .PRQ for VSTO that download file from web and checks if file is not corrupted using MD5 hash.
If I use generic download link and MS will deploy new version of VSTO then setup will complaint about corrupted file.
InstallShield has abstractions in their PRQ file that are meant to help but I have found problematic.
First, the PRQ itself can have a URL. This means that at runtime the PRQ embedded into the setup.exe will go try to download a newer version of itself from this URL. If this happens, the new XML is used and yours is ignored. This sounds like a good idea to keep things fresh and up to date but the CM Nazi in me see's this as a man in the middle vunerability that compromises the integrity of the build.
The second is that your XML or the downloaded XML both have URL attributes on the individual files. Again the CM Nazi in me says that while this seems like a good idea, it's really inserting an external dependency that isn't under my control and again violating the integrity of the build.
If it was me, I'd never use InstallShield and/or Microsoft URL's in my PRQ files. Host the content yourself and do change management of that so you can have complete control. If longevity of the build is desired then don't use web downloads in the first place. Bake it all into the EXE.
As for the exact question you asked, I'll have to google for it. But really I'd probably just move onto the latest version and then implement the above advice starting there.

Sitecore Automated Republish

Is there any way of automating a site publish with a given set of targets in Sitecore through the command line?
I have the PowerShell console installed however how do I know what commands it even supports? Documentation seems sparse.
I do recommend Sitecore Powershell Console created by Adam Najmanowicz. There is a lot of documentation and sample commands on his blog. You can find a code that will publish pages here http://blog.najmanowicz.com/2011/11/17/powershell-console-for-sitecore-what-can-it-do-for-me/.
More information and other commands can be found in other posts on his blog.

where can I get a XD version dojo source

WHere can I get a XD version of dojo source like the one hosted on google? What I want to do is to host dojo source from my local CDN, and my custom dojo module in my web application. Is this a good practice? or I might as well just include the dojo source in my web app, and run the custom build?
Thanks,
You can build an xd version of dojo from the source code
Here are instructions on how to do it:
http://dojotoolkit.org/reference-guide/1.7/quickstart/custom-builds.html
See the section on "doing xdomain builds"
In our organization (a large one), we do have a CDN version of dojo deployed on internal CDN mainly since some of our webapps are not allowed to access extranet (firewall issues).
For performance, though, a custom build gives biggest boost since it is customized to the modules you need/use - once the custom build is done, you only need to ship a single compressed js output file and a small number of supporting files
When doing your custom build, you can use the xdDojoPath and loader=xdomain if you wish to use cross domain dojo to load your optimized js - see http://osdir.com/ml/cometd-users/2011-08/msg00050.html for some notes on this
Also see related SO question: Dojo on a CDN vs own install
The good news is that with Dojo 1.7+ and the new loader, you don't have to do anything special for a cross domain build (good answer above from #Vijay Agrawal, but I think that reference guide link may need some updating for 1.7) Just write your code to the new AMD format, use asynch:true, run the build tools to create layers, and deploy them on any server. AMD makes use of callbacks and many of the tricks the old Dojo xd builder used to employ, but in a much simpler way.
To support older code, there is a legacy cross domain mode mentioned in the loader docs.

Specific examples of vSphere SDK for .NET

The vSphere SDK for .NET developers pdf has a sample that describes how to connect to Vcenter and perform operations such as power-off, reboot etc.
I need specific examples for changing VM configuration such as disk, memory, CPU etc as well as migration through Storage VMotion and cloning.
The vSphere PowerCLI admin guide has specific examples to the above using command line in Powershell but there are no corresponding examples in C#. Has anyone attempted these operations in C#?
The vSphere SDK for .NET comes with many samples for performing various operations.
The samples, however, need to be rebuilt using a supplied batch file(s).
Here's how it is done:
Navigate to the path: VMware-vSphere-WS-SDK-4.1.0-257238\SDK\samples\DotNet
Under this path, you will find various batch files, such as: Build2005.cmd and
Build2008.cmd
There's also a readme_dotnet.html, but it seems outdated.
Open a Visual Studio command line window.
Navigate to the samples\DotNet folder.
If you have installed VS in a non-default location, fix up the environment variable prior to beginning:
"set the environment variable VSINSTALLDIR to the directory containing the 2 directories "Common7" and "SDK"." Please remember to use quotes around directory names that have spaces in them.
Execute Build2005.cmd or Build2008.cmd (for VS2005/2008).
This will create a "cs" folder with all relevant samples (58 projects).
Hope this helps!
Lior
I've played with a number of VMWare API's and I've settled on VSphere SDK for .NET also. It's not perfect but it's the best I've found so far. As far as samples, since the PowerCLI cmdlets are just wrappers for the underlying .NET classes I tend to google for PowerCLI examples and then port that over to C#.
It seems strange that when I go to the website for code samples they simply don't have a category for this SDK. They only have samples for the SDK that's a bunch of .net class source files based on WSDL.