Skip to content

(maint) Prime Feature and Instance installation with .Net 3.5 source #197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions spec/acceptance/sqlserver_config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def ensure_sqlserver_instance(host,inst_name, ensure_val = 'present')
sql_sysadmin_accounts => ['Administrator'],
security_mode => 'SQL',
sa_pwd => 'Pupp3t1@',
windows_feature_source => 'I:\\sources\\sxs',
}
MANIFEST

Expand Down
1 change: 1 addition & 0 deletions spec/acceptance/sqlserver_instance_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def ensure_sqlserver_instance(host, features, inst_name, ensure_val = 'present',
sql_sysadmin_accounts => #{sysadmin_accounts},
agt_svc_account => 'Administrator',
agt_svc_password => 'Qu@lity!',
windows_feature_source => 'I:\\sources\\sxs',
}
MANIFEST

Expand Down
1 change: 1 addition & 0 deletions spec/acceptance/z_last_sqlserver_features_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def ensure_sql_features(host, features, ensure_val = 'present')
is_svc_account => "$::hostname\\\\Administrator",
is_svc_password => 'Qu@lity!',
features => [ <%= mssql_features %> ],
windows_feature_source => 'I:\\sources\\sxs',
}
MANIFEST

Expand Down
10 changes: 10 additions & 0 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
require 'sql_testing_helpers'
require 'beaker/puppet_install_helper'

WIN_ISO_ROOT = "http://int-resources.ops.puppetlabs.net/ISO/Windows/2012"
WIN_2012R2_ISO = "en_windows_server_2012_r2_with_update_x64_dvd_6052708.iso"
QA_RESOURCE_ROOT = "http://int-resources.ops.puppetlabs.net/QA_resources/microsoft_sql/iso/"
SQL_2014_ISO = "SQLServer2014-x64-ENU.iso"
SQL_2012_ISO = "SQLServer2012SP1-FullSlipstream-ENU-x64.iso"
Expand Down Expand Up @@ -70,6 +72,14 @@
# Install sqlserver dependencies.
on(agent, puppet('module install puppetlabs-stdlib'))

# Mount windows 2012R2 ISO to allow install of .NET 3.5 Windows Feature
iso_opts = {
:folder => WIN_ISO_ROOT,
:file => WIN_2012R2_ISO,
:drive_letter => 'I'
}
mount_iso(agent, iso_opts)

# Install sqlserver module from local source.
# See FM-5062 for more details.
copy_module_to(agent, local)
Expand Down
34 changes: 18 additions & 16 deletions spec/sql_testing_helpers.rb
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@

def mount_iso(host, opts = {})
# This method mounts the ISO on a given host
qa_iso_resource_root = opts[:qa_iso_resource_root]
sqlserver_iso = opts[:sqlserver_iso]
sqlserver_version = opts[:sqlserver_version]
folder = opts[:folder];
file = opts[:file];
drive_letter = opts[:drive_letter];

pp = <<-MANIFEST
$p_src = '#{qa_iso_resource_root}/#{sqlserver_iso}'
$source = 'C:\\#{sqlserver_iso}'
pget{"Download #{sqlserver_version} Iso":
$p_src = '#{folder}/#{file}'
$source = 'C:\\#{file}'
pget{"Download #{file} Iso":
source => $p_src,
target => 'C:',
timeout => 150000,
}
mount_iso{$source:
require => Pget['Download #{sqlserver_version} Iso'],
drive_letter => 'H',
require => Pget['Download #{file} Iso'],
drive_letter => '#{drive_letter}',
}
MANIFEST
apply_manifest_on(host, pp)
Expand All @@ -37,7 +38,8 @@ def install_sqlserver(host, opts = {})
'INSTANCEDIR' => 'C:\\Program Files\\Microsoft SQL Server',
'INSTALLSHAREDDIR' => 'C:\\Program Files\\Microsoft SQL Server',
'INSTALLSHAREDWOWDIR' => 'C:\\Program Files (x86)\\Microsoft SQL Server',
}
},
windows_feature_source => 'I:\\sources\\sxs',
}
MANIFEST
apply_manifest_on(host, pp)
Expand Down Expand Up @@ -83,15 +85,15 @@ def base_install(sql_version)
case sql_version.to_i
when 2012
iso_opts = {
:qa_iso_resource_root => QA_RESOURCE_ROOT,
:sqlserver_iso => SQL_2012_ISO,
:sqlserver_version => '2012',
:folder => QA_RESOURCE_ROOT,
:file => SQL_2012_ISO,
:drive_letter => 'H'
}
when 2014
iso_opts = {
:qa_iso_resource_root => QA_RESOURCE_ROOT,
:sqlserver_iso => SQL_2014_ISO,
:sqlserver_version => '2014',
:folder => QA_RESOURCE_ROOT,
:file => SQL_2014_ISO,
:drive_letter => 'H'
}
end
host = find_only_one('sql_host')
Expand Down