opsicle 2.3.1 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/opsicle/client.rb +4 -2
- data/lib/opsicle/cloneable_instance.rb +1 -1
- data/lib/opsicle/config.rb +13 -3
- data/lib/opsicle/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e709d4cd1f9b258fae81ec63bbc659c1db1db44
|
4
|
+
data.tar.gz: 16c3c0ee8f9ac500176497998f551cb885e23d61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aeaa6a8211aba81c3d125ab90059493e45df684dd89c31ec62690f3e3a0e037593fa1876160dcfa47b544273079bf86eb3bd5a0e57b2a3a46f6ac1197f4ffe63
|
7
|
+
data.tar.gz: 1a47aae0831ec1e2a9afa3a44475629eb18b6961660d4ea1bffb73289a28fb4513556a642c41d8d855730b34ea24c7dde85221d90837c34dbe1b82b838b2740e
|
data/lib/opsicle/client.rb
CHANGED
@@ -11,8 +11,10 @@ module Opsicle
|
|
11
11
|
@config.configure_aws_environment!(environment)
|
12
12
|
credentials = @config.aws_credentials
|
13
13
|
region = @config.opsworks_region
|
14
|
-
|
15
|
-
|
14
|
+
aws_opts = {region: region}
|
15
|
+
aws_opts[:credentials] = credentials unless credentials.nil?
|
16
|
+
@opsworks = Aws::OpsWorks::Client.new aws_opts
|
17
|
+
@s3 = Aws::S3::Client.new aws_opts
|
16
18
|
end
|
17
19
|
|
18
20
|
def run_command(command, command_args={}, options={})
|
@@ -45,7 +45,7 @@ module Opsicle
|
|
45
45
|
if old_hostname =~ /\d\d\z/
|
46
46
|
new_instance_hostname = increment_hostname(old_hostname, all_sibling_hostnames)
|
47
47
|
else
|
48
|
-
new_instance_hostname = old_hostname << "
|
48
|
+
new_instance_hostname = old_hostname << "-clone"
|
49
49
|
end
|
50
50
|
|
51
51
|
puts "\nAutomatically generated hostname: #{new_instance_hostname}\n"
|
data/lib/opsicle/config.rb
CHANGED
@@ -60,14 +60,24 @@ module Opsicle
|
|
60
60
|
|
61
61
|
def authenticate_with_credentials
|
62
62
|
profile_name = opsworks_config[:profile_name] || @environment.to_s
|
63
|
-
|
63
|
+
begin
|
64
|
+
credentials = Aws::SharedCredentials.new(profile_name: profile_name)
|
65
|
+
rescue Aws::Errors::NoSuchProfileError
|
66
|
+
if ENV['AWS_SESSION_TOKEN']
|
67
|
+
Output.say('AWS profile not found; falling back to environment credentials', :debug)
|
68
|
+
else
|
69
|
+
raise Aws::Errors::NoSuchProfileError, "AWS profile #{profile_name} not found"
|
70
|
+
end
|
71
|
+
end
|
64
72
|
region = opsworks_region
|
65
73
|
|
66
|
-
|
74
|
+
if !credentials.nil? && !credentials.set?
|
67
75
|
abort('Opsicle can no longer authenticate through your ~/.fog file. Please run `opsicle legacy-credential-converter` before proceeding.')
|
68
76
|
end
|
69
77
|
|
70
|
-
|
78
|
+
aws_opts = {region: region}
|
79
|
+
aws_opts[:credentials] = credentials unless credentials.nil?
|
80
|
+
Aws.config.update aws_opts
|
71
81
|
|
72
82
|
iam = Aws::IAM::Client.new
|
73
83
|
|
data/lib/opsicle/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opsicle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Fleener
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-04-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk
|
@@ -73,14 +73,14 @@ dependencies:
|
|
73
73
|
requirements:
|
74
74
|
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: '0.
|
76
|
+
version: '0.6'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: '0.
|
83
|
+
version: '0.6'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: hashdiff
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|