mixlib-install 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/acceptance/{powershell → powershell_install_ps1}/.acceptance/acceptance-cookbook/.gitignore +0 -0
- data/acceptance/{bourne → powershell_install_ps1}/.acceptance/acceptance-cookbook/metadata.rb +0 -0
- data/acceptance/{bourne → powershell_install_ps1}/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -0
- data/acceptance/{powershell → powershell_install_ps1}/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -0
- data/acceptance/{powershell → powershell_install_ps1}/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -0
- data/acceptance/{bourne → powershell_install_ps1}/inspec/verify.rb +0 -0
- data/acceptance/{powershell → powershell_install_ps1}/terraform/application.tf +0 -0
- data/acceptance/{bourne → powershell_install_ps1}/terraform/aws.tf +0 -0
- data/acceptance/{powershell → powershell_install_ps1}/terraform/variables.tf +0 -0
- data/acceptance/{bourne → ubuntu_install_command}/.acceptance/acceptance-cookbook/.gitignore +0 -0
- data/acceptance/{powershell → ubuntu_install_command}/.acceptance/acceptance-cookbook/metadata.rb +0 -0
- data/acceptance/{powershell → ubuntu_install_command}/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -0
- data/acceptance/ubuntu_install_command/.acceptance/acceptance-cookbook/recipes/provision.rb +11 -0
- data/acceptance/{bourne → ubuntu_install_command}/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -0
- data/acceptance/ubuntu_install_command/inspec/verify.rb +3 -0
- data/acceptance/{bourne → ubuntu_install_command}/terraform/application.tf +0 -0
- data/acceptance/{powershell → ubuntu_install_command}/terraform/aws.tf +0 -0
- data/acceptance/{bourne → ubuntu_install_command}/terraform/variables.tf +0 -0
- data/acceptance/ubuntu_install_sh/.acceptance/acceptance-cookbook/.gitignore +8 -0
- data/acceptance/ubuntu_install_sh/.acceptance/acceptance-cookbook/metadata.rb +2 -0
- data/acceptance/ubuntu_install_sh/.acceptance/acceptance-cookbook/recipes/destroy.rb +3 -0
- data/acceptance/{bourne → ubuntu_install_sh}/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -0
- data/acceptance/ubuntu_install_sh/.acceptance/acceptance-cookbook/recipes/verify.rb +11 -0
- data/acceptance/{powershell → ubuntu_install_sh}/inspec/verify.rb +0 -0
- data/acceptance/ubuntu_install_sh/terraform/application.tf +78 -0
- data/acceptance/ubuntu_install_sh/terraform/aws.tf +8 -0
- data/acceptance/ubuntu_install_sh/terraform/variables.tf +27 -0
- data/ci/script.sh +3 -2
- data/lib/mixlib/install/generator/bourne.rb +1 -0
- data/lib/mixlib/install/version.rb +1 -1
- metadata +29 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fd429858c205b8c5d6bf643428cd3f56c7098a0
|
4
|
+
data.tar.gz: 3135db39f1a26f22c6bc0f5b36ecb26353fc1489
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c967072c4b5a6059cebe0eabcc29de03f6b6c677a8d180f867043fcf7e391feeb1a61c61e9e268a2f9eb704a7be408c1a14494e717e6fc122f1d098fae087e3d
|
7
|
+
data.tar.gz: 471805ae5fadac8f184902550cd01b2a543fb4a36a9e7a8e3067a8a3eded34152c219825dade8e09bbbdf94061d070517310ce337a4632769113708b2fa5b94f
|
data/CHANGELOG.md
CHANGED
data/acceptance/{powershell → powershell_install_ps1}/.acceptance/acceptance-cookbook/.gitignore
RENAMED
File without changes
|
data/acceptance/{bourne → powershell_install_ps1}/.acceptance/acceptance-cookbook/metadata.rb
RENAMED
File without changes
|
data/acceptance/{bourne → powershell_install_ps1}/.acceptance/acceptance-cookbook/recipes/destroy.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/acceptance/{bourne → ubuntu_install_command}/.acceptance/acceptance-cookbook/.gitignore
RENAMED
File without changes
|
data/acceptance/{powershell → ubuntu_install_command}/.acceptance/acceptance-cookbook/metadata.rb
RENAMED
File without changes
|
File without changes
|
@@ -0,0 +1,11 @@
|
|
1
|
+
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/install.sh" do
|
2
|
+
cwd node['chef-acceptance']['suite-dir']
|
3
|
+
end
|
4
|
+
|
5
|
+
execute "terraform plan" do
|
6
|
+
cwd "#{node['chef-acceptance']['suite-dir']}/terraform"
|
7
|
+
end
|
8
|
+
|
9
|
+
execute "terraform apply" do
|
10
|
+
cwd "#{node['chef-acceptance']['suite-dir']}/terraform"
|
11
|
+
end
|
data/acceptance/{bourne → ubuntu_install_command}/.acceptance/acceptance-cookbook/recipes/verify.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/acceptance/{bourne → ubuntu_install_sh}/.acceptance/acceptance-cookbook/recipes/provision.rb
RENAMED
File without changes
|
@@ -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
|
File without changes
|
@@ -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 = "development"
|
64
|
+
X-Application = "mixlib-install"
|
65
|
+
}
|
66
|
+
|
67
|
+
provisioner "file" {
|
68
|
+
source = "../../.acceptance_data/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
|
+
}
|
@@ -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
|
+
}
|
data/ci/script.sh
CHANGED
@@ -10,8 +10,9 @@ if [ "${TRAVIS_REPO_SLUG}" = "chef/mixlib-install" ]; then
|
|
10
10
|
# setup acceptance tests
|
11
11
|
cd acceptance && export BUNDLE_GEMFILE=$PWD/Gemfile && /opt/chefdk/embedded/bin/bundle install && export APPBUNDLER_ALLOW_RVM=true
|
12
12
|
# run acceptances tests and force cleanup
|
13
|
-
# only testing
|
13
|
+
# only testing ubuntu until issues with powershell suite resovled:
|
14
14
|
# 1) inspec not finding chef package once connected (not reproducible locally)
|
15
15
|
# 2) currently no way to mask password (sensitive true) AND know what the error is if inspec fails
|
16
|
-
/opt/chefdk/embedded/bin/bundle exec chef-acceptance test
|
16
|
+
/opt/chefdk/embedded/bin/bundle exec chef-acceptance test ubuntu_install_command --force-destroy
|
17
|
+
/opt/chefdk/embedded/bin/bundle exec chef-acceptance test ubuntu_install_sh --force-destroy
|
17
18
|
fi
|
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: 2.0.
|
4
|
+
version: 2.0.2
|
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: 2016-09-
|
12
|
+
date: 2016-09-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: artifactory
|
@@ -201,24 +201,33 @@ files:
|
|
201
201
|
- acceptance/.gitignore
|
202
202
|
- acceptance/Gemfile
|
203
203
|
- acceptance/README.md
|
204
|
-
- acceptance/
|
205
|
-
- acceptance/
|
206
|
-
- acceptance/
|
207
|
-
- acceptance/
|
208
|
-
- acceptance/
|
209
|
-
- acceptance/
|
210
|
-
- acceptance/
|
211
|
-
- acceptance/
|
212
|
-
- acceptance/
|
213
|
-
- acceptance/
|
214
|
-
- acceptance/
|
215
|
-
- acceptance/
|
216
|
-
- acceptance/
|
217
|
-
- acceptance/
|
218
|
-
- acceptance/
|
219
|
-
- acceptance/
|
220
|
-
- acceptance/
|
221
|
-
- acceptance/
|
204
|
+
- acceptance/powershell_install_ps1/.acceptance/acceptance-cookbook/.gitignore
|
205
|
+
- acceptance/powershell_install_ps1/.acceptance/acceptance-cookbook/metadata.rb
|
206
|
+
- acceptance/powershell_install_ps1/.acceptance/acceptance-cookbook/recipes/destroy.rb
|
207
|
+
- acceptance/powershell_install_ps1/.acceptance/acceptance-cookbook/recipes/provision.rb
|
208
|
+
- acceptance/powershell_install_ps1/.acceptance/acceptance-cookbook/recipes/verify.rb
|
209
|
+
- acceptance/powershell_install_ps1/inspec/verify.rb
|
210
|
+
- acceptance/powershell_install_ps1/terraform/application.tf
|
211
|
+
- acceptance/powershell_install_ps1/terraform/aws.tf
|
212
|
+
- acceptance/powershell_install_ps1/terraform/variables.tf
|
213
|
+
- acceptance/ubuntu_install_command/.acceptance/acceptance-cookbook/.gitignore
|
214
|
+
- acceptance/ubuntu_install_command/.acceptance/acceptance-cookbook/metadata.rb
|
215
|
+
- acceptance/ubuntu_install_command/.acceptance/acceptance-cookbook/recipes/destroy.rb
|
216
|
+
- acceptance/ubuntu_install_command/.acceptance/acceptance-cookbook/recipes/provision.rb
|
217
|
+
- acceptance/ubuntu_install_command/.acceptance/acceptance-cookbook/recipes/verify.rb
|
218
|
+
- acceptance/ubuntu_install_command/inspec/verify.rb
|
219
|
+
- acceptance/ubuntu_install_command/terraform/application.tf
|
220
|
+
- acceptance/ubuntu_install_command/terraform/aws.tf
|
221
|
+
- acceptance/ubuntu_install_command/terraform/variables.tf
|
222
|
+
- acceptance/ubuntu_install_sh/.acceptance/acceptance-cookbook/.gitignore
|
223
|
+
- acceptance/ubuntu_install_sh/.acceptance/acceptance-cookbook/metadata.rb
|
224
|
+
- acceptance/ubuntu_install_sh/.acceptance/acceptance-cookbook/recipes/destroy.rb
|
225
|
+
- acceptance/ubuntu_install_sh/.acceptance/acceptance-cookbook/recipes/provision.rb
|
226
|
+
- acceptance/ubuntu_install_sh/.acceptance/acceptance-cookbook/recipes/verify.rb
|
227
|
+
- acceptance/ubuntu_install_sh/inspec/verify.rb
|
228
|
+
- acceptance/ubuntu_install_sh/terraform/application.tf
|
229
|
+
- acceptance/ubuntu_install_sh/terraform/aws.tf
|
230
|
+
- acceptance/ubuntu_install_sh/terraform/variables.tf
|
222
231
|
- ci/before-script.sh
|
223
232
|
- ci/es-infrastructure.pem.enc
|
224
233
|
- ci/script.sh
|