Offline Installation of the Puppeteer Chromium Library

In air-gapped environments, you can use the broad steps below for installing the Puppeteer Chromium library on the target eG manager host:

  • Mount the RHEL ISO installation image on the target Linux system;

  • Configure the Linux ISO as a local Yum repository;

  • Install the Puppeteer library files

  • Validate the Installation

Each of these steps has been discussed below.

Mounting the RHEL ISO Image on the Linux System

For this, do the following:

  1. Login to the target Linux system.

  2. Attach the RHEL ISO image matching the installed OS version to the Linux system as a CD-ROM device. To achieve this, first determine the name of the CD-ROM device. For that, issue the following command at the Shell prompt:

    lsblk

  3. This command displays detailed information about all storage devices like hard drives, SSDs, and USBs, along with their partitions. It outputs this data in a clean, hierarchical tree-like format, showing the device name, size, type, and where it is mounted (see Figure 1).

    Identifying the CDROM Device

    Figure 1 : Determining the name of the CD-ROM device from the output of the lsblk command

  4. In the output of the command (see Figure 1), look for a device with the NAME sr0 and type rom. Such a device is the CD-ROM device.

  5. Next, mount the RHEL ISO image to a temporary directory (say /mnt) on the CD-ROM device. For this, issue the following command at the prompt:

    sudo mount /dev/sr0 /mnt

  6. Upon successful execution, the command will return the following output:

    Verifying Successful Mount

    Figure 2 : Verifying the successful mount

  7. In the output of Figure 2, check if the MOUNTPOINT for the CD-ROM device is set to /mnt. If it is, its a clear indicator that the image was successfully mounted.

Configuring Linux ISO as a Local Yum Repository

For this, follow the steps below:

  1. Issue the following command at the shell prompt of the target Linux system, to navigate to the repository configuration directory:

    cd /etc/yum.repos.d/

  2. Then, proceed to create a local repository file (say, local.repo) using the following command:

    sudo vi local.repo

  3. Add the following content to the new repo file:

    Copy
    [BaseOS] 
    name=RHEL BaseOS Local Repo 
    baseurl=file:///mnt/BaseOS 
    enabled=1
    gpgcheck=0 

    [AppStream]
    name=RHEL AppStream Local Repo 
    baseurl=file:///mnt/AppStream
    enabled=1
    gpgcheck=0
  4. Save and exit the file by issuing the following command:

    :wq

  5. Then, verify the repository configuration. For this, you can issue one of the following commands at the prompt:

    yum repolist all

    (OR)

    dnf repolist

  6. Output similar to what you see in Figure 3 will then appear.

    Verifying Successful Repository Configuration

    Figure 3 : Verifying successful repository configuration

  7. In the output (see Figure 3), check if repo name of the new repository you created is correctly displayed, and its status is enabled. In the case of our example, local is the name of the new repository, and the same is displayed under repo name. The status of local is also enabled.

  8. Also, ensure that BaseOS and AppStream are listed and enabled

Installing the Puppeteer Library

Finally, proceed to install the library files by issuing the following command at the prompt:

sudo yum install -y \ alsa-lib \ atk \ at-spi2-atk \ cairo \ cups-libs \ fontconfig \libdrm \ libX11 \ libXcomposite \ libXcursor \ libXdamage \ libXext \ libXfixes \ libXi \ libXrandr \ libXrender \ libXtst \ libXScrnSaver \ libxkbcommon \ mesa-libgbm \ gtk3 \ liberation-fonts

Validate the Puppeteer Installation

For this, do the following:

  1. Run the following command at the prompt:

    rpm -qa | grep fontconfig

  2. If this command returns the output displayed by Figure 4, its a confirmation that the package has been installed successfully.

    Output confirming that package installation is successful

    Figure 4 : Validating the successful installation of the dependencies

  3. Next, change to the following directory as the eG install user:

    /opt/egurkha/manager/tomcat/webapps/final/HighchartExport/node_modules/.cache/puppeteer/chrome-headless-shell/linux-131.0.6778.108/chrome-headless-shell-linux64

  4. Run the following command now:

    ./chrome-headless-shell –version

  5. If the results output by this command are as shown by Figure 5, then its a clear sign that the dependencies are working as expected.

    Output that confirms that dependencies are working

    Figure 5 : Confirming that the dependencies are working