-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0002-do-automatinator.html
106 lines (106 loc) · 5.84 KB
/
0002-do-automatinator.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>But Professor‽</title>
<link href="bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
<link href="static/blog.css" rel="stylesheet" />
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-71639036-1', 'auto');
ga('send', 'pageview');</script>
</head>
<body>
<div class="container">
<div class="blog-header">
<h1 class="blog-title">
<a href="index.html">But Professor‽</a>
</h1>
<p class="lead blog-description">Some random deep thoughts from when “it’s compiling”</p>
</div>
<div class="row">
<div class="col-sm-8 blog-main">
<div class="blog-post">
<div><h2><a href="0002-do-automatinator.html">Itch of the Week: Archiving and Restoring Digitalocean Droplets Painlessly</a></h2>
<h3 id="-i-a-k-a-going-full-nomad-with-do-automatinator-i-"><i>a.k.a. Going Full Nomad With do-automatinator</i></h3>
<p><small>Jan 2, 2016</small></p>
<p>In the previous (first, actually) post I have promised deep stuff. It is coming, just not yet.</p>
<p>The motto used (<em>Release early, release often</em>) was popularized by Eric S. Raymond in his 1997 essay.
The text also mentions other "lessons", such as "Every good work of software starts by scratching a developer's personal itch." (- <a href="https://en.wikipedia.org/wiki/The_Cathedral_and_the_Bazaar">The Cathedral and the Bazaar</a>)</p>
<h3 id="the-backstory">The Backstory</h3>
<ul>
<li>Digitalocean offers cheap VPS service</li>
<li>You only have to pay for the hours your machines "exist", so you can go even cheaper if you are not running (permanent) services, but using the machines for development, etc.</li>
<li>You don't have to pay when the machines are "destroyed"</li>
<li>You can save the machines</li>
<li>You can only save machines that are powered-off</li>
</ul>
<h3 id="the-itch">The Itch</h3>
<ul>
<li>You can't "just" shutdown, snapshot and destroy a machine with a single click of a button or a command</li>
</ul>
<h3 id="the-scratch">The Scratch</h3>
<p><a href="https://github.com/bessbd/do-automatinator">do-automatinator</a> is a command-line tool to shut down, snapshot and destroy a machine at Digitalocean. (And to do the reverse, too)</p>
<h3 id="some-tech-stuff">Some Tech Stuff</h3>
<h4 id="setting-your-token">Setting Your Token</h4>
<pre><code class="lang-bash">coffee app.coffee settoken <your digitalocean token>
</code></pre>
<p>(You only have to do this once)</p>
<h4 id="shutting-down-snapshotting-and-destroying-a-machine">Shutting Down, Snapshotting and Destroying a Machine</h4>
<pre><code class="lang-bash">coffee app.coffee save <machine name>
</code></pre>
<h4 id="creating-a-machine-from-a-snapshot-aka-restoring-a-machine-">Creating a Machine from a Snapshot (aka Restoring a Machine)</h4>
<pre><code class="lang-bash">coffee app.coffee restore <machine name>
</code></pre>
<h3 id="the-conclusion">The Conclusion</h3>
<p>This way, I (and anyone using the tool) can create a machine, set it up and only pay for the hours the machine is actually in use. (As a bonus, even backups are created, for free(!))</p>
<h3 id="what-if-i-don-t-have-a-digitalocean-account-yet-">What if I don't have a Digitalocean account yet?</h3>
<p>If you don't have a Digitalocean account yet, using <a href="https://m.do.co/c/3ae3e3d011af">this</a> link gets you $10 in DO credit (and some for me, too, thanks for the support).</p>
</div>
<a href="0002-do-automatinator.html">[permalink]</a>
<div class="addthis_sharing_toolbox"></div>
<hr />
<div id="disqus_thread"></div>
<script>/**
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables
*/
/*
var disqus_config = function () {
this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = 0002-do-automatinator.html; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
*/
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = 'https://butprofessor.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();</script>
<noscript>
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a>
</noscript>
<script type="text/javascript">
google_ad_client = "ca-pub-5489197102815138";
google_ad_slot = "1331359202";
google_ad_width = 728;
google_ad_height = 90;
</script>
</div>
<script type="text/javascript" src="//pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div>
<div class="col-sm-3 col-sm-offset-1 blog-sidebar">
<div class="sidebar-module sidebar-module-inset">
<h4>About</h4>
<p>A blog on programming as art, critical thinking and things like that</p>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-56828401947111a4" async="async"></script>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
</body>
</html>