Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status


sitecore (3) Versions 0.5.1

Installs/Configures Sitecore

cookbook 'sitecore', '~> 0.5.1', :supermarket
cookbook 'sitecore', '~> 0.5.1'
knife supermarket install sitecore
knife supermarket download sitecore
Quality 17%

Sitecore Cookbook

Cookbook to install the Sitecore 7.x content management system.


This cookbook implements resources useful for installing and/or configuring Sitecore:

The sitecore_cms resource installs the files, sets permissions, and makes IIS configurations
for serving a website powered by Sitecore. There's also an optional action to enable the Solr
content search provider.

The sitecore_config resource enables and disables settings in the App_Config\Includes directory.

The sitecore_db resource attaches the Sitecore databases, creates a user account, and grants
it permissions on those DBs.

These resource can be used together to spin up a VM on a developer workstation, or independently
to provision separate database & application server nodes in other environments.

There's also an IIS helper recipe which can be used to quickly install some common features.
This recipe is optional and you're welcome to set up IIS however you like as long as it has
all the requirements for Sitecore 7.

This cookbook expands on some of the ideas found in the
Sitecore Powershell Library.

Neither the Sitecore CMS, Windows, nor a license file are included with this cookbook. Users are
responsible for obtaining and licensing the proprietary bits of a Sitecore tech stack on their own.
The licensing of this cookbook does not apply to Sitecore or Windows.

This cookbook references proprietary software. See [NOTICE](NOTICE) for more information.


  • Chef 11.10 or higher
  • Ruby 1.9 or higher
  • Windows
    • Tested with Windows Server 2012
  • IIS
    • Tested with IIS 8
  • SQL Server
    • Tested with SQL Server 2012 and SQL Server Express 2014
  • Powershell with SQL Server Management Objects


Attributes live in node['sitecore']. Read the source code in attributes/ to see what attributes are
available, and their default values.

Resource/Provider Usage


Installs Sitecore to inetpub, creates an IIS website and app pool.

Paths to assets such as the sitecore zip, license file, etc... can be local, i.e. you've
placed them in a temporary location using chef resources such as
cookbook_file, or remote,
such as a secured and restricted URL accessible by Chef.

Example Usage

sitecore_cms 'MySite' do
  source 'c:/path/to/'
  license 'c:/path/to/license.xml'
  bindings [
    { 'host' => '', 'proto' => 'http', 'port' => 80 }
  connection_strings [
      'name' => 'core',
      'database' => 'Sitecore.Core',
      'user_id' => 'sitecore_user',
      'password' => 'foobar123',
      'data_source' => '(local)\SQLEXPRESS'
      'name' => 'master',
      'database' => 'Sitecore.Master',
      'user_id' => 'sitecore_user',
      'password' => 'foobar123',
      'data_source' => '(local)\SQLEXPRESS'
      'name' => 'web',
      'database' => 'Sitecore.Web',
      'user_id' => 'sitecore_user',
      'password' => 'foobar123',
      'data_source' => '(local)\SQLEXPRESS'
      'name' => 'analytics',
      'connection_string' => 'mongodb://mongodb/analytics'

Example of using the Solr content search provider

sitecore_cms 'MySite' do
  action [:install, :enable_solr]
  source 'c:/path/to/'
  solr_libs 'c:/path/to/'
  bindings [
    # My site's bindings
  connection_strings [
    # My site's connection strings
  license 'c:/path/to/license.xml'

In this example we add the :enable_solr action and supply the path to a zip file
of Sitecore's Solr dlls, which will be placed in the website's bin directory, i.e.


Enables or disables configuration files. If the name of a site is given, the
provider will look in the default location of
c:\inetpub\wwwroot\SiteName\App_Config\Include. The full path to your includes
directory can be specified via the configs_path attribute.

If both site and configs_path are given, configs_path takes precedence.

Example Usage

sitecore_config 'Sitecore.Mvc' do
  site 'MySite'
  action :enable

sitecore_config 'Sitecore.MvcAnalytics' do
  configs_path 'D:\MySite\App_Config\Includes'
  action :disable


Sets up one or more Sitecore databases.

Assumes that SQL Server is present, and the account running Chef has
permission to create databases, users, and assign roles. If you're using
vagrant, this means the vagrant user on your development box.

Example Usage

sitecore_db '.\SQLEXPRESS' do
  action [:install, :create_login, :assign_roles]
  site 'MySite'
  databases [
    { 'name' => 'Sitecore.Core', 'type' => 'core' },
    { 'name' => 'Sitecore.Master', 'type' => 'master' },
    { 'name' => 'Sitecore.Web', 'type' => 'web' },
    { 'name' => 'Sitecore.Analytics', 'type' => 'analytics' }
  source_directory 'c:/inetpub/wwwroot/MySite/Databases'
  username 'sitecore_user'
  password 'foobar123'

This resource will look for mdf and ldf files corresponding to each
database name in the source_directory and attach them to the
SQL server at .\SQLEXPRESS (or whichever host you provide).

A login named "sitecore_user" will be created with the given password,
and granted the roles defined in node['sitecore']['roles'].

Refer to
"Evolution of Cookbook Development"
by Opscode for information on handling sensitive data with Chef.


default recipe takes no action.

iis recipe is included as a tool for setting up the roles needed to serve a
Sitecore site. Using it is optional, and you're welcome to implement your own
logic for configuring IIS.


Use Rspec to execute the ChefSpec tests:

$ rspec


See []( for help with problems commonly encountered by users of this cookbook. If that document doesn't address your situation, feel free to open an issue on Github.

How to contribute

Please read []( to learn how you can help improve this cookbook.



Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

windows ~> 1.36
powershell ~> 3.0
iis ~> 4.1
openssl ~> 1.1
git ~> 4.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Sitecore Cookbook Change Log

This file is used to list changes made in each version of the Sitecore cookbook.

v 0.5.1 (2015-05-08)

  • #19 Add ability to pass an entire connection string.

v 0.5.0 (2015-04-14)

  • #1 Stop flooding the console with ChefSpec deprecation notices
  • #3 Remove incorrect use of symbols from documentation
  • #4 Support the directory structure of Sitecore 7.5 zip files
  • #6 Document the open source contributor process
  • #9 Create a changelog
  • #11 Fix mixlib-shellout problems with bundle install

v 0.4.0 (2015-03-12)

  • Initial public release
  • Sitecore 7.0 support
  • Install the CMS files
  • Enable Solr
  • Configure IIS website and application pool
  • Attach databases
  • Create database user and assign roles
  • Enable/disable App_Config\Include configuration files

Collaborator Number Metric

0.5.1 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric

0.5.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must contain a file

Foodcritic Metric

0.5.1 failed this metric

FC064: Ensure issues_url is set in metadata: sitecore/metadata.rb:1
FC065: Ensure source_url is set in metadata: sitecore/metadata.rb:1
FC066: Ensure chef_version is set in metadata: sitecore/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: sitecore/metadata.rb:1
FC069: Ensure standardized license defined in metadata: sitecore/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric

0.5.1 passed this metric

Testing File Metric

0.5.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must contain a file

Version Tag Metric

0.5.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must include a tag that matches this cookbook version number