cem_acpt 0.11.1 → 0.11.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: df61aa1c290a076e460b4c790babb19d0e0729e7d543feb96a9fb40e1589e50a
4
- data.tar.gz: 800a652e59491e42f0e3fdd43db93e397956309e2b575d33e0f2c1497ebd8311
3
+ metadata.gz: 68da70c79c3346b5ce515014b2202746db3f2ef2395c60aa4891ea15635f7e7b
4
+ data.tar.gz: 0273522771cc02caac4f07e7b7c150f7ab3b7bbc4fc3b9126309819a5f607608
5
5
  SHA512:
6
- metadata.gz: a4a93419e474a066291ead08cbb28222f635f218b3df394b92f8c23d2fc1d63d55b9c5e240229c86db22a7b98e0e8673a5f13c7d02bd0d3633976942cc22be08
7
- data.tar.gz: 614ecdad289b17a01ffcaea724aa928372cf578a4270f641e592549a6f2d017235646fe5ab8b3274e23801755935b6d7e17cdd39072aee28cbc7692b86e5b663
6
+ metadata.gz: eff07c3af3f0692706e5863825bb324b6f9b1f821cebd54c0baad9b6b4ea30850d7307342188eaa9c81de6833650cb472f74b8bc378a333886117320033dfbd2
7
+ data.tar.gz: 5c5cf88592e47515349bde762ee85baf5f07000b024d20e6f5fa550780641049b5b9cf514ab3a74a804fbfb8685c73fd6227271a7d2ea2aa734e9abc819e26f6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cem_acpt (0.11.1)
4
+ cem_acpt (0.11.2)
5
5
  async-http (>= 0.60, < 0.70)
6
6
  bcrypt_pbkdf (>= 1.0, < 2.0)
7
7
  deep_merge (>= 1.2, < 2.0)
@@ -19,7 +19,11 @@ module CemAcpt
19
19
 
20
20
  def provision_commands
21
21
  commands_from_config = @config.get("images.#{@image_name}.provision_commands") || []
22
- (default_provision_commands + commands_from_config).compact
22
+ if @config.get("images.#{@image_name}.skip_default_provision_commands")
23
+ commands_from_config.compact
24
+ else
25
+ (default_provision_commands + commands_from_config).compact
26
+ end
23
27
  end
24
28
  alias to_a provision_commands
25
29
 
@@ -83,7 +87,11 @@ module CemAcpt
83
87
 
84
88
  def provision_commands
85
89
  commands_from_config = @config.get("images.#{@image_name}.provision_commands") || []
86
- (default_provision_commands + commands_from_config).compact
90
+ if @config.get("images.#{@image_name}.skip_default_provision_commands")
91
+ commands_from_config.compact
92
+ else
93
+ (default_provision_commands + commands_from_config).compact
94
+ end
87
95
  end
88
96
  alias to_a provision_commands
89
97
  end
@@ -103,7 +111,11 @@ module CemAcpt
103
111
 
104
112
  def provision_commands
105
113
  commands_from_config = @config.get("images.#{@image_name}.provision_commands") || []
106
- (default_provision_commands + commands_from_config).compact
114
+ if @config.get("images.#{@image_name}.skip_default_provision_commands")
115
+ commands_from_config.compact
116
+ else
117
+ (default_provision_commands + commands_from_config).compact
118
+ end
107
119
  end
108
120
  alias to_a provision_commands
109
121
 
@@ -86,7 +86,7 @@ module CemAcpt
86
86
  output.each do |instance_name, data|
87
87
  unless @config.get('no_destroy_nodes')
88
88
  logger.info('CemAcpt::ImageBuilder') { "Stopping instance #{instance_name}..." }
89
- @exec.run('compute', 'instances', 'stop', instance_name)
89
+ @exec.run('compute', 'instances', 'stop', instance_name, '--zone', @config.get('platform.zone'))
90
90
  end
91
91
  unless @config.get('no_build_images')
92
92
  deprecate_old_images_in_family(data['image_family'])
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CemAcpt
4
- VERSION = '0.11.1'
4
+ VERSION = '0.11.2'
5
5
  end
@@ -189,7 +189,12 @@ resource "google_compute_instance" "acpt-test-node" {
189
189
  }
190
190
 
191
191
  metadata = {
192
- "enable-oslogin" = "TRUE"
192
+ # Keep OSLogin disabled on test instances. The metadata "ssh-keys" entry
193
+ # below is what cem_acpt relies on for SSH auth (terraform's remote-exec
194
+ # provisioner connects with the ephemeral key generated per run). With
195
+ # enable-oslogin=TRUE, GCP ignores the metadata "ssh-keys" entry, and we
196
+ # currently have no plumbing for OSLogin key registration.
197
+ "enable-oslogin" = "FALSE"
193
198
  "ssh-keys" = "${var.username}:${file(var.public_key)}"
194
199
  "cem-acpt-test" = each.value.test_name
195
200
  }
@@ -116,7 +116,14 @@ resource "google_compute_instance" "acpt-test-node" {
116
116
  }
117
117
 
118
118
  metadata = {
119
- "enable-oslogin" = "TRUE"
119
+ # Keep OSLogin disabled on the throwaway build instance. The metadata
120
+ # "ssh-keys" entry below is what terraform's remote-exec provisioner
121
+ # uses for SSH auth (with the ephemeral key generated per run). With
122
+ # enable-oslogin=TRUE, GCP ignores the metadata "ssh-keys" entry, and
123
+ # we have no plumbing for OSLogin key registration. The build instance
124
+ # is destroyed immediately after the disk is snapshotted, so disabling
125
+ # OSLogin here only affects the throwaway VM, not the resulting image.
126
+ "enable-oslogin" = "FALSE"
120
127
  "ssh-keys" = "${var.username}:${file(var.public_key)}"
121
128
  "for-image-family" = each.value.image_family
122
129
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cem_acpt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - puppetlabs