From Fedora Project Wiki

(Created page with "{{QA/Test_Case |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. |actions= * Create a new Butane config file called httpd.bu with the following content: OR [https://docs.fedoraproject.org/en-US/fedora-coreos/tutorial-services/ follow this tutorial] <pre> variant: fcos ve...")
 
No edit summary
 
Line 39: Line 39:
|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.
|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.
}}
}}
[[Category:CoreOS Test Cases]]

Latest revision as of 13:36, 11 September 2023

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.