Files
clear-linux-documentation/tutorials/archive/kata_migration.html
2024-11-04 18:48:51 +00:00

216 lines
13 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="en" data-content_root="../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Migrate Clear Containers to Kata Containers* &#8212; Documentation for Clear Linux* project</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/bizstyle.css?v=5283bb3d" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
<script src="../../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../../_static/doctools.js?v=9bcbadda"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/clipboard.min.js?v=a7894cd8"></script>
<script src="../../_static/copybutton.js?v=a56c686a"></script>
<script src="../../_static/bizstyle.js"></script>
<link rel="canonical" href="https://clearlinux.github.io/clear-linux-documentation/tutorials/archive/kata_migration.html" />
<link rel="icon" href="../../_static/favicon.ico"/>
<link rel="author" title="About these documents" href="../../about.html" />
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Reference" href="../../reference/index.html" />
<link rel="prev" title="Multi-boot Clear Linux* OS with other operating systems" href="../multi-boot/multi-boot.html" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<!--[if lt IE 9]>
<script src="_static/css3-mediaqueries.js"></script>
<![endif]-->
</head><body>
<div class="related" role="navigation" aria-label="Related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../reference/index.html" title="Reference"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../multi-boot/multi-boot.html" title="Multi-boot Clear Linux* OS with other operating systems"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">Documentation for Clear Linux* project</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" accesskey="U">Tutorials</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Migrate Clear Containers to Kata Containers*</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="migrate-clear-containers-to-kata-containers">
<span id="kata-migration"></span><h1>Migrate Clear Containers to Kata Containers*<a class="headerlink" href="#migrate-clear-containers-to-kata-containers" title="Link to this heading"></a></h1>
<p>This tutorial explains how to migrate from Clear Containers to Kata Containers.</p>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#description" id="id1">Description</a></p></li>
<li><p><a class="reference internal" href="#prerequisites" id="id2">Prerequisites</a></p></li>
<li><p><a class="reference internal" href="#stop-clear-containers-instances" id="id3">Stop Clear Containers instances</a></p></li>
<li><p><a class="reference internal" href="#manually-migrate-customized-configuration-files" id="id4">Manually migrate customized configuration files</a></p></li>
<li><p><a class="reference internal" href="#enable-kata-containers-as-default" id="id5">Enable Kata Containers as default</a></p></li>
<li><p><a class="reference internal" href="#run-kata-containers" id="id6">Run Kata Containers</a></p></li>
</ul>
</nav>
<section id="description">
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Description</a><a class="headerlink" href="#description" title="Link to this heading"></a></h2>
<p><a class="reference external" href="https://github.com/clearcontainers">Clear Containers</a> and <a class="reference external" href="https://github.com/kata-containers">Kata Containers</a> can co-exist in the same system.
Both can be installed through the <strong class="command">containers-virt</strong> bundle. However,
we recommend that you migrate to Kata Containers because Clear Containers is no
longer <a class="reference external" href="https://github.com/kata-containers/documentation/blob/master/Upgrading.md#maintenance-warning">maintained</a> and will soon be deprecated on Clear Linux* OS.</p>
</section>
<section id="prerequisites">
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Prerequisites</a><a class="headerlink" href="#prerequisites" title="Link to this heading"></a></h2>
<ul class="simple">
<li><p>Clear Containers is on a Docker* system.</p></li>
<li><p>Kata Containers is installed. See <a class="reference internal" href="../kata.html#kata"><span class="std std-ref">Kata Containers*</span></a>.</p></li>
</ul>
</section>
<section id="stop-clear-containers-instances">
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Stop Clear Containers instances</a><a class="headerlink" href="#stop-clear-containers-instances" title="Link to this heading"></a></h2>
<p>As an unprivileged user, stop all running instances of Clear Containers:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="k">for</span><span class="w"> </span>container<span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="k">$(</span>sudo<span class="w"> </span>docker<span class="w"> </span>ps<span class="w"> </span>-q<span class="k">)</span><span class="p">;</span><span class="w"> </span><span class="k">do</span><span class="w"> </span>sudo<span class="w"> </span>docker<span class="w"> </span>stop<span class="w"> </span><span class="nv">$container</span><span class="p">;</span><span class="w"> </span><span class="k">done</span>
</pre></div>
</div>
</section>
<section id="manually-migrate-customized-configuration-files">
<h2><a class="toc-backref" href="#id4" role="doc-backlink">Manually migrate customized configuration files</a><a class="headerlink" href="#manually-migrate-customized-configuration-files" title="Link to this heading"></a></h2>
<p>If you have made changes to your <a class="reference external" href="https://github.com/clearcontainers/runtime#configuration">Clear Containers configuration</a>, review
those changes and decide whether to manually apply those changes to your
<a class="reference external" href="https://github.com/kata-containers/runtime#configuration">Kata Containers configuration</a>.</p>
<p>Make any required changes before continuing this process.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>You do not need to manually remove any Clear Containers packages.</p>
</div>
</section>
<section id="enable-kata-containers-as-default">
<h2><a class="toc-backref" href="#id5" role="doc-backlink">Enable Kata Containers as default</a><a class="headerlink" href="#enable-kata-containers-as-default" title="Link to this heading"></a></h2>
<ol class="arabic">
<li><p>Configure Docker to use the Kata Containers runtime by default.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>mkdir<span class="w"> </span>-p<span class="w"> </span>/etc/systemd/system/docker.service.d/
cat<span class="w"> </span><span class="s">&lt;&lt;EOF | sudo tee /etc/systemd/system/docker.service.d/51-runtime.conf</span>
<span class="s">[Service]</span>
<span class="s">Environment=&quot;DOCKER_DEFAULT_RUNTIME=--default-runtime kata-runtime&quot;</span>
<span class="s">EOF</span>
</pre></div>
</div>
</li>
<li><p>Restart the Docker systemd services.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>systemctl<span class="w"> </span>daemon-reload
sudo<span class="w"> </span>systemctl<span class="w"> </span>restart<span class="w"> </span>docker
</pre></div>
</div>
</li>
<li><p>Verify Docker is using Kata Containers.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>docker<span class="w"> </span>info<span class="w"> </span><span class="p">|</span><span class="w"> </span>grep<span class="w"> </span>-i<span class="w"> </span><span class="s1">&#39;default runtime&#39;</span>
Default<span class="w"> </span>Runtime:<span class="w"> </span>kata-runtime
</pre></div>
</div>
</li>
</ol>
</section>
<section id="run-kata-containers">
<h2><a class="toc-backref" href="#id6" role="doc-backlink">Run Kata Containers</a><a class="headerlink" href="#run-kata-containers" title="Link to this heading"></a></h2>
<p>Use the following command:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>docker<span class="w"> </span>run<span class="w"> </span>-ti<span class="w"> </span>busybox<span class="w"> </span>sh
</pre></div>
</div>
<p><strong>Congratulations!</strong></p>
<p>Youve successfully migrated from Clear Containers to Kata Containers.</p>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="Main">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../index.html">
<img class="logo" src="../../_static/clearlinux.png" alt="Logo of Clear Linux* Project Docs"/>
</a></p>
<div>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Migrate Clear Containers to Kata Containers*</a><ul>
<li><a class="reference internal" href="#description">Description</a></li>
<li><a class="reference internal" href="#prerequisites">Prerequisites</a></li>
<li><a class="reference internal" href="#stop-clear-containers-instances">Stop Clear Containers instances</a></li>
<li><a class="reference internal" href="#manually-migrate-customized-configuration-files">Manually migrate customized configuration files</a></li>
<li><a class="reference internal" href="#enable-kata-containers-as-default">Enable Kata Containers as default</a></li>
<li><a class="reference internal" href="#run-kata-containers">Run Kata Containers</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="../multi-boot/multi-boot.html"
title="previous chapter">Multi-boot Clear Linux* OS with other operating systems</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="../../reference/index.html"
title="next chapter">Reference</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/tutorials/archive/kata_migration.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<search id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="Related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../../reference/index.html" title="Reference"
>next</a> |</li>
<li class="right" >
<a href="../multi-boot/multi-boot.html" title="Multi-boot Clear Linux* OS with other operating systems"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">Documentation for Clear Linux* project</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Tutorials</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Migrate Clear Containers to Kata Containers*</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2022 Intel Corporation. All Rights Reserved..
Last updated on Nov 04, 2024.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.1.3.
</div>
</body>
</html>