meroku 2.0.21 → 2.0.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -23
- data/lib/meroku/cli/secrets.rb +3 -0
- data/lib/meroku/tunnelable.rb +5 -5
- data/lib/meroku/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: 644b170886bbccc668dcbd9f7c85e12fd7f3fdd7
|
4
|
+
data.tar.gz: f2f9a6ceac6218ca01981f77999f3493976bb20e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4a8a319a22ac72f047737ac20a66ab94b8e42a83a4542e6b3017dbb253e51bf8a9dfafc75888796a9d400d7733ca126a6a68949dad12c029486406851677721
|
7
|
+
data.tar.gz: 34497e672d4a3d8f5a271610ebaaee77549bb6295aa0e8bc1394b148bf80998f86e29fbb8fda5ff61b268d5985abf32db36f01acbae8d23aec60685a76beb099
|
data/README.md
CHANGED
@@ -75,30 +75,10 @@ And deploy
|
|
75
75
|
|
76
76
|
The meroku secret is a 12 charactor hex string, eg. 'dcb528615aa4'
|
77
77
|
All other secrets are derived/downloaded from it.
|
78
|
+
To do administrative commands such as spawn, despawn, you would need to
|
79
|
+
do this first,
|
78
80
|
|
79
|
-
|
80
|
-
~/.meroku/.apiusername
|
81
|
-
~/.meroku/.apisecret
|
82
|
-
|
83
|
-
Frontend (rails app)
|
84
|
-
|
85
|
-
CI
|
86
|
-
CLI
|
87
|
-
run_instances()
|
88
|
-
requires
|
89
|
-
ENV['AWS_ACCESS_KEY']
|
90
|
-
ENV['AWS_SECRET']
|
91
|
-
|
92
|
-
Developer workstation
|
93
|
-
CLI
|
94
|
-
run_instances()
|
95
|
-
requires
|
96
|
-
ENV['AWS_ACCESS_KEY']
|
97
|
-
ENV['AWS_SECRET']
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
OLD: You will need a copy of the file `.secret`. Place it at `~/.meroku/.secret`
|
81
|
+
export SECRET="example"
|
102
82
|
|
103
83
|
|
104
84
|
### Commands
|
data/lib/meroku/cli/secrets.rb
CHANGED
@@ -5,7 +5,9 @@ module Meroku
|
|
5
5
|
def self.load(admin: false)
|
6
6
|
return unless admin
|
7
7
|
env_file = Dir.home + '/.meroku/meroku.env'
|
8
|
+
pem_file = Dir.home + '/.meroku/meroku.id_rsa'
|
8
9
|
attempt_download unless File.exist?(env_file)
|
10
|
+
attempt_download unless File.exist?(pem_file)
|
9
11
|
Dotenv.load(env_file)
|
10
12
|
end
|
11
13
|
|
@@ -14,6 +16,7 @@ module Meroku
|
|
14
16
|
FileUtils.mkdir_p "#{Dir.home}/.meroku"
|
15
17
|
`curl -so ~/.meroku/meroku.env https://s3.amazonaws.com/#{ENV['SECRET']}/meroku.env`
|
16
18
|
`curl -so ~/.meroku/meroku.id_rsa https://s3.amazonaws.com/#{ENV['SECRET']}/meroku.id_rsa`
|
19
|
+
FileUtils.chmod 0400, "#{Dir.home}/.meroku/meroku.id_rsa"
|
17
20
|
end
|
18
21
|
end
|
19
22
|
end
|
data/lib/meroku/tunnelable.rb
CHANGED
@@ -6,13 +6,13 @@ module Meroku
|
|
6
6
|
retries = 0
|
7
7
|
begin
|
8
8
|
code = nil
|
9
|
-
puts "DB8 tunnel_ip #{@tunnel_ip}"
|
10
|
-
puts "DB8 @tunnel_username #{@tunnel_username}"
|
11
|
-
puts "DB8 @tunnel_key_name #{@tunnel_key_name}"
|
12
|
-
puts "DB8 #{`ls -la ~/.meroku/`}"
|
9
|
+
#puts "DB8 tunnel_ip #{@tunnel_ip}"
|
10
|
+
#puts "DB8 @tunnel_username #{@tunnel_username}"
|
11
|
+
#puts "DB8 @tunnel_key_name #{@tunnel_key_name}"
|
12
|
+
#puts "DB8 #{`ls -la ~/.meroku/`}"
|
13
13
|
Net::SSH.start(@tunnel_ip,
|
14
14
|
@tunnel_username,
|
15
|
-
keys: @tunnel_key_name,
|
15
|
+
keys: [ @tunnel_key_name ],
|
16
16
|
verify_host_key: false) do |ssh|
|
17
17
|
ssh.open_channel do |channel|
|
18
18
|
puts cmd
|
data/lib/meroku/version.rb
CHANGED