From Fedora Project Wiki

Description

This test case ensures that Fedora CoreOS can create and manage systemd services using Butane and Ignition configuration files.

Setup

Download and install the latest version of Fedora CoreOS on a bare metal system or virtual machine.

How to test

variant: fcos
version: 1.4.0
systemd:
  units:
    - name: httpd.service
      enabled: true
      contents: |
        [Unit]
        Description=My HTTP server
        After=network-online.target
        Wants=network-online.target
        [Service]
        ExecStart=/usr/bin/python3 -m http.server
        [Install]
        WantedBy=multi-user.target
  • Convert the Butane config file to an Ignition config file by executing the command butane httpd.bu -o httpd.ign.
  • Boot the Fedora CoreOS system with the generated httpd.ign file. If you are using a virtual machine, provide the Ignition config file as a parameter during the boot process.
  • After the system has booted, open a terminal and execute the command systemctl status httpd.service to verify that the httpd.service systemd unit has been created, enabled, and is running.
  • On a separate machine or the same machine with a web browser, navigate to the IP address of the Fedora CoreOS system to verify that the HTTP server is running and accessible.

Expected Results

  • The httpd.bu file is created successfully.
  • The butane httpd.bu -o httpd.ign command generates an Ignition config file without errors.
  • The Fedora CoreOS system boots successfully using the httpd.ign file.
  • The httpd.service systemd unit is created, enabled, and running, as shown by the systemctl status httpd.service command.
  • The HTTP server is running and accessible from a web browser.

Optional

Optionally, test different systemd service configurations, such as creating multiple services or services with dependencies, to ensure that Fedora CoreOS can handle various service management scenarios.