blob: 9349558918aebc564e20097b6c1e019da0566ca3 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Apache Mesos - Containerizer</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:locale" content="en_US"/>
<meta property="og:type" content="website"/>
<meta property="og:title" content="Apache Mesos"/>
<meta property="og:site_name" content="Apache Mesos"/>
<meta property="og:url" content="http://mesos.apache.org/"/>
<meta property="og:image" content="http://mesos.apache.org/assets/img/mesos_logo_fb_preview.png"/>
<meta property="og:description"
content="Apache Mesos abstracts resources away from machines,
enabling fault-tolerant and elastic distributed systems
to easily be built and run effectively."/>
<meta name="twitter:card" content="summary"/>
<meta name="twitter:site" content="@ApacheMesos"/>
<meta name="twitter:title" content="Apache Mesos"/>
<meta name="twitter:image" content="http://mesos.apache.org/assets/img/mesos_logo_fb_preview.png"/>
<meta name="twitter:description"
content="Apache Mesos abstracts resources away from machines,
enabling fault-tolerant and elastic distributed systems
to easily be built and run effectively."/>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<link rel="alternate" type="application/atom+xml" title="Apache Mesos Blog" href="/blog/feed.xml">
<link href="../../../assets/css/main.css" media="screen" rel="stylesheet" type="text/css" />
<!-- Google Analytics Magic -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-20226872-1']);
_gaq.push(['_setDomainName', 'apache.org']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<!-- magical breadcrumbs -->
<div class="topnav">
<div class="container">
<ul class="breadcrumb">
<li>
<div class="dropdown">
<a data-toggle="dropdown" href="#">Apache Software Foundation <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
<li><a href="http://www.apache.org">Apache Homepage</a></li>
<li><a href="http://www.apache.org/licenses/">License</a></li>
<li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
<li><a href="http://www.apache.org/security/">Security</a></li>
</ul>
</div>
</li>
<li><a href="http://mesos.apache.org">Apache Mesos</a></li>
<li><a href="/documentation
/">Documentation
</a></li>
</ul><!-- /.breadcrumb -->
</div><!-- /.container -->
</div><!-- /.topnav -->
<!-- navbar excitement -->
<div class="navbar navbar-default navbar-static-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#mesos-menu" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/"><img src="/assets/img/mesos_logo.png" alt="Apache Mesos logo"/></a>
</div><!-- /.navbar-header -->
<div class="navbar-collapse collapse" id="mesos-menu">
<ul class="nav navbar-nav navbar-right">
<li><a href="/gettingstarted/">Getting Started</a></li>
<li><a href="/blog/">Blog</a></li>
<li><a href="/documentation/latest/">Documentation</a></li>
<li><a href="/downloads/">Downloads</a></li>
<li><a href="/community/">Community</a></li>
</ul>
</div><!-- /#mesos-menu -->
</div><!-- /.container -->
</div><!-- /.navbar -->
<div class="content">
<div class="container">
<div class="row-fluid">
<div class="col-md-4">
<h4>If you're new to Mesos</h4>
<p>See the <a href="/gettingstarted/">getting started</a> page for more
information about downloading, building, and deploying Mesos.</p>
<h4>If you'd like to get involved or you're looking for support</h4>
<p>See our <a href="/community/">community</a> page for more details.</p>
</div>
<div class="col-md-8">
<h1>Containerizer</h1>
<h2>Motivation</h2>
<p>Containerizers are intended to run tasks in &lsquo;containers&rsquo; which in turn are used
to:</p>
<ul>
<li>Isolate a task from other running tasks.</li>
<li>&lsquo;Contain&rsquo; tasks to run in limited resource runtime environment.</li>
<li>Control task&rsquo;s individual resources (e.g, CPU, memory) programatically.</li>
<li>Run software in a pre-packaged file system image, allowing it to run in
different environments.</li>
</ul>
<h2>Types of containerizers</h2>
<p>Mesos plays well with existing container technologies (e.g., docker) and also
provides its own container technology. It also supports composing different
container technologies(e.g., docker and mesos).</p>
<p>Mesos implements the following containerizers:</p>
<ul>
<li><a href="#Composing">Composing</a></li>
<li><a href="#Docker">Docker</a></li>
<li><a href="#Mesos">Mesos (default)</a></li>
<li>External (deprecated)</li>
</ul>
<p>User can specify the types of containerizers to use via the agent flag
<code>--containerizers</code>.</p>
<p><a name="Composing"></a></p>
<h3>Composing containerizer</h3>
<p>This feature allows multiple container technologies to play together. It is
enabled when you configure the <code>--containerizers</code> agent flag with multiple comma
seperated containerizer names (e.g., <code>--containerizers=mesos,docker</code>). The order
of the comma separated list is important as the first containerizer that
supports the task&rsquo;s container configuration will be used to launch the task.</p>
<p>Use cases:</p>
<ul>
<li>For testing tasks with different types of resource isolations. Since &lsquo;mesos&rsquo;
containerizers have more isolation abilities, a framework can use composing
containerizer to test a task using &lsquo;mesos&rsquo; containerizer&rsquo;s controlled
environment and at the same time test it to work with &lsquo;docker&rsquo; containers by
just changing the container parameters for the task.</li>
</ul>
<p><a name="Docker"></a></p>
<h3>Docker containerizer</h3>
<p>Docker containerizer allows tasks to be run inside docker container. This
containerizer is enabled when you configure the agent flag as
<code>--containerizers=docker</code>.</p>
<p>Use cases:</p>
<ul>
<li>If task needs to be run with the tooling that comes with the docker package.</li>
<li>If Mesos agent is running inside a docker container.</li>
</ul>
<p>For more details, see
<a href="/documentation/latest/./docker-containerizer/">Docker Containerizer</a>.</p>
<p><a name="Mesos"></a></p>
<h3>Mesos containerizer</h3>
<p>This containerizer allows tasks to be run with an array of pluggable isolators
provided by Mesos. This is the native Mesos containerizer solution and is
enabled when you configure the agent flag as <code>--containerizers=mesos</code>.</p>
<p>Use cases:</p>
<ul>
<li>Allow Mesos to control the task&rsquo;s runtime environment without depending on
other container technologies (e.g., docker).</li>
<li>Want fine grained operating system controls (e.g., cgroups/namespaces provided
by linux).</li>
<li>Want Mesos&rsquo;s latest container technology features.</li>
<li>Need additional resource controls like disk usage limits, which
might not be provided by other container technologies.</li>
<li>Want to add custom isolation for tasks.</li>
</ul>
<p>For more details, see
<a href="/documentation/latest/./mesos-containerizer/">Mesos Containerizer</a>.</p>
<h2>References</h2>
<ul>
<li><a href="/documentation/latest/./containerizer-internals/">Containerizer Internals</a> for
implementation details of containerizers.</li>
</ul>
</div>
</div>
</div><!-- /.container -->
</div><!-- /.content -->
<hr>
<!-- footer -->
<div class="footer">
<div class="container">
<div class="col-md-4 social-blk">
<span class="social">
<a href="https://twitter.com/ApacheMesos"
class="twitter-follow-button"
data-show-count="false" data-size="large">Follow @ApacheMesos</a>
<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>
<a href="https://twitter.com/intent/tweet?button_hashtag=mesos"
class="twitter-hashtag-button"
data-size="large"
data-related="ApacheMesos">Tweet #mesos</a>
<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>
</span>
</div>
<div class="col-md-8 trademark">
<p>&copy; 2012-2017 <a href="http://apache.org">The Apache Software Foundation</a>.
Apache Mesos, the Apache feather logo, and the Apache Mesos project logo are trademarks of The Apache Software Foundation.
<p>
</div>
</div><!-- /.container -->
</div><!-- /.footer -->
<!-- JS -->
<script src="//code.jquery.com/jquery-1.11.0.min.js" type="text/javascript"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js" type="text/javascript"></script>
</body>
</html>