Skip to content

Sam-Martin/test_kitchen_mssql_helpers

Repository files navigation

test_kitchen_mssql_helpers Build Status

Cookbook which performs a very basic installation of MSSQL Server 2014 Express using the BoxStarter Cookbook and MsSqlServer2014Express Chocolatey package.
This cookbook is useful as an example of how to install and configure MSSQL in a test-kitchen compatible manner and is also used by the test_kitchen_mssql_template.

Attributes

  • ['test_kitchen_mssql_helpers']['chef_client_user_password'] (Must contain the password of the user executing chef-client)
  • ['test_kitchen_mssql_helpers']['sa_password'] (Declares the SA password for MSSQL)

Usage

Copy the files from this repository into your cookbook's repo (merging files as necessary), then use the platform named 'windows-2012r2' in .kitchen.yml as your test bed. Replace the existing tests in default with the tests you wish to run and add a run_list that specifies your cookbook or other kitchen provisioners as you desire!

Connectivity

You will presumably need to populate the MSSQL server's IP in your cookbook/script somewhere. You can do this in Chef like so

search_query = 'run_list:*test_kitchen_mssql_helpers??server*'
sql_server_ip = search('node', search_query)[0]['ipaddress']

Or in any other scripting scenario by parsing the JSON file you can find in %temp%\kitchen\nodes\default-windows-mssqlserver.json.

MSSQL is configured to listen to all IPs (i.e. NAT and Private) on TCP 1433.

Authentication

The default username and password are sa and Vagrant!, you can change the default password using the attributes in the test_kitchen_mssql_helpers cookbook

Dependencies

BoxStarter

Matt Wrock's Boxstarter.org is used by this cookbook to automatically create a scheduled task to install the MsSqlServer2014Express Chocolatey package.
Without BoxStarter (i.e. installing the package in the context of a WinRM session) the MSSQL package would not install.

Chocolatey

Chocolatey.org is a package management system for Windows which this cookbook uses to install MSSQL 2014.

Author

Author:: Sam Martin (samjackmartin@gmail.com)

About

Facilitates the setup of a multi-node test setup using MSSQL in Test Kitchen

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages