meroku 2.0.14 → 2.0.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +27 -2
- data/lib/meroku/cli/secrets.rb +6 -1
- 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: 914fbe09588246caeb82b0732065ed71730d794d
|
4
|
+
data.tar.gz: fcc0a01217811a013830189c63b5f70eeccbecd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce371cc567888fcd8dbcf76514be3498df97d0ca2310b4116f27ce4ef2ef3a8ce932b71f9c743e73cfd1d7e08dd501c34a86d5b0b0b34d0d5948842138baddf3
|
7
|
+
data.tar.gz: f70832a1acf37a970c9d80ec1e021e75e3339ba7e04e89a30efaf137ab57f1c989d39acf62687da867c6ec6d2192eaf35b7abb9d06e56d3e45f4aadb2088d14e
|
data/README.md
CHANGED
@@ -71,9 +71,34 @@ And deploy
|
|
71
71
|
## DOCUMENTATION FOR MAINTAINERS
|
72
72
|
|
73
73
|
|
74
|
-
###
|
74
|
+
### Secrets
|
75
75
|
|
76
|
-
|
76
|
+
The meroku secret is a 12 charactor hex string, eg. 'dcb528615aa4'
|
77
|
+
All other secrets are derived/downloaded from it.
|
78
|
+
|
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`
|
77
102
|
|
78
103
|
|
79
104
|
### Commands
|
data/lib/meroku/cli/secrets.rb
CHANGED
@@ -5,9 +5,14 @@ module Meroku
|
|
5
5
|
def self.load(admin: false)
|
6
6
|
return unless admin
|
7
7
|
env_file = Dir.home + '/.meroku/meroku.env'
|
8
|
-
|
8
|
+
attempt_download unless File.exist?(env_file)
|
9
9
|
Dotenv.load(env_file)
|
10
10
|
end
|
11
|
+
|
12
|
+
def self.attempt_download
|
13
|
+
abort 'ENV["SECRET"] not found' unles ENV['SECRET']
|
14
|
+
`curl -o ~/.meroku/meroku.env https://s3.amazonaws.com/#{ENV['SECRET']}/meroku.env`
|
15
|
+
end
|
11
16
|
end
|
12
17
|
end
|
13
18
|
end
|
data/lib/meroku/version.rb
CHANGED