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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 15d969ad79fb909f97bf0b4697ce29411b584fbc
4
- data.tar.gz: 95ec9d65fb8ac7c4d33441e049d6a108036d71af
3
+ metadata.gz: 644b170886bbccc668dcbd9f7c85e12fd7f3fdd7
4
+ data.tar.gz: f2f9a6ceac6218ca01981f77999f3493976bb20e
5
5
  SHA512:
6
- metadata.gz: 76648bfeacbc3ad173c1d129f9cdff075bae6c66c8d4ab2c5a8e85fa1de9a6197aa19148681e5e150985ff8675c0d3aa7d761ec3f4a82241262c993890373038
7
- data.tar.gz: 1a374f067804e197d9601a9de0b8580e94e0dee45ff7ff977dc848becc9349ecd921f54554c55145c62a5bdfaf725bdb55823d69acfd6b309fccc9a0acbb0c2b
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
- After loggin in via the CLI, these two files are populated
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
@@ -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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Meroku
2
- VERSION = "2.0.21"
2
+ VERSION = "2.0.22"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meroku
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.21
4
+ version: 2.0.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Weerasinghe