Managing Flatpak repositories in orcharhino

Flatpak allows users to install, manage, and run portable applications on orcharhino, primarily for desktop environments. In orcharhino, you can integrate Flatpak repositories to distribute and control Flatpak applications across managed hosts. By configuring Flatpak repositories, you ensure that systems have access to the necessary application packages while maintaining centralized control over application deployment.

Flatpak repositories function similarly to other content repositories in orcharhino. You can synchronize, manage access permissions, and assign repositories to specific lifecycle environments to control which applications are available to systems. You can also use Hammer CLI to manage Flatpak repositories.

Creating a Flatpak remote by using orcharhino management UI

You can create a Flatpak remote to access and manage Flatpak repositories in orcharhino management UI.

Prerequisites
  • Your orcharhino account has a role that grants the create_flatpak_remotes permission.

Procedure
  1. In the orcharhino management UI, navigate to Content > Flatpak Remotes.

  2. Click Create new.

  3. In the Name field, enter a name for the Flatpak remote.

  4. In the URL field, enter the URL of the Flatpak remote. For example, to use the Red Hat Flatpak index, enter: https://flatpaks.redhat.io/rhel/. To use the Fedora Flatpak index, enter: https://registry.fedoraproject.org/.

  5. If the Flatpak remote requires authentication, enter the required credentials. For example, synchronizing Red Hat Flatpaks from registry.redhat.io requires authentication. For more information, see Creating Registry Service Accounts.

  6. Click Create.

Creating a Flatpak remote by using Hammer CLI

You can create a Flatpak remote to access and manage Flatpak repositories by using Hammer CLI.

Prerequisites
  • Your orcharhino account has a role that grants the create_flatpak_remotes permission.

Procedure
  • Create your Flatpak remote:

    $ hammer flatpak-remote create \
    --name My_Flatpak_Remote_Name \
    --organization-id My_Organization_ID \
    --url My_Flatpak_Remote_URL

    For example, to use the Red Hat Flatpak index, enter: https://flatpaks.redhat.io/rhel/. To use the Fedora Flatpak index, enter: https://registry.fedoraproject.org/.

    If the Flatpak remote requires authentication, enter the required credentials. For example, synchronizing Red Hat Flatpaks from registry.redhat.io requires authentication. For more information, see Creating Registry Service Accounts.

Scanning a Flatpak remote by using orcharhino management UI

You can scan a Flatpak remote to fetch metadata about the repositories it provides. Scanning a Flatpak remote creates remote repository artifacts for the repositories hosted by the Flatpak remote. If new repositories are added to the Flatpak remote, scan it again to pull in the changes.

Prerequisites
  • Your orcharhino account has a role that grants the view_flatpak_remotes and edit_flatpak_remotes permissions.

Procedure
  1. In the orcharhino management UI, navigate to Content > Flatpak Remotes.

  2. Select the Flatpak remote that you want to scan.

  3. Click Scan.

Scanning a Flatpak remote by using Hammer CLI

You can scan a Flatpak remote to fetch metadata about the repositories it provides. Scanning a Flatpak remote creates remote repository artifacts for the repositories hosted by the Flatpak remote. If new repositories are added to the Flatpak remote, scan it again to pull in the changes.

Prerequisites
  • Your orcharhino account has a role that grants the view_flatpak_remotes and edit_flatpak_remotes permissions.

Procedure
  • Scan your Flatpak remote:

    $ hammer flatpak-remote scan --id My_Flatpak_Remote_ID

Viewing Flatpak remote details by using orcharhino management UI

You can view a list of the repositories a scanned Flatpak remote provides.

Prerequisites
  • Your orcharhino account has a role that grants the view_flatpak_remotes permission.

Procedure
  1. In the orcharhino management UI, navigate to Content > Flatpak Remotes.

  2. Click the name of the Flatpak remote you want to view.

  3. The page displays a list of repositories available from the scanned Flatpak remote.

Viewing Flatpak remote details by using Hammer CLI

You can view a list of the repositories a scanned Flatpak remote provides.

Prerequisites
  • Your orcharhino account has a role that grants the view_flatpak_remotes permission.

Procedure
  • View details of your Flatpak remote:

    $ hammer flatpak-remote info --id My_Flatpak_Remote_ID

Mirroring remote Flatpak repositories to orcharhino products by using orcharhino management UI

You can mirror a Flatpak repository from a Flatpak remote into an existing product in orcharhino to make it available for content management and distribution.

This action creates a new repository inside the product you selected. You can now synchronize the repository to pull down its content. Flatpak repositories are container repositories and you can add them to content views like other container repositories.

Flatpak applications require a corresponding runtime environment, which the Flatpak remote also provides. To make the AlmaLinux 10 Mozilla Firefox Flatpak available to a host, ensure that the host can access the matching rhel10/flatpak-runtime repository.

Prerequisites
  • Your orcharhino account has a role that grants the view_flatpak_remotes and edit_flatpak_remotes permissions.

  • Ensure that Flatpak runtime repositories are available to hosts alongside application repositories. Flatpak applications, such as rhel9/firefox-flatpak, depend on the runtime for installation.

  • You have created a product on orcharhino.

Procedure
  1. In the orcharhino management UI, navigate to Content > Flatpak Remotes.

  2. In the list of Flatpak Remotes, click the name of the remote you want to mirror.

  3. In the list of remote repositories, locate the repository you want to mirror.

  4. Select the Mirror Action menu on the row of the repository.

  5. In the Mirror window, select the existing product where you want to create the new repository.

  6. Click Mirror.

Mirroring remote Flatpak repositories to orcharhino products by using Hammer CLI

You can mirror a Flatpak repository from a Flatpak remote into an existing product in orcharhino to make it available for content management and distribution.

This action creates a new repository inside the product you selected. You can now synchronize the repository to pull down its content. Flatpak repositories are container repositories and you can add them to content views like other container repositories.

Flatpak applications require a corresponding runtime environment, which the Flatpak remote also provides. To make the AlmaLinux 10 Mozilla Firefox Flatpak available to a host, ensure that the host can access the matching rhel10/flatpak-runtime repository.

Prerequisites
  • Your orcharhino account has a role that grants the view_flatpak_remotes and edit_flatpak_remotes permissions.

  • Ensure that Flatpak runtime repositories are available to hosts alongside application repositories. Flatpak applications, such as rhel9/firefox-flatpak, depend on the runtime for installation.

  • You have created a product on orcharhino.

Procedure
  • Mirror a Flatpak repository into your product:

    $ hammer flatpak-remote remote-repository mirror \
    --flatpak-remote-id My_Flatpak_Remote_ID \
    --id My_Flatpak_Repository_ID \
    --product-id My_Product_ID

Enabling the Flatpak remote by using Hammer CLI

This procedure configures and manages Flatpak repositories by using Hammer CLI.

Prerequisites
  • Your orcharhino account has a role that grants the permissions view_flatpak_remotes, create_flatpak_remotes, edit_flatpak_remotes, and destroy_flatpak_remotes.

  • Set up Flatpak.

  • Flatpak applications rely on Flatpak runtimes. For example, rhel9/firefox-flatpak depends on rhel9/flatpak-runtime.

  • Ensure that runtime repositories are available to clients alongside application repositories for installations to work.

CLI procedure
  1. Enable a Flatpak remote on the orcharhino Server by using standalone AlmaLinux systems or orcharhino:

    $ hammer flatpak-remote create \
    --name=My_Flatpak_Remote_Name \
    --organization=My_Organization \
    --url=My_Flatpak_Remote_URL

    You can include authentication details by using the options --username=My_User_Name --token=My_Token.

  2. Update the Flatpak remote with authentication credentials:

    $ hammer flatpak-remote update \
    --id My_Flatpak_Remote_ID \
    --token=My_Token \
    --username=My_User_Name
  3. Optional: List and view information about the Flatpak remote:

    $ hammer flatpak-remote list --organization-id My_Organization_ID
    $ hammer flatpak-remote info --id My_Flatpak_Remote_ID
  4. Scan the Flatpak remote:

    $ hammer flatpak-remote scan --id=My_ID
  5. List repositories in the Flatpak remote:

    $ hammer flatpak-remote remote-repository list --flatpak-remote-id=My_ID
  6. Mirror a Flatpak remote repository to a orcharhino product:

    $ hammer flatpak-remote remote-repository mirror \
    --id=My_Remote_Repo_ID \
    --product-id=orcharhino_Product_ID

    The --id in this command refers to the Flatpak remote repository ID, not the standard orcharhino repository ID.

    You can view the repository under the selected product in orcharhino management UI. Set the Include Tags field to latest.

  7. Synchronize the orcharhino repository:

    $ hammer repository sync --id=My_Repo_ID

    The --id in this command refers to the standard orcharhino repository ID, not the Flatpak remote repository ID.

Installing Flatpak applications on orcharhino hosts

Use the command line to install selected applications from the enabled Flatpak remotes.

Prerequisites
  • Flatpak is installed on the host.

  • Set up Flatpak on the content host that consumes applications from orcharhino Server. For more information, see Setting up Flatpak.

  • Ensure that Flatpak runtime repositories are available to hosts alongside application repositories. Flatpak applications, such as rhel9/firefox-flatpak, depend on the runtime for installation.

  • Ensure that Podman is installed on the host.

  • To install Flatpak applications from orcharhino, ensure that your orcharhino account has the view_lifecycle_environments, view_products, and view_content_views permissions, unless the lifecycle environment allows unauthenticated pull.

  • Your orcharhino account has a role that grants the create_personal_access_tokens permission to generate an access token for authentication. The token generates automatically when you run podman login.

Procedure
  1. On the managed host, add your orcharhino Server as a Flatpak remote:

    $ flatpak remote-add --authenticator-name=org.flatpak.Authenticator.Oci katello oci+https://orcharhino.example.com/
  2. Log in the host to the container registry using one of the following methods:

    • Certificate authentication

      • When registering a host to orcharhino or orcharhino Proxy, select the Set up container registry certs checkbox.

      • If the host is already registered, run the Flatpak - Login to registry via podman job template on the host. Set Set up certificate authentication to true and enter the URL of your orcharhino Proxy as the registry URL.

    • Using Podman

      • Log in using Podman:

        $ podman login orcharhino.example.com
  3. Install your application. For example, to install the Mozilla Firefox Flatpak:

    $ flatpak install firefox

Setting up Flatpak remote for orcharhino Proxy

Configure orcharhino Proxy Servers to synchronize and distribute Flatpak repositories to managed hosts.

orcharhino Proxies synchronize Flatpaks and make them available to all hosts, but not organizations, content views, or lifecycle environments. Clients receive the latest Flatpaks synchronized on the orcharhino Proxy globally.

Prerequisites
Procedure
  1. On the managed host, add the orcharhino Proxy as a Flatpak remote:

    $ flatpak remote-add --authenticator-name=org.flatpak.Authenticator.Oci katello oci+https://orcharhino-proxy.network2.example.com/
  2. Log in the host to the container registry using one of the following methods:

    • Certificate authentication

      • When registering a host to orcharhino Proxy, select the Set up container registry certs checkbox.

      • If the host is already registered, run the Flatpak - Login to registry via podman job template on the host. Set Set up certificate authentication to true and enter the URL of your orcharhino Proxy as the registry URL.

    • Using Podman

      • Log in using Podman:

        $ podman login orcharhino.example.com

        For more information about logging in using Podman, see Configuring podman to trust the CA.

        You might need to log in to the registry again if you have not saved your credentials.

  3. Optional: Save your credentials permanently using one of the following options:

    • To save the credentials for the current user:

      $ cp $XDG_RUNTIME_DIR/containers/auth.json $HOME/.config/flatpak/oci-auth.json
    • To save the credentials system-wide:

      $ cp $XDG_RUNTIME_DIR/containers/auth.json /etc/flatpak/oci-auth.json
  4. Install your application. For example, to install the Mozilla Firefox Flatpak:

    $ flatpak install firefox

Importing and exporting content to orcharhino Server for Flatpak

Use Hammer CLI to transfer Flatpak content to orcharhino Server in environments with disconnected orcharhino Server instances.

Prerequisites
Procedure
  1. On your connected orcharhino Server, export your Flatpak repository:

    $ hammer content-export complete repository \
    --id My_Repository_ID
  2. Transfer the Flatpak repository from your connected orcharhino Server to your disconnected orcharhino Server. Ensure that the pulp user can read and write the directory and place it under /var/lib/pulp/imports/.

    For more information, see Synchronizing Content Between Servers.

  3. On your disconnected orcharhino Server, import your Flatpak repository:

    $ hammer content-import repository \
    --organization-id My_Organization_ID \
    --path /var/lib/pulp/imports/My_Exported_Flatpak_Repository/
  4. On your host, add the disconnected orcharhino Server as a Flatpak remote:

    $ flatpak remote-add --authenticator-name=org.flatpak.Authenticator.Oci katello oci+https://orcharhino.example.com/
  5. Log in using Podman:

    $ podman login orcharhino.example.com
  6. Install your application. For example, to install the Mozilla Firefox Flatpak:

    $ flatpak install firefox

The text and illustrations on this page are licensed by ATIX AG under a Creative Commons Attribution Share Alike 4.0 International ("CC BY-SA 4.0") license. This page also contains text from the official Foreman documentation which uses the same license ("CC BY-SA 4.0").