Beaker

Running tests on an Atomic hostΒΆ

New in version 0.18.3.

Beaker supports running tests on host operating systems based on the Project Atomic pattern. The tests are run in a Docker container instead of the host when such an OS is used. If you are not familiar with this Beaker feature, see Running tests in a Container to learn more. Familiarity with this feature is assumed for the rest of this guide.

An example recipe which uses an atomic host OS is as follows:

<recipe kernel_options="" kernel_options_post="" ks_meta="no_default_harness_repo harness_docker_base_image=registry.hub.docker.com/centos:centos7 ostree_repo_url=http://link/to/ostree/repo/ ostree_ref=my-atomic-host/20/x86_64/standard" role="RECIPE_MEMBERS" whiteboard="">
  <autopick random="false"/>
  <watchdog panic="ignore"/>
  <packages/>
  <ks_appends/>
  <repos>
    <repo name="restraint" url="https://beaker-project.org/yum/harness/CentOS7/"/>
  </repos>
  <distroRequires>
    <and>
      <distro_family op="=" value="MyAtomicHost7"/>
      <distro_variant op="=" value=""/>
      <distro_name op="=" value="My Atomic Host-7"/>
      <distro_arch op="=" value="x86_64"/>
    </and>
  </distroRequires>
  <hostRequires>
    <system>
      <memory op="&gt;" value="1500"/>
    </system>
    <system_type value="Machine"/>
  </hostRequires>
  <partitions/>
  <task name="/test-tasks/uname" role="STANDALONE"/>
</recipe>

The above recipe specifies that the test harness should be run in a CentOS 7 container. Two additional ksmeta variables have to be specified:

  • ostree_repo_url: This variable is used to specify the rpm-ostree repository
  • ostree_ref: This variable is used to specify the rpm-ostree remote ref

Note

You may also note that the above recipe specifies <memory op="&gt;" value="1500"/> in the <hostRequires>. This is to specify that we want the host system to have at least 1500 MB memory. You may or may not need this to successfully execute a recipe.