Insights: How To Upgrade The NGINX Component On 22.4 ?

Insights: How to upgrade the NGINX component on 22.4?

Issue Description

In version 22.4, Insights is using an older version of ngnix. There are some CVEs associated with this version so if desired it can be updated. The official patch for this is scheduled for 22.4.3.

Updating Online Installation

  1. Login to the linux console
  2. Run the following. This creates a repo file that will be used for the update.
    • cat > nginx.conf <<EOF
      [nginx]

      name=nginx

      baseurl=http://nginx.org/packages/rhel/8/$basearch/

      enabled=1

      gpgcheck=1

      module_hotfixes=true
      EOF
  3. Copy the repo file into the docker contianer.
    • sudo docker cp nginx.conf looker-container:/etc/yum.repos.d/nginx.conf
  4. Run the installer in the container.
    • sudo docker exec -it looker-container yum install nginx -y
    • sudo docker restart looker-container
  5. Check the nginx version
    • sudo docker exec -it looker-container nginx -version
  6. Make a note of the actions taken. If the container is removed and recreated these steps have to be taken again (or just upgrade to 22.4.3 when it is released).

Offline Installation

  1. Download the nginx rpm. (attached to the KB)
  2. Copy the rpm to the linux server using your preferred option.
  3. Login to the linux server and change directories to the folder where the file was placed.
  4. Once in that folder run the following commands:
    • sudo docker cp nginx-1.22.0-1.el8.ngx.x86_64.rpm looker-container:/app
    • sudo docker exec -it looker-container rpm -Uvh nginx-1.22.0-1.el8.ngx.x86_64.rpm
    • sudo docker restart looker-container
  5. Check the nginx version
    • sudo docker exec -it looker-container nginx -version