Red Hat Training

A Red Hat training course is available for Red Hat Linux

28.4. Installing Composer

To install Composer on a dedicated virtual machine, follow these steps.

Important

Composer is available as a Technology Preview. See the Technology Preview Features Support Scope for more details.
Customers deploying Composer are encouraged to provide feedback to Red Hat.

Prerequisites

  • The virtual machine for Composer must be already installed, meet the requirements, be subscribed, and be running.
  • The system with repository mirrors must be accessible on network.
  • The Composer system must use the same version of Red Hat Enterprise Linux as the system containing repository mirrors.
  • You must be connected to the virtual machine and run all the commands there.
  • The repository RHEL-7-Extras must be enabled on the system.

Procedure

  1. Install the Composer packages:
    # yum install lorax-composer composer-cli cockpit-composer

    Note

    If Cockpit is not installed yet, it is implicitly installed as a dependency of the cockpit-composer package.
  2. List the repositories enabled on this machine and note their identifiers:
    # yum repolist
  3. Create a repository configuration file in the /etc/yum.repos.d directory which points to the mirrored repositories. Include the IP address or host name of the virtual machine system. For each of the repository mirrors, run:
    # cat >> /etc/yum.repos.d/mirror.repo <<EOF
    [mirror-REPO-ID]
    name=NAME
    baseurl=http://IP-ADDR/cdrom/
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    
    EOF
    Replace REPO-ID with the repository identifier, NAME with the repository name, and IP-ADDR with the IP address or host name. This will present the repository mirrors to the system with an identifier containing the prefix mirror-.
  4. Verify the repository configuration:
    # yum clean all
    # yum repolist
  5. Disable the original subscribed repositories from Red Hat content delivery network. For each of the mirrored repositories, run:
    # yum-config-manager --disable REPO-ID
    Replace REPO-ID with the repository identifier.
  6. Enable Composer to start after each reboot and configure the system firewall:
    # systemctl enable lorax-composer.socket
    # systemctl enable cockpit.socket
    # firewall-cmd --add-service=cockpit && firewall-cmd --add-service=cockpit --permanent
  7. The Composer and Cockpit services are started automatically on each system reboot. For this first session after installation, start these services manually:
    # systemctl start lorax-composer
    # systemctl start cockpit