mixlib-install 3.3.4 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.expeditor/config.yml +11 -7
- data/CHANGELOG.md +8 -3
- data/VERSION +1 -1
- data/acceptance/ubuntu_install_command/.acceptance/acceptance-cookbook/recipes/provision.rb +1 -0
- data/acceptance/ubuntu_install_command_once/.acceptance/acceptance-cookbook/.gitignore +8 -0
- data/acceptance/ubuntu_install_command_once/.acceptance/acceptance-cookbook/metadata.rb +2 -0
- data/acceptance/ubuntu_install_command_once/.acceptance/acceptance-cookbook/recipes/destroy.rb +3 -0
- data/acceptance/ubuntu_install_command_once/.acceptance/acceptance-cookbook/recipes/provision.rb +12 -0
- data/acceptance/ubuntu_install_command_once/.acceptance/acceptance-cookbook/recipes/verify.rb +11 -0
- data/acceptance/ubuntu_install_command_once/inspec/verify.rb +7 -0
- data/acceptance/ubuntu_install_command_once/terraform/application.tf +78 -0
- data/acceptance/ubuntu_install_command_once/terraform/aws.tf +8 -0
- data/acceptance/ubuntu_install_command_once/terraform/variables.tf +27 -0
- data/acceptance/ubuntu_install_sh/.acceptance/acceptance-cookbook/recipes/provision.rb +1 -0
- data/acceptance/windows-server-2012r2-fips/.acceptance/acceptance-cookbook/recipes/provision.rb +1 -0
- data/acceptance/windows-server-2012r2-once/.acceptance/acceptance-cookbook/.gitignore +2 -0
- data/acceptance/windows-server-2012r2-once/.acceptance/acceptance-cookbook/metadata.rb +2 -0
- data/acceptance/windows-server-2012r2-once/.acceptance/acceptance-cookbook/recipes/destroy.rb +3 -0
- data/acceptance/windows-server-2012r2-once/.acceptance/acceptance-cookbook/recipes/provision.rb +13 -0
- data/acceptance/windows-server-2012r2-once/.acceptance/acceptance-cookbook/recipes/verify.rb +14 -0
- data/acceptance/windows-server-2012r2-once/inspec/verify.rb +7 -0
- data/acceptance/windows-server-2012r2-once/terraform/application.tf +89 -0
- data/acceptance/windows-server-2012r2-once/terraform/aws.tf +8 -0
- data/acceptance/windows-server-2012r2-once/terraform/variables.tf +16 -0
- data/lib/mixlib/install/generator/bourne.rb +2 -0
- data/lib/mixlib/install/generator/bourne/scripts/check_product.sh +6 -0
- data/lib/mixlib/install/generator/bourne/scripts/script_cli_parameters.sh +4 -2
- data/lib/mixlib/install/generator/powershell/scripts/helpers.ps1.erb +1 -1
- data/lib/mixlib/install/generator/powershell/scripts/install_project.ps1 +13 -3
- data/lib/mixlib/install/version.rb +1 -1
- metadata +21 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 330f993cfb69a22e018ecffd2993b74619945cb9
|
4
|
+
data.tar.gz: d80c5194651fb543c57cdec4a8c3366b290842ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa96263fded01b16629164a336182234331bfa905a80bf16bd91aa40f0efd1c6b3ba1c6e68a576fb5657a48821107e308dc1da66a1efef8b3d77226e83bc8fde
|
7
|
+
data.tar.gz: 86c5bf3ff6611fbd1282c50e2998b5c43efecbb6752c7eb29f2703d1f7dc366c06e6c34e03e013c9d53d3882424eacd4a45f14dfacd6c3d0ac041eab98ffa772
|
data/.expeditor/config.yml
CHANGED
@@ -1,14 +1,18 @@
|
|
1
1
|
slack:
|
2
|
-
notify_channel: eng-services-
|
2
|
+
notify_channel: eng-services-notify
|
3
3
|
|
4
4
|
github:
|
5
5
|
maintainer_group: chef/engineering-services
|
6
6
|
version_tag_format: v{{version}}
|
7
7
|
|
8
8
|
merge_actions:
|
9
|
-
built_in:bump_version:
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
- built_in:bump_version:
|
10
|
+
ignore_labels:
|
11
|
+
- "Version: Skip Bump"
|
12
|
+
- "Expeditor: Skip All"
|
13
|
+
- bash:.expeditor/update_version.sh:
|
14
|
+
only_if: built_in:bump_version
|
15
|
+
- built_in:update_changelog:
|
16
|
+
ignore_labels:
|
17
|
+
- "Changelog: Skip Update"
|
18
|
+
- "Expeditor: Skip All"
|
data/CHANGELOG.md
CHANGED
@@ -1,11 +1,16 @@
|
|
1
1
|
# Mixlib::Install Changes
|
2
2
|
|
3
|
-
<!-- latest_release 3.
|
3
|
+
<!-- latest_release 3.4.0 -->
|
4
|
+
## [v3.4.0](https://github.com/chef/mixlib-install/tree/v3.4.0) (2017-08-22)
|
5
|
+
|
6
|
+
#### Merged Pull Requests
|
7
|
+
- Add install_strategy option to bootstrap install scripts [#232](https://github.com/chef/mixlib-install/pull/232) ([wrightp](https://github.com/wrightp))
|
8
|
+
<!-- latest_release -->
|
9
|
+
|
4
10
|
## [v3.3.4](https://github.com/chef/mixlib-install/tree/v3.3.4) (2017-08-10)
|
5
11
|
|
6
12
|
#### Merged Pull Requests
|
7
13
|
- Fix Windows architecture detection [#231](https://github.com/chef/mixlib-install/pull/231) ([rlaveycal](https://github.com/rlaveycal))
|
8
|
-
<!-- latest_release -->
|
9
14
|
|
10
15
|
## [v3.3.3](https://github.com/chef/mixlib-install/tree/v3.3.3) (2017-08-02)
|
11
16
|
|
@@ -185,4 +190,4 @@
|
|
185
190
|
|
186
191
|
## [1.0.0]
|
187
192
|
- Ability to query product artifacts from multiple channels
|
188
|
-
- Ability to generate installation scripts for `sh` and `ps1`
|
193
|
+
- Ability to generate installation scripts for `sh` and `ps1`
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.4.0
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# Generate install script then write to disk for terraform to copy to the instance for execution
|
1
2
|
execute "bundle exec ruby -e \"require 'mixlib/install'; puts Mixlib::Install.new(product_name: 'omnibus-toolchain', product_version: :latest, channel: :stable).install_command\" > ../.acceptance_data/ubuntu_install_command.sh" do
|
2
3
|
cwd node['chef-acceptance']['suite-dir']
|
3
4
|
end
|
data/acceptance/ubuntu_install_command_once/.acceptance/acceptance-cookbook/recipes/provision.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# Generate install script then write to disk for terraform to copy to the instance for execution
|
2
|
+
execute "bundle exec ruby -e \"require 'mixlib/install'; puts Mixlib::Install.new(product_name: 'chef', product_version: :latest, channel: :stable, install_command_options: {install_strategy: 'once'}).install_command\" > ../.acceptance_data/ubuntu_install_command_once.sh" do
|
3
|
+
cwd node['chef-acceptance']['suite-dir']
|
4
|
+
end
|
5
|
+
|
6
|
+
execute "terraform plan" do
|
7
|
+
cwd "#{node['chef-acceptance']['suite-dir']}/terraform"
|
8
|
+
end
|
9
|
+
|
10
|
+
execute "terraform apply" do
|
11
|
+
cwd "#{node['chef-acceptance']['suite-dir']}/terraform"
|
12
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
ruby_block "get ip" do
|
2
|
+
block do
|
3
|
+
tf_state = JSON.parse(File.read("#{node['chef-acceptance']['suite-dir']}/terraform/terraform.tfstate"))
|
4
|
+
node.default["ip"] = tf_state["modules"].first["resources"]["aws_instance.mixlib_install_sh"]["primary"]["attributes"]["public_ip"]
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
execute "run inspec" do
|
9
|
+
command lazy { "inspec exec verify.rb -t ssh://ubuntu@#{node['ip']} -i ~/.ssh/es-infrastructure.pem" }
|
10
|
+
cwd "#{node['chef-acceptance']['suite-dir']}/inspec"
|
11
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
data "aws_ami" "ubuntu_14_ami" {
|
2
|
+
most_recent = true
|
3
|
+
|
4
|
+
filter {
|
5
|
+
name = "owner-id"
|
6
|
+
values = ["099720109477"]
|
7
|
+
}
|
8
|
+
|
9
|
+
filter {
|
10
|
+
name = "name"
|
11
|
+
values = ["ubuntu/images/*/ubuntu-*-14.04-*-server-*"]
|
12
|
+
}
|
13
|
+
|
14
|
+
filter {
|
15
|
+
name = "architecture"
|
16
|
+
values = ["x86_64"]
|
17
|
+
}
|
18
|
+
|
19
|
+
filter {
|
20
|
+
name = "virtualization-type"
|
21
|
+
values = ["hvm"]
|
22
|
+
}
|
23
|
+
|
24
|
+
filter {
|
25
|
+
name = "block-device-mapping.volume-type"
|
26
|
+
values = ["gp2"]
|
27
|
+
}
|
28
|
+
|
29
|
+
filter {
|
30
|
+
name = "image-type"
|
31
|
+
values = ["machine"]
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
resource "aws_instance" "mixlib_install_sh" {
|
36
|
+
count = 1
|
37
|
+
|
38
|
+
ami = "${data.aws_ami.ubuntu_14_ami.id}"
|
39
|
+
instance_type = "${var.aws_instance_type}"
|
40
|
+
key_name = "es-infrastructure"
|
41
|
+
|
42
|
+
associate_public_ip_address = true
|
43
|
+
|
44
|
+
subnet_id = "subnet-11ac0174" # Planet Releng Public Subnet
|
45
|
+
source_dest_check = false
|
46
|
+
|
47
|
+
vpc_security_group_ids = [
|
48
|
+
"sg-96274af3",
|
49
|
+
]
|
50
|
+
|
51
|
+
connection {
|
52
|
+
user = "ubuntu"
|
53
|
+
private_key = "${file("${var.connection_private_key}")}"
|
54
|
+
agent = "${var.connection_agent}"
|
55
|
+
timeout = "10m"
|
56
|
+
}
|
57
|
+
|
58
|
+
tags {
|
59
|
+
# ChefOps's AWS standard tags:
|
60
|
+
X-Dept = "EngServ"
|
61
|
+
X-Contact = "pwright"
|
62
|
+
X-Production = "false"
|
63
|
+
X-Environment = "acceptance"
|
64
|
+
X-Application = "mixlib-install"
|
65
|
+
}
|
66
|
+
|
67
|
+
provisioner "file" {
|
68
|
+
source = "../../.acceptance_data/ubuntu_install_command_once.sh"
|
69
|
+
destination = "/tmp/install.sh"
|
70
|
+
}
|
71
|
+
|
72
|
+
provisioner "remote-exec" {
|
73
|
+
inline = [
|
74
|
+
"chmod +x /tmp/install.sh",
|
75
|
+
"sudo bash /tmp/install.sh",
|
76
|
+
]
|
77
|
+
}
|
78
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Restrict operation of terraform to chef-es profile so that
|
2
|
+
# we do not create resources in other aws profiles.
|
3
|
+
# We assume user has configured standard aws credentials
|
4
|
+
# under ~/.aws/credentials or with $AWS_SHARED_CREDENTIALS_FILE
|
5
|
+
provider "aws" {
|
6
|
+
region = "${var.aws_region}"
|
7
|
+
profile = "chef-aws"
|
8
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# Region to create infrastructure in
|
2
|
+
variable "aws_region" {
|
3
|
+
type = "string"
|
4
|
+
default = "us-west-2"
|
5
|
+
}
|
6
|
+
|
7
|
+
variable "aws_instance_type" {
|
8
|
+
type = "string"
|
9
|
+
default = "t2.micro"
|
10
|
+
}
|
11
|
+
|
12
|
+
# Used to indicidate whether the environment should be treated as "prod"
|
13
|
+
# This is mainly used for the `X-Production` AWS tag.
|
14
|
+
variable "production" {
|
15
|
+
default = "false"
|
16
|
+
}
|
17
|
+
|
18
|
+
# SSH Connection info used for remote provisioning instances
|
19
|
+
variable "connection_agent" {
|
20
|
+
description = "Set to false to disable using ssh-agent to authenticate"
|
21
|
+
default = false
|
22
|
+
}
|
23
|
+
|
24
|
+
variable "connection_private_key" {
|
25
|
+
description = "File path to AWS keypair private key to provision with"
|
26
|
+
default = "~/.ssh/es-infrastructure.pem"
|
27
|
+
}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# Generate install script then write to disk for terraform to copy to the instance for execution
|
1
2
|
execute "bundle exec ruby -e \"require 'mixlib/install'; puts Mixlib::Install.install_sh\" > ../.acceptance_data/ubuntu_install.sh" do
|
2
3
|
cwd node['chef-acceptance']['suite-dir']
|
3
4
|
end
|
data/acceptance/windows-server-2012r2-fips/.acceptance/acceptance-cookbook/recipes/provision.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# Generate install script then write to disk for terraform to copy to the instance for execution
|
1
2
|
execute "bundle exec ruby -e \"require 'mixlib/install'; puts Mixlib::Install.install_ps1, 'install'\" > ../.acceptance_data/powershell_install_fips.ps1" do
|
2
3
|
cwd node['chef-acceptance']['suite-dir']
|
3
4
|
end
|
data/acceptance/windows-server-2012r2-once/.acceptance/acceptance-cookbook/recipes/provision.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Generate install script then write to disk for terraform to copy to the instance for execution
|
2
|
+
execute "bundle exec ruby -e \"require 'mixlib/install'; puts Mixlib::Install.install_ps1, 'install -install_strategy once'\" > ../.acceptance_data/powershell_install_once.ps1" do
|
3
|
+
cwd node['chef-acceptance']['suite-dir']
|
4
|
+
end
|
5
|
+
|
6
|
+
execute "terraform plan" do
|
7
|
+
cwd "#{node['chef-acceptance']['suite-dir']}/terraform"
|
8
|
+
end
|
9
|
+
|
10
|
+
execute "terraform apply" do
|
11
|
+
cwd "#{node['chef-acceptance']['suite-dir']}/terraform"
|
12
|
+
end
|
13
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
ruby_block "get ip" do
|
2
|
+
block do
|
3
|
+
tf_state = JSON.parse(File.read("#{node['chef-acceptance']['suite-dir']}/terraform/terraform.tfstate"))
|
4
|
+
node.default["ip"] = tf_state["modules"].first["resources"]["aws_instance.mixlib_install_ps1"]["primary"]["attributes"]["public_ip"]
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
execute "run inspec" do
|
9
|
+
command lazy { "inspec exec verify.rb -t winrm://Administrator@#{node['ip']} --password $WINDOWS_PASSWORD" }
|
10
|
+
cwd "#{node['chef-acceptance']['suite-dir']}/inspec"
|
11
|
+
environment(
|
12
|
+
"WINDOWS_PASSWORD" => ENV["TF_VAR_admin_password"] || "Pas5w0rD"
|
13
|
+
)
|
14
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
data "aws_ami" "windows_ami" {
|
2
|
+
most_recent = true
|
3
|
+
|
4
|
+
filter {
|
5
|
+
name = "owner-alias"
|
6
|
+
values = ["amazon"]
|
7
|
+
}
|
8
|
+
|
9
|
+
filter {
|
10
|
+
name = "name"
|
11
|
+
values = ["Windows_Server-2012-R2*-English-*-Base-*"]
|
12
|
+
}
|
13
|
+
|
14
|
+
filter {
|
15
|
+
name = "architecture"
|
16
|
+
values = ["x86_64"]
|
17
|
+
}
|
18
|
+
|
19
|
+
filter {
|
20
|
+
name = "virtualization-type"
|
21
|
+
values = ["hvm"]
|
22
|
+
}
|
23
|
+
|
24
|
+
filter {
|
25
|
+
name = "block-device-mapping.volume-type"
|
26
|
+
values = ["gp2"]
|
27
|
+
}
|
28
|
+
|
29
|
+
filter {
|
30
|
+
name = "image-type"
|
31
|
+
values = ["machine"]
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
resource "aws_instance" "mixlib_install_ps1" {
|
36
|
+
count = 1
|
37
|
+
|
38
|
+
ami = "${data.aws_ami.windows_ami.id}"
|
39
|
+
instance_type = "${var.aws_instance_type}"
|
40
|
+
key_name = "es-infrastructure"
|
41
|
+
|
42
|
+
associate_public_ip_address = true
|
43
|
+
|
44
|
+
subnet_id = "subnet-11ac0174" # Planet Releng Public Subnet
|
45
|
+
source_dest_check = false
|
46
|
+
|
47
|
+
vpc_security_group_ids = [
|
48
|
+
"sg-96274af3",
|
49
|
+
]
|
50
|
+
|
51
|
+
connection {
|
52
|
+
type = "winrm"
|
53
|
+
user = "Administrator"
|
54
|
+
password = "${var.admin_password}"
|
55
|
+
timeout = "10m"
|
56
|
+
}
|
57
|
+
|
58
|
+
user_data = <<EOF
|
59
|
+
<script>
|
60
|
+
winrm quickconfig -q & winrm set winrm/config/winrs @{MaxMemoryPerShellMB="300"} & winrm set winrm/config @{MaxTimeoutms="1800000"} & winrm set winrm/config/service @{AllowUnencrypted="true"} & winrm set winrm/config/service/auth @{Basic="true"}
|
61
|
+
</script>
|
62
|
+
<powershell>
|
63
|
+
Set-ExecutionPolicy -ExecutionPolicy Bypass
|
64
|
+
netsh advfirewall firewall add rule name="WinRM in" protocol=TCP dir=in profile=any localport=5985 remoteip=any localip=any action=allow
|
65
|
+
$admin = [adsi]("WinNT://./administrator, user")
|
66
|
+
$admin.psbase.invoke("SetPassword", "${var.admin_password}")
|
67
|
+
</powershell>
|
68
|
+
EOF
|
69
|
+
|
70
|
+
tags {
|
71
|
+
# ChefOps's AWS standard tags:
|
72
|
+
X-Dept = "EngServ"
|
73
|
+
X-Contact = "pwright"
|
74
|
+
X-Production = "false"
|
75
|
+
X-Environment = "acceptance"
|
76
|
+
X-Application = "mixlib-install"
|
77
|
+
}
|
78
|
+
|
79
|
+
provisioner "file" {
|
80
|
+
source = "../../.acceptance_data/powershell_install_once.ps1"
|
81
|
+
destination = "/tmp/install.ps1"
|
82
|
+
}
|
83
|
+
|
84
|
+
provisioner "remote-exec" {
|
85
|
+
inline = [
|
86
|
+
"powershell.exe -file /tmp/install.ps1",
|
87
|
+
]
|
88
|
+
}
|
89
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Restrict operation of terraform to chef-es profile so that
|
2
|
+
# we do not create resources in other aws profiles.
|
3
|
+
# We assume user has configured standard aws credentials
|
4
|
+
# under ~/.aws/credentials or with $AWS_SHARED_CREDENTIALS_FILE
|
5
|
+
provider "aws" {
|
6
|
+
region = "${var.aws_region}"
|
7
|
+
profile = "chef-aws"
|
8
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Region to create infrastructure in
|
2
|
+
variable "aws_region" {
|
3
|
+
type = "string"
|
4
|
+
default = "us-west-2"
|
5
|
+
}
|
6
|
+
|
7
|
+
variable "aws_instance_type" {
|
8
|
+
type = "string"
|
9
|
+
default = "t2.micro"
|
10
|
+
}
|
11
|
+
|
12
|
+
variable "admin_password" {
|
13
|
+
description = "Set Windows Administrator password"
|
14
|
+
type = "string"
|
15
|
+
default = "Pas5w0rD"
|
16
|
+
}
|
@@ -25,6 +25,7 @@ module Mixlib
|
|
25
25
|
install_command = []
|
26
26
|
install_command << get_script("helpers.sh", context)
|
27
27
|
install_command << get_script("script_cli_parameters.sh")
|
28
|
+
install_command << get_script("check_product.sh")
|
28
29
|
install_command << get_script("platform_detection.sh")
|
29
30
|
install_command << get_script("fetch_metadata.sh", context)
|
30
31
|
install_command << get_script("fetch_package.sh")
|
@@ -44,6 +45,7 @@ module Mixlib
|
|
44
45
|
install_command = []
|
45
46
|
install_command << get_script("helpers.sh", user_agent_headers: options.user_agent_headers)
|
46
47
|
install_command << render_variables
|
48
|
+
install_command << get_script("check_product.sh")
|
47
49
|
install_command << get_script("platform_detection.sh")
|
48
50
|
install_command << get_script("fetch_metadata.sh")
|
49
51
|
install_command << get_script("fetch_package.sh")
|
@@ -9,13 +9,14 @@
|
|
9
9
|
# $project: Project to be installed
|
10
10
|
# $cmdline_filename: Name of the package downloaded on local disk.
|
11
11
|
# $cmdline_dl_dir: Name of the directory downloaded package will be saved to on local disk.
|
12
|
+
# $install_strategy: Method of package installations. default strategy is to always install upon exec. Set to "once" to skip if project is installed
|
12
13
|
############
|
13
14
|
|
14
15
|
# Defaults
|
15
16
|
channel="stable"
|
16
17
|
project="chef"
|
17
18
|
|
18
|
-
while getopts pnv:c:f:P:d: opt
|
19
|
+
while getopts pnv:c:f:P:d:s opt
|
19
20
|
do
|
20
21
|
case "$opt" in
|
21
22
|
|
@@ -26,9 +27,10 @@ do
|
|
26
27
|
f) cmdline_filename="$OPTARG";;
|
27
28
|
P) project="$OPTARG";;
|
28
29
|
d) cmdline_dl_dir="$OPTARG";;
|
30
|
+
s) install_strategy="$OPTARG";;
|
29
31
|
\?) # unknown flag
|
30
32
|
echo >&2 \
|
31
|
-
"usage: $0 [-P project] [-c release_channel] [-v version] [-f filename | -d download_dir]"
|
33
|
+
"usage: $0 [-P project] [-c release_channel] [-v version] [-f filename | -d download_dir] [-s install_strategy]"
|
32
34
|
exit 1;;
|
33
35
|
esac
|
34
36
|
done
|
@@ -48,15 +48,25 @@ function Install-Project {
|
|
48
48
|
$daemon = 'auto',
|
49
49
|
[string]
|
50
50
|
$http_proxy,
|
51
|
-
[string]
|
52
|
-
$download_url_override,
|
53
51
|
# Specify an alternate download url, must also include checksum
|
54
52
|
[string]
|
55
|
-
$
|
53
|
+
$download_url_override,
|
56
54
|
# SHA256 checksum of the download file
|
57
55
|
# Must be present when using download_url_override
|
56
|
+
[string]
|
57
|
+
$checksum,
|
58
|
+
# Set to 'once' to skip install if project is detected
|
59
|
+
[string]
|
60
|
+
$install_strategy
|
58
61
|
)
|
59
62
|
|
63
|
+
if ((Test-Path "$env:systemdrive\opscode\$project\embedded") -and ($install_strategy -eq 'once')) {
|
64
|
+
Write-Host "$project installation detected"
|
65
|
+
Write-Host "install_strategy set to 'once'"
|
66
|
+
Write-Host "Nothing to install"
|
67
|
+
exit
|
68
|
+
}
|
69
|
+
|
60
70
|
# Set http_proxy as env var
|
61
71
|
if(-not [string]::IsNullOrEmpty($http_proxy)) {
|
62
72
|
$env:http_proxy = $http_proxy
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mixlib-install
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thom May
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-08-
|
12
|
+
date: 2017-08-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mixlib-shellout
|
@@ -90,6 +90,15 @@ files:
|
|
90
90
|
- acceptance/ubuntu_install_command/terraform/application.tf
|
91
91
|
- acceptance/ubuntu_install_command/terraform/aws.tf
|
92
92
|
- acceptance/ubuntu_install_command/terraform/variables.tf
|
93
|
+
- acceptance/ubuntu_install_command_once/.acceptance/acceptance-cookbook/.gitignore
|
94
|
+
- acceptance/ubuntu_install_command_once/.acceptance/acceptance-cookbook/metadata.rb
|
95
|
+
- acceptance/ubuntu_install_command_once/.acceptance/acceptance-cookbook/recipes/destroy.rb
|
96
|
+
- acceptance/ubuntu_install_command_once/.acceptance/acceptance-cookbook/recipes/provision.rb
|
97
|
+
- acceptance/ubuntu_install_command_once/.acceptance/acceptance-cookbook/recipes/verify.rb
|
98
|
+
- acceptance/ubuntu_install_command_once/inspec/verify.rb
|
99
|
+
- acceptance/ubuntu_install_command_once/terraform/application.tf
|
100
|
+
- acceptance/ubuntu_install_command_once/terraform/aws.tf
|
101
|
+
- acceptance/ubuntu_install_command_once/terraform/variables.tf
|
93
102
|
- acceptance/ubuntu_install_sh/.acceptance/acceptance-cookbook/.gitignore
|
94
103
|
- acceptance/ubuntu_install_sh/.acceptance/acceptance-cookbook/metadata.rb
|
95
104
|
- acceptance/ubuntu_install_sh/.acceptance/acceptance-cookbook/recipes/destroy.rb
|
@@ -118,6 +127,15 @@ files:
|
|
118
127
|
- acceptance/windows-server-2012r2-fips/terraform/application.tf
|
119
128
|
- acceptance/windows-server-2012r2-fips/terraform/aws.tf
|
120
129
|
- acceptance/windows-server-2012r2-fips/terraform/variables.tf
|
130
|
+
- acceptance/windows-server-2012r2-once/.acceptance/acceptance-cookbook/.gitignore
|
131
|
+
- acceptance/windows-server-2012r2-once/.acceptance/acceptance-cookbook/metadata.rb
|
132
|
+
- acceptance/windows-server-2012r2-once/.acceptance/acceptance-cookbook/recipes/destroy.rb
|
133
|
+
- acceptance/windows-server-2012r2-once/.acceptance/acceptance-cookbook/recipes/provision.rb
|
134
|
+
- acceptance/windows-server-2012r2-once/.acceptance/acceptance-cookbook/recipes/verify.rb
|
135
|
+
- acceptance/windows-server-2012r2-once/inspec/verify.rb
|
136
|
+
- acceptance/windows-server-2012r2-once/terraform/application.tf
|
137
|
+
- acceptance/windows-server-2012r2-once/terraform/aws.tf
|
138
|
+
- acceptance/windows-server-2012r2-once/terraform/variables.tf
|
121
139
|
- acceptance/windows-server-2012r2/.acceptance/acceptance-cookbook/.gitignore
|
122
140
|
- acceptance/windows-server-2012r2/.acceptance/acceptance-cookbook/metadata.rb
|
123
141
|
- acceptance/windows-server-2012r2/.acceptance/acceptance-cookbook/recipes/destroy.rb
|
@@ -140,6 +158,7 @@ files:
|
|
140
158
|
- lib/mixlib/install/generator.rb
|
141
159
|
- lib/mixlib/install/generator/base.rb
|
142
160
|
- lib/mixlib/install/generator/bourne.rb
|
161
|
+
- lib/mixlib/install/generator/bourne/scripts/check_product.sh
|
143
162
|
- lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
|
144
163
|
- lib/mixlib/install/generator/bourne/scripts/fetch_package.sh
|
145
164
|
- lib/mixlib/install/generator/bourne/scripts/helpers.sh.erb
|