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.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -0
  3. data/acceptance/{powershell → powershell_install_ps1}/.acceptance/acceptance-cookbook/.gitignore +0 -0
  4. data/acceptance/{bourne → powershell_install_ps1}/.acceptance/acceptance-cookbook/metadata.rb +0 -0
  5. data/acceptance/{bourne → powershell_install_ps1}/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -0
  6. data/acceptance/{powershell → powershell_install_ps1}/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -0
  7. data/acceptance/{powershell → powershell_install_ps1}/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -0
  8. data/acceptance/{bourne → powershell_install_ps1}/inspec/verify.rb +0 -0
  9. data/acceptance/{powershell → powershell_install_ps1}/terraform/application.tf +0 -0
  10. data/acceptance/{bourne → powershell_install_ps1}/terraform/aws.tf +0 -0
  11. data/acceptance/{powershell → powershell_install_ps1}/terraform/variables.tf +0 -0
  12. data/acceptance/{bourne → ubuntu_install_command}/.acceptance/acceptance-cookbook/.gitignore +0 -0
  13. data/acceptance/{powershell → ubuntu_install_command}/.acceptance/acceptance-cookbook/metadata.rb +0 -0
  14. data/acceptance/{powershell → ubuntu_install_command}/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -0
  15. data/acceptance/ubuntu_install_command/.acceptance/acceptance-cookbook/recipes/provision.rb +11 -0
  16. data/acceptance/{bourne → ubuntu_install_command}/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -0
  17. data/acceptance/ubuntu_install_command/inspec/verify.rb +3 -0
  18. data/acceptance/{bourne → ubuntu_install_command}/terraform/application.tf +0 -0
  19. data/acceptance/{powershell → ubuntu_install_command}/terraform/aws.tf +0 -0
  20. data/acceptance/{bourne → ubuntu_install_command}/terraform/variables.tf +0 -0
  21. data/acceptance/ubuntu_install_sh/.acceptance/acceptance-cookbook/.gitignore +8 -0
  22. data/acceptance/ubuntu_install_sh/.acceptance/acceptance-cookbook/metadata.rb +2 -0
  23. data/acceptance/ubuntu_install_sh/.acceptance/acceptance-cookbook/recipes/destroy.rb +3 -0
  24. data/acceptance/{bourne → ubuntu_install_sh}/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -0
  25. data/acceptance/ubuntu_install_sh/.acceptance/acceptance-cookbook/recipes/verify.rb +11 -0
  26. data/acceptance/{powershell → ubuntu_install_sh}/inspec/verify.rb +0 -0
  27. data/acceptance/ubuntu_install_sh/terraform/application.tf +78 -0
  28. data/acceptance/ubuntu_install_sh/terraform/aws.tf +8 -0
  29. data/acceptance/ubuntu_install_sh/terraform/variables.tf +27 -0
  30. data/ci/script.sh +3 -2
  31. data/lib/mixlib/install/generator/bourne.rb +1 -0
  32. data/lib/mixlib/install/version.rb +1 -1
  33. metadata +29 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6521f3678f0d1b61776fd15ed97211bb9a218ba4
4
- data.tar.gz: ff8d551119e27d84087e4b69c129a0aab47bfff5
3
+ metadata.gz: 3fd429858c205b8c5d6bf643428cd3f56c7098a0
4
+ data.tar.gz: 3135db39f1a26f22c6bc0f5b36ecb26353fc1489
5
5
  SHA512:
6
- metadata.gz: 0e897cdb1dd20f149d2c6949a8df21b974baea1baf837cc76ed540530c11d199dbaf22998b05a3b7ed5da58799a32fa584ecb3dd08db5e4ac7a8454f79a6d84e
7
- data.tar.gz: 9c8c72d0d7fa09dea9e64ff6524758af09fd41238080b8afcf7f190ee0c4eaf1af973754b5ba72c4232bdf5354872a1eac54e58ca3c58974836fbfa583459f22
6
+ metadata.gz: c967072c4b5a6059cebe0eabcc29de03f6b6c677a8d180f867043fcf7e391feeb1a61c61e9e268a2f9eb704a7be408c1a14494e717e6fc122f1d098fae087e3d
7
+ data.tar.gz: 471805ae5fadac8f184902550cd01b2a543fb4a36a9e7a8e3067a8a3eded34152c219825dade8e09bbbdf94061d070517310ce337a4632769113708b2fa5b94f
@@ -1,5 +1,8 @@
1
1
  # Change Log
2
2
 
3
+ ## [2.0.2]
4
+ - Fix install.sh to include fetch_package.sh
5
+
3
6
  ## [2.0.1]
4
7
  - Fix install.sh and install.ps1 scripts to install unstable packages
5
8
 
@@ -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
@@ -0,0 +1,3 @@
1
+ describe package("omnibus-toolchain") do
2
+ it { should be_installed }
3
+ end
@@ -0,0 +1,8 @@
1
+ nodes/
2
+ tmp/
3
+
4
+ # Terraform
5
+ *.tfstate
6
+ *.tfstate.backup
7
+ *_override.tf
8
+
@@ -0,0 +1,3 @@
1
+ execute "terraform destroy -force" do
2
+ cwd "#{node['chef-acceptance']['suite-dir']}/terraform"
3
+ 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 = "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
+ }
@@ -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 bourne until issues with powershell suite resovled:
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 bourne --force-destroy
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
@@ -53,6 +53,7 @@ module Mixlib
53
53
  else
54
54
  install_command << get_script("fetch_metadata.sh")
55
55
  end
56
+ install_command << get_script("fetch_package.sh")
56
57
  install_command << get_script("install_package.sh")
57
58
 
58
59
  install_command.join("\n\n")
@@ -1,5 +1,5 @@
1
1
  module Mixlib
2
2
  class Install
3
- VERSION = "2.0.1"
3
+ VERSION = "2.0.2"
4
4
  end
5
5
  end
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.1
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-28 00:00:00.000000000 Z
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/bourne/.acceptance/acceptance-cookbook/.gitignore
205
- - acceptance/bourne/.acceptance/acceptance-cookbook/metadata.rb
206
- - acceptance/bourne/.acceptance/acceptance-cookbook/recipes/destroy.rb
207
- - acceptance/bourne/.acceptance/acceptance-cookbook/recipes/provision.rb
208
- - acceptance/bourne/.acceptance/acceptance-cookbook/recipes/verify.rb
209
- - acceptance/bourne/inspec/verify.rb
210
- - acceptance/bourne/terraform/application.tf
211
- - acceptance/bourne/terraform/aws.tf
212
- - acceptance/bourne/terraform/variables.tf
213
- - acceptance/powershell/.acceptance/acceptance-cookbook/.gitignore
214
- - acceptance/powershell/.acceptance/acceptance-cookbook/metadata.rb
215
- - acceptance/powershell/.acceptance/acceptance-cookbook/recipes/destroy.rb
216
- - acceptance/powershell/.acceptance/acceptance-cookbook/recipes/provision.rb
217
- - acceptance/powershell/.acceptance/acceptance-cookbook/recipes/verify.rb
218
- - acceptance/powershell/inspec/verify.rb
219
- - acceptance/powershell/terraform/application.tf
220
- - acceptance/powershell/terraform/aws.tf
221
- - acceptance/powershell/terraform/variables.tf
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