This repository has been archived by the owner on Feb 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
how-it-works.html
executable file
·180 lines (150 loc) · 9.21 KB
/
how-it-works.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
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>How it works | Hyper - Make VM run like Container</title>
<meta name="description" content="Hyper - Make VM run like Container. Fast as Container, Isolated by VM.">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="./favicon.ico">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.min.css">
</head>
<body class="gray-bg">
<header class="page-header">
<div class="wrapper">
<div class="logo"><a href="/"></a></div>
<nav class="header">
<div class="border-menu"></div>
<a href="/">Home</a>
<a href="https://docs.hypercontainer.io/get_started/install.html" target="_blank">Install</a>
<a href="./how-it-works.html">How it works</a>
<a href="./why-hyper.html">Why Hyper</a>
<a href="https://docs.hypercontainer.io/" target="_blank">Docs</a>
<div class="dropdown">
<span>About</span>
<ul>
<li><a href="https://hyper.sh/blog/" target="_blank">Blog</a></li>
<li><a href="./partners.html">Partners</a></li>
<li><a href="./faq.html">FAQs</a></li>
<li><a href="./about.html">About</a></li>
</ul>
</div>
</nav>
<a href="https://github.com/hyperhq" target="_blank" class="btn btn-header">GitHub</a>
</div>
</header>
<section class="desc title">
<h3 data-sr="wait .1s enter bottom">How it works</h3>
<div class="blog">
<p>Hyper has four components:</p>
<ul class="task-list">
<li>CLI: <strong><em>hyperctl</em></strong>
</li>
<li>Daemon: <strong><em>hyperd</em></strong> (with REST APIs)</li>
<li>Guest Kernel: <strong><em>hyperkernel</em></strong>
</li>
<li>Guest Init Service: <strong><em>hyperstart</em></strong>
</li>
</ul>
<p>On a physical Linux host:</p>
<pre><code>[root@user ~:]# hyperctl pull nginx:latest
[root@user ~:]# hyperctl run nginx:latest
</code></pre>
<p>Upon the <strong><em>RUN</em></strong> command, Hyper launches a new VM instance, instead of containers, and mount the specified image onto the instance:</p>
<pre><code>[root@user ~:]# hyperctl list
xxxxxx
</code></pre>
<p>Inside to the VM, a minimalist Linux kernel, called <strong><em>HyperKernel</em></strong>, is booted. HyperKernel is built with a tiny Init service, called <strong><em>HyperStart</em></strong>, which creates a <strong><em>Pod</em></strong>, setup <em>Mount</em> namespace, and launch apps from the loaded image.</p>
<p><img src="./img/hyper.png" alt="how it works"/></p>
<h2>
<a id="user-content-what-is-pod" class="anchor" href="#what-is-pod" aria-hidden="true"><span class="octicon octicon-link"></span></a>What is Pod?</h2>
<p>Pod is a concept originated from <a href="https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/pods.md">Google</a>. The key idea behind <strong>Pods</strong> is that in a microservice architecture usually involves some "helper" programs, such as log, monitoring, cron, etc. These helper programs are built to work cooperatively with the app. Therefore, instead of running in multiple isolated containers, these processes should share the namespace, though they are packaged in different images.</p>
<h2>
<a id="user-content-pod-is-the-first-class-in-hyper" class="anchor" href="#pod-is-the-first-class-in-hyper" aria-hidden="true"><span class="octicon octicon-link"></span></a>Pods are the first layer in Hyper</h2>
<p>In Hyper, a Pod consists of a group of app images, launched in a single instance.</p>
<pre><code>[root@user ~:]# hyperctl run -p podfile.json
</code></pre>
<p>Inside of a instance, different applications from different images share the namespaces: <strong><em><code>PID</code></em></strong>, <strong><em><code>Network</code></em></strong>, <strong><em><code>IPC</code></em></strong>, <strong><em><code>UTS</code></em></strong>, <strong><em><code>User</code></em></strong>. Pods help provides a familiar view of a tranditional OS, rather than the philosophy: "<strong><em>one process per container</em></strong>":</p>
<ul class="task-list">
<li>Processes can see each other</li>
<li>Processes can use all IPC facilities to communicate</li>
<li>Processes share the same hostname</li>
<li>Processes have access to all NICs attached to the instance, and share the same port range</li>
<li>Processes have access to all disk attached to the instance</li>
</ul>
<p>The exception is <strong><em><code>Mount</code></em></strong>. Since a Pod may have multiple app images, Hyper applies the <strong><em><code>Mount</code></em></strong> namespace to isolate the root filesystem from each other.</p>
<p>Note: Hyper is immune from <a href="https://blog.phusion.nl/2015/01/20/docker-and-the-pid-1-zombie-reaping-problem/">Pid 1 problem</a>, since HyperStart launches the app processes and continues to live in the same namespace with them.</p>
<p><strong>Find out more in <a href="https://docs.hypercontainer.io">Hyper docs</a></strong></p>
</div>
</section>
<footer>
<div class="wrapper clearfix">
<div class="column">
<h2>Company</h2>
<ul>
<li><a href="./about.html">About</a></li>
<li><a href="./jobs.html">Jobs</a></li>
<li><a href="./security.html">Security</a></li>
<li><a href="./partners.html">Partners</a></li>
</ul>
</div>
<div class="column">
<h2>Support & Community</h2>
<ul>
<li><a target="_blank" href="https://github.com/hyperhq">Github</a></li>
<li><p>Mailing List</p>
<ul>
<li><a target="_blank" href="https://groups.google.com/d/forum/hyper-user">General</a></li>
<li><a target="_blank" href="https://groups.google.com/d/forum/hyper-dev">Developer</a></li>
</ul>
</li>
<li><a href="https://twitter.com/hyper_sh" class="twitter-follow-button" data-show-count="false">Follow @hyper_sh</a></li>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<li style="margin-top: 5px"><script async defer src="https://slack.hyper.sh/slackin.js"></script></li>
</ul>
</div>
<div class="column">
<h2>Documentation</h2>
<ul>
<li><a target="_blank" href="https://docs.hypercontainer.io/get_started/install.html">Get Started</a></li>
<li><a target="_blank" href="https://docs.hypercontainer.io/get_started/pod.html">Running Pod</a></li>
<li><a target="_blank" href="https://docs.hypercontainer.io/reference/podfile.html">Reference</a></li>
<li><a target="_blank" href="https://docs.hypercontainer.io/release_notes/index.html">Release Notes</a></li>
</ul>
</div>
<div class="column">
<div class="subscribe">
<form action="//hyper.us10.list-manage.com/subscribe/post?u=5079c1cfdd3630a5d1a4a2f15&id=1c79a2241b" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL" placeholder="Enter Your Email">
<input type="text" style="display: none;" name="b_5079c1cfdd3630a5d1a4a2f15_1c79a2241b" tabindex="-1" value="">
<button class="button" type="submit">Subscribe</button>
</form>
<p class="hint">Subscribe to the latest Hyper news.</p>
</div>
<div class="copyright">
(c) 2015, HyperHQ Inc. All rights reserved.
</div>
</div>
</div>
</footer>
<script src="js/vendor/jquery-1.11.2.min.js"></script>
<script src="js/vendor/scrollReveal.min.js"></script>
<script src="js/main.js"></script>
<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-61225823-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>