Search

Chapter 1. Quay plugin for Backstage

download PDF

The Quay plugin displays the information about your container images within the Quay registry in your Backstage application.

1.1. For administrators

1.1.1. Installation

The Red Hat Plug-ins for Backstage (RHPIB) packages are hosted in a separate NPM registry, which is maintained by Red Hat. To use these packages, you must adjust your NPM configuration to pull the @redhat scoped packages:

# update your .npmrc or .yarnrc file
yarn config set "@redhat:registry" https://npm.registry.redhat.com
# then pull a package
yarn add @redhat/backstage-plugin-quay

For more information, see npm docs.

Creating a .npmrc file ensures that all the packages are scoped under @redhat and are fetched from Red Hat’s NPM registry, while the rest dependencies remain sourced from other registry.

You can now install the Quay plugin using the following command:

yarn workspace app add @redhat/backstage-plugin-quay

1.1.2. Configuration

  1. Set the proxy to the desired Quay server in the app-config.yaml file as follows:

       ```yaml title="app-config.yaml"
       proxy:
         '/quay/api':
           target: 'https://quay.io'
           headers:
             X-Requested-With: 'XMLHttpRequest'
             # Uncomment the following line to access a private Quay Repository using a token
             # Authorization: 'Bearer <YOUR TOKEN>'
           changeOrigin: true
           # Change to "false" in case of using self hosted quay instance with a self-signed certificate
           secure: true
    
       quay:
         # The UI url for Quay, used to generate the link to Quay
         uiUrl: 'https://quay.io'
       ```
  2. Enable an additional tab on the entity view page in packages/app/src/components/catalog/EntityPage.tsx:

       ```tsx title="packages/app/src/components/catalog/EntityPage.tsx"
       /* highlight-add-next-line */
       import { isQuayAvailable, QuayPage } from '@redhat/backstage-plugin-quay';
    
       const serviceEntityPage = (
         <EntityPageLayout>
           {/* ... */}
           {/* highlight-add-next-line */}
           <EntityLayout.Route if={isQuayAvailable} path="/quay" title="Quay">
             <QuayPage />
           </EntityLayout.Route>
         </EntityPageLayout>
       );
       ```
  3. Annotate your entity with the following annotations:

       ```yaml title="catalog-info.yaml"
       metadata:
         annotations:
           'quay.io/repository-slug': `<ORGANIZATION>/<REPOSITORY>',
       ```

1.2. For users

1.2.1. Using the Quay plugin in Backstage

Quay is a front-end plugin that enables you to view the information about the container images.

Prerequisites

  • Your Backstage application is installed and running.
  • You have installed the Quay plugin. For installation process, see Installation.

Procedure

  1. Open your Backstage application and select a component from the Catalog page.
  2. Go to the Image Registry tab.

    The Image Registry tab in the Backstage UI contains a list of container images and related information, such as TAG, LAST MODIFIED, SECURITY SCAN, SIZE, EXPIRES, and MANIFEST.

    quay-tab
  3. If a container image does not pass the security scan, select the security scan value of the image to check the vulnerabilities.

    quay-tab

    The vulnerabilities page displays the associated advisory with a link, severity, package name, and current and fixed versions.

    quay-tab-vulnerabilities

    The advisory link redirects to the Red Hat Security Advisory page that contains detailed information about the advisory, including the solution.

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.