pele 0.1.12.pre.pre → 0.1.13.pre.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pele/cli.rb +5 -10
- data/lib/pele/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efb95f1e2faa519e6e0195764a53be3d9c5dbbb5
|
4
|
+
data.tar.gz: 1e794cd85aaea6ca89a61383ea5958e51e4318e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 450492003109d248b62694f2356c670191098bbc4f1e4de70d6de4df912f7db31502deafe081d8675f61f6346326c8b3c0819c94324fdac18d835be8d8abf98b
|
7
|
+
data.tar.gz: 5a4bab62507dcaa0ddc3ef4b50203bbbd0572e6e0a653275de3832f8dbbf69c40fcfd11b89ca5c77bd1326946b5f24a1fbeafcac06416462a929bbf35b124332
|
data/lib/pele/cli.rb
CHANGED
@@ -27,9 +27,9 @@ module Pele
|
|
27
27
|
puts ''
|
28
28
|
say('Provide your aws credentials below', :yellow)
|
29
29
|
puts ''
|
30
|
-
aws_access_key_id = prompt.ask('AWS Access Key ID: '.colorize(:blue), required: true)
|
31
|
-
aws_secret_access_key = prompt.ask('AWS Secret Access Key: '.colorize(:blue), required: true)
|
32
|
-
aws_region = prompt.select('Choose a AWS region: '.colorize(:blue), Pele::Regions::ALL)
|
30
|
+
aws_access_key_id = prompt.ask('AWS Access Key ID: '.colorize(:blue), required: true).delete(' ')
|
31
|
+
aws_secret_access_key = prompt.ask('AWS Secret Access Key: '.colorize(:blue), required: true).delete(' ')
|
32
|
+
aws_region = prompt.select('Choose a AWS region: '.colorize(:blue), Pele::Regions::ALL).delete(' ')
|
33
33
|
if aws_access_key_id.empty? || aws_secret_access_key.empty? || aws_region.empty?
|
34
34
|
say('You need to provide all three credentials. Please try again', :red)
|
35
35
|
abort
|
@@ -39,17 +39,12 @@ module Pele
|
|
39
39
|
end
|
40
40
|
puts ''
|
41
41
|
say('Now lets generate AWS key-pair. This is needed to access EC2 Instances', :green)
|
42
|
-
if File.exist? File.expand_path "#{os}key"
|
43
|
-
puts ''
|
44
|
-
overwrite = prompt.select('Looks like you already have a key generated. Would you like to generate new one?', %w[Yes No])
|
45
|
-
abort if overwrite == 'Yes'
|
46
|
-
end
|
47
42
|
puts ''
|
48
|
-
key_pair_name = prompt.ask(
|
43
|
+
key_pair_name = prompt.ask("Name your key-pair. For example: #{'mykeypair'.colorize(:green)}").delete(' ')
|
49
44
|
begin
|
50
45
|
ec2 = Aws::EC2::Client.new
|
51
46
|
key_pair = ec2.create_key_pair(key_name: "#{key_pair_name}-pele")
|
52
|
-
create_file (OS.mac? || OS.linux? ? "~/.ssh/#{key_pair.key_name}.pem" : "%HOMEPATH
|
47
|
+
create_file (OS.mac? || OS.linux? ? "~/.ssh/#{key_pair.key_name}.pem" : "%HOMEPATH%\\.ssh\\#{key_pair.key_name}.pem") do
|
53
48
|
key_pair.key_material
|
54
49
|
end
|
55
50
|
say('Key-pair successfully generated', :green)
|
data/lib/pele/version.rb
CHANGED