-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·459 lines (391 loc) · 15.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="apple-touch-icon" sizes="57x57" href="/img/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/img/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/img/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/img/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/img/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/img/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/img/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/img/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/img/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/img/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/img/favicon-16x16.png">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/img/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<title>PiArmy</title>
<!-- Bootstrap Core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Theme CSS -->
<link href="css/freelancer.min.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<style>
section {
padding: 50px 0;
}
section h2 {
font-size: 1.5em;
}
section#maincontent .main{
padding-top: 20px;
}
section.success {
background: #fff;
color: #2C3E50;
}
ul.links {
font-size: 1.5em;
}
ul.links li {
list-style-type: none;
}
.navbar-custom {
padding: 5px 0;
}
.tagline {
color: #fff;
display: block;
margin-top: 20px;
margin-left: 10px;
margin-right: 10px;
text-transform: none;
font-size: 1.1em;
font-family: 'Open Sans', sans-serif;
font-weight: 400;
}
.copy {
font-size: 1.1em;
font-family: 'Open Sans', sans-serif;
font-weight: 300;
}
ul.links {
font-size: 1.2em;
}
hr.star-light {
border-color: #18BC9C;
}
hr.star-light:after {
color: #18BC9C;
background-color: #efefef;
}
.sidebar {
font-size: 0.9em;
padding-top:20px;
background-color: #efefef;
font-weight: 300;
font-family: 'Open Sans', sans-serif;
}
.sidebar .tutorial, .sidebar .repository {
margin-bottom:5px;
padding-bottom: 5px;
font-size: 1.2em;
}
.excerpt p {
margin-left: 25px;
font-size: 0.9em;
color: #2C3E50;
margin-bottom: 0px;
}
.cssload-triangles {
transform: translate(-50%, -50%);
-o-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
-webkit-transform: translate(-50%, -50%);
-moz-transform: translate(-50%, -50%);
height: 40px;
width: 45px;
position: relative;
left: 50%;
}
.cssload-tri {
position: absolute;
animation: cssload-pulse 712.5ms ease-in infinite;
-o-animation: cssload-pulse 712.5ms ease-in infinite;
-ms-animation: cssload-pulse 712.5ms ease-in infinite;
-webkit-animation: cssload-pulse 712.5ms ease-in infinite;
-moz-animation: cssload-pulse 712.5ms ease-in infinite;
border-top: 13px solid rgba(44,62,80,0.68);
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 0px;
}
.cssload-tri.cssload-invert {
border-top: 0px;
border-bottom: 13px solid rgba(44,62,80,0.67);
border-left: 7px solid transparent;
border-right: 7px solid transparent;
}
.cssload-tri:nth-child(1) {
left: 15px;
}
.cssload-tri:nth-child(2) {
left: 7px;
top: 13px;
animation-delay: -118.75ms;
-o-animation-delay: -118.75ms;
-ms-animation-delay: -118.75ms;
-webkit-animation-delay: -118.75ms;
-moz-animation-delay: -118.75ms;
}
.cssload-tri:nth-child(3) {
left: 15px;
top: 13px;
}
.cssload-tri:nth-child(4) {
left: 22px;
top: 13px;
animation-delay: -593.75ms;
-o-animation-delay: -593.75ms;
-ms-animation-delay: -593.75ms;
-webkit-animation-delay: -593.75ms;
-moz-animation-delay: -593.75ms;
}
.cssload-tri:nth-child(5) {
top: 27px;
animation-delay: -237.5ms;
-o-animation-delay: -237.5ms;
-ms-animation-delay: -237.5ms;
-webkit-animation-delay: -237.5ms;
-moz-animation-delay: -237.5ms;
}
.cssload-tri:nth-child(6) {
top: 27px;
left: 7px;
animation-delay: -237.5ms;
-o-animation-delay: -237.5ms;
-ms-animation-delay: -237.5ms;
-webkit-animation-delay: -237.5ms;
-moz-animation-delay: -237.5ms;
}
.cssload-tri:nth-child(7) {
top: 27px;
left: 15px;
animation-delay: -356.25ms;
-o-animation-delay: -356.25ms;
-ms-animation-delay: -356.25ms;
-webkit-animation-delay: -356.25ms;
-moz-animation-delay: -356.25ms;
}
.cssload-tri:nth-child(8) {
top: 27px;
left: 22px;
animation-delay: -475ms;
-o-animation-delay: -475ms;
-ms-animation-delay: -475ms;
-webkit-animation-delay: -475ms;
-moz-animation-delay: -475ms;
}
.cssload-tri:nth-child(9) {
top: 27px;
left: 30px;
animation-delay: -475ms;
-o-animation-delay: -475ms;
-ms-animation-delay: -475ms;
-webkit-animation-delay: -475ms;
-moz-animation-delay: -475ms;
}
@keyframes cssload-pulse {
0% {
opacity: 1;
}
16.666% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@-o-keyframes cssload-pulse {
0% {
opacity: 1;
}
16.666% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@-ms-keyframes cssload-pulse {
0% {
opacity: 1;
}
16.666% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@-webkit-keyframes cssload-pulse {
0% {
opacity: 1;
}
16.666% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@-moz-keyframes cssload-pulse {
0% {
opacity: 1;
}
16.666% {
opacity: 1;
}
100% {
opacity: 0;
}
}
</style>
<body id="page-top" class="index">
<div id="skipnav"><a href="#maincontent">Skip to main content</a></div>
<!-- Navigation -->
<nav id="mainNav" class="navbar navbar-default navbar-fixed-top navbar-custom">
<div class="container">
<div class="col-lg-7">
<img class="img-responsive" src="img/PiArmy.png" alt="">
</div>
<div class="col-lg-5">
<span class="tagline">Adventures with an Army of Raspberry Pis</span>
</div>
</div>
<!-- /.container-fluid -->
</nav>
<!-- About Section -->
<section class="success" id="maincontent">
<div class="container">
<div class="row" style="margin-top: 20px;">
<div class="col-lg-7 main">
<h2 style="margin-bottom:20px;">About</h2>
<p class="text-left copy">PiArmy was started as an experiment to combine Docker and IoT, specifically on Raspberry Pis. What started out as some simple Docker images and notes has turned into more of an obsession. As the number of images and tests grew a lot of concepts and documentation was lost in the hurry to rapidly prototype, instead of deliberately take things step by step. So, in order to force myself to slow down and organize my thoughts, I decided to turn this into a public spectacle/debacle, complete with public Docker images, articles on theory and pain points, and general process documentation.</p>
<p class="text-left copy">The seed for this initially started when I found myself deploying more and more IoT devices into the wild with the need to manage them remotely. In the hopes of creating a centralized administration for devices on disparate networks, PiArmy was born. Initially, with only a handful of devices, I managed everything through a centralized server utilizing Docker Swarm and a custom Ngrok server. However, this quickly became untenable while trying not only to manage the Docker Swarm itself, but then also dynamically remapping and managing all of the ports via Ngrok across different networks—some public and some behind firewalls. I quickly became lost while trying to implement different versions of overlay networks and various VPN setups—all without a deep understanding some of the basic Docker networking concepts. By piling on more and more technologies, things became worse instead of better.</p>
<p class="text-left copy">I decided to take a step back, remove all of the networking hassles, and dig deeper into Docker concepts. So, I bought 4 Raspberry Pi 3s, a switch, and HDMI monitor and decided to start from scratch. The tutorials and images here represent a new starting point in this deeper dive. By documenting some of the basic concepts as well as some of the hurdles I had to overcome, the hope is that this might become a centralized knowledge base not only for me, but for anyone else wanting to explore the combination of Docker on the Raspberry Pi.</p>
<p class="text-left copy">Once all of the pieces to this first puzzle are finished, the next steps include figuring out the best and most stable ways to expand the local Swarm out across different public and private networks, while still maintaining a stable and manageable army of IoT devices.</p>
</div>
<div class="col-lg-5 text-center sidebar">
<h2>Tutorials</h2>
<hr class="star-light">
<div class="links text-left tutorials">
<div class="cssload-triangles" style="margin-top:40px;">
<div class="cssload-tri cssload-invert"></div>
<div class="cssload-tri cssload-invert"></div>
<div class="cssload-tri"></div>
<div class="cssload-tri cssload-invert"></div>
<div class="cssload-tri cssload-invert"></div>
<div class="cssload-tri"></div>
<div class="cssload-tri cssload-invert"></div>
<div class="cssload-tri"></div>
<div class="cssload-tri cssload-invert"></div>
</div>
</div>
<br /><br />
<h2>Repositories</h2>
<hr class="star-light">
<div class="links text-left repositories">
<div class="cssload-triangles" style="margin-top:20px;">
<div class="cssload-tri cssload-invert"></div>
<div class="cssload-tri cssload-invert"></div>
<div class="cssload-tri"></div>
<div class="cssload-tri cssload-invert"></div>
<div class="cssload-tri cssload-invert"></div>
<div class="cssload-tri"></div>
<div class="cssload-tri cssload-invert"></div>
<div class="cssload-tri"></div>
<div class="cssload-tri cssload-invert"></div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="text-center">
<div class="footer-below">
<div class="container">
<div class="row">
<div class="col-lg-6" style="text-align:left;">
© PiArmy <script>document.write(new Date().getFullYear());</script>
</div>
<div class="col-lg-6" style="text-align:right;">
This is based on the <a style="color:#fff;text-decoration: underline;" target="_blank" href="https://startbootstrap.com/template-overviews/freelancer/">Freelancer</a> theme from <a style="color:#fff;text-decoration: underline;" target="_blank" href="https://startbootstrap.com">startbootstrap.com</a>.
</div>
</div>
</div>
</div>
</footer>
<!-- Scroll to Top Button (Only visible on small and extra-small screen sizes) -->
<div class="scroll-top page-scroll hidden-sm hidden-xs hidden-lg hidden-md">
<a class="btn btn-primary" href="#page-top">
<i class="fa fa-chevron-up"></i>
</a>
</div>
<!-- jQuery -->
<script src="vendor/jquery/jquery.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
<!-- Plugin JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
<!-- Moment.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
<!-- Theme JavaScript -->
</body>
</html>
<script>
$( document ).ready(function() {
$.ajax({
url: "http://piarmy.ngrok.io/wp-json/wp/v2/posts/?categories=17&order=asc&_jsonp=breakdownPosts",
// The name of the callback parameter
jsonp: "_jsonp",
// Tell jQuery we're expecting JSONP
dataType: "jsonp",
// Work with the response
success: function( response ) {
$("div.tutorials").html("");
response.forEach(function(post){
var strippedTitle = post.title.rendered.replace('Breakdown by Example: ','');
var tutorialLink = "<div class='tutorial'><i class='fa fa-fw fa-lightbulb-o' aria-hidden='true'></i> <a style='color:#2C3E50;text-decoration: underline;' target='_blank' href='"+post.link+"'>"+strippedTitle+"</a><div class='excerpt'>"+post.excerpt.rendered+"</div></div>";
$("div.tutorials").append(tutorialLink);
});
}
});
$.ajax({
url: "https://api.github.com/orgs/piarmy/repos?callback=githubCallback",
// The name of the callback parameter
jsonp: "callback",
// Tell jQuery we're expecting JSONP
dataType: "jsonp",
// Work with the response
success: function( response ) {
$("div.repositories").html("");
response.data.forEach(function(repo){
var repoLink = "<div class='repository'><i class='fa fa-fw fa-github' aria-hidden='true'></i> <a style='color:#2C3E50;text-decoration: underline;' target='_blank' href='"+repo.html_url+"'>"+repo.full_name+"</a><div class='excerpt'><p>"+repo.description+"</p></div></div>";
$("div.repositories").append(repoLink);
});
}
});
console.log(moment().format("MMMM"));
});
</script>