-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmetadata.json
More file actions
1 lines (1 loc) · 8.39 KB
/
metadata.json
File metadata and controls
1 lines (1 loc) · 8.39 KB
1
{"name":"sql_server","version":"2.5.0","description":"Installs/Configures Microsoft SQL Server 2008 R2","long_description":"# sql_server Cookbook\n[](http://travis-ci.org/chef-cookbooks/sql_server) [](https://supermarket.chef.io/cookbooks/sql_server)\n\nInstalls and configures Microsoft SQL Server 2008 R2 and Microsoft SQL Server 2012 server and client. By default the Express edition is installed, but the `sql_server::server` recipe supports installation of other editions (see **Usage** below).\n\n## Requirements\n### Platforms\n- Windows Server 2008 (R1, R2)\n- Windows Server 2012 (R1, R2)\n\n### Chef\n- Chef 11+\n\n### Cookbooks\n- windows\n\n## Attributes\n### default\nThe following attributes are used by both client and server recipes.\n- `node['sql_server']['accept_eula']` - indicate that you accept the terms of the end user license, default is 'false'\n- `node['sql_server']['product_key']` - Specifies the product key for the edition of SQL Server, default is `nil` (not needed for SQL Server 2008 R2 Express installs)\n\n### client\nThis file also contains download url, checksum and package name for all client installation packages. See the **Usage** section below for more details.\n\n### server\n- `node['sql_server']['install_dir']` - main directory for installation, default is `C:\\Program Files\\Microsoft SQL Server`\n- `node['sql_server']['port']` - static TCP port server should listen on for client connections, default is `1433`\n- `node['sql_server']['instance_name']` - name of the default instance, default is `SQLEXPRESS`\n- `node['sql_server']['instance_dir']` - root directory of the default instance, default is `C:\\Program Files\\Microsoft SQL Server`\n- `node['sql_server']['shared_wow_dir']` - root directory of the shared WOW directory, default is `C:\\Program Files (x86)\\Microsoft SQL Server`\n- `node['sql_server']['agent_account']` - Agent account name, default is `NT AUTHORITY\\NETWORK SERVICE`\n- `node['sql_server']['agent_startup']` - Agent service startup mode, default is `Disabled`\n- `node['sql_server']['rs_mode']` - Reporting Services install mode, default is `FilesOnlyMode`\n- `node['sql_server']['rs_account']` - Reporting Services account name, default is `NT AUTHORITY\\NETWORK SERVICE`\n- `node['sql_server']['rs_startup']` - Reporting Services startup mode, default is `Automatic`\n- `node['sql_server']['browser_startup']` - Browser Service startup mode, default is `Disabled`\n- `node['sql_server']['sysadmins']` - Windows accounts that are SQL administrators, default is `Administrator`\n- `node['sql_server']['sql_account']` - SQL service account name, default is `NT AUTHORITY\\NETWORK SERVICE`\n\nThis file also contains download url, checksum and package name for the server installation package.\n\n## Usage\n### default\nIncludes the `sql_server::client` recipe.\n\n### client\nInstalls required the SQL Server Native Client and all required dependancies. These include:\n- [Microsoft SQL Server 2008 R2 Native Client](http://www.microsoft.com/download/en/details.aspx?id=16978#SNAC)\n- [Microsoft SQL Server 2008 R2 Command Line Utilities (ie `sqlcmd`)](http://www.microsoft.com/download/en/details.aspx?id=16978#SQLCMD)\n- [Microsoft SQL Server System CLR Types](http://www.microsoft.com/download/en/details.aspx?id=16978#SQLSYSCLR)\n- [Microsoft SQL Server 2008 R2 Management Objects](http://www.microsoft.com/download/en/details.aspx?id=16978#SMO)\n- [Windows PowerShell Extensions for SQL Server 2008 R2](http://www.microsoft.com/download/en/details.aspx?id=16978#PowerShell)\n\nThe 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.\n\n### server\nInstalls SQL Server 2008 R2 Express or SQL Server 2012 Express.\n\nBy default, the cookbook installs SQL Server 2008 R2 Express. There are two options to install a different version.\n\nNOTE: For this recipe to run you must set the node['sql_server']['server_sa_password'] in an environment, role, or wrapper cookbook.\n\n**Option 1:** From a role, environment, or wrapper cookbook, set `node['sql_server']['version']` to '2008R2' to install SQL Server 2008 R2 Express or '2012' to install SQL Server 2012 Express.\n\n**Option 2:** From a role, environment, or wrapper cookbook, set these node attributes to specify the URL, checksum, and name of the package (as it appears in the Windows Registry).\n\n```\nnode['sql_server']['server']['url']\nnode['sql_server']['server']['checksum']\nnode['sql_server']['server']['package_name']\n```\n\nThe installation is done using the `windows_package` resource and [ConfigurationFile](http://msdn.microsoft.com/en-us/library/dd239405.aspx) generated from a `template` resource. The installation is slightly opinionated and does the following:\n- Enables [Mixed Mode](http://msdn.microsoft.com/en-us/library/aa905171\\(v=sql.80\\).aspx) (Windows Authentication and SQL Server Authentication) authentication\n- Auto-generates and sets a strong password for the 'sa' account\n- sets a static TCP port which is configurable via an attribute.\n\nInstalling 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:\n\n```ruby\nname \"sql_server\"\ndescription \"SQL Server database master\"\nrun_list(\n \"recipe[sql_server::server]\"\n)\ndefault_attributes(\n \"sql_server\" => {\n \"accept_eula\" => true\n }\n)\n```\n\nOut 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:\n\n```ruby\nname \"sql_server_standard\"\ndescription \"SQL Server Stadard edition database master\"\nrun_list(\n \"recipe[sql_server::server]\"\n)\ndefault_attributes(\n \"sql_server\" => {\n \"instance_name\" => \"MSSQLSERVER\",\n \"product_key\" => \"YOUR_PRODUCT_KEY_HERE\",\n \"accept_eula\" => true,\n \"server\" => {\n \"url\" => \"DOWNLOAD_LOCATION_OF_INSTALLATION_PACKAGE\",\n \"checksum\" => \"SHA256_OF_INSTALLATION_PACKAGE\"\n }\n }\n)\n```\n\nDepending 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:\n\n```ruby\n# unlock port in firewall\n# this should leverage firewall_rule resource\n# once COOK-689 is completed\nfirewall_rule_name = \"#{node['sql_server']['instance_name']} Static Port\"\n\nexecute \"open-static-port\" do\n command \"netsh advfirewall firewall add rule name=\\\"#{firewall_rule_name}\\\" dir=in action=allow protocol=TCP localport=#{node['sql_server']['port']}\"\n returns [0,1,42] # *sigh* cmd.exe return codes are wonky\n not_if { SqlServer::Helper.firewall_rule_enabled?(firewall_rule_name) }\nend\n```\n\n## License & Authors\n**Author:** Cookbook Engineering Team ([cookbooks@chef.io](mailto:cookbooks@chef.io))\n\n**Copyright:** 2011-2015, Chef Software, Inc.\n\n```text\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","maintainer":"Chef Software, Inc.","maintainer_email":"cookbooks@chef.io","license":"Apache 2.0","platforms":{"windows":">= 0.0.0"},"dependencies":{"windows":">= 1.2.6"},"recommendations":{},"suggestions":{},"conflicting":{},"providing":{},"replacing":{},"attributes":{},"groupings":{},"recipes":{},"source_url":"https://github.com/chef-cookbooks/sql_server","issues_url":"https://github.com/chef-cookbooks/sql_server/issues","chef_version":{},"ohai_version":{}}