Rechercher

Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 3. Preparing your system to deploy Red Hat Quay

download PDF

For a proof of concept Red Hat Quay deployment, you must configure port mapping, a database, and Redis prior to deploying the registry. Use the following procedures to prepare your system to deploy Red Hat Quay.

3.1. Configuring port mapping for Red Hat Quay

You can use port mappings to expose ports on the host and then use these ports in combination with the host IP address or host name to navigate to the Red Hat Quay endpoint.

Procedure

  1. Enter the following command to obtain your static IP address for your host system:

    $ ip a

    Example output

    ---
        link/ether 6c:6a:77:eb:09:f1 brd ff:ff:ff:ff:ff:ff
        inet 192.168.1.132/24 brd 192.168.1.255 scope global dynamic noprefixroute wlp82s0
    ---

  2. Add the IP address and a local hostname, for example, quay-server.example.com to your /etc/hosts file that will be used to reach the Red Hat Quay endpoint. You can confirm that the IP address and hostname have been added to the /etc/hosts file by entering the following command:

    $ cat /etc/hosts

    Example output

    192.168.1.138 quay-server.example.com

3.2. Configuring the database

Red Hat Quay requires a database for storing metadata. PostgreSQL is used throughout this document. For this deployment, a directory on the local file system to persist database data is used.

Use the following procedure to set up a PostgreSQL database.

Procedure

  1. In the installation folder, denoted here by the $QUAY variable, create a directory for the database data by entering the following command:

    $ mkdir -p $QUAY/postgres-quay
  2. Set the appropriate permissions by entering the following command:

    $ setfacl -m u:26:-wx $QUAY/postgres-quay
  3. Start the Postgres container, specifying the username, password, and database name and port, with the volume definition for database data:

    $ sudo podman run -d --rm --name postgresql-quay \
      -e POSTGRESQL_USER=quayuser \
      -e POSTGRESQL_PASSWORD=quaypass \
      -e POSTGRESQL_DATABASE=quay \
      -e POSTGRESQL_ADMIN_PASSWORD=adminpass \
      -p 5432:5432 \
      -v $QUAY/postgres-quay:/var/lib/pgsql/data:Z \
      registry.redhat.io/rhel8/postgresql-13:1-109
  4. Ensure that the Postgres pg_trgm module is installed by running the following command:

    $ sudo podman exec -it postgresql-quay /bin/bash -c 'echo "CREATE EXTENSION IF NOT EXISTS pg_trgm" | psql -d quay -U postgres'
    Note

    The pg_trgm module is required for the Quay container.

3.3. Configuring Redis

Redis is a key-value store that is used by Red Hat Quay for live builder logs.

Use the following procedure to deploy the Redis container for the Red Hat Quay proof of concept.

Procedure

  • Start the Redis container, specifying the port and password, by entering the following command:

    $ sudo podman run -d --rm --name redis \
      -p 6379:6379 \
      -e REDIS_PASSWORD=strongpassword \
      registry.redhat.io/rhel8/redis-6:1-110
Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.