bosh_aws_cpi 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4715d56bc4b85eac9fd0189d39b4ded22f321a93
4
- data.tar.gz: b398c1ed46eaf078f592326429962273b4134b7d
3
+ metadata.gz: 8f1678fa3712efeb30ac293ada0fdb2183a3c043
4
+ data.tar.gz: eb18fe472d0f6f7fe0e0bedca3c64de37c3b2a55
5
5
  SHA512:
6
- metadata.gz: 7b5bea5f2a608cbcf193be6dfd842de0533d7484c932065d3af3b9b58baaa2a0fedee2a0a35ae0f09c926369fceac7e65226c5286534f62038a26933e25c4548
7
- data.tar.gz: 9a063456dc99cf0170ebde8f2e7b4ffdc7064df20588f54adbf9a78132b05213a365140a241ac21447f1864627a6f529020bce3b081ec6d81ee3b63d27479415
6
+ metadata.gz: e0b8e1fbe36086aeaa4ac308ab30b5e2069c453b7722e5e2db1a0786e9fe4e608dc2cace7e4bc5ae82959f3fc245391954a54a356c5d42cc9237ccfc06fef368
7
+ data.tar.gz: 34e7d8ce2a7a05c13f9d6093d2391674358fcac953a268fa00f903575dad2d198b8cabb77e2f460a75e2ff8bc5dd71c87bca2f4134f6fb91230860f7edf983e7
@@ -9,7 +9,12 @@ module Bosh::AwsCloud
9
9
 
10
10
  def common_availability_zone(volume_az_names, resource_pool_az_name, vpc_subnet_az_name)
11
11
  zone_names = (volume_az_names + [resource_pool_az_name, vpc_subnet_az_name]).compact.uniq
12
- ensure_same_availability_zone(zone_names)
12
+ if zone_names.size > 1
13
+ raise Bosh::Clouds::CloudError,
14
+ "can't use multiple availability zones: Volume in #{volume_az_names.join(', ')}, " +
15
+ "Resource Pool in #{resource_pool_az_name}, " +
16
+ "Subnet in #{vpc_subnet_az_name}"
17
+ end
13
18
 
14
19
  zone_names.first || @default
15
20
  end
@@ -31,10 +36,5 @@ module Bosh::AwsCloud
31
36
  region.availability_zones.each { |zone| zones << zone.name }
32
37
  zones[Random.rand(zones.size)]
33
38
  end
34
-
35
- def ensure_same_availability_zone(zone_names)
36
- raise Bosh::Clouds::CloudError,
37
- "can't use multiple availability zones: #{zone_names.join(', ')}" if zone_names.size > 1
38
- end
39
39
  end
40
- end
40
+ end
@@ -57,7 +57,13 @@ module Bosh::AwsCloud
57
57
  initialize_aws
58
58
  initialize_registry
59
59
 
60
- elb = AWS::ELB.new(@aws_params)
60
+ aws_elb_params = {
61
+ access_key_id: aws_properties['access_key_id'],
62
+ secret_access_key: aws_properties['secret_access_key'],
63
+ region: aws_properties['region']
64
+ }
65
+
66
+ elb = AWS::ELB.new(aws_elb_params)
61
67
 
62
68
  @instance_manager = InstanceManager.new(region, registry, elb, az_selector, @logger)
63
69
 
@@ -160,10 +160,6 @@ module Bosh::AwsCloud
160
160
  Bosh::Clouds::Config.logger
161
161
  end
162
162
 
163
- def self.task_checkpoint
164
- Bosh::Clouds::Config.task_checkpoint
165
- end
166
-
167
163
  def initialize
168
164
  @started_at = Time.now
169
165
  end
@@ -187,7 +183,6 @@ module Bosh::AwsCloud
187
183
 
188
184
  state = nil
189
185
  Bosh::Retryable.new(tries: tries, sleep: sleep_cb, on: errors, ensure: ensure_cb).retryer do
190
- Bosh::AwsCloud::ResourceWait.task_checkpoint
191
186
 
192
187
  state = resource.method(state_method).call
193
188
  if state == :error || state == :failed
@@ -0,0 +1,37 @@
1
+ #!/bin/sh
2
+ #
3
+ # This script runs as root through sudo without the need for a password,
4
+ # so it needs to make sure it can't be abused.
5
+ #
6
+
7
+ # make sure we have a secure PATH
8
+ PATH=/bin:/usr/bin
9
+ export PATH
10
+ if [ $# -ne 2 ]; then
11
+ echo "usage: $0 <image-file> <block device>"
12
+ exit 1
13
+ fi
14
+
15
+ IMAGE="$1"
16
+ OUTPUT="$2"
17
+
18
+ # workaround for issue on 12.04 LTS, use LANG=C
19
+ echo ${IMAGE} | LANG=C egrep '^/[A-za-z0-9_/-]+/image$' > /dev/null 2>&1
20
+ if [ $? -ne 0 ]; then
21
+ echo "ERROR: illegal image file: ${IMAGE}"
22
+ exit 1
23
+ fi
24
+
25
+ echo ${OUTPUT} | egrep '^/dev/[svx]+d[a-z0-9]+$' > /dev/null 2>&1
26
+ if [ $? -ne 0 ]; then
27
+ echo "ERROR: illegal device: ${OUTPUT}"
28
+ exit 1
29
+ fi
30
+
31
+ if [ ! -b ${OUTPUT} ]; then
32
+ echo "ERROR: not a device: ${OUTPUT}"
33
+ exit 1
34
+ fi
35
+
36
+ # copy image to block device with 1 MB block size
37
+ tar -xzf ${IMAGE} -O root.img | dd bs=1M of=${OUTPUT}
@@ -0,0 +1,5 @@
1
+ #!/bin/bash
2
+
3
+ set -ex
4
+
5
+ bundle package --all --all-platforms
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bosh_aws_cpi
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - VMware
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-02 00:00:00.000000000 Z
11
+ date: 2015-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -125,6 +125,8 @@ files:
125
125
  - lib/cloud/aws/stemcell_finder.rb
126
126
  - lib/cloud/aws/tag_manager.rb
127
127
  - lib/cloud/aws/vip_network.rb
128
+ - scripts/stemcell-copy.sh
129
+ - scripts/vendor_gems
128
130
  homepage: https://github.com/cloudfoundry/bosh
129
131
  licenses:
130
132
  - Apache 2.0