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1.3.0
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.0
- 1.0.4
- 1.0.2
- 1.0.0
Installs/Configures Microsoft SQL Server
cookbook 'sql_server', '= 2.2.3', :supermarket
knife supermarket install sql_server
knife supermarket download sql_server
sql_server Cookbook
Installs and configures Microsoft SQL Server 2008 R2 server and client. By default the Express edition is installed, but the sql_server::server
recipe supports installation of other editions (see Usage below).
Requirements
Platforms
Tested on:
- Windows Server 2008 R2
May work on other versions of Windows.
Attributes
default
The following attributes are used by both client and server recipes.
-
node['sql_server']['accept_eula']
- indicate that you accept the terms of the end user license, default is 'false' -
node['sql_server']['product_key']
- Specifies the product key for the edition of SQL Server, default isnil
(not needed for SQL Server 2008 R2 Express installs)
client
This file also contains download url, checksum and package name for all client installation packages. See the Usage section below for more details.
server
-
node['sql_server']['install_dir']
- main directory for installation, default isC:\Program Files\Microsoft SQL Server
-
node['sql_server']['port']
- static TCP port server should listen on for client connections, default is1433
-
node['sql_server']['instance_name']
- name of the default instance, default isSQLEXPRESS
-
node['sql_server']['instance_dir']
- root directory of the default instance, default isC:\Program Files\Microsoft SQL Server
-
node['sql_server']['shared_wow_dir']
- root directory of the shared WOW directory, default isC:\Program Files (x86)\Microsoft SQL Server
-
node['sql_server']['agent_account']
- Agent account name, default isNT AUTHORITY\NETWORK SERVICE
-
node['sql_server']['agent_startup']
- Agent service startup mode, default isDisabled
-
node['sql_server']['rs_mode']
- Reporting Services install mode, default isFilesOnlyMode
-
node['sql_server']['rs_account']
- Reporting Services account name, default isNT AUTHORITY\NETWORK SERVICE
-
node['sql_server']['rs_startup']
- Reporting Services startup mode, default isAutomatic
-
node['sql_server']['browser_startup']
- Browser Service startup mode, default isDisabled
-
node['sql_server']['sysadmins']
- Windows accounts that are SQL administrators, default isAdministrator
-
node['sql_server']['sql_account']
- SQL service account name, default isNT AUTHORITY\NETWORK SERVICE
This file also contains download url, checksum and package name for the server installation package.
Usage
default
Includes the sql_server::client
recipe.
client
Installs required the SQL Server Native Client and all required dependancies. These include:
- Microsoft SQL Server 2008 R2 Native Client
- Microsoft SQL Server 2008 R2 Command Line Utilities (ie
sqlcmd
) - Microsoft SQL Server System CLR Types
- Microsoft SQL Server 2008 R2 Management Objects
- Windows PowerShell Extensions for SQL Server 2008 R2
The SQL Server Native Client contains the SQL Server ODBC driver and the SQL Server OLE DB provider in one native dynamic link library (DLL) supporting applications using native-code APIs (ODBC, OLE DB and ADO) to Microsoft SQL Server. In simple terms these packages should allow any other node to act as a client of a SQL Server instance.
The TinyTDS gem is also installed as this is used in the SQL Server providers for the database
and database_user
resources (see the database
cookbook for more details).
server
Installs SQL Server 2008 R2 Express. The installation is done using the windows_package
resource and ConfigurationFile generated from a template
resource. The installation is slightly opinionated and does the following:
- Enables Mixed Mode (Windows Authentication and SQL Server Authentication) authentication
- Auto-generates and sets a strong password for the 'sa' account
- sets a static TCP port which is configurable via an attribute.
Installing any of the SQL Server server or client packages in an unattended/automated way requires you to explicitly indicate that you accept the terms of the end user license. The hooks have been added to all recipes to do this via an attribute. Create a role to set the node['sql_server']['accept_license_terms']
attribute to 'true'. For example:
name "sql_server" description "SQL Server database master" run_list( "recipe[sql_server::server]" ) default_attributes( "sql_server" => { "accept_eula" => true } )
Out of the box this recipe installs the Express edition of SQL Server 2008 R2. If you would like to install the Standard edition create a role as follows:
name "sql_server_standard" description "SQL Server Stadard edition database master" run_list( "recipe[sql_server::server]" ) default_attributes( "sql_server" => { "instance_name" => "MSSQLSERVER", "product_key" => "YOUR_PRODUCT_KEY_HERE", "accept_eula" => true, "server" => { "url" => "DOWNLOAD_LOCATION_OF_INSTALLATION_PACKAGE", "checksum" => "SHA256_OF_INSTALLATION_PACKAGE" } } )
Depending on your base Windows installation you may also need to open the configured static port in the Windows Firewall. In the name of security we do not do this by default but the follow code should get the job done:
# unlock port in firewall # this should leverage firewall_rule resource # once COOK-689 is completed firewall_rule_name = "#{node['sql_server']['instance_name']} Static Port" execute "open-static-port" do command "netsh advfirewall firewall add rule name=\"#{firewall_rule_name}\" dir=in action=allow protocol=TCP localport=#{node['sql_server']['port']}" returns [0,1,42] # *sigh* cmd.exe return codes are wonky not_if { SqlServer::Helper.firewall_rule_enabled?(firewall_rule_name) } end
License & Authors
- Author:: Seth Chisamore (schisamo@chef.io)
Copyright:: 2011, Chef Software, Inc. 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 http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Dependent cookbooks
openssl >= 0.0.0 |
windows >= 1.2.6 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
sql_server Cookbook CHANGELOG
This file is used to list changes made in each version of the sql_server cookbook.
v2.2.3 (2014-02-18)
- reverting OpenSSL module namespace change
v2.2.2 (2014-02-17)
- updating to use the latest openssl
v2.2.0 (2014-03-27)
- [COOK-4355] - Fix support for SQL server by using the right registry path
v2.0.0 (2014-02-27)
[COOK-4253] - Make install options configurable
v1.4.4 (2014-02-21)
Improvement
- COOK-4268 - sql_server does not support installing SQL 2012
v1.4.1 (2014-02-21)
Improvement
- COOK-3892 - sql_server cookbook uses deprecated windows_registry LWRP
Bug
- COOK-3725 - sql_server randomly-generated SA password sometimes not strong enough
v1.3.0
Improvement
- COOK-3507 - Broken SQLExpress download links...
Bug
- COOK-3506 - SQLEXPRESS on 32 bits systems does not support INSTALLSHAREDWOWDIR
- COOK-3388 - Mixlib::ShellOut::CommandTimeout: command timed out error
v1.2.2
- See (v1.2.1), made a mistake with DevOdd releases
v1.2.1
Improvement
- COOK-3088 - Allow setting feature_list
v1.2.0
Bug
- [COOK-3085]: Sql server configuration is incorrect when trying to install non-express version
v1.1.0
- [COOK-1049] - remove unneeded external restart script from sql_server::server recipe
v1.0.4
- bump windows cookbook dependency version to pick up Ruby 1.9 compat fixes
v1.0.2
- [COOK-773] win_friendly_path is no longer a module_function
- rename accept_license_terms attribute to accept_eula for consistency with other cookbooks like iis
v1.0.0
- [COOK-681] initial release
Foodcritic Metric
2.2.3 failed this metric
FC031: Cookbook without metadata file: /tmp/cook/a81a4db568ef6cbde76c0a84/sql_server/metadata.rb:1
FC045: Consider setting cookbook name in metadata: /tmp/cook/a81a4db568ef6cbde76c0a84/sql_server/metadata.rb:1
2.2.3 failed this metric
FC045: Consider setting cookbook name in metadata: /tmp/cook/a81a4db568ef6cbde76c0a84/sql_server/metadata.rb:1