Skip to content

Commit 170ddc9

Browse files
committed
Removing support and textual occurences of SQLSERVER 2012
1 parent 76b578d commit 170ddc9

File tree

11 files changed

+13
-39
lines changed

11 files changed

+13
-39
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
## Overview
2222

23-
The sqlserver module installs and manages Microsoft SQL Server 2012, 2014, 2016, 2017, 2019 and 2022 on Windows systems.
23+
The sqlserver module installs and manages Microsoft SQL Server 2014, 2016, 2017, 2019 and 2022 on Windows systems.
2424

2525
## Module Description
2626

@@ -276,7 +276,7 @@ SQL 2017, 2019 and 2022 detection support has been added. This support is limite
276276

277277
The MSOLEDBSQL driver is now required to use this module. You can use this chocolatey [package](https://community.chocolatey.org/packages/msoledbsql) for installation. but it must version 18.x or earlier. (v19+ is not currently supported)
278278

279-
This module can manage only a single version of SQL Server on a given host (one and only one of SQL Server 2012, 2014, 2016, 2017, 2019 or 2022). The module is able to manage multiple SQL Server instances of the same version.
279+
This module can manage only a single version of SQL Server on a given host (one and only one of SQL Server 2014, 2016, 2017, 2019 or 2022). The module is able to manage multiple SQL Server instances of the same version.
280280

281281
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.
282282

lib/puppet/provider/sqlserver_features/mssql.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def create
122122
instance_version = PuppetX::Sqlserver::ServerHelper.sql_version_from_install_source(@resource[:source])
123123
Puppet.debug("Installation source detected as version #{instance_version}") unless instance_version.nil?
124124

125-
install_net35(@resource[:windows_feature_source]) if [SQL_2012, SQL_2014].include? instance_version
125+
install_net35(@resource[:windows_feature_source]) if instance_version == SQL_2014
126126

127127
debug "Installing features #{@resource[:features]}"
128128
add_features(@resource[:features])

lib/puppet/provider/sqlserver_instance/mssql.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def create
107107
instance_version = PuppetX::Sqlserver::ServerHelper.sql_version_from_install_source(@resource[:source])
108108
Puppet.debug("Installation source detected as version #{instance_version}") unless instance_version.nil?
109109

110-
install_net35(@resource[:windows_feature_source]) if [SQL_2012, SQL_2014].include? instance_version
110+
install_net35(@resource[:windows_feature_source]) if instance_version == SQL_2014
111111

112112
add_features(@resource[:features])
113113
end

lib/puppet_x/sqlserver/features.rb

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22

33
require 'puppet/util/windows'
44

5-
SQL_2012 = 'SQL_2012'
65
SQL_2014 = 'SQL_2014'
76
SQL_2016 = 'SQL_2016'
87
SQL_2017 = 'SQL_2017'
98
SQL_2019 = 'SQL_2019'
109
SQL_2022 = 'SQL_2022'
1110

12-
ALL_SQL_VERSIONS = [SQL_2012, SQL_2014, SQL_2016, SQL_2017, SQL_2019, SQL_2022].freeze
11+
ALL_SQL_VERSIONS = [SQL_2014, SQL_2016, SQL_2017, SQL_2019, SQL_2022].freeze
1312

1413
# rubocop:disable Style/ClassAndModuleChildren
1514
module PuppetX
@@ -20,10 +19,6 @@ class Features # rubocop:disable Style/Documentation
2019
extend Puppet::Util::Windows::Registry
2120

2221
SQL_CONFIGURATION = {
23-
SQL_2012 => {
24-
major_version: 11,
25-
registry_path: '110'
26-
},
2722
SQL_2014 => {
2823
major_version: 12,
2924
registry_path: '120'
@@ -181,7 +176,6 @@ def self.get_shared_features(version)
181176
# return a hash of version => instance info
182177
#
183178
# {
184-
# "SQL_2012" => {},
185179
# "SQL_2014" => {
186180
# "MSSQLSERVER" => {
187181
# "name" => "MSSQLSERVER",
@@ -232,7 +226,6 @@ def self.instances
232226
# return a hash of version => shared features array
233227
#
234228
# {
235-
# "SQL_2012" => ["Conn", "SDK", "MDS", "BC", "SSMS", "ADV_SSMS", "IS"],
236229
# "SQL_2014" => []
237230
# }
238231
def self.features

lib/puppet_x/sqlserver/server_helper.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def self.is_domain_or_local_user?(user, hostname) # rubocop:disable Naming/Predi
2020
!%r{(^(((nt (authority|service))|#{hostname})\\\w+)$)|^(\w+)$}i.match?(user)
2121
end
2222

23-
# Returns either SQL_2016, SQL_2014 or SQL_2012 if it can determine the SQL Version from the install source
23+
# Returns either SQL_2016 or SQL_2014 if it can determine the SQL Version from the install source
2424
# Returns nil if it can not be determined
2525
def self.sql_version_from_install_source(source_dir)
2626
# Attempt to read the Mediainfo.xml file in the root of the install media
@@ -48,7 +48,6 @@ def self.sql_version_from_install_source(source_dir)
4848
return SQL_2017 if ver[1].start_with?('14.')
4949
return SQL_2016 if ver[1].start_with?('13.')
5050
return SQL_2014 if ver[1].start_with?('12.')
51-
return SQL_2012 if ver[1].start_with?('11.')
5251

5352
nil
5453
end

metadata.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "puppetlabs-sqlserver",
33
"version": "4.1.0",
44
"author": "puppetlabs",
5-
"summary": "The `sqlserver` module installs and manages MS SQL Server 2012, 2014, 2016, 2017, 2019 and 2022 on Windows systems.",
5+
"summary": "The `sqlserver` module installs and manages MS SQL Server 2014, 2016, 2017, 2019 and 2022 on Windows systems.",
66
"license": "proprietary",
77
"source": "https://github.com/puppetlabs/puppetlabs-sqlserver",
88
"project_page": "https://github.com/puppetlabs/puppetlabs-sqlserver",
@@ -40,7 +40,6 @@
4040
"mssql",
4141
"sqlserver",
4242
"microsoft",
43-
"sql2012",
4443
"sql2014",
4544
"sql2016",
4645
"sql2017",

provision.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
default:
22
provisioner: vagrant
33
images: ['gusztavvargadr/windows-server']
4-
release_checks_sql_2012:
5-
provisioner: abs
6-
images: ['win-2012r2-x86_64']
7-
vars: 'sqlversion: sqlserver_2012'
84
release_checks_sql_2014_parity:
95
provisioner: abs
106
images: ['win-2012r2-x86_64']

readmes/README_ja_JP.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
## 概要
2222

23-
Microsoft SQL Server 2012、2014、2016、2017は、sqlserverモジュールにより、Windowsシステムでインストールと管理を行います。
23+
Microsoft SQL Server 2014、2016、2017は、sqlserverモジュールにより、Windowsシステムでインストールと管理を行います。
2424

2525
## モジュールの概要
2626

@@ -1070,7 +1070,7 @@ sys.configurationsで管理するオプションを指定します。有効な
10701070

10711071
SQL 2017検出サポートが追加されました。このサポートはほかのバージョンの既存の機能に限定されます。SQL 2017に固有の新しい機能は、このリリースには追加されていません。
10721072

1073-
このモジュールは、指定ホスト上のSQL Serverの単独バージョンのみ管理できます(SQL Server 2012、2014、2016のうちいずれか1つのみ)。このモジュールでは同一バージョンの複数のSQL Serverインスタンスを管理できます。
1073+
このモジュールは、指定ホスト上のSQL Serverの単独バージョンのみ管理できます(SQL Server 2014、2016のうちいずれか1つのみ)。このモジュールでは同一バージョンの複数のSQL Serverインスタンスを管理できます。
10741074

10751075
このモジュールは、SQL Server Native Client SDK (別名SNAC_SDK)を管理できません。SQL ServerのインストールメディアはSDKをインストールできますが、SDKをアンインストールすることはできません。'sqlserver_features' factはSDKの存在を検出します。
10761076

spec/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The Acceptance tets run on either a master and agent system or just on a stand-a
4242
First use beaker-hostgenerator to set up a hosts.yml to feed to the acceptance tests by running:
4343

4444
```
45-
bundle exec beaker-hostgenerator windows2012r2-64sql_host%2Cdefault.a%7Bsql_version=2012%7D-redhat7-64mdca --hypervisor abs > spec/acceptance/nodesets/hosts.yml
45+
bundle exec beaker-hostgenerator windows2012r2-64sql_host%2Cdefault.a%7Bsql_version=2014%7D-redhat7-64mdca --hypervisor abs > spec/acceptance/nodesets/hosts.yml
4646
```
4747
This command assumes you're running it from the root of the sqlserver module repo.
4848

@@ -56,7 +56,7 @@ export ABS_RESOURCE_HOSTS="[{\"hostname\":\"<LOCATION OF WINDOWS HOST TO TEST>\"
5656
e.g. replace "<LOCATION OF WINDOWS HOST TO TEST>\" with "fyzskxlt6edanll.delivery.puppetlabs.net\"
5757

5858
```
59-
export ABS_RESOURCE_REQUESTS_beaker="[{\"windows2012r2-64sql_host.a%7Bsql_version=2012%7D-redhat7-64mdca\":{\"win-2012r2-x86_64\":1,\"redhat-7-x86_64\":1}, \"windows2012r2-64sql_host.a%7Bsql_version=2014%7D-redhat7-64mdca\":{\"win-2012r2-x86_64\":1,\"redhat-7-x86_64\":1}}]"
59+
export ABS_RESOURCE_REQUESTS_beaker="[{\"windows2012r2-64sql_host.a%7Bsql_version=2014%7D-redhat7-64mdca\":{\"win-2012r2-x86_64\":1,\"redhat-7-x86_64\":1}, \"windows2012r2-64sql_host.a%7Bsql_version=2016%7D-redhat7-64mdca\":{\"win-2012r2-x86_64\":1,\"redhat-7-x86_64\":1}}]"
6060
6161
export BEAKER_setfile=spec/acceptance/nodesets/hosts.yml
6262
export BEAKER_keyfile=/var/lib/jenkins/.ssh/id_rsa-acceptance

spec/spec_helper_acceptance_local.rb

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class Helper
1616
SQL_2017_ISO = 'SQLServer2017-x64-ENU.iso'
1717
SQL_2016_ISO = 'en_sql_server_2016_enterprise_with_service_pack_1_x64_dvd_9542382.iso'
1818
SQL_2014_ISO = 'SQLServer2014SP3-FullSlipstream-x64-ENU.iso'
19-
SQL_2012_ISO = 'SQLServer2012SP1-FullSlipstream-ENU-x64.iso'
2019
SQL_ADMIN_USER = 'sa'
2120
SQL_ADMIN_PASS = 'Pupp3t1@'
2221
USER = Helper.instance.run_shell('$env:UserName').stdout.chomp
@@ -101,12 +100,6 @@ def mount_iso(opts = {})
101100

102101
def base_install(sql_version)
103102
case sql_version.to_i
104-
when 2012
105-
iso_opts = {
106-
folder: QA_RESOURCE_ROOT,
107-
file: SQL_2012_ISO,
108-
drive_letter: 'H'
109-
}
110103
when 2014
111104
iso_opts = {
112105
folder: QA_RESOURCE_ROOT,
@@ -237,7 +230,7 @@ def validate_sql_install(opts = {}, &block)
237230
end
238231

239232
def get_install_paths(version)
240-
vers = { '2012' => '110', '2014' => '120', '2016' => '130', '2017' => '140', '2019' => '150', '2022' => '160' }
233+
vers = { '2014' => '120', '2016' => '130', '2017' => '140', '2019' => '150', '2022' => '160' }
241234

242235
raise _('Valid version must be specified') unless vers.key?(version)
243236

spec/sql_testing_helpers.rb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,6 @@ def run_sql_query(host, opts = {}, &block)
9090

9191
def base_install(sql_version)
9292
case sql_version.to_i
93-
when 2012
94-
iso_opts = {
95-
folder: QA_RESOURCE_ROOT,
96-
file: SQL_2012_ISO,
97-
drive_letter: 'H'
98-
}
9993
when 2014
10094
iso_opts = {
10195
folder: QA_RESOURCE_ROOT,
@@ -169,7 +163,7 @@ def remove_sql_instances(host, opts = {})
169163
end
170164

171165
def get_install_paths(version)
172-
vers = { '2012' => '110', '2014' => '120', '2016' => '130', '2017' => '140', '2019' => '150', '2022' => '160' }
166+
vers = { '2014' => '120', '2016' => '130', '2017' => '140', '2019' => '150', '2022' => '160' }
173167

174168
raise _('Valid version must be specified') unless vers.key?(version)
175169

0 commit comments

Comments
 (0)