vagrant-uplift 0.2.1902.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/bin/console +13 -0
- data/bin/setup +8 -0
- data/lib/scripts/vagrant/uplift.vagrant.core/uplift.fix-second-network.ps1 +59 -0
- data/lib/scripts/vagrant/uplift.vagrant.dc12/dc.dsc.ps1 +128 -0
- data/lib/scripts/vagrant/uplift.vagrant.dc12/dc.replica.dsc.ps1 +117 -0
- data/lib/scripts/vagrant/uplift.vagrant.dc12/dc.users.dsc.ps1 +147 -0
- data/lib/scripts/vagrant/uplift.vagrant.dc12/tests/dc.dsc.Tests.ps1 +165 -0
- data/lib/scripts/vagrant/uplift.vagrant.dcjoin/dc.join.dsc.ps1 +125 -0
- data/lib/scripts/vagrant/uplift.vagrant.dcjoin/dc.join.hostname.ps1 +13 -0
- data/lib/scripts/vagrant/uplift.vagrant.dcjoin/tests/dc.join.dsc.Tests.ps1 +12 -0
- data/lib/scripts/vagrant/uplift.vagrant.sharepoint/shared/sp.helpers.ps1 +155 -0
- data/lib/scripts/vagrant/uplift.vagrant.sharepoint/sp2013.dsc.ps1 +248 -0
- data/lib/scripts/vagrant/uplift.vagrant.sharepoint/sp2013.post_setup.dsc.ps1 +117 -0
- data/lib/scripts/vagrant/uplift.vagrant.sharepoint/sp2016.dsc.ps1 +246 -0
- data/lib/scripts/vagrant/uplift.vagrant.sharepoint/sp2016.farm-only.dsc.ps1 +281 -0
- data/lib/scripts/vagrant/uplift.vagrant.sharepoint/sp2016.info.ps1 +36 -0
- data/lib/scripts/vagrant/uplift.vagrant.sharepoint/sp2016.post_setup.dsc.ps1 +125 -0
- data/lib/scripts/vagrant/uplift.vagrant.sharepoint/sp2016.pre_setup1.dsc.ps1 +28 -0
- data/lib/scripts/vagrant/uplift.vagrant.sharepoint/sp2016.pre_setup2.dsc.ps1 +75 -0
- data/lib/scripts/vagrant/uplift.vagrant.sharepoint/tests/sp2013.dsc.wfe.Tests.ps1 +68 -0
- data/lib/scripts/vagrant/uplift.vagrant.sharepoint/tests/sp2016.dsc.wfe.Tests.ps1 +68 -0
- data/lib/scripts/vagrant/uplift.vagrant.sql12/sql.complete.dsc.ps1 +186 -0
- data/lib/scripts/vagrant/uplift.vagrant.sql12/sql.dsc.ps1 +66 -0
- data/lib/scripts/vagrant/uplift.vagrant.sql12/sql.optimize.dsc.ps1 +50 -0
- data/lib/scripts/vagrant/uplift.vagrant.sql12/sql.prepare.dsc.ps1 +60 -0
- data/lib/scripts/vagrant/uplift.vagrant.sql12/tests/sql.dsc.Tests.ps1 +23 -0
- data/lib/scripts/vagrant/uplift.vagrant.sql12/tests/sql12.dsc.Tests.ps1 +45 -0
- data/lib/scripts/vagrant/uplift.vagrant.sql12/tests/sql16.dsc.Tests.ps1 +22 -0
- data/lib/scripts/vagrant/uplift.vagrant.visual_studio13/tests/vs13.dsc.Tests.ps1 +61 -0
- data/lib/scripts/vagrant/uplift.vagrant.visual_studio13/vs13.dsc.post_deploy.ps1 +32 -0
- data/lib/scripts/vagrant/uplift.vagrant.visual_studio13/vs13.dsc.ps1 +69 -0
- data/lib/scripts/vagrant/uplift.vagrant.visual_studio17/tests/vs17.dsc.Tests.ps1 +61 -0
- data/lib/scripts/vagrant/uplift.vagrant.visual_studio17/vs17.dsc.post_deploy.ps1 +34 -0
- data/lib/scripts/vagrant/uplift.vagrant.visual_studio17/vs17.dsc.ps1 +134 -0
- data/lib/scripts/vagrant/uplift.vagrant.win12soe/soe.dsc.ps1 +115 -0
- data/lib/scripts/vagrant/uplift.vagrant.win12soe/soe.shortcuts.dsc.ps1 +41 -0
- data/lib/scripts/vagrant/uplift.vagrant.win12soe/tests/soe.dsc.modules.Tests.ps1 +71 -0
- data/lib/scripts/vagrant/uplift.vagrant.win12soe/tests/soe.dsc.os.Tests.ps1 +89 -0
- data/lib/vagrant-uplift.rb +8 -0
- data/lib/vagrant-uplift/config_builder.rb +819 -0
- data/lib/vagrant-uplift/log.rb +146 -0
- data/lib/vagrant-uplift/plugin-vagrant-uplift-checkpoint.rb +41 -0
- data/lib/vagrant-uplift/plugin.rb +16 -0
- data/lib/vagrant-uplift/version.rb +10 -0
- metadata +131 -0
@@ -0,0 +1,146 @@
|
|
1
|
+
require 'logger'
|
2
|
+
|
3
|
+
module VagrantPlugins::Uplift
|
4
|
+
module Log
|
5
|
+
|
6
|
+
extend self
|
7
|
+
|
8
|
+
# adding custom log levels
|
9
|
+
# https://stackoverflow.com/questions/2281490/how-to-add-a-custom-log-level-to-logger-in-ruby
|
10
|
+
class UpliftLogger < Logger
|
11
|
+
|
12
|
+
SEVS = %w(DEBUG INFO WARN ERROR FATAL VERBOSE INFO_LIGHT)
|
13
|
+
def format_severity(severity)
|
14
|
+
SEVS[severity] || 'ANY'
|
15
|
+
end
|
16
|
+
|
17
|
+
def verbose(progname = nil, &block)
|
18
|
+
add(5, nil, progname, &block)
|
19
|
+
end
|
20
|
+
|
21
|
+
def info_light(progname = nil, &block)
|
22
|
+
add(6, nil, progname, &block)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def get_logger
|
27
|
+
|
28
|
+
$stdout.sync = true
|
29
|
+
logger = UpliftLogger.new($stdout)
|
30
|
+
|
31
|
+
_configure_logging(logger)
|
32
|
+
|
33
|
+
return logger
|
34
|
+
end
|
35
|
+
|
36
|
+
private
|
37
|
+
|
38
|
+
def _configure_logging(logger)
|
39
|
+
_set_formatting(logger)
|
40
|
+
_set_log_level(logger)
|
41
|
+
end
|
42
|
+
|
43
|
+
def _set_log_level(logger)
|
44
|
+
logger.level = Logger::INFO
|
45
|
+
|
46
|
+
case ENV['UPLF_LOG_LEVEL']
|
47
|
+
when 'DEBUG'
|
48
|
+
logger.level = Logger::DEBUG
|
49
|
+
when 'INFO'
|
50
|
+
logger.level = Logger::INFO
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def _set_formatting(logger)
|
55
|
+
logger.formatter= proc do |severity, datetime, progname, message|
|
56
|
+
_format_message(severity, datetime, progname, message)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
def _logger_name
|
61
|
+
'vagrant-uplift'
|
62
|
+
end
|
63
|
+
|
64
|
+
def _format_message(severity, datetime, progname, message)
|
65
|
+
color_code = _get_message_color_code(severity: severity, message: message)
|
66
|
+
|
67
|
+
if severity == "DEBUG"
|
68
|
+
message = " #{message}"
|
69
|
+
end
|
70
|
+
|
71
|
+
case ENV['UPLF_LOG_FORMAT'].to_s.upcase
|
72
|
+
when 'SHORT'
|
73
|
+
"\e[#{color_code}m#{_logger_name}: #{message}\e[0m\n"
|
74
|
+
when 'TIME'
|
75
|
+
"\e[#{color_code}m#{_logger_name}: #{datetime} #{message}\e[0m\n"
|
76
|
+
when 'FULL'
|
77
|
+
"\e[#{color_code}m#{_logger_name}: #{datetime} #{severity} #{message}\e[0m\n"
|
78
|
+
else
|
79
|
+
"\e[#{color_code}m#{_logger_name}: #{message}\e[0m\n"
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
def _get_message_color_code(severity:, message:)
|
84
|
+
color = _white
|
85
|
+
|
86
|
+
case severity
|
87
|
+
when "INFO"
|
88
|
+
color = _light_blue
|
89
|
+
when "INFO_LIGHT"
|
90
|
+
color = _light_light_blue
|
91
|
+
when "WARNING"
|
92
|
+
color = _yellow
|
93
|
+
when "WARN"
|
94
|
+
color = _yellow
|
95
|
+
when "DEBUG"
|
96
|
+
color = _light_blue
|
97
|
+
when "ERROR"
|
98
|
+
color = _red
|
99
|
+
when "FATAL"
|
100
|
+
color = _red
|
101
|
+
when "VERBOSE"
|
102
|
+
color = _gray
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
def _white
|
107
|
+
37
|
108
|
+
end
|
109
|
+
|
110
|
+
def _red
|
111
|
+
31
|
112
|
+
end
|
113
|
+
|
114
|
+
def _green
|
115
|
+
"2;32"
|
116
|
+
end
|
117
|
+
|
118
|
+
def _green_light
|
119
|
+
"1;32"
|
120
|
+
end
|
121
|
+
|
122
|
+
def _yellow
|
123
|
+
33
|
124
|
+
end
|
125
|
+
|
126
|
+
def _blue
|
127
|
+
34
|
128
|
+
end
|
129
|
+
|
130
|
+
def _pink
|
131
|
+
35
|
132
|
+
end
|
133
|
+
|
134
|
+
def _light_blue
|
135
|
+
"2;36"
|
136
|
+
end
|
137
|
+
|
138
|
+
def _light_light_blue
|
139
|
+
"1;36"
|
140
|
+
end
|
141
|
+
|
142
|
+
def _gray
|
143
|
+
37
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
begin
|
2
|
+
require "vagrant"
|
3
|
+
rescue LoadError
|
4
|
+
raise "The vagrant-uplift plugin must be run within Vagrant."
|
5
|
+
end
|
6
|
+
|
7
|
+
module VagrantPlugins::UpliftCheckpoint
|
8
|
+
|
9
|
+
# https://superuser.com/questions/701735/run-script-on-host-machine-during-vagrant-up/992220#992220
|
10
|
+
class Config < Vagrant.plugin("2", :config)
|
11
|
+
attr_accessor :name
|
12
|
+
end
|
13
|
+
|
14
|
+
class Plugin < Vagrant.plugin("2")
|
15
|
+
name "vagrant-uplift-checkpoint"
|
16
|
+
|
17
|
+
config(:uplift_checkpoint, :provisioner) do
|
18
|
+
Config
|
19
|
+
end
|
20
|
+
|
21
|
+
provisioner(:uplift_checkpoint) do
|
22
|
+
Provisioner
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
class Provisioner < Vagrant.plugin("2", :provisioner)
|
27
|
+
|
28
|
+
def provision
|
29
|
+
machine_name = @machine.name
|
30
|
+
checkpoint_name = config.name
|
31
|
+
|
32
|
+
dir = ".vagrant/machines/#{machine_name}/virtualbox/.uplift/"
|
33
|
+
|
34
|
+
FileUtils.mkdir_p dir
|
35
|
+
file_name =File.join(dir, ".checkpoint-#{checkpoint_name}")
|
36
|
+
|
37
|
+
File.write(file_name, 'ok')
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
begin
|
2
|
+
require "vagrant"
|
3
|
+
rescue LoadError
|
4
|
+
raise "The vagrant-uplift plugin must be run within Vagrant."
|
5
|
+
end
|
6
|
+
|
7
|
+
require_relative 'plugin-vagrant-uplift-checkpoint'
|
8
|
+
require_relative 'config_builder'
|
9
|
+
|
10
|
+
module VagrantPlugins::Uplift
|
11
|
+
|
12
|
+
class Plugin < Vagrant.plugin("2")
|
13
|
+
name "vagrant-uplift"
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
metadata
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: vagrant-uplift
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.1902.18
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- SubPointSupport
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-02-04 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Use vagrant-uplift to heavylift common windows installation rounties
|
56
|
+
for DC, SQL, and SharePoint Vagrant VM
|
57
|
+
email:
|
58
|
+
- support@subpointsolutions.com
|
59
|
+
executables: []
|
60
|
+
extensions: []
|
61
|
+
extra_rdoc_files: []
|
62
|
+
files:
|
63
|
+
- bin/console
|
64
|
+
- bin/setup
|
65
|
+
- lib/scripts/vagrant/uplift.vagrant.core/uplift.fix-second-network.ps1
|
66
|
+
- lib/scripts/vagrant/uplift.vagrant.dc12/dc.dsc.ps1
|
67
|
+
- lib/scripts/vagrant/uplift.vagrant.dc12/dc.replica.dsc.ps1
|
68
|
+
- lib/scripts/vagrant/uplift.vagrant.dc12/dc.users.dsc.ps1
|
69
|
+
- lib/scripts/vagrant/uplift.vagrant.dc12/tests/dc.dsc.Tests.ps1
|
70
|
+
- lib/scripts/vagrant/uplift.vagrant.dcjoin/dc.join.dsc.ps1
|
71
|
+
- lib/scripts/vagrant/uplift.vagrant.dcjoin/dc.join.hostname.ps1
|
72
|
+
- lib/scripts/vagrant/uplift.vagrant.dcjoin/tests/dc.join.dsc.Tests.ps1
|
73
|
+
- lib/scripts/vagrant/uplift.vagrant.sharepoint/shared/sp.helpers.ps1
|
74
|
+
- lib/scripts/vagrant/uplift.vagrant.sharepoint/sp2013.dsc.ps1
|
75
|
+
- lib/scripts/vagrant/uplift.vagrant.sharepoint/sp2013.post_setup.dsc.ps1
|
76
|
+
- lib/scripts/vagrant/uplift.vagrant.sharepoint/sp2016.dsc.ps1
|
77
|
+
- lib/scripts/vagrant/uplift.vagrant.sharepoint/sp2016.farm-only.dsc.ps1
|
78
|
+
- lib/scripts/vagrant/uplift.vagrant.sharepoint/sp2016.info.ps1
|
79
|
+
- lib/scripts/vagrant/uplift.vagrant.sharepoint/sp2016.post_setup.dsc.ps1
|
80
|
+
- lib/scripts/vagrant/uplift.vagrant.sharepoint/sp2016.pre_setup1.dsc.ps1
|
81
|
+
- lib/scripts/vagrant/uplift.vagrant.sharepoint/sp2016.pre_setup2.dsc.ps1
|
82
|
+
- lib/scripts/vagrant/uplift.vagrant.sharepoint/tests/sp2013.dsc.wfe.Tests.ps1
|
83
|
+
- lib/scripts/vagrant/uplift.vagrant.sharepoint/tests/sp2016.dsc.wfe.Tests.ps1
|
84
|
+
- lib/scripts/vagrant/uplift.vagrant.sql12/sql.complete.dsc.ps1
|
85
|
+
- lib/scripts/vagrant/uplift.vagrant.sql12/sql.dsc.ps1
|
86
|
+
- lib/scripts/vagrant/uplift.vagrant.sql12/sql.optimize.dsc.ps1
|
87
|
+
- lib/scripts/vagrant/uplift.vagrant.sql12/sql.prepare.dsc.ps1
|
88
|
+
- lib/scripts/vagrant/uplift.vagrant.sql12/tests/sql.dsc.Tests.ps1
|
89
|
+
- lib/scripts/vagrant/uplift.vagrant.sql12/tests/sql12.dsc.Tests.ps1
|
90
|
+
- lib/scripts/vagrant/uplift.vagrant.sql12/tests/sql16.dsc.Tests.ps1
|
91
|
+
- lib/scripts/vagrant/uplift.vagrant.visual_studio13/tests/vs13.dsc.Tests.ps1
|
92
|
+
- lib/scripts/vagrant/uplift.vagrant.visual_studio13/vs13.dsc.post_deploy.ps1
|
93
|
+
- lib/scripts/vagrant/uplift.vagrant.visual_studio13/vs13.dsc.ps1
|
94
|
+
- lib/scripts/vagrant/uplift.vagrant.visual_studio17/tests/vs17.dsc.Tests.ps1
|
95
|
+
- lib/scripts/vagrant/uplift.vagrant.visual_studio17/vs17.dsc.post_deploy.ps1
|
96
|
+
- lib/scripts/vagrant/uplift.vagrant.visual_studio17/vs17.dsc.ps1
|
97
|
+
- lib/scripts/vagrant/uplift.vagrant.win12soe/soe.dsc.ps1
|
98
|
+
- lib/scripts/vagrant/uplift.vagrant.win12soe/soe.shortcuts.dsc.ps1
|
99
|
+
- lib/scripts/vagrant/uplift.vagrant.win12soe/tests/soe.dsc.modules.Tests.ps1
|
100
|
+
- lib/scripts/vagrant/uplift.vagrant.win12soe/tests/soe.dsc.os.Tests.ps1
|
101
|
+
- lib/vagrant-uplift.rb
|
102
|
+
- lib/vagrant-uplift/config_builder.rb
|
103
|
+
- lib/vagrant-uplift/log.rb
|
104
|
+
- lib/vagrant-uplift/plugin-vagrant-uplift-checkpoint.rb
|
105
|
+
- lib/vagrant-uplift/plugin.rb
|
106
|
+
- lib/vagrant-uplift/version.rb
|
107
|
+
homepage: http://subpointsolutions.com/uplift
|
108
|
+
licenses:
|
109
|
+
- MIT
|
110
|
+
metadata: {}
|
111
|
+
post_install_message:
|
112
|
+
rdoc_options: []
|
113
|
+
require_paths:
|
114
|
+
- lib
|
115
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
120
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
requirements: []
|
126
|
+
rubyforge_project:
|
127
|
+
rubygems_version: 2.7.8
|
128
|
+
signing_key:
|
129
|
+
specification_version: 4
|
130
|
+
summary: Simplifies windows infrastructure management for your Vagrant VM
|
131
|
+
test_files: []
|