Skip to content

Commit baf2b5c

Browse files
authored
Merge pull request #234 from glennsarti/modules-5209-release-prep-20
(MODULES-5209) Prepare for 2.0.0 release
2 parents ba2d6a7 + 1f23674 commit baf2b5c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1165
-804
lines changed

.fixtures.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
fixtures:
22
repositories:
3-
"stdlib":
4-
"repo": "git://github.com/puppetlabs/puppetlabs-stdlib.git"
3+
"stdlib": "https://github.com/puppetlabs/puppetlabs-stdlib.git"
54
symlinks:
65
sqlserver: "#{source_dir}"

.sync.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ Gemfile:
55
optional:
66
':development':
77
- gem: yard
8+
':system_tests':
9+
- gem: beaker-testmode_switcher
10+
version: '<= 0.2.0'
11+
- gem: master_manipulator
812
Rakefile:
913
unmanaged: true
1014
spec/spec_helper.rb:
1115
unmanaged: true
12-
appveyor.yml:
13-
matrix_extras:
14-
- PUPPET_GEM_VERSION: 4.2.3
15-
RUBY_VER: 21-x64
1616
LICENSE:
1717
license_type: 'puppetpe'
1818
NOTICE:

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ before_install:
1010
matrix:
1111
fast_finish: true
1212
include:
13-
- rvm: 2.3.1
13+
- rvm: 2.4.0
1414
bundler_args: --without system_tests
15-
env: PUPPET_GEM_VERSION="~> 4.0"
16-
- rvm: 2.1.7
15+
env: PUPPET_GEM_VERSION="~> 5.0"
16+
- rvm: 2.1.9
1717
bundler_args: --without system_tests
1818
env: PUPPET_GEM_VERSION="~> 4.0"
1919
notifications:

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,41 @@
1+
## 2017-08-10 - Supported Release 2.0.0
2+
3+
### Summary
4+
5+
This major release adds support for Microsoft SQL Server 2016
6+
7+
#### Features
8+
9+
- Deprecates the use of `Tools` and `SQL` as installation features ([MODULES-4257](https://tickets.puppet.com/browse/MODULES-4257))
10+
- Added more detailed examples to the README
11+
- Updated with Puppet 4 data types ([MODULES-5126](https://tickets.puppet.com/browse/MODULES-5126))
12+
- Added parameters to manage PolyBase ([MODULES-5070](https://tickets.puppet.com/browse/MODULES-5070))
13+
14+
#### Bug Fixes
15+
16+
- Make .Net installation errors more obvious ([MODULES-5092](https://tickets.puppet.com/browse/MODULES-5092))
17+
- Remove service_ensure parameter as it had no use ([MODULES-5030](https://tickets.puppet.com/browse/MODULES-5030))
18+
- Using as_sysadmin_accounts without AS feature will error ([MODULES-2386](https://tickets.puppet.com/browse/MODULES-2386))
19+
- SNAC_SDK shared feature can not be managed by the module ([FM-5389](https://tickets.puppet.com/browse/FM-5389))
20+
- Purge members from SQL Server Role should actually purge ([MODULES-2543](https://tickets.puppet.com/browse/MODULES-2543))
21+
- Identifiers are properly escaped during database creation ([FM-5021](https://tickets.puppet.com/browse/FM-5021))
22+
- Remove forced TCP connection for SQL management ([MODULES-4915](https://tickets.puppet.com/browse/MODULES-4915))
23+
- Update metadata for Puppet 4 and Puppet 5 ([MODULES-4842](https://tickets.puppet.com/browse/MODULES-4842), [MODULES-5144](https://tickets.puppet.com/browse/MODULES-5144))
24+
- Add test tiering and test mode switcher ([FM-5062](https://tickets.puppet.com/browse/FM-5062), [FM-6141](https://tickets.puppet.com/browse/FM-6141))
25+
126
## 2017-05-08 - Supported Release 1.2.0
27+
228
### Summary
329

430
This release adds support for internationalization of the module. It also contains Japanese translations for the README, summary and description of the metadata.json and major cleanups in the README. Additional folders have been introduced called locales and readmes where translation files can be found. A number of features and bug fixes are also included in this release.
531

632
#### Features
33+
734
- (MODULES-4334) - Adding locales directory, config.yaml and POT file for i18n.
835
- Puppet-module-gems now implemented
936

1037
#### Bug Fixes
38+
1139
- (MODULES-4528) Replace Puppet.version comparison with Puppet::Util::Package.versioncmp
1240
- (MODULES-4667) Update beaker tests for Jenkins CI
1341

Gemfile

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ minor_version = "#{ruby_version_segments[0]}.#{ruby_version_segments[1]}"
4343
#end
4444

4545
group :development do
46-
gem "puppet-module-posix-default-r#{minor_version}", :require => false, :platforms => "ruby"
47-
gem "puppet-module-win-default-r#{minor_version}", :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
48-
gem "puppet-module-posix-dev-r#{minor_version}", :require => false, :platforms => "ruby"
49-
gem "puppet-module-win-dev-r#{minor_version}", :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
50-
gem "json_pure", '<= 2.0.1', :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
51-
gem "fast_gettext", '1.1.0', :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
52-
gem "fast_gettext", :require => false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
53-
gem "yard", :require => false
46+
gem "puppet-module-posix-default-r#{minor_version}", :require => false, :platforms => "ruby"
47+
gem "puppet-module-win-default-r#{minor_version}", :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
48+
gem "puppet-module-posix-dev-r#{minor_version}", :require => false, :platforms => "ruby"
49+
gem "puppet-module-win-dev-r#{minor_version}", '0.0.7', :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
50+
gem "json_pure", '<= 2.0.1', :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
51+
gem "fast_gettext", '1.1.0', :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
52+
gem "fast_gettext", :require => false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
53+
gem "yard", :require => false
5454
end
5555

5656
group :system_tests do
@@ -61,6 +61,9 @@ group :system_tests do
6161
gem "beaker-rspec", *location_for(ENV['BEAKER_RSPEC_VERSION'])
6262
gem "beaker-hostgenerator", *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION'])
6363
gem "beaker-abs", *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.1')
64+
gem "puppet-blacksmith", '~> 3.4', :require => false
65+
gem "beaker-testmode_switcher", '<= 0.2.0', :require => false
66+
gem "master_manipulator", :require => false
6467
end
6568

6669
gem 'puppet', *location_for(ENV['PUPPET_GEM_VERSION'])

README.md

Lines changed: 101 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,6 @@ This example creates the same MS SQL instance as shown above with additional opt
8080

8181
### Install SQL Server tools and features not specific to a SQL Server instance
8282

83-
```puppet
84-
sqlserver_features { 'Generic Features':
85-
source => 'E:/',
86-
features => ['Tools'],
87-
}
88-
```
89-
9083
```puppet
9184
sqlserver_features { 'Generic Features':
9285
source => 'E:/',
@@ -184,6 +177,81 @@ sqlserver_tsql{ 'Always running':
184177
}
185178
```
186179

180+
### Advanced example
181+
182+
This advanced example:
183+
184+
* Installs the basic SQL Server Engine from installation media mounted at 'D:\' with TCP Enabled and various directories set.
185+
186+
* Uses only Windows-based authentication and installs with only the user that Puppet is executing as. Note that the 'sql_sysadmin_accounts' is only applicable during the instance installation and is not actively enforced.
187+
188+
* Creates a `sqlserver::config` resource, which is used in later resources to connect to the newly created instance. As we support only Windows-based authentication, a username and password is not required.
189+
190+
* Creates a local group called 'DB Administrators' and ensures that it is SQL System Administrator (sysadmin role); also creates the account that Puppet uses to install and manage the instance.
191+
192+
* Ensures that the advanced options for `sp_configure` are enabled, so that Puppet can manage the `max memory` setting for the instance.
193+
194+
* Ensure that the `max memory` (MB) configuration item is set to 2048 megabytes.
195+
196+
```puppet
197+
$sourceloc = 'D:/'
198+
199+
# Install a SQL Server default instance
200+
sqlserver_instance{'MSSQLSERVER':
201+
source => $sourceloc,
202+
features => ['SQLEngine'],
203+
sql_sysadmin_accounts => [$facts['id']],
204+
install_switches => {
205+
'TCPENABLED' => 1,
206+
'SQLBACKUPDIR' => 'C:\\MSSQLSERVER\\backupdir',
207+
'SQLTEMPDBDIR' => 'C:\\MSSQLSERVER\\tempdbdir',
208+
'INSTALLSQLDATADIR' => 'C:\\MSSQLSERVER\\datadir',
209+
'INSTANCEDIR' => 'C:\\Program Files\\Microsoft SQL Server',
210+
'INSTALLSHAREDDIR' => 'C:\\Program Files\\Microsoft SQL Server',
211+
'INSTALLSHAREDWOWDIR' => 'C:\\Program Files (x86)\\Microsoft SQL Server'
212+
}
213+
}
214+
215+
# Resource to connect to the DB instance
216+
sqlserver::config { 'MSSQLSERVER':
217+
admin_login_type => 'WINDOWS_LOGIN'
218+
}
219+
220+
# Enforce SQL Server Administrators
221+
$local_dba_group_name = 'DB Administrators'
222+
$local_dba_group_netbios_name = "${facts['hostname']}\\DB Administrators"
223+
224+
group { $local_dba_group_name:
225+
ensure => present
226+
}
227+
228+
-> sqlserver::login { $local_dba_group_netbios_name :
229+
login_type => 'WINDOWS_LOGIN',
230+
}
231+
232+
-> sqlserver::role { 'sysadmin':
233+
ensure => 'present',
234+
instance => 'MSSQLSERVER',
235+
type => 'SERVER',
236+
members => [$local_dba_group_netbios_name, $facts['id']],
237+
}
238+
239+
# Enforce memory consumption
240+
sqlserver_tsql {'check advanced sp_configure':
241+
command => 'EXEC sp_configure \'show advanced option\', \'1\'; RECONFIGURE;',
242+
onlyif => 'sp_configure @configname=\'max server memory (MB)\'',
243+
instance => 'MSSQLSERVER'
244+
}
245+
246+
-> sqlserver::sp_configure { 'MSSQLSERVER-max memory':
247+
config_name => 'max server memory (MB)',
248+
instance => 'MSSQLSERVER',
249+
reconfigure => true,
250+
restart => true,
251+
value => 2048
252+
}
253+
```
254+
187255
## Reference
188256

189257
### Types
@@ -203,8 +271,10 @@ Default: 'present'.
203271
##### `features`
204272

205273
*Required.*
206-
207-
Specifies one or more features to manage. Valid options: 'BC', 'Conn', 'SSMS', 'ADV_SSMS', 'SDK', 'IS', 'MDS', and 'Tools' (the Tools feature includes SSMS, ADV_SSMS, and Conn).
274+
275+
Specifies one or more features to manage. Valid options: 'BC', 'Conn', 'SSMS', 'ADV_SSMS', 'SDK', 'IS', 'MDS', 'BOL', 'DREPLAY_CTLR', 'DREPLAY_CLT'.
276+
277+
The 'Tools' value for this setting is deprecated. Specify 'BC', 'SSMS', 'ADV_SSMS', 'Conn', and 'SDK' explicitly.
208278

209279
##### `install_switches`
210280

@@ -294,7 +364,9 @@ Default: 'present'.
294364

295365
##### `features`
296366

297-
*Required.* Specifies one or more features to manage. The list of top-level features includes 'SQL', 'AS', and 'RS'. The 'SQL' feature includes the Database Engine, Replication, Full-Text, and Data Quality Services (DQS) server. Valid options: an array containing one or more of the strings 'SQL', 'SQLEngine', 'Replication', 'FullText', 'DQ', 'AS', and 'RS'.
367+
*Required.* Specifies one or more features to manage. The list of top-level features includes 'AS' and 'RS'. Valid options: an array containing one or more of the strings 'SQL', 'SQLEngine', 'Replication', 'FullText', 'DQ', 'AS', 'RS', 'POLYBASE', and 'ADVANCEDANALYTICS'.
368+
369+
The 'SQL' value for this setting is deprecated. Specify 'DQ', 'FullText', 'Replication', and 'SQLEngine' explicitly.
298370

299371
##### `install_switches`
300372

@@ -319,6 +391,22 @@ Specifies a product key for SQL Server. Valid options: a string containing a val
319391

320392
Default: `undef`.
321393

394+
##### `polybase_svc_account`
395+
396+
**Applicable only if the POLYBASE feature for SQL Server 2016 is being installed.**
397+
398+
Specifies a domain or system account for the Polybase Engine service.
399+
400+
Valid options: a string specifying an existing username.
401+
402+
##### `polybase_svc_password`
403+
404+
**Applicable only if the POLYBASE feature for SQL Server 2016 is being installed.**
405+
406+
Specifies the password for the Polybase Engine service
407+
408+
Valid options: a string specifying a valid password.
409+
322410
##### `rs_svc_account`
323411

324412
Specifies a domain or system account to be used by the report service. Valid options: a string; cannot include any of the following characters: `'"/ \ [ ] : ; | = , + * ? < >'`. If you specify a domain user account, the domain must be less than 254 characters and the username must be less than 20 characters.
@@ -343,10 +431,6 @@ Specifies a security mode for SQL Server. Valid options: 'SQL'. If not specified
343431

344432
Default: `undef`.
345433

346-
##### `service_ensure`
347-
348-
Specifies whether the SQL Server service should be running. Valid options: 'automatic' (Puppet starts the service if it's not running), 'manual' (Puppet takes no action), and 'disable' (Puppet stops the service if it's running).
349-
350434
##### `source`
351435

352436
*Required.*
@@ -985,7 +1069,9 @@ Terminology differs somewhat between various database systems; please refer to t
9851069

9861070
## Limitations
9871071

988-
This module is available only for Windows Server 2012 or 2012 R2, and works with Puppet Enterprise 3.7 and later.
1072+
This module can manage only a single version of SQL Server on a given host (one and only one of SQL Server 2012, 2014 or 2016). The module is able to manage multiple SQL Server instances of the same version.
1073+
1074+
This module cannot manage the SQL Server Native Client SDK (also known as SNAC_SDK). The SQL Server installation media can install the SDK, but it is not able to uninstall the SDK. Note that the 'sqlserver_features' fact detects the presence of the SDK.
9891075

9901076
## Development
9911077

Rakefile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,25 @@ task :validate do
2121
sh "erb -P -x -T '-' #{template} | ruby -c"
2222
end
2323
end
24+
25+
require 'rspec/core/rake_task'
26+
desc 'test tiering'
27+
RSpec::Core::RakeTask.new(:test_tier) do |t|
28+
# Setup rspec opts
29+
t.rspec_opts = ['--color']
30+
31+
# TEST_TIERS env variable is a comma separated list of tiers to run. e.g. low, medium, high
32+
if ENV['TEST_TIERS']
33+
test_tiers = ENV['TEST_TIERS'].split(',')
34+
raise 'TEST_TIERS env variable must have at least 1 tier specified. low, medium or high (comma separated).' if test_tiers.count == 0
35+
test_tiers.each do |tier|
36+
raise "#{tier} not a valid test tier." unless %w(low medium high).include?(tier)
37+
t.rspec_opts.push("--tag tier_#{tier}")
38+
end
39+
else
40+
puts 'TEST_TIERS env variable not defined. Defaulting to run all tests.'
41+
end
42+
43+
# Implement an override for the pattern with BEAKER_PATTERN env variable.
44+
t.pattern = ENV['BEAKER_PATTERN'] ? ENV['BEAKER_PATTERN'] : 'spec/acceptance'
45+
end

appveyor.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,28 @@ environment:
1414
RUBY_VER: 21
1515
- PUPPET_GEM_VERSION: ~> 4.0
1616
RUBY_VER: 21-x64
17-
- PUPPET_GEM_VERSION: ~> 4.0
18-
RUBY_VER: 23
19-
- PUPPET_GEM_VERSION: ~> 4.0
20-
RUBY_VER: 23-x64
21-
- PUPPET_GEM_VERSION: 4.2.3
22-
RUBY_VER: 21-x64
23-
- PUPPET_GEM_VERSION: 4.2.3
17+
- PUPPET_GEM_VERSION: ~> 5.0
18+
RUBY_VER: 24
19+
- PUPPET_GEM_VERSION: ~> 5.0
20+
RUBY_VER: 24-x64
21+
- PUPPET_GEM_VERSION: 4.7.1
2422
RUBY_VER: 21-x64
2523
matrix:
2624
fast_finish: true
2725
install:
2826
- SET PATH=C:\Ruby%RUBY_VER%\bin;%PATH%
27+
- ps: |
28+
# AppVeyor appears to have OpenSSL headers available already
29+
# which msys2 would normally install with:
30+
# pacman -S mingw-w64-x86_64-openssl --noconfirm
31+
#
32+
if ( $(ruby --version) -match "^ruby\s+2\.4" ) {
33+
Write-Output "Building OpenSSL gem ~> 2.0.4 to fix Ruby 2.4 / AppVeyor issue"
34+
gem install openssl --version '~> 2.0.4' --no-ri --no-rdoc
35+
}
36+
37+
gem list openssl
38+
ruby -ropenssl -e 'puts \"OpenSSL Version - #{OpenSSL::OPENSSL_VERSION}\"; puts \"OpenSSL Library Version - #{OpenSSL::OPENSSL_LIBRARY_VERSION}\"'
2939
- bundle install --jobs 4 --retry 2 --without system_tests
3040
- type Gemfile.lock
3141
build: off

lib/puppet/parser/functions/sqlserver_validate_instance_name.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# @raise [Puppet::ParserError] Instance name can not be larger than 16 characters
1111
# @raise [Puppet::ParserError] Instance name can not start or end with underscore (_)
1212
#
13+
1314
module Puppet::Parser::Functions
1415
newfunction(:sqlserver_validate_instance_name, :docs => <<DOC) do |args|
1516
Validate the MS SQL Instance name based on what Microsoft has set within the document located at

lib/puppet/parser/functions/sqlserver_validate_on_off.rb

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)