mixlib-install 3.9.0 → 3.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/lib/mixlib/install/options.rb +1 -1
- data/lib/mixlib/install/version.rb +1 -1
- data/mixlib-install.gemspec +1 -1
- metadata +3 -112
- data/.expeditor/config.yml +0 -20
- data/.expeditor/update_version.sh +0 -9
- data/.gitattributes +0 -3
- data/.github/CODEOWNERS +0 -3
- data/.gitignore +0 -13
- data/.rspec +0 -2
- data/.rubocop.yml +0 -2
- data/.travis.yml +0 -61
- data/CHANGELOG.md +0 -220
- data/CONTRIBUTING.md +0 -14
- data/VERSION +0 -1
- data/acceptance/.gitignore +0 -8
- data/acceptance/.suites/ubuntu_install_checksum/.acceptance/acceptance-cookbook/.gitignore +0 -8
- data/acceptance/.suites/ubuntu_install_checksum/.acceptance/acceptance-cookbook/metadata.rb +0 -2
- data/acceptance/.suites/ubuntu_install_checksum/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -3
- data/acceptance/.suites/ubuntu_install_checksum/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -24
- data/acceptance/.suites/ubuntu_install_checksum/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -11
- data/acceptance/.suites/ubuntu_install_checksum/inspec/verify.rb +0 -78
- data/acceptance/.suites/ubuntu_install_checksum/terraform/application.tf +0 -95
- data/acceptance/.suites/ubuntu_install_checksum/terraform/aws.tf +0 -8
- data/acceptance/.suites/ubuntu_install_checksum/terraform/variables.tf +0 -27
- data/acceptance/.suites/windows-nano/.acceptance/acceptance-cookbook/.gitignore +0 -2
- data/acceptance/.suites/windows-nano/.acceptance/acceptance-cookbook/libraries/chef_extentions.rb +0 -74
- data/acceptance/.suites/windows-nano/.acceptance/acceptance-cookbook/metadata.rb +0 -2
- data/acceptance/.suites/windows-nano/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -1
- data/acceptance/.suites/windows-nano/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -49
- data/acceptance/.suites/windows-nano/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -9
- data/acceptance/.suites/windows-nano/inspec/verify.rb +0 -11
- data/acceptance/.suites/windows-nano/terraform/application.tf +0 -59
- data/acceptance/.suites/windows-nano/terraform/aws.tf +0 -8
- data/acceptance/.suites/windows-nano/terraform/variables.tf +0 -10
- data/acceptance/Gemfile +0 -8
- data/acceptance/README.md +0 -6
- data/acceptance/centos_install_checksum/.acceptance/acceptance-cookbook/.gitignore +0 -8
- data/acceptance/centos_install_checksum/.acceptance/acceptance-cookbook/metadata.rb +0 -2
- data/acceptance/centos_install_checksum/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -3
- data/acceptance/centos_install_checksum/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -24
- data/acceptance/centos_install_checksum/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -11
- data/acceptance/centos_install_checksum/inspec/verify.rb +0 -78
- data/acceptance/centos_install_checksum/terraform/application.tf +0 -95
- data/acceptance/centos_install_checksum/terraform/aws.tf +0 -8
- data/acceptance/centos_install_checksum/terraform/variables.tf +0 -27
- data/acceptance/ubuntu_install_command/.acceptance/acceptance-cookbook/.gitignore +0 -8
- data/acceptance/ubuntu_install_command/.acceptance/acceptance-cookbook/metadata.rb +0 -2
- data/acceptance/ubuntu_install_command/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -3
- data/acceptance/ubuntu_install_command/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -12
- data/acceptance/ubuntu_install_command/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -11
- data/acceptance/ubuntu_install_command/inspec/verify.rb +0 -3
- data/acceptance/ubuntu_install_command/terraform/application.tf +0 -78
- data/acceptance/ubuntu_install_command/terraform/aws.tf +0 -8
- data/acceptance/ubuntu_install_command/terraform/variables.tf +0 -27
- data/acceptance/ubuntu_install_command_once/.acceptance/acceptance-cookbook/.gitignore +0 -8
- data/acceptance/ubuntu_install_command_once/.acceptance/acceptance-cookbook/metadata.rb +0 -2
- data/acceptance/ubuntu_install_command_once/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -3
- data/acceptance/ubuntu_install_command_once/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -12
- data/acceptance/ubuntu_install_command_once/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -11
- data/acceptance/ubuntu_install_command_once/inspec/verify.rb +0 -7
- data/acceptance/ubuntu_install_command_once/terraform/application.tf +0 -78
- data/acceptance/ubuntu_install_command_once/terraform/aws.tf +0 -8
- data/acceptance/ubuntu_install_command_once/terraform/variables.tf +0 -27
- data/acceptance/ubuntu_install_sh/.acceptance/acceptance-cookbook/.gitignore +0 -8
- data/acceptance/ubuntu_install_sh/.acceptance/acceptance-cookbook/metadata.rb +0 -2
- data/acceptance/ubuntu_install_sh/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -3
- data/acceptance/ubuntu_install_sh/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -12
- data/acceptance/ubuntu_install_sh/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -11
- data/acceptance/ubuntu_install_sh/inspec/verify.rb +0 -3
- data/acceptance/ubuntu_install_sh/terraform/application.tf +0 -78
- data/acceptance/ubuntu_install_sh/terraform/aws.tf +0 -8
- data/acceptance/ubuntu_install_sh/terraform/variables.tf +0 -27
- data/acceptance/windows-server-2012r2-checksum/.acceptance/acceptance-cookbook/.gitignore +0 -2
- data/acceptance/windows-server-2012r2-checksum/.acceptance/acceptance-cookbook/metadata.rb +0 -2
- data/acceptance/windows-server-2012r2-checksum/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -3
- data/acceptance/windows-server-2012r2-checksum/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -22
- data/acceptance/windows-server-2012r2-checksum/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -14
- data/acceptance/windows-server-2012r2-checksum/inspec/verify.rb +0 -21
- data/acceptance/windows-server-2012r2-checksum/terraform/application.tf +0 -94
- data/acceptance/windows-server-2012r2-checksum/terraform/aws.tf +0 -8
- data/acceptance/windows-server-2012r2-checksum/terraform/variables.tf +0 -16
- data/acceptance/windows-server-2012r2-fips/.acceptance/acceptance-cookbook/.gitignore +0 -2
- data/acceptance/windows-server-2012r2-fips/.acceptance/acceptance-cookbook/metadata.rb +0 -1
- data/acceptance/windows-server-2012r2-fips/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -3
- data/acceptance/windows-server-2012r2-fips/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -12
- data/acceptance/windows-server-2012r2-fips/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -14
- data/acceptance/windows-server-2012r2-fips/inspec/verify.rb +0 -3
- data/acceptance/windows-server-2012r2-fips/terraform/application.tf +0 -90
- data/acceptance/windows-server-2012r2-fips/terraform/aws.tf +0 -8
- data/acceptance/windows-server-2012r2-fips/terraform/variables.tf +0 -16
- data/acceptance/windows-server-2012r2-once/.acceptance/acceptance-cookbook/.gitignore +0 -2
- data/acceptance/windows-server-2012r2-once/.acceptance/acceptance-cookbook/metadata.rb +0 -2
- data/acceptance/windows-server-2012r2-once/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -3
- data/acceptance/windows-server-2012r2-once/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -13
- data/acceptance/windows-server-2012r2-once/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -14
- data/acceptance/windows-server-2012r2-once/inspec/verify.rb +0 -7
- data/acceptance/windows-server-2012r2-once/terraform/application.tf +0 -89
- data/acceptance/windows-server-2012r2-once/terraform/aws.tf +0 -8
- data/acceptance/windows-server-2012r2-once/terraform/variables.tf +0 -16
- data/acceptance/windows-server-2012r2-ps1/.acceptance/acceptance-cookbook/.gitignore +0 -2
- data/acceptance/windows-server-2012r2-ps1/.acceptance/acceptance-cookbook/metadata.rb +0 -2
- data/acceptance/windows-server-2012r2-ps1/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -3
- data/acceptance/windows-server-2012r2-ps1/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -12
- data/acceptance/windows-server-2012r2-ps1/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -14
- data/acceptance/windows-server-2012r2-ps1/inspec/verify.rb +0 -3
- data/acceptance/windows-server-2012r2-ps1/terraform/application.tf +0 -89
- data/acceptance/windows-server-2012r2-ps1/terraform/aws.tf +0 -8
- data/acceptance/windows-server-2012r2-ps1/terraform/variables.tf +0 -16
- data/ci/before-script.sh +0 -18
- data/ci/es-infrastructure.pem.enc +0 -0
- data/ci/run-acceptance-tests.sh +0 -13
|
@@ -1,8 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
}
|
data/acceptance/ubuntu_install_command_once/.acceptance/acceptance-cookbook/recipes/provision.rb
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
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
|
data/acceptance/ubuntu_install_command_once/.acceptance/acceptance-cookbook/recipes/verify.rb
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
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
|
|
@@ -1,78 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
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,12 +0,0 @@
|
|
|
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_sh\" > ../.acceptance_data/ubuntu_install.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
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
|
@@ -1,78 +0,0 @@
|
|
|
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.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
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
}
|
data/acceptance/windows-server-2012r2-checksum/.acceptance/acceptance-cookbook/recipes/provision.rb
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# Nothing to see here...
|
|
2
|
-
|
|
3
|
-
install_url = "install -download_url_override https://packages.chef.io/files/stable/chef/13.2.20/windows/2012r2/chef-client-13.2.20-1-x64.msi"
|
|
4
|
-
|
|
5
|
-
execute "bundle exec ruby -e \"require 'mixlib/install'; puts Mixlib::Install.install_ps1, '#{install_url}'\" > ../.acceptance_data/powershell_install_url.ps1" do
|
|
6
|
-
cwd node['chef-acceptance']['suite-dir']
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
install_checksum = "#{install_url} -checksum 82772d31ad110b7a584492f3a51358a56f4d706a41920c0d441b87c94b71336c -verbose"
|
|
10
|
-
|
|
11
|
-
execute "bundle exec ruby -e \"require 'mixlib/install'; puts Mixlib::Install.install_ps1, '#{install_checksum}'\" > ../.acceptance_data/powershell_install_checksum.ps1" do
|
|
12
|
-
cwd node['chef-acceptance']['suite-dir']
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
execute "terraform plan" do
|
|
16
|
-
cwd "#{node['chef-acceptance']['suite-dir']}/terraform"
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
execute "terraform apply" do
|
|
20
|
-
cwd "#{node['chef-acceptance']['suite-dir']}/terraform"
|
|
21
|
-
end
|
|
22
|
-
|
data/acceptance/windows-server-2012r2-checksum/.acceptance/acceptance-cookbook/recipes/verify.rb
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
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
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
describe package("Chef Client v13*") do
|
|
2
|
-
it { should be_installed }
|
|
3
|
-
its("version") { should match /13.2.20/ }
|
|
4
|
-
end
|
|
5
|
-
|
|
6
|
-
# redirect verbose output
|
|
7
|
-
describe command("powershell.exe -file /tmp/install_with_checksum.ps1 *>&1") do
|
|
8
|
-
its("stdout") { should match /Found existing installer/ }
|
|
9
|
-
its("stdout") { should match /Checksum verified, using existing installer/ }
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
# corrupt the file
|
|
13
|
-
describe powershell("Out-File -filepath C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\chef-client-13.2.20-1-x64.msi") do
|
|
14
|
-
its("exit_status") { should eq 0 }
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
# redirect verbose output
|
|
18
|
-
describe command("powershell.exe -file /tmp/install_with_checksum.ps1 *>&1") do
|
|
19
|
-
its("stdout") { should match /Found existing installer/ }
|
|
20
|
-
its("stdout") { should match /Checksum mismatch/ }
|
|
21
|
-
end
|