meroku 2.0.8 → 2.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -5
  3. data/bin/meroku +1 -1
  4. data/circle.yml +23 -0
  5. data/frontend/Gemfile +5 -2
  6. data/frontend/Gemfile.lock +5 -2
  7. data/frontend/app/controllers/application_controller.rb +1 -0
  8. data/frontend/app/controllers/apps_controller.rb +46 -48
  9. data/frontend/app/controllers/publickeys_controller.rb +45 -46
  10. data/frontend/app/controllers/users/registrations_controller.rb +0 -15
  11. data/frontend/app/controllers/users/sessions_controller.rb +12 -3
  12. data/frontend/app/lib/cmd.rb +11 -0
  13. data/frontend/app/models/app.rb +18 -11
  14. data/frontend/app/models/publickey.rb +1 -1
  15. data/frontend/app/models/user.rb +5 -4
  16. data/frontend/app/policies/application_policy.rb +53 -0
  17. data/frontend/app/policies/publickey_policy.rb +7 -0
  18. data/frontend/app/serializable/serializable_user.rb +2 -1
  19. data/frontend/app/views/layouts/application.html.erb +1 -1
  20. data/frontend/config/database.yml +72 -10
  21. data/frontend/config/routes.rb +6 -14
  22. data/frontend/db/migrate/20171028150506_add_apisecret_to_users.rb +6 -0
  23. data/frontend/etc_nginx_sites-enabled_default +1 -1
  24. data/frontend/public/Meroku.html +140 -0
  25. data/frontend/public/Meroku/Api.html +129 -0
  26. data/frontend/public/Meroku/Api/Request.html +221 -0
  27. data/frontend/public/Meroku/Aws.html +212 -0
  28. data/frontend/public/Meroku/Aws/Ec2.html +477 -0
  29. data/frontend/public/Meroku/CLI.html +784 -0
  30. data/frontend/public/Meroku/CLI/AdminUser.html +192 -0
  31. data/frontend/public/Meroku/CLI/Help.html +224 -0
  32. data/frontend/public/Meroku/CLI/Secrets.html +191 -0
  33. data/frontend/public/Meroku/CLI/Session.html +460 -0
  34. data/frontend/public/Meroku/CLI/User.html +182 -0
  35. data/frontend/public/Meroku/Extensions.html +405 -0
  36. data/frontend/public/Meroku/Infrastructure.html +279 -0
  37. data/frontend/public/Meroku/Infrastructure/Node.html +785 -0
  38. data/frontend/public/Meroku/Infrastructure/Server.html +373 -0
  39. data/frontend/public/Meroku/Node.html +845 -0
  40. data/frontend/public/Meroku/Tunnel.html +701 -0
  41. data/frontend/public/Meroku/Tunnelable.html +243 -0
  42. data/frontend/public/_index.html +273 -0
  43. data/frontend/public/class_list.html +51 -0
  44. data/frontend/public/css/common.css +1 -0
  45. data/frontend/public/css/full_list.css +58 -0
  46. data/frontend/public/css/style.css +492 -0
  47. data/frontend/public/file.README.html +181 -0
  48. data/frontend/public/file_list.html +56 -0
  49. data/frontend/public/frames.html +17 -0
  50. data/frontend/public/index.html +181 -0
  51. data/frontend/public/js/app.js +248 -0
  52. data/frontend/public/js/full_list.js +216 -0
  53. data/frontend/public/js/jquery.js +4 -0
  54. data/frontend/public/method_list.html +395 -0
  55. data/frontend/public/robots.txt +2 -1
  56. data/frontend/public/top-level-namespace.html +110 -0
  57. data/frontend/test/policies/publickey_policy_test.rb +19 -0
  58. data/lib/meroku.rb +9 -7
  59. data/lib/meroku/api.rb +8 -0
  60. data/lib/meroku/api/request.rb +17 -0
  61. data/lib/meroku/aws.rb +14 -0
  62. data/lib/meroku/aws/ec2.rb +59 -0
  63. data/lib/meroku/cli.rb +80 -81
  64. data/lib/meroku/cli/help.rb +27 -0
  65. data/lib/meroku/cli/secrets.rb +13 -0
  66. data/lib/meroku/cli/session.rb +32 -51
  67. data/lib/meroku/extensions.rb +32 -0
  68. data/lib/meroku/infrastructure.rb +14 -17
  69. data/lib/meroku/infrastructure/server.rb +20 -0
  70. data/lib/meroku/node.rb +113 -0
  71. data/lib/meroku/tunnelable.rb +31 -0
  72. data/lib/meroku/version.rb +1 -1
  73. data/modified-cedar-14.sh +0 -4
  74. metadata +50 -9
  75. data/frontend/app/controllers/pages_controller.rb +0 -4
  76. data/frontend/app/views/pages/landing.html.erb +0 -2
  77. data/frontend/db/migrate/20171025193627_add_token_to_users.rb +0 -5
  78. data/lib/meroku/cli/admin_user.rb +0 -20
  79. data/lib/meroku/cli/user.rb +0 -14
  80. data/lib/meroku/infrastructure/node.rb +0 -102
  81. data/lib/meroku/tunnel.rb +0 -56
@@ -0,0 +1,279 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Module: Meroku::Infrastructure
8
+
9
+ &mdash; Documentation by YARD 0.9.9
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "Meroku::Infrastructure";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (I)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Meroku.html" title="Meroku (module)">Meroku</a></span></span>
41
+ &raquo;
42
+ <span class="title">Infrastructure</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Module: Meroku::Infrastructure
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+ <dl>
73
+ <dt>Extended by:</dt>
74
+ <dd><span class='object_link'><a href="Aws/Ec2.html" title="Meroku::Aws::Ec2 (module)">Aws::Ec2</a></span></dd>
75
+ </dl>
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+ <dl>
85
+ <dt>Defined in:</dt>
86
+ <dd>lib/meroku/infrastructure.rb<span class="defines">,<br />
87
+ lib/meroku/infrastructure/server.rb</span>
88
+ </dd>
89
+ </dl>
90
+
91
+ </div>
92
+
93
+ <h2>Overview</h2><div class="docstring">
94
+ <div class="discussion">
95
+
96
+ <p>Logic related to the infratructure that powers meroku</p>
97
+
98
+
99
+ </div>
100
+ </div>
101
+ <div class="tags">
102
+
103
+
104
+ </div><h2>Defined Under Namespace</h2>
105
+ <p class="children">
106
+
107
+
108
+
109
+
110
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Infrastructure/Server.html" title="Meroku::Infrastructure::Server (class)">Server</a></span>
111
+
112
+
113
+ </p>
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+ <h2>
123
+ Class Method Summary
124
+ <small><a href="#" class="summary_toggle">collapse</a></small>
125
+ </h2>
126
+
127
+ <ul class="summary">
128
+
129
+ <li class="public ">
130
+ <span class="summary_signature">
131
+
132
+ <a href="#each_server-class_method" title="each_server (class method)">.<strong>each_server</strong> &#x21d2; Object </a>
133
+
134
+
135
+
136
+ </span>
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+ <span class="summary_desc"><div class='inline'></div></span>
147
+
148
+ </li>
149
+
150
+
151
+ <li class="public ">
152
+ <span class="summary_signature">
153
+
154
+ <a href="#servers-class_method" title="servers (class method)">.<strong>servers</strong> &#x21d2; Object </a>
155
+
156
+
157
+
158
+ </span>
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+ <span class="summary_desc"><div class='inline'></div></span>
169
+
170
+ </li>
171
+
172
+
173
+ </ul>
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="Aws/Ec2.html" title="Meroku::Aws::Ec2 (module)">Aws::Ec2</a></span></h3>
186
+ <p class="inherited"><span class='object_link'><a href="Aws/Ec2.html#associate_address-class_method" title="Meroku::Aws::Ec2.associate_address (method)">associate_address</a></span>, <span class='object_link'><a href="Aws/Ec2.html#ec2_client-instance_method" title="Meroku::Aws::Ec2#ec2_client (method)">ec2_client</a></span>, <span class='object_link'><a href="Aws/Ec2.html#ec2_client-class_method" title="Meroku::Aws::Ec2.ec2_client (method)">ec2_client</a></span>, <span class='object_link'><a href="Aws/Ec2.html#make_instance-instance_method" title="Meroku::Aws::Ec2#make_instance (method)">make_instance</a></span>, <span class='object_link'><a href="Aws/Ec2.html#tag-instance_method" title="Meroku::Aws::Ec2#tag (method)">tag</a></span></p>
187
+
188
+
189
+ <div id="class_method_details" class="method_details_list">
190
+ <h2>Class Method Details</h2>
191
+
192
+
193
+ <div class="method_details first">
194
+ <h3 class="signature first" id="each_server-class_method">
195
+
196
+ .<strong>each_server</strong> &#x21d2; <tt>Object</tt>
197
+
198
+
199
+
200
+
201
+
202
+ </h3><table class="source_code">
203
+ <tr>
204
+ <td>
205
+ <pre class="lines">
206
+
207
+
208
+ 19
209
+ 20
210
+ 21</pre>
211
+ </td>
212
+ <td>
213
+ <pre class="code"><span class="info file"># File 'lib/meroku/infrastructure.rb', line 19</span>
214
+
215
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_each_server'>each_server</span>
216
+ <span class='id identifier rubyid_servers'>servers</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_s'>s</span><span class='op'>|</span> <span class='kw'>yield</span> <span class='id identifier rubyid_s'>s</span> <span class='rbrace'>}</span>
217
+ <span class='kw'>end</span></pre>
218
+ </td>
219
+ </tr>
220
+ </table>
221
+ </div>
222
+
223
+ <div class="method_details ">
224
+ <h3 class="signature " id="servers-class_method">
225
+
226
+ .<strong>servers</strong> &#x21d2; <tt>Object</tt>
227
+
228
+
229
+
230
+
231
+
232
+ </h3><table class="source_code">
233
+ <tr>
234
+ <td>
235
+ <pre class="lines">
236
+
237
+
238
+ 8
239
+ 9
240
+ 10
241
+ 11
242
+ 12
243
+ 13
244
+ 14
245
+ 15
246
+ 16
247
+ 17</pre>
248
+ </td>
249
+ <td>
250
+ <pre class="code"><span class="info file"># File 'lib/meroku/infrastructure.rb', line 8</span>
251
+
252
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_servers'>servers</span>
253
+ <span class='id identifier rubyid_ec2_client'>ec2_client</span><span class='period'>.</span><span class='id identifier rubyid_describe_instances'>describe_instances</span><span class='lparen'>(</span>
254
+ <span class='label'>filters:</span> <span class='lbracket'>[</span>
255
+ <span class='lbrace'>{</span> <span class='label'>name:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>tag:Name</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>values:</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>node</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='rbrace'>}</span><span class='comma'>,</span>
256
+ <span class='lbrace'>{</span> <span class='label'>name:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>instance-state-name</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>values:</span> <span class='qwords_beg'>%w[</span><span class='tstring_content'>running</span><span class='words_sep'> </span><span class='tstring_content'>pending</span><span class='words_sep'>]</span> <span class='rbrace'>}</span>
257
+ <span class='rbracket'>]</span>
258
+ <span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_reservations'>reservations</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_xx'>xx</span><span class='op'>|</span>
259
+ <span class='const'><span class='object_link'><a href="../Meroku.html" title="Meroku (module)">Meroku</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Meroku::Infrastructure (module)">Infrastructure</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Infrastructure/Server.html" title="Meroku::Infrastructure::Server (class)">Server</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Infrastructure/Server.html#initialize-instance_method" title="Meroku::Infrastructure::Server#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_xx'>xx</span><span class='period'>.</span><span class='id identifier rubyid_instances'>instances</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='period'>.</span><span class='id identifier rubyid_instance_id'>instance_id</span><span class='rparen'>)</span>
260
+ <span class='kw'>end</span>
261
+ <span class='kw'>end</span></pre>
262
+ </td>
263
+ </tr>
264
+ </table>
265
+ </div>
266
+
267
+ </div>
268
+
269
+ </div>
270
+
271
+ <div id="footer">
272
+ Generated on Tue Oct 31 19:39:54 2017 by
273
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
274
+ 0.9.9 (ruby-2.4.2).
275
+ </div>
276
+
277
+ </div>
278
+ </body>
279
+ </html>
@@ -0,0 +1,785 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: Meroku::Infrastructure::Node
8
+
9
+ &mdash; Documentation by YARD 0.9.9
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "Meroku::Infrastructure::Node";
19
+ relpath = '../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../_index.html">Index (N)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../Meroku.html" title="Meroku (module)">Meroku</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Infrastructure.html" title="Meroku::Infrastructure (module)">Infrastructure</a></span></span>
41
+ &raquo;
42
+ <span class="title">Node</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: Meroku::Infrastructure::Node
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">Meroku::Infrastructure::Node</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/meroku/infrastructure/node.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+
103
+
104
+
105
+
106
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
107
+ <ul class="summary">
108
+
109
+ <li class="public ">
110
+ <span class="summary_signature">
111
+
112
+ <a href="#ec2_client-instance_method" title="#ec2_client (instance method)">#<strong>ec2_client</strong> &#x21d2; Object </a>
113
+
114
+
115
+
116
+ </span>
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+ <span class="summary_desc"><div class='inline'>
130
+ <p>Returns the value of attribute ec2_client.</p>
131
+ </div></span>
132
+
133
+ </li>
134
+
135
+
136
+ <li class="public ">
137
+ <span class="summary_signature">
138
+
139
+ <a href="#instance-instance_method" title="#instance (instance method)">#<strong>instance</strong> &#x21d2; Object </a>
140
+
141
+
142
+
143
+ </span>
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+ <span class="summary_desc"><div class='inline'>
157
+ <p>Returns the value of attribute instance.</p>
158
+ </div></span>
159
+
160
+ </li>
161
+
162
+
163
+ <li class="public ">
164
+ <span class="summary_signature">
165
+
166
+ <a href="#tunnel-instance_method" title="#tunnel (instance method)">#<strong>tunnel</strong> &#x21d2; Object </a>
167
+
168
+
169
+
170
+ </span>
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+ <span class="summary_desc"><div class='inline'>
184
+ <p>Returns the value of attribute tunnel.</p>
185
+ </div></span>
186
+
187
+ </li>
188
+
189
+
190
+ </ul>
191
+
192
+
193
+
194
+
195
+
196
+ <h2>
197
+ Instance Method Summary
198
+ <small><a href="#" class="summary_toggle">collapse</a></small>
199
+ </h2>
200
+
201
+ <ul class="summary">
202
+
203
+ <li class="public ">
204
+ <span class="summary_signature">
205
+
206
+ <a href="#associate_address-instance_method" title="#associate_address (instance method)">#<strong>associate_address</strong> &#x21d2; Object </a>
207
+
208
+
209
+
210
+ </span>
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+ <span class="summary_desc"><div class='inline'></div></span>
221
+
222
+ </li>
223
+
224
+
225
+ <li class="public ">
226
+ <span class="summary_signature">
227
+
228
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(ec2_client) &#x21d2; Node </a>
229
+
230
+
231
+
232
+ </span>
233
+
234
+
235
+ <span class="note title constructor">constructor</span>
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+ <span class="summary_desc"><div class='inline'>
245
+ <p>A new instance of Node.</p>
246
+ </div></span>
247
+
248
+ </li>
249
+
250
+
251
+ <li class="public ">
252
+ <span class="summary_signature">
253
+
254
+ <a href="#install_frontend_app-instance_method" title="#install_frontend_app (instance method)">#<strong>install_frontend_app</strong> &#x21d2; Object </a>
255
+
256
+
257
+
258
+ </span>
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+ <span class="summary_desc"><div class='inline'></div></span>
269
+
270
+ </li>
271
+
272
+
273
+ <li class="public ">
274
+ <span class="summary_signature">
275
+
276
+ <a href="#install_packages-instance_method" title="#install_packages (instance method)">#<strong>install_packages</strong> &#x21d2; Object </a>
277
+
278
+
279
+
280
+ </span>
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+ <span class="summary_desc"><div class='inline'></div></span>
291
+
292
+ </li>
293
+
294
+
295
+ <li class="public ">
296
+ <span class="summary_signature">
297
+
298
+ <a href="#tweak_configuration-instance_method" title="#tweak_configuration (instance method)">#<strong>tweak_configuration</strong> &#x21d2; Object </a>
299
+
300
+
301
+
302
+ </span>
303
+
304
+
305
+
306
+
307
+
308
+
309
+
310
+
311
+
312
+ <span class="summary_desc"><div class='inline'></div></span>
313
+
314
+ </li>
315
+
316
+
317
+ </ul>
318
+
319
+
320
+ <div id="constructor_details" class="method_details_list">
321
+ <h2>Constructor Details</h2>
322
+
323
+ <div class="method_details first">
324
+ <h3 class="signature first" id="initialize-instance_method">
325
+
326
+ #<strong>initialize</strong>(ec2_client) &#x21d2; <tt><span class='object_link'><a href="" title="Meroku::Infrastructure::Node (class)">Node</a></span></tt>
327
+
328
+
329
+
330
+
331
+
332
+ </h3><div class="docstring">
333
+ <div class="discussion">
334
+
335
+ <p>Returns a new instance of Node</p>
336
+
337
+
338
+ </div>
339
+ </div>
340
+ <div class="tags">
341
+
342
+
343
+ </div><table class="source_code">
344
+ <tr>
345
+ <td>
346
+ <pre class="lines">
347
+
348
+
349
+ 7
350
+ 8
351
+ 9
352
+ 10
353
+ 11
354
+ 12
355
+ 13
356
+ 14
357
+ 15
358
+ 16
359
+ 17
360
+ 18
361
+ 19
362
+ 20
363
+ 21
364
+ 22
365
+ 23
366
+ 24
367
+ 25
368
+ 26
369
+ 27
370
+ 28
371
+ 29
372
+ 30
373
+ 31
374
+ 32
375
+ 33
376
+ 34
377
+ 35
378
+ 36
379
+ 37
380
+ 38
381
+ 39</pre>
382
+ </td>
383
+ <td>
384
+ <pre class="code"><span class="info file"># File 'lib/meroku/infrastructure/node.rb', line 7</span>
385
+
386
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_ec2_client'>ec2_client</span><span class='rparen'>)</span>
387
+ <span class='ivar'>@ec2_client</span> <span class='op'>=</span> <span class='id identifier rubyid_ec2_client'>ec2_client</span>
388
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_ec2_client'>ec2_client</span><span class='period'>.</span><span class='id identifier rubyid_try'>try</span><span class='lparen'>(</span>
389
+ <span class='symbol'>:run_instances</span><span class='comma'>,</span>
390
+ <span class='lbrace'>{</span>
391
+ <span class='label'>image_id:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>ami-841f46ff</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='comment'>#was ami-841f46ff
392
+ </span> <span class='label'>min_count:</span> <span class='int'>1</span><span class='comma'>,</span>
393
+ <span class='label'>max_count:</span> <span class='int'>1</span><span class='comma'>,</span>
394
+ <span class='label'>key_name:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>meroku.id_rsa</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
395
+ <span class='label'>instance_type:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>t2.micro</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='comment'>#&#39;t2.micro&#39;,
396
+ </span> <span class='label'>tag_specifications:</span> <span class='lbracket'>[</span>
397
+ <span class='lbrace'>{</span>
398
+ <span class='label'>resource_type:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>instance</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
399
+ <span class='label'>tags:</span> <span class='lbracket'>[</span>
400
+ <span class='lbrace'>{</span>
401
+ <span class='label'>key:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Name</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
402
+ <span class='label'>value:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>node</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
403
+ <span class='rbrace'>}</span><span class='comma'>,</span>
404
+ <span class='rbracket'>]</span><span class='comma'>,</span>
405
+ <span class='rbrace'>}</span><span class='comma'>,</span>
406
+ <span class='rbracket'>]</span>
407
+ <span class='rbrace'>}</span>
408
+ <span class='rparen'>)</span>
409
+ <span class='ivar'>@instance</span> <span class='op'>=</span> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_instances'>instances</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span> <span class='kw'>if</span> <span class='id identifier rubyid_result'>result</span>
410
+ <span class='ivar'>@tunnel</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../Meroku.html" title="Meroku (module)">Meroku</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Tunnel.html" title="Meroku::Tunnel (class)">Tunnel</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../Tunnel.html#initialize-instance_method" title="Meroku::Tunnel#initialize (method)">new</a></span></span><span class='lparen'>(</span>
411
+ <span class='label'>ip:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>34.239.241.218</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
412
+ <span class='label'>username:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>ubuntu</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
413
+ <span class='label'>keys:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>~/crypto/meroku/meroku.id_rsa</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
414
+ <span class='label'>verify_host_key:</span> <span class='kw'>false</span><span class='comma'>,</span>
415
+ <span class='label'>verbose:</span> <span class='kw'>false</span>
416
+ <span class='rparen'>)</span>
417
+ <span class='kw'>self</span>
418
+ <span class='kw'>end</span></pre>
419
+ </td>
420
+ </tr>
421
+ </table>
422
+ </div>
423
+
424
+ </div>
425
+
426
+ <div id="instance_attr_details" class="attr_details">
427
+ <h2>Instance Attribute Details</h2>
428
+
429
+
430
+ <span id="ec2_client=-instance_method"></span>
431
+ <div class="method_details first">
432
+ <h3 class="signature first" id="ec2_client-instance_method">
433
+
434
+ #<strong>ec2_client</strong> &#x21d2; <tt>Object</tt>
435
+
436
+
437
+
438
+
439
+
440
+ </h3><div class="docstring">
441
+ <div class="discussion">
442
+
443
+ <p>Returns the value of attribute ec2_client</p>
444
+
445
+
446
+ </div>
447
+ </div>
448
+ <div class="tags">
449
+
450
+
451
+ </div><table class="source_code">
452
+ <tr>
453
+ <td>
454
+ <pre class="lines">
455
+
456
+
457
+ 5
458
+ 6
459
+ 7</pre>
460
+ </td>
461
+ <td>
462
+ <pre class="code"><span class="info file"># File 'lib/meroku/infrastructure/node.rb', line 5</span>
463
+
464
+ <span class='kw'>def</span> <span class='id identifier rubyid_ec2_client'>ec2_client</span>
465
+ <span class='ivar'>@ec2_client</span>
466
+ <span class='kw'>end</span></pre>
467
+ </td>
468
+ </tr>
469
+ </table>
470
+ </div>
471
+
472
+
473
+ <span id="instance=-instance_method"></span>
474
+ <div class="method_details ">
475
+ <h3 class="signature " id="instance-instance_method">
476
+
477
+ #<strong>instance</strong> &#x21d2; <tt>Object</tt>
478
+
479
+
480
+
481
+
482
+
483
+ </h3><div class="docstring">
484
+ <div class="discussion">
485
+
486
+ <p>Returns the value of attribute instance</p>
487
+
488
+
489
+ </div>
490
+ </div>
491
+ <div class="tags">
492
+
493
+
494
+ </div><table class="source_code">
495
+ <tr>
496
+ <td>
497
+ <pre class="lines">
498
+
499
+
500
+ 5
501
+ 6
502
+ 7</pre>
503
+ </td>
504
+ <td>
505
+ <pre class="code"><span class="info file"># File 'lib/meroku/infrastructure/node.rb', line 5</span>
506
+
507
+ <span class='kw'>def</span> <span class='id identifier rubyid_instance'>instance</span>
508
+ <span class='ivar'>@instance</span>
509
+ <span class='kw'>end</span></pre>
510
+ </td>
511
+ </tr>
512
+ </table>
513
+ </div>
514
+
515
+
516
+ <span id="tunnel=-instance_method"></span>
517
+ <div class="method_details ">
518
+ <h3 class="signature " id="tunnel-instance_method">
519
+
520
+ #<strong>tunnel</strong> &#x21d2; <tt>Object</tt>
521
+
522
+
523
+
524
+
525
+
526
+ </h3><div class="docstring">
527
+ <div class="discussion">
528
+
529
+ <p>Returns the value of attribute tunnel</p>
530
+
531
+
532
+ </div>
533
+ </div>
534
+ <div class="tags">
535
+
536
+
537
+ </div><table class="source_code">
538
+ <tr>
539
+ <td>
540
+ <pre class="lines">
541
+
542
+
543
+ 5
544
+ 6
545
+ 7</pre>
546
+ </td>
547
+ <td>
548
+ <pre class="code"><span class="info file"># File 'lib/meroku/infrastructure/node.rb', line 5</span>
549
+
550
+ <span class='kw'>def</span> <span class='id identifier rubyid_tunnel'>tunnel</span>
551
+ <span class='ivar'>@tunnel</span>
552
+ <span class='kw'>end</span></pre>
553
+ </td>
554
+ </tr>
555
+ </table>
556
+ </div>
557
+
558
+ </div>
559
+
560
+
561
+ <div id="instance_method_details" class="method_details_list">
562
+ <h2>Instance Method Details</h2>
563
+
564
+
565
+ <div class="method_details first">
566
+ <h3 class="signature first" id="associate_address-instance_method">
567
+
568
+ #<strong>associate_address</strong> &#x21d2; <tt>Object</tt>
569
+
570
+
571
+
572
+
573
+
574
+ </h3><table class="source_code">
575
+ <tr>
576
+ <td>
577
+ <pre class="lines">
578
+
579
+
580
+ 41
581
+ 42
582
+ 43
583
+ 44
584
+ 45
585
+ 46
586
+ 47
587
+ 48
588
+ 49
589
+ 50
590
+ 51
591
+ 52</pre>
592
+ </td>
593
+ <td>
594
+ <pre class="code"><span class="info file"># File 'lib/meroku/infrastructure/node.rb', line 41</span>
595
+
596
+ <span class='kw'>def</span> <span class='id identifier rubyid_associate_address'>associate_address</span>
597
+ <span class='id identifier rubyid_retries'>retries</span> <span class='op'>||=</span> <span class='int'>0</span>
598
+ <span class='ivar'>@ec2_client</span><span class='period'>.</span><span class='id identifier rubyid_associate_address'>associate_address</span><span class='lparen'>(</span>
599
+ <span class='label'>allocation_id:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>eipalloc-139f7823</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
600
+ <span class='label'>instance_id:</span> <span class='ivar'>@instance</span><span class='period'>.</span><span class='id identifier rubyid_try'>try</span><span class='lparen'>(</span><span class='symbol'>:instance_id</span><span class='rparen'>)</span>
601
+ <span class='rparen'>)</span>
602
+ <span class='kw'>self</span>
603
+ <span class='kw'>rescue</span> <span class='op'>::</span><span class='const'>Aws</span><span class='op'>::</span><span class='const'>EC2</span><span class='op'>::</span><span class='const'>Errors</span><span class='op'>::</span><span class='const'>InvalidInstanceID</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
604
+ <span class='id identifier rubyid_print'>print</span> <span class='const'>STDERR</span><span class='period'>.</span><span class='id identifier rubyid_print'>print</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span>
605
+ <span class='id identifier rubyid_sleep'>sleep</span> <span class='int'>2</span>
606
+ <span class='kw'>retry</span> <span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_retries'>retries</span> <span class='op'>+=</span> <span class='int'>1</span><span class='rparen'>)</span> <span class='op'>&lt;</span> <span class='int'>15</span>
607
+ <span class='kw'>end</span></pre>
608
+ </td>
609
+ </tr>
610
+ </table>
611
+ </div>
612
+
613
+ <div class="method_details ">
614
+ <h3 class="signature " id="install_frontend_app-instance_method">
615
+
616
+ #<strong>install_frontend_app</strong> &#x21d2; <tt>Object</tt>
617
+
618
+
619
+
620
+
621
+
622
+ </h3><table class="source_code">
623
+ <tr>
624
+ <td>
625
+ <pre class="lines">
626
+
627
+
628
+ 78
629
+ 79
630
+ 80
631
+ 81
632
+ 82
633
+ 83
634
+ 84
635
+ 85
636
+ 86
637
+ 87
638
+ 88
639
+ 89
640
+ 90
641
+ 91
642
+ 92
643
+ 93
644
+ 94
645
+ 95
646
+ 96
647
+ 97
648
+ 98
649
+ 99</pre>
650
+ </td>
651
+ <td>
652
+ <pre class="code"><span class="info file"># File 'lib/meroku/infrastructure/node.rb', line 78</span>
653
+
654
+ <span class='kw'>def</span> <span class='id identifier rubyid_install_frontend_app'>install_frontend_app</span>
655
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>mkdir /home/ubuntu/.meroku</span><span class='tstring_end'>&#39;</span></span>
656
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cd ~\; git clone https://github.com/oystersauce8/meroku\;</span><span class='tstring_end'>&quot;</span></span>
657
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>sudo rm -f /etc/nginx/sites-enabled/* /etc/nginx/sites-available/*</span><span class='tstring_end'>&quot;</span></span>
658
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>sudo cp ~/meroku/frontend/etc_nginx_sites-enabled_default /etc/nginx/sites-enabled/default</span><span class='tstring_end'>&quot;</span></span>
659
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>sudo cp /home/ubuntu/meroku/frontend/etc_nginx_sites-enabled_template /sharedro</span><span class='tstring_end'>&#39;</span></span>
660
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>sudo chmod a+r /sharedro/etc_nginx_sites-enabled_template</span><span class='tstring_end'>&#39;</span></span>
661
+
662
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>curl -s -o /home/ubuntu/.meroku/letsencrypt_fullchain.pem http://www.sam-we.com/dropbox/meroku-</span><span class='embexpr_beg'>#{</span><span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>SECRET</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'>/letsencrypt_fullchain.pem</span><span class='tstring_end'>&quot;</span></span>
663
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>curl -s -o /home/ubuntu/.meroku/letsencrypt_privkey.pem http://www.sam-we.com/dropbox/meroku-</span><span class='embexpr_beg'>#{</span><span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>SECRET</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'>/letsencrypt_privkey.pem</span><span class='tstring_end'>&quot;</span></span>
664
+
665
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cd ~/meroku/frontend\; sudo gem install bundler\; bundle\;</span><span class='tstring_end'>&quot;</span></span>
666
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cd ~/meroku/frontend\; SECRET=</span><span class='embexpr_beg'>#{</span><span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>SECRET</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'> RAILS_ENV=production bundle exec rails assets:precompile</span><span class='tstring_end'>&quot;</span></span>
667
+
668
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cd ~/meroku/frontend\; SECRET=</span><span class='embexpr_beg'>#{</span><span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>SECRET</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'> RAILS_ENV=production bundle exec rake db:migrate</span><span class='tstring_end'>&quot;</span></span>
669
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cd ~/meroku/frontend\; SECRET=</span><span class='embexpr_beg'>#{</span><span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>SECRET</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'> bundle exec puma -d -b unix:///home/ubuntu/meroku.sock</span><span class='tstring_end'>&quot;</span></span>
670
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>sudo /usr/sbin/nginx -s reload</span><span class='tstring_end'>&quot;</span></span>
671
+
672
+ <span class='kw'>self</span>
673
+ <span class='kw'>rescue</span>
674
+ <span class='id identifier rubyid_byebug'>byebug</span>
675
+ <span class='kw'>end</span></pre>
676
+ </td>
677
+ </tr>
678
+ </table>
679
+ </div>
680
+
681
+ <div class="method_details ">
682
+ <h3 class="signature " id="install_packages-instance_method">
683
+
684
+ #<strong>install_packages</strong> &#x21d2; <tt>Object</tt>
685
+
686
+
687
+
688
+
689
+
690
+ </h3><table class="source_code">
691
+ <tr>
692
+ <td>
693
+ <pre class="lines">
694
+
695
+
696
+ 54
697
+ 55
698
+ 56
699
+ 57
700
+ 58
701
+ 59
702
+ 60
703
+ 61
704
+ 62
705
+ 63
706
+ 64
707
+ 65
708
+ 66
709
+ 67
710
+ 68
711
+ 69
712
+ 70
713
+ 71
714
+ 72</pre>
715
+ </td>
716
+ <td>
717
+ <pre class="code"><span class="info file"># File 'lib/meroku/infrastructure/node.rb', line 54</span>
718
+
719
+ <span class='kw'>def</span> <span class='id identifier rubyid_install_packages'>install_packages</span>
720
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span> <span class='tstring'><span class='tstring_beg'>%Q[</span><span class='tstring_content'>sudo sh -c &#39;echo &quot;-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIPWJQU+TkDu9uyVzHQcVnKklRhQvIBdXHkA/7zAQG8XuoAoGCCqGSM49\nAwEHoUQDQgAEI1lm18nECH4jH+6p80jhn8WgZRDOC1ufVVtoPUnUgEvslfV3xzWl\nDXZKof765EiCOYyt2TZ7pKClMexhHWhMtA==\n-----END EC PRIVATE KEY-----&quot; &gt; /etc/ssh/ssh_host_ecdsa_key&#39;</span><span class='tstring_end'>]</span></span>
721
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span> <span class='tstring'><span class='tstring_beg'>%Q[</span><span class='tstring_content'>sudo sh -c &#39;echo &quot;ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCNZZtfJxAh+Ix/uqfNI4Z/FoGUQzgtbn1VbaD1J1IBL7JX1d8c1pQ12SqH++uRIgjmMrdk2e6SgpTHsYR1oTLQ= root@ip-172-31-64-77&quot; &gt; /etc/ssh/ssh_host_ecdsa_key.pub&#39;</span><span class='tstring_end'>]</span></span>
722
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>sudo apt-add-repository ppa:brightbox/ruby-ng\;</span><span class='tstring_end'>&quot;</span></span>
723
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>curl -s -o /tmp/modified-cedar-14.sh https://raw.githubusercontent.com/oystersauce8/meroku/master/modified-cedar-14.sh</span><span class='tstring_end'>&quot;</span></span>
724
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>sudo chmod 755 /tmp/modified-cedar-14.sh</span><span class='tstring_end'>&quot;</span></span>
725
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/bin/bash -lc &#39;sudo /tmp/modified-cedar-14.sh&#39;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>concise:</span><span class='kw'>true</span><span class='rparen'>)</span>
726
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>sudo apt-get install -y ruby2.4 ruby2.4-dev</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>concise:</span><span class='kw'>true</span><span class='rparen'>)</span>
727
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>sudo apt-get install -y nginx libsqlite3-dev nodejs</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span><span class='label'>concise:</span><span class='kw'>true</span><span class='rparen'>)</span>
728
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>sudo apt-get install -y libpq-dev postgresql-9.6</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>concise:</span> <span class='kw'>true</span><span class='rparen'>)</span>
729
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>sudo -u postgres createuser -e meroku</span><span class='tstring_end'>&#39;</span></span>
730
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>sudo -u postgres createdb meroku</span><span class='tstring_end'>&#39;</span></span>
731
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>%Q[</span><span class='tstring_content'>sudo -u postgres psql -c &quot;ALTER ROLE meroku WITH PASSWORD &#39;</span><span class='embexpr_beg'>#{</span><span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>SECRET</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'>&#39;;&quot;</span><span class='tstring_end'>]</span></span><span class='rparen'>)</span>
732
+ <span class='comment'>#@tunnel.run(%Q[sudo sed -i -e &quot;s/local\(.*\)peer/local\1md5/&quot; /etc/postgresql/9.6/main/pg_hba.conf])
733
+ </span> <span class='comment'>#@tunnel.run(%Q[sudo sed -i &quot;/^local/s/peer/md5/g&quot; /etc/postgresql/9.6/main/pg_hba.conf])
734
+ </span> <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>%Q[</span><span class='tstring_content'>sudo perl -pi -e &quot;s#local.*all.*all.*peer#local all all md5#&quot; /etc/postgresql/9.6/main/pg_hba.conf</span><span class='tstring_end'>]</span></span><span class='rparen'>)</span>
735
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>sudo service postgresql restart</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
736
+ <span class='kw'>self</span>
737
+ <span class='kw'>end</span></pre>
738
+ </td>
739
+ </tr>
740
+ </table>
741
+ </div>
742
+
743
+ <div class="method_details ">
744
+ <h3 class="signature " id="tweak_configuration-instance_method">
745
+
746
+ #<strong>tweak_configuration</strong> &#x21d2; <tt>Object</tt>
747
+
748
+
749
+
750
+
751
+
752
+ </h3><table class="source_code">
753
+ <tr>
754
+ <td>
755
+ <pre class="lines">
756
+
757
+
758
+ 74
759
+ 75
760
+ 76</pre>
761
+ </td>
762
+ <td>
763
+ <pre class="code"><span class="info file"># File 'lib/meroku/infrastructure/node.rb', line 74</span>
764
+
765
+ <span class='kw'>def</span> <span class='id identifier rubyid_tweak_configuration'>tweak_configuration</span>
766
+ <span class='ivar'>@tunnel</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>sudo mkdir /sharedro &amp;&amp; sudo chmod 777 /sharedro</span><span class='tstring_end'>&#39;</span></span>
767
+ <span class='kw'>end</span></pre>
768
+ </td>
769
+ </tr>
770
+ </table>
771
+ </div>
772
+
773
+ </div>
774
+
775
+ </div>
776
+
777
+ <div id="footer">
778
+ Generated on Sun Oct 29 20:33:05 2017 by
779
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
780
+ 0.9.9 (ruby-2.4.2).
781
+ </div>
782
+
783
+ </div>
784
+ </body>
785
+ </html>