/usr/share/doc/charliecloud/html/virtualbox.html is in charliecloud-doc 0.2.3~git20171120.1a5609e-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 | <!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>4. VirtualBox appliance — Charliecloud 0.2.3~pre documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="search" title="Search" href="search.html"/>
<link rel="copyright" title="Copyright" href="copyright.html"/>
<link rel="top" title="Charliecloud 0.2.3~pre documentation" href="index.html"/>
<link rel="next" title="5. Frequently asked questions (FAQ)" href="faq.html"/>
<link rel="prev" title="3. Help text for executables" href="script-help.html"/>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="index.html" class="icon icon-home"> Charliecloud
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="install.html">1. Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorial.html">2. Tutorial</a></li>
<li class="toctree-l1"><a class="reference internal" href="script-help.html">3. Help text for executables</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">4. VirtualBox appliance</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#install-and-use-the-appliance">4.1. Install and use the appliance</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#configure-virtualbox">4.1.1. Configure VirtualBox</a></li>
<li class="toctree-l3"><a class="reference internal" href="#install-the-appliance">4.1.2. Install the appliance</a></li>
<li class="toctree-l3"><a class="reference internal" href="#log-in-and-try-charliecloud">4.1.3. Log in and try Charliecloud</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#build-the-appliance">4.2. Build the appliance</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#initialize-vm">4.2.1. Initialize VM</a></li>
<li class="toctree-l3"><a class="reference internal" href="#install-centos">4.2.2. Install CentOS</a></li>
<li class="toctree-l3"><a class="reference internal" href="#configure-guest-os">4.2.3. Configure guest OS</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#log-in">4.2.3.1. Log in</a></li>
<li class="toctree-l4"><a class="reference internal" href="#update-sudoers">4.2.3.2. Update sudoers</a></li>
<li class="toctree-l4"><a class="reference internal" href="#configure-proxy">4.2.3.3. Configure proxy</a></li>
<li class="toctree-l4"><a class="reference internal" href="#install-a-decent-user-environment">4.2.3.4. Install a decent user environment</a></li>
<li class="toctree-l4"><a class="reference internal" href="#configure-auto-login-on-console">4.2.3.5. Configure auto-login on console</a></li>
<li class="toctree-l4"><a class="reference internal" href="#upgrade-kernel">4.2.3.6. Upgrade kernel</a></li>
<li class="toctree-l4"><a class="reference internal" href="#install-guest-additions">4.2.3.7. Install Guest Additions</a></li>
<li class="toctree-l4"><a class="reference internal" href="#install-openmpi">4.2.3.8. Install OpenMPI</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#install-docker">4.2.4. Install Docker</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#install">4.2.4.1. Install</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id1">4.2.4.2. Configure proxy</a></li>
<li class="toctree-l4"><a class="reference internal" href="#test">4.2.4.3. Test</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#install-charliecloud">4.2.5. Install Charliecloud</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#set-environment-variables">4.2.5.1. Set environment variables</a></li>
<li class="toctree-l4"><a class="reference internal" href="#enable-a-second-getty">4.2.5.2. Enable a second <code class="code docutils literal"><span class="pre">getty</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#build-and-install-charliecloud">4.2.5.3. Build and install Charliecloud</a></li>
<li class="toctree-l4"><a class="reference internal" href="#prime-docker-cache">4.2.5.4. Prime Docker cache</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#create-export-snapshot">4.2.6. Create export snapshot</a></li>
<li class="toctree-l3"><a class="reference internal" href="#finish-testing-charliecloud">4.2.7. Finish testing Charliecloud</a></li>
<li class="toctree-l3"><a class="reference internal" href="#export-appliance">4.2.8. Export appliance</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#upgrade-the-appliance">4.3. Upgrade the appliance</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#os-packages-via-yum">4.3.1. OS packages via <code class="code docutils literal"><span class="pre">yum</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#charliecloud">4.3.2. Charliecloud</a></li>
<li class="toctree-l3"><a class="reference internal" href="#docker-images">4.3.3. Docker images</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">5. Frequently asked questions (FAQ)</a></li>
<li class="toctree-l1"><a class="reference internal" href="copyright.html">6. Copyright and license</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Charliecloud</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> »</li>
<li>4. VirtualBox appliance</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="virtualbox-appliance">
<h1>4. VirtualBox appliance<a class="headerlink" href="#virtualbox-appliance" title="Permalink to this headline">¶</a></h1>
<p>This page explains how to create and use a single-node <a class="reference external" href="https://www.virtualbox.org/">VirtualBox</a> virtual machine appliance with Charliecloud and
Docker pre-installed. This lets you:</p>
<blockquote>
<div><ul class="simple">
<li>use Charliecloud on Macs and Windows</li>
<li>quickly try out Charliecloud without following the install procedure</li>
</ul>
</div></blockquote>
<p>The virtual machine uses CentOS 7 with an ElRepo LTS kernel. We use the
<code class="code docutils literal"><span class="pre">kernel.org</span></code> mirror for CentOS, but any should work. Various settings
are specified, but in most cases we have not done any particular tuning, so
use your judgement, and feedback is welcome. We assume Bash shell.</p>
<p>This procedure assumes you already have VirtualBox installed and working.</p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#install-and-use-the-appliance" id="id2">Install and use the appliance</a><ul>
<li><a class="reference internal" href="#configure-virtualbox" id="id3">Configure VirtualBox</a></li>
<li><a class="reference internal" href="#install-the-appliance" id="id4">Install the appliance</a></li>
<li><a class="reference internal" href="#log-in-and-try-charliecloud" id="id5">Log in and try Charliecloud</a></li>
</ul>
</li>
<li><a class="reference internal" href="#build-the-appliance" id="id6">Build the appliance</a><ul>
<li><a class="reference internal" href="#initialize-vm" id="id7">Initialize VM</a></li>
<li><a class="reference internal" href="#install-centos" id="id8">Install CentOS</a></li>
<li><a class="reference internal" href="#configure-guest-os" id="id9">Configure guest OS</a></li>
<li><a class="reference internal" href="#install-docker" id="id10">Install Docker</a></li>
<li><a class="reference internal" href="#install-charliecloud" id="id11">Install Charliecloud</a></li>
<li><a class="reference internal" href="#create-export-snapshot" id="id12">Create export snapshot</a></li>
<li><a class="reference internal" href="#finish-testing-charliecloud" id="id13">Finish testing Charliecloud</a></li>
<li><a class="reference internal" href="#export-appliance" id="id14">Export appliance</a></li>
</ul>
</li>
<li><a class="reference internal" href="#upgrade-the-appliance" id="id15">Upgrade the appliance</a><ul>
<li><a class="reference internal" href="#os-packages-via-yum" id="id16">OS packages via <code class="code docutils literal"><span class="pre">yum</span></code></a></li>
<li><a class="reference internal" href="#charliecloud" id="id17">Charliecloud</a></li>
<li><a class="reference internal" href="#docker-images" id="id18">Docker images</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="install-and-use-the-appliance">
<h2><a class="toc-backref" href="#id2">4.1. Install and use the appliance</a><a class="headerlink" href="#install-and-use-the-appliance" title="Permalink to this headline">¶</a></h2>
<p>This procedure imports a provided <code class="code docutils literal"><span class="pre">.ova</span></code> file into VirtualBox and walks
you through logging in and running a brief Hello World in Charliecloud. You
will act as user <code class="code docutils literal"><span class="pre">charlie</span></code>, who has passwordless <code class="code docutils literal"><span class="pre">sudo</span></code>.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">These instructions provide for an SSH server in the guest that is
accessible to anyone logged into the host. It is your responsibility to
ensure this is safe and compliant with your organization’s policies, or
modify the procedure accordingly.</p>
</div>
<div class="section" id="configure-virtualbox">
<h3><a class="toc-backref" href="#id3">4.1.1. Configure VirtualBox</a><a class="headerlink" href="#configure-virtualbox" title="Permalink to this headline">¶</a></h3>
<ol class="arabic simple">
<li>Set <em>Preferences</em> -> <em>Proxy</em> if needed at your site.</li>
</ol>
</div>
<div class="section" id="install-the-appliance">
<h3><a class="toc-backref" href="#id4">4.1.2. Install the appliance</a><a class="headerlink" href="#install-the-appliance" title="Permalink to this headline">¶</a></h3>
<ol class="arabic simple">
<li>Download the <code class="code docutils literal"><span class="pre">charliecloud_centos7.ova</span></code> file (or whatever your site
has called it).</li>
<li><em>File</em> -> <em>Import appliance</em>. Choose <code class="code docutils literal"><span class="pre">charliecloud_centos7.ova</span></code> and click <em>Continue</em>.</li>
<li>Review the settings.<ul>
<li>CPU should match the number of cores in your system.</li>
<li>RAM should be reasonable. Anywhere from 2GiB to half your system RAM will
probably work.</li>
<li>Check <em>Reinitialize the MAC address of all network cards</em>.</li>
</ul>
</li>
<li>Click <em>Import</em>.</li>
<li>Verify that the appliance’s port forwarding is acceptable to you and your
site: <em>Details</em> -> <em>Network</em> -> <em>Adapter 1</em> -> <em>Advanced</em> -> <em>Port
Forwarding</em>.</li>
</ol>
</div>
<div class="section" id="log-in-and-try-charliecloud">
<h3><a class="toc-backref" href="#id5">4.1.3. Log in and try Charliecloud</a><a class="headerlink" href="#log-in-and-try-charliecloud" title="Permalink to this headline">¶</a></h3>
<ol class="arabic simple">
<li>Start the VM by clicking the green arrow.</li>
<li>Wait for it to boot.</li>
<li>Click on the console window, where user <code class="code docutils literal"><span class="pre">charlie</span></code> is logged in. (If
the VM “captures” your mouse pointer, type the key combination listed in
the lower-right corner of the window to release it.)</li>
<li>Change your password:</li>
</ol>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> sudo passwd charlie
</pre></div>
</div>
<ol class="arabic simple" start="5">
<li>SSH into the VM using the password you just set. (Accessing the VM using
SSH rather than the console is generally more pleasant, because you have a
nice terminal with native copy-and-paste, etc.)</li>
</ol>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> ssh -p <span class="m">2022</span> charlie@localhost
</pre></div>
</div>
<ol class="arabic simple" start="6">
<li>Run a container:</li>
</ol>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> ch-docker2tar hello /var/tmp
<span class="go">57M /var/tmp/hello.tar.gz</span>
<span class="gp">$</span> ch-tar2dir /var/tmp/hello.tar.gz /var/tmp
<span class="go">creating new image /var/tmp/hello</span>
<span class="go">/var/tmp/hello unpacked ok</span>
<span class="gp">$</span> cat /etc/redhat-release
<span class="go">CentOS Linux release 7.3.1611 (Core)</span>
<span class="gp">$</span> ch-run /var/tmp/hello -- /bin/bash
<span class="gp">></span> cat /etc/debian_version
<span class="go">8.9</span>
<span class="gp">></span> <span class="nb">exit</span>
</pre></div>
</div>
<p>Congratulations! You’ve successfully used Charliecloud. Now all of your
wildest dreams will come true.</p>
<p>Shut down the VM at your leisure.</p>
<p>Possible next steps:</p>
<blockquote>
<div><ul class="simple">
<li>Follow the <a class="reference internal" href="tutorial.html"><span class="doc">tutorial</span></a>.</li>
<li>Run the <a class="reference internal" href="install.html#install-test-charliecloud"><span class="std std-ref">test suite</span></a> in
<code class="code docutils literal"><span class="pre">/usr/share/doc/charliecloud/test</span></code>. (Note that the environment
variables are already configured for you in this appliance.)</li>
</ul>
</div></blockquote>
</div>
</div>
<div class="section" id="build-the-appliance">
<h2><a class="toc-backref" href="#id6">4.2. Build the appliance</a><a class="headerlink" href="#build-the-appliance" title="Permalink to this headline">¶</a></h2>
<div class="section" id="initialize-vm">
<h3><a class="toc-backref" href="#id7">4.2.1. Initialize VM</a><a class="headerlink" href="#initialize-vm" title="Permalink to this headline">¶</a></h3>
<p>Configure <em>Preferences</em> -> <em>Proxy</em> if needed.</p>
<p>Create a new VM called <em>Charliecloud (CentOS 7)</em> in VirtualBox. We used the
following specifications:</p>
<ul class="simple">
<li><em>Processors(s):</em> However many you have in the box you are using to build the
appliance. This value will be adjusted by users when they install the
appliance.</li>
<li><em>Memory:</em> 4 GiB. Less might work too. This can be adjusted as needed.</li>
<li><em>Disk:</em> 24 GiB, VDI dynamically allocated. We’ve run demos with 8 GiB, but
that’s not enough to run the Charliecloud test suite. The downside of being
generous is more use of the host disk. The image file starts small and grows
as needed, so unused space doesn’t consume real resources. Note however that
the image file does not shrink if you delete files in the guest (modulo
heroics — image files can be compacted to remove zero pages, so you need to
zero out the free space in the guest filesystem for this to work).</li>
</ul>
<p>Additional non-default settings:</p>
<ul class="simple">
<li><em>Network</em><ul>
<li><em>Adapter 1</em><ul>
<li><em>Advanced</em><ul>
<li><em>Attached to:</em> NAT</li>
<li><em>Adapter Type:</em> Paravirtualized Network</li>
<li><em>Port Forwarding:</em> add the following rule (but see caveat above):<ul>
<li><em>Name:</em> ssh from localhost</li>
<li><em>Protocol:</em> TCP</li>
<li><em>Host IP:</em> 127.0.0.1</li>
<li><em>Host Port:</em> 2022</li>
<li><em>Guest IP:</em> 10.0.2.15</li>
<li><em>Guest Port:</em> 22</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="install-centos">
<h3><a class="toc-backref" href="#id8">4.2.2. Install CentOS</a><a class="headerlink" href="#install-centos" title="Permalink to this headline">¶</a></h3>
<p>Download the <a class="reference external" href="http://mirrors.kernel.org/centos/7/isos/x86_64/">NetInstall ISO</a> from your favorite mirror.
Attach it to the virtual optical drive of your VM by double-clicking on
<em>[Optical drive] Empty</em>.</p>
<p>Start the VM. Choose <em>Install CentOS Linux 7</em>.</p>
<p>Under <em>Installation summary</em>, configure (in this order):</p>
<ul class="simple">
<li><em>Network & host name</em><ul>
<li>Enable <em>eth0</em>; verify it gets 10.0.2.15 and correct DNS.</li>
</ul>
</li>
<li><em>Date & time</em><ul>
<li>Enable <em>Network Time</em></li>
<li>Select your time zone</li>
</ul>
</li>
<li><em>Installation source</em><ul>
<li><em>On the network</em>: <code class="code docutils literal"><span class="pre">https://mirrors.kernel.org/centos/7/os/x86_64/</span></code></li>
<li><em>Proxy setup</em>: as appropriate for your network</li>
</ul>
</li>
<li><em>Software selection</em><ul>
<li><em>Base environment:</em> Minimal Install</li>
<li><em>Add-Ons</em>: Development Tools</li>
</ul>
</li>
<li><em>Installation destination</em><ul>
<li>No changes needed but the installer wants you to click in and look.</li>
</ul>
</li>
</ul>
<p>Click <em>Begin installation</em>. Configure:</p>
<ul class="simple">
<li><em>Root password:</em> Something random (e.g. <code class="code docutils literal"><span class="pre">pwgen</span> <span class="pre">-cny</span> <span class="pre">24</span></code>), which you
can then forget because it will never be needed again. Users of the
appliance will not have access to this password but will to its hash in
<code class="code docutils literal"><span class="pre">/etc/shadow</span></code>.</li>
<li><em>User creation:</em><ul>
<li><em>User name:</em> charlie</li>
<li><em>Make this user administrator:</em> yes</li>
<li><em>Password:</em> Decent password that meets your organization’s requirements.
Appliance user access is same as the root password.</li>
</ul>
</li>
</ul>
<p>Click <em>Finish configuration</em>, then <em>Reboot</em> and wait for the login prompt to
come up in the console. Note that the install ISO will be automatically
ejected.</p>
</div>
<div class="section" id="configure-guest-os">
<h3><a class="toc-backref" href="#id9">4.2.3. Configure guest OS</a><a class="headerlink" href="#configure-guest-os" title="Permalink to this headline">¶</a></h3>
<div class="section" id="log-in">
<h4>4.2.3.1. Log in<a class="headerlink" href="#log-in" title="Permalink to this headline">¶</a></h4>
<p>SSH into the guest. (This will give you a fully functional native terminal
with copy and paste, your preferred configuration, etc.)</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> ssh -p <span class="m">2022</span> charlie@localhost
</pre></div>
</div>
</div>
<div class="section" id="update-sudoers">
<h4>4.2.3.2. Update sudoers<a class="headerlink" href="#update-sudoers" title="Permalink to this headline">¶</a></h4>
<p>We want <code class="code docutils literal"><span class="pre">sudo</span></code> to (1) accept <code class="code docutils literal"><span class="pre">charlie</span></code> without a password and (2)
have access to the proxy environment variables.</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> sudo visudo
</pre></div>
</div>
<p>Comment out:</p>
<div class="highlight-none"><div class="highlight"><pre><span></span>## Allows people in group wheel to run all commands
%wheel ALL=(ALL) ALL
</pre></div>
</div>
<p>Uncomment:</p>
<div class="highlight-none"><div class="highlight"><pre><span></span>## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
</pre></div>
</div>
<p>Add:</p>
<div class="highlight-none"><div class="highlight"><pre><span></span>Defaults env_keep+="DISPLAY auto_proxy HTTP_PROXY http_proxy HTTPS_PROXY https_proxy ALL_PROXY all_proxy NO_PROXY no_proxy"
</pre></div>
</div>
</div>
<div class="section" id="configure-proxy">
<h4>4.2.3.3. Configure proxy<a class="headerlink" href="#configure-proxy" title="Permalink to this headline">¶</a></h4>
<p>If your site uses a web proxy, you’ll need to configure the VM to use it. The
setup described here also lets you turn on and off the proxy as needed with
the <code class="code docutils literal"><span class="pre">proxy-on</span></code> and <code class="code docutils literal"><span class="pre">proxy-off</span></code> shell functions.</p>
<p>Create a file <code class="code docutils literal"><span class="pre">/etc/profile.d/proxy.sh</span></code> containing, for example, the
following. Note that the only editor you have so far is <code class="code docutils literal"><span class="pre">vi</span></code>, and you’ll
need to <code class="code docutils literal"><span class="pre">sudo</span></code>.</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span>proxy-on <span class="o">()</span> <span class="o">{</span>
<span class="nb">export</span> <span class="nv">HTTP_PROXY</span><span class="o">=</span>http://proxy.example.com:8080
<span class="nb">export</span> <span class="nv">http_proxy</span><span class="o">=</span><span class="nv">$HTTP_PROXY</span>
<span class="nb">export</span> <span class="nv">HTTPS_PROXY</span><span class="o">=</span><span class="nv">$HTTP_PROXY</span>
<span class="nb">export</span> <span class="nv">https_proxy</span><span class="o">=</span><span class="nv">$HTTP_PROXY</span>
<span class="nb">export</span> <span class="nv">ALL_PROXY</span><span class="o">=</span><span class="nv">$HTTP_PROXY</span>
<span class="nb">export</span> <span class="nv">all_proxy</span><span class="o">=</span><span class="nv">$HTTP_PROXY</span>
<span class="nb">export</span> <span class="nv">NO_PROXY</span><span class="o">=</span><span class="s1">'localhost,127.0.0.1,.example.com'</span>
<span class="nb">export</span> <span class="nv">no_proxy</span><span class="o">=</span><span class="nv">$NO_PROXY</span>
<span class="o">}</span>
proxy-off <span class="o">()</span> <span class="o">{</span>
<span class="nb">unset</span> -v HTTP_PROXY http_proxy
<span class="nb">unset</span> -v HTTPS_PROXY https_proxy
<span class="nb">unset</span> -v ALL_PROXY all_proxy
<span class="nb">unset</span> -v NO_PROXY no_proxy
<span class="o">}</span>
proxy-on
</pre></div>
</div>
<p>Test:</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> <span class="nb">exec</span> bash
<span class="gp">$</span> <span class="nb">set</span> <span class="p">|</span> fgrep -i proxy
<span class="go">ALL_PROXY=http://proxy.example.com:8080</span>
<span class="go">[...]</span>
<span class="gp">$</span> sudo bash
<span class="gp">#</span> <span class="nb">set</span> <span class="p">|</span> fgrep -i proxy
<span class="go">ALL_PROXY=http://proxy.example.com:8080</span>
<span class="go">[...]</span>
<span class="gp">#</span> <span class="nb">exit</span>
</pre></div>
</div>
</div>
<div class="section" id="install-a-decent-user-environment">
<h4>4.2.3.4. Install a decent user environment<a class="headerlink" href="#install-a-decent-user-environment" title="Permalink to this headline">¶</a></h4>
<p>Use <code class="code docutils literal"><span class="pre">yum</span></code> to install a basic environment suitable for your site. For
example:</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> sudo yum upgrade
<span class="gp">$</span> sudo yum install emacs vim wget
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">CentOS includes Git 1.8 by default, which is quite old. It’s sufficient for
installing Charliecloud, but if you expect users to do any real development
with Git, you probably want to install a newer version, perhaps from
source.</p>
</div>
</div>
<div class="section" id="configure-auto-login-on-console">
<h4>4.2.3.5. Configure auto-login on console<a class="headerlink" href="#configure-auto-login-on-console" title="Permalink to this headline">¶</a></h4>
<p>This sets the first virtual console to log in <code class="code docutils literal"><span class="pre">charlie</span></code> automatically
(i.e., without password). This increases user convenience and, combined with
passwordless <code class="code docutils literal"><span class="pre">sudo</span></code> above, it lets users set their own password for
<code class="code docutils literal"><span class="pre">charlie</span></code> without you needing to distribute the password set above. Even
on multi-user systems, this is secure because the VM console window is
displayed only in the invoking user’s windowing environment.</p>
<p>Adapted from this <a class="reference external" href="https://www.centos.org/forums/viewtopic.php?t=48288">forum post</a>.</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> <span class="nb">cd</span> /etc/systemd/system/getty.target.wants
<span class="gp">$</span> sudo cp /lib/systemd/system/getty<span class="se">\@</span>.service getty<span class="se">\@</span>tty1.service
</pre></div>
</div>
<p>Edit <code class="code docutils literal"><span class="pre">getty@tty1.service</span></code> to modify the <code class="code docutils literal"><span class="pre">ExecStart</span></code> line and add a
new line at the end, as follows:</p>
<div class="highlight-ini"><div class="highlight"><pre><span></span><span class="k">[Service]</span>
<span class="c1">;...</span>
<span class="na">ExecStart</span><span class="o">=</span><span class="s">-/sbin/agetty --autologin charlie --noclear %I</span>
<span class="c1">;...</span>
<span class="k">[Install]</span>
<span class="c1">;...</span>
<span class="c1">;Alias=getty@tty1.service</span>
</pre></div>
</div>
<p>Reboot. The VM text console should be logged into <code class="code docutils literal"><span class="pre">charlie</span></code> with no user
interaction.</p>
</div>
<div class="section" id="upgrade-kernel">
<h4>4.2.3.6. Upgrade kernel<a class="headerlink" href="#upgrade-kernel" title="Permalink to this headline">¶</a></h4>
<p>CentOS 7 comes with kernel version 3.10 (plus lots of Red Hat patches). In
order to run Charliecloud well, we need something newer. This can be obtained
from <a class="reference external" href="http://elrepo.org">ElRepo</a>.</p>
<p>First, set the new kernel flavor to be the default on boot. Edit
<code class="code docutils literal"><span class="pre">/etc/sysconfig/kernel</span></code> and change <code class="code docutils literal"><span class="pre">DEFAULTKERNEL</span></code> from
<code class="code docutils literal"><span class="pre">kernel</span></code> to <code class="code docutils literal"><span class="pre">kernel-lt</span></code>.</p>
<p>Next, install the kernel:</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
<span class="gp">$</span> sudo rpm -Uvh https://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
<span class="gp">$</span> sudo yum upgrade
<span class="gp">$</span> sudo rpm --erase --nodeps kernel-headers
<span class="gp">$</span> sudo yum --enablerepo<span class="o">=</span>elrepo-kernel install kernel-lt kernel-lt-headers kernel-lt-devel
<span class="gp">$</span> sudo yum check dependencies
</pre></div>
</div>
<p>Reboot. Log back in and verify that you’re in the right kernel:</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> uname -r
<span class="go">4.4.85-1.el7.elrepo.x86_64</span>
</pre></div>
</div>
</div>
<div class="section" id="install-guest-additions">
<h4>4.2.3.7. Install Guest Additions<a class="headerlink" href="#install-guest-additions" title="Permalink to this headline">¶</a></h4>
<p>The VirtualBox <a class="reference external" href="https://www.virtualbox.org/manual/ch04.html">Guest Additions</a> add various tweaks to the
guest to make it work better with the host.</p>
<ol class="arabic simple">
<li>Raise the VM’s console window.</li>
<li>From the menu bar, choose <em>Devices</em> -> <em>Insert Guest Additions CD Image</em>.</li>
</ol>
<p>Install. It is OK if you get a complaint about skipping X.</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> sudo mount /dev/cdrom /mnt
<span class="gp">$</span> sudo sh /mnt/VBoxLinuxAdditions.run
<span class="gp">$</span> sudo eject
</pre></div>
</div>
<p>Reboot.</p>
</div>
<div class="section" id="install-openmpi">
<h4>4.2.3.8. Install OpenMPI<a class="headerlink" href="#install-openmpi" title="Permalink to this headline">¶</a></h4>
<p>This will enable you to run MPI-based images using the host MPI, as you would
on a cluster. Match the MPI version in
<code class="code docutils literal"><span class="pre">examples/mpi/mpihello/Dockerfile</span></code>.</p>
<p>(CentOS has an OpenMPI RPM, but it’s the wrong version and lacks an
<code class="code docutils literal"><span class="pre">mpirun</span></code> command.)</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> <span class="nb">cd</span> /usr/local/src
<span class="gp">$</span> sudo chgrp wheel .
<span class="gp">$</span> sudo chmod <span class="m">2775</span> .
<span class="gp">$</span> ls -ld .
<span class="go">drwxrwsr-x. 2 root wheel 6 Nov 5 2016 .</span>
<span class="gp">$</span> wget https://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.5.tar.gz
<span class="gp">$</span> tar xf openmpi-1.10.5.tar.gz
<span class="gp">$</span> rm openmpi-1.10.5.tar.gz
<span class="gp">$</span> <span class="nb">cd</span> openmpi-1.10.5/
<span class="gp">$</span> ./configure --prefix<span class="o">=</span>/usr --disable-mpi-cxx --disable-mpi-fortran
<span class="gp">$</span> make -j<span class="k">$(</span>getconf _NPROCESSORS_ONLN<span class="k">)</span>
<span class="gp">$</span> sudo make install
<span class="gp">$</span> make clean
<span class="gp">$</span> ldconfig
</pre></div>
</div>
<p>Sanity:</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> which mpirun
<span class="gp">$</span> mpirun --version
<span class="go">mpirun (Open MPI) 1.10.5</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="install-docker">
<h3><a class="toc-backref" href="#id10">4.2.4. Install Docker</a><a class="headerlink" href="#install-docker" title="Permalink to this headline">¶</a></h3>
<p>See also Docker’s <a class="reference external" href="https://docs.docker.com/engine/installation/linux/centos/">CentOS install documentation</a>.</p>
<div class="section" id="install">
<h4>4.2.4.1. Install<a class="headerlink" href="#install" title="Permalink to this headline">¶</a></h4>
<p>This will offer Docker’s GPG key. Verify its fingerprint.</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> sudo yum install yum-utils
<span class="gp">$</span> sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
<span class="gp">$</span> sudo yum install docker-ce
<span class="gp">$</span> sudo systemctl <span class="nb">enable</span> docker
<span class="gp">$</span> sudo systemctl is-enabled docker
<span class="go">enabled</span>
</pre></div>
</div>
</div>
<div class="section" id="id1">
<h4>4.2.4.2. Configure proxy<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h4>
<p>If needed at your site, create a file
<code class="code docutils literal"><span class="pre">/etc/systemd/system/docker.service.d/http-proxy.conf</span></code> with the
following content:</p>
<div class="highlight-ini"><div class="highlight"><pre><span></span><span class="k">[Service]</span>
<span class="na">Environment</span><span class="o">=</span><span class="s">"HTTP_PROXY=http://proxy.example.com:8080"</span>
<span class="na">Environment</span><span class="o">=</span><span class="s">"HTTPS_PROXY=http://proxy.example.com:8080"</span>
</pre></div>
</div>
<p>Restart Docker and verify:</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> sudo systemctl daemon-reload
<span class="gp">$</span> sudo systemctl restart docker
<span class="gp">$</span> systemctl show --property<span class="o">=</span>Environment docker
<span class="go">Environment=HTTP_PROXY=[...] HTTPS_PROXY=[...]</span>
</pre></div>
</div>
<p>Note that there’s nothing special to turn off the proxy if you are off-site;
you’ll need to edit the file again.</p>
</div>
<div class="section" id="test">
<h4>4.2.4.3. Test<a class="headerlink" href="#test" title="Permalink to this headline">¶</a></h4>
<p>Test that Docker is installed and working by running the Hello World image:</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> sudo docker run hello-world
<span class="go">[...]</span>
<span class="go">Hello from Docker!</span>
<span class="go">This message shows that your installation appears to be working correctly.</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="install-charliecloud">
<h3><a class="toc-backref" href="#id11">4.2.5. Install Charliecloud</a><a class="headerlink" href="#install-charliecloud" title="Permalink to this headline">¶</a></h3>
<div class="section" id="set-environment-variables">
<h4>4.2.5.1. Set environment variables<a class="headerlink" href="#set-environment-variables" title="Permalink to this headline">¶</a></h4>
<p>Charliecloud’s <code class="code docutils literal"><span class="pre">make</span> <span class="pre">test</span></code> needs some environment variables. Set these
by default for convenience.</p>
<p>Create a file <code class="code docutils literal"><span class="pre">/etc/profile.d/charliecloud.sh</span></code> with the following
content:</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">CH_TEST_TARDIR</span><span class="o">=</span>/var/tmp/tarballs
<span class="nb">export</span> <span class="nv">CH_TEST_IMGDIR</span><span class="o">=</span>/var/tmp/images
<span class="nb">export</span> <span class="nv">CH_TEST_PERMDIRS</span><span class="o">=</span>skip
</pre></div>
</div>
<p>Test:</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> <span class="nb">exec</span> bash
<span class="gp">$</span> <span class="nb">set</span> <span class="p">|</span> fgrep CH_TEST
<span class="go">CH_TEST_IMGDIR=/var/tmp/images</span>
<span class="go">CH_TEST_PERMDIRS=skip</span>
<span class="go">CH_TEST_TARDIR=/var/tmp/tarballs</span>
</pre></div>
</div>
</div>
<div class="section" id="enable-a-second-getty">
<h4>4.2.5.2. Enable a second <code class="code docutils literal"><span class="pre">getty</span></code><a class="headerlink" href="#enable-a-second-getty" title="Permalink to this headline">¶</a></h4>
<p>Charliecloud requires a <code class="code docutils literal"><span class="pre">getty</span></code> process for its test suite. CentOS runs
only a single <code class="code docutils literal"><span class="pre">getty</span></code> by default, so if you log in on the console,
Charliecloud will not pass its tests. Thus, enable a second one:</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> sudo ln -s /usr/lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty2.service
<span class="gp">$</span> sudo systemctl start getty@tty2.service
</pre></div>
</div>
<p>Test:</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> ps ax <span class="p">|</span> egrep <span class="o">[</span>g<span class="o">]</span>etty
<span class="go"> 751 tty1 Ss+ 0:00 /sbin/agetty --noclear tty1 linux</span>
<span class="go">2885 tty2 Ss+ 0:00 /sbin/agetty --noclear tty2 linux</span>
</pre></div>
</div>
</div>
<div class="section" id="build-and-install-charliecloud">
<h4>4.2.5.3. Build and install Charliecloud<a class="headerlink" href="#build-and-install-charliecloud" title="Permalink to this headline">¶</a></h4>
<p>This fetches the tip of <code class="code docutils literal"><span class="pre">master</span></code> in Charliecloud’s GitHub repository. If
you want a different version, use Git commands to check it out.</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> <span class="nb">cd</span> /usr/local/src
<span class="gp">$</span> git clone --recursive https://www.github.com/hpc/charliecloud.git
<span class="gp">$</span> <span class="nb">cd</span> charliecloud
<span class="gp">$</span> make
<span class="gp">$</span> sudo make install <span class="nv">PREFIX</span><span class="o">=</span>/usr
</pre></div>
</div>
<p>Basic sanity:</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> which ch-run
<span class="go">/usr/bin/ch-run</span>
<span class="gp">$</span> ch-run --version
<span class="go">0.2.2~pre+00ffb9b</span>
</pre></div>
</div>
</div>
<div class="section" id="prime-docker-cache">
<span id="virtualbox-prime-docker-cache"></span><h4>4.2.5.4. Prime Docker cache<a class="headerlink" href="#prime-docker-cache" title="Permalink to this headline">¶</a></h4>
<p>Running <code class="code docutils literal"><span class="pre">make</span> <span class="pre">test-build</span></code> will build all the necessary Docker layers.
This will speed things up if the user later wishes to make use of them.</p>
<p>Note that this step can take 20–30 minutes to do all the builds.</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> <span class="nb">cd</span> /usr/share/doc/charliecloud/test
<span class="gp">$</span> make test-build
<span class="go"> ✓ create tarball directory if needed</span>
<span class="go"> - documentations build (skipped: sphinx is not installed)</span>
<span class="go"> ✓ executables seem sane</span>
<span class="go"> ✓ proxy variables</span>
<span class="go">[...]</span>
<span class="go">41 tests, 0 failures, 1 skipped</span>
</pre></div>
</div>
<p>But the tarballs will be overwritten by later runs, so remove them to reduce
VM image size for export. We’ll zero them out first so that the export sees
the blocks as unused. (It does not understand filesystems, so it thinks
deleted but non-zero blocks are still in use.)</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> <span class="nb">cd</span> /var/tmp/tarballs
<span class="gp">$</span> <span class="k">for</span> i in *.tar.gz<span class="p">;</span> <span class="k">do</span> <span class="nb">echo</span> <span class="nv">$i</span><span class="p">;</span> shred -n0 --zero <span class="nv">$i</span><span class="p">;</span> <span class="k">done</span>
<span class="gp">$</span> rm *.tar.gz
</pre></div>
</div>
</div>
</div>
<div class="section" id="create-export-snapshot">
<h3><a class="toc-backref" href="#id12">4.2.6. Create export snapshot</a><a class="headerlink" href="#create-export-snapshot" title="Permalink to this headline">¶</a></h3>
<p>Charliecloud’s <code class="code docutils literal"><span class="pre">make</span> <span class="pre">test-run</span></code> and <code class="code docutils literal"><span class="pre">test-test</span></code> produce voluminous
image files that need not be in the appliance, in contrast with the primed
Docker cache as discussed above. However, we also don’t want to export an
appliance that hasn’t been tested. The solution is to make a snapshot of what
we do want to export, run the tests, and then return to the pre-test snapshot
and export it.</p>
<ol class="arabic simple">
<li>Shut down the VM.</li>
<li>Create a snapshot called <em>exportme</em>.</li>
<li>Boot the VM again and log in.</li>
</ol>
</div>
<div class="section" id="finish-testing-charliecloud">
<h3><a class="toc-backref" href="#id13">4.2.7. Finish testing Charliecloud</a><a class="headerlink" href="#finish-testing-charliecloud" title="Permalink to this headline">¶</a></h3>
<p>This runs the Charliecloud test suite in full. If it passes, then the snapshot
you created in the previous step is good to go.</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> <span class="nb">cd</span> /usr/share/doc/charliecloud/test
<span class="gp">$</span> make test-all
</pre></div>
</div>
</div>
<div class="section" id="export-appliance">
<h3><a class="toc-backref" href="#id14">4.2.8. Export appliance</a><a class="headerlink" href="#export-appliance" title="Permalink to this headline">¶</a></h3>
<p>This creates a <code class="code docutils literal"><span class="pre">.ova</span></code> file, which is a standard way to package a virtual
machine image with metadata. Someone else can then import it into their own
VirtualBox, as described above. In principle other virtual machine emulators
should work as well, though we haven’t tried.</p>
<ol class="arabic simple">
<li>Shut down the VM.</li>
<li>Revert to snapshot <em>exportme</em>.</li>
<li><em>File</em> -> <em>Export appliance</em></li>
<li>Select your VM. Click <em>Continue</em>.</li>
<li>Configure the export:<ul>
<li><em>File:</em> Directory and filename you want. (The install procedure above
uses <code class="code docutils literal"><span class="pre">charliecloud_centos7.ova</span></code>.)</li>
<li><em>Format:</em> OVF 2.0</li>
<li><em>Write Manifest file:</em> unchecked</li>
</ul>
</li>
<li>Click <em>Continue</em>.</li>
<li>Check the decriptive information and click <em>Export</em>.</li>
<li>Distribute the resulting file (which should be about 5GiB).</li>
</ol>
</div>
</div>
<div class="section" id="upgrade-the-appliance">
<h2><a class="toc-backref" href="#id15">4.3. Upgrade the appliance</a><a class="headerlink" href="#upgrade-the-appliance" title="Permalink to this headline">¶</a></h2>
<p>Shut down the VM and roll back to <em>exportme</em>.</p>
<div class="section" id="os-packages-via-yum">
<h3><a class="toc-backref" href="#id16">4.3.1. OS packages via <code class="code docutils literal"><span class="pre">yum</span></code></a><a class="headerlink" href="#os-packages-via-yum" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> sudo yum upgrade
<span class="gp">$</span> sudo yum --enablerepo<span class="o">=</span>elrepo-kernel install kernel-lt kernel-lt-headers kernel-lt-devel
</pre></div>
</div>
<p>You may also want to remove old, unneeded kernel packages:</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> rpm -qa <span class="s1">'kernel*'</span> <span class="p">|</span> sort
<span class="go">kernel-3.10.0-514.26.2.el7.x86_64</span>
<span class="go">kernel-3.10.0-514.el7.x86_64</span>
<span class="go">kernel-3.10.0-693.2.2.el7.x86_64</span>
<span class="go">kernel-devel-3.10.0-514.26.2.el7.x86_64</span>
<span class="go">kernel-devel-3.10.0-514.el7.x86_64</span>
<span class="go">kernel-devel-3.10.0-693.2.2.el7.x86_64</span>
<span class="go">kernel-lt-4.4.85-1.el7.elrepo.x86_64</span>
<span class="go">kernel-lt-devel-4.4.85-1.el7.elrepo.x86_64</span>
<span class="go">kernel-lt-headers-4.4.85-1.el7.elrepo.x86_64</span>
<span class="go">kernel-tools-3.10.0-693.2.2.el7.x86_64</span>
<span class="go">kernel-tools-libs-3.10.0-693.2.2.el7.x86_64</span>
<span class="gp">$</span> sudo rpm --erase kernel-3.10.0-514.26.2.el7 <span class="o">[</span>... etc ...<span class="o">]</span>
</pre></div>
</div>
</div>
<div class="section" id="charliecloud">
<h3><a class="toc-backref" href="#id17">4.3.2. Charliecloud</a><a class="headerlink" href="#charliecloud" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> <span class="nb">cd</span> /usr/local/src/charliecloud
<span class="gp">$</span> git pull
<span class="gp">$</span> make clean
<span class="gp">$</span> make
<span class="gp">$</span> sudo make install <span class="nv">PREFIX</span><span class="o">=</span>/usr
<span class="gp">$</span> git log -n1
<span class="go">commit 4ebff0a0d7352b69e4cf8b9f529b6247c17dbe86</span>
<span class="go">[...]</span>
<span class="gp">$</span> which ch-run
<span class="go">/usr/bin/ch-run</span>
<span class="gp">$</span> ch-run --version
<span class="go">0.2.2~pre+4ebff0a</span>
</pre></div>
</div>
<p>Make sure the Git hashes match.</p>
</div>
<div class="section" id="docker-images">
<h3><a class="toc-backref" href="#id18">4.3.3. Docker images</a><a class="headerlink" href="#docker-images" title="Permalink to this headline">¶</a></h3>
<p>Delete existing containers and images:</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> sudo docker rm <span class="k">$(</span>sudo docker ps -aq<span class="k">)</span>
<span class="gp">$</span> sudo docker rmi -f <span class="k">$(</span>sudo docker images -q<span class="k">)</span>
</pre></div>
</div>
<p>Now, go to <a class="reference internal" href="#virtualbox-prime-docker-cache"><span class="std std-ref">Prime Docker cache</span></a> above and proceed.</p>
</div>
</div>
</div>
</div>
<div class="articleComments">
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="faq.html" class="btn btn-neutral float-right" title="5. Frequently asked questions (FAQ)" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="script-help.html" class="btn btn-neutral" title="3. Help text for executables" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
© <a href="copyright.html">Copyright</a> 2014–2017, Los Alamos National Security, LLC.
</p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.2.3~pre',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="/usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>
|