Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


pulp_centos7

Pulp 2.8 on CentOS 7

This page describes the installation of Pulp on CentOS 7 for repository management without consumers (no remote management).

Install prerequisites

  • Check storage requirements.
  • Install Pulp repo:
    cd /etc/yum.repos.d
    wget http://repos.fedorapeople.org/repos/pulp/pulp/rhel-pulp.repo
  • Install EPEL repo:
    yum install epel-release-7-5.noarch.rpm
    yum update
  • Install MongoDB:
    yum install mongodb-server
    systemctl enable mongod
    systemctl start mongod
  • Install Qpid:
    yum install qpid-cpp-server qpid-cpp-server-store
    systemctl enable qpidd
    systemctl start qpidd

Install and configure Pulp server

  • Install the Pulp server:
    yum groupinstall pulp-server-qpid
  • Edit /etc/pulp/server.conf:
    server_name = 
  • Edit /etc/qpid/qpidd.conf:
    auth=no
  • Initialize the database:
    sudo -u apache pulp-manage-db
  • Edit /etc/httpd/conf.d/ssl.conf:
    SSLProtocol all -SSLv2 -SSLv3
  • Start and enable apache:
    systemctl enable httpd
    systemctl start httpd
  • Edit /etc/default/pulp_workers:
    PULP_CONCURRENCY=4
  • Start workers:
    systemctl enable pulp_workers
    systemctl start pulp_workers
  • Edit /etc/default/pulp_celerybeat
  • Start Celery:
    systemctl enable pulp_celerybeat
    systemctl start pulp_celerybeat
  • Edit /etc/default/pulp_resource_manager
  • Start resource manager:
    systemctl enable pulp_resource_manager
    systemctl start pulp_resource_manager

Install and configure Pulp admin

  • Install admin:
    yum groupinstall pulp-admin
  • Edit /etc/pulp/admin/admin.conf:
    host =
    verify_ssl = False

Open firewall ports

  • Add port 80 and 443 to trusted zone:
    firewall-cmd --permanent --zone=public --add-service=htts
    firewall-cmd --permanent --zone=public --add-service=https
    firewall-cmd --reload
    firewall-cmd --zone=public --list-all

Create self signed certificates

  • Also copy CA certificate, server certificate and key to /etc/pki/…, then configure Apache to use these certificates (ssl.conf and in /etc/httpd/conf.d).

Pulp admin

  • Log in as non-root user (password admin):
    pulp-admin login -u admin
  • Change the admin password:
    pulp-admin auth user update --login admin -p
  • You can save credentials in ~/.pulp/admin.conf:
    [auth]
    username: admin
    password: <your-new-pass>

Add repo

  • Create repo's:
    pulp-admin rpm repo create --repo-id=CentOS-7-x86_64 --feed=http://mirror.centos.org/centos/7/os/x86_64/
    pulp-admin rpm repo create --repo-id=CentOS-7-x86_64-updates --feed=http://mirror.centos.org/centos/7/updates/x86_64/
  • Sync repo's:
    pulp-admin rpm repo sync run --repo-id="CentOS-7-x86_64"
    pulp-admin rpm repo sync run --repo-id="CentOS-7-x86_64-updates"

Schedule sync

  • Schedule sync every day at 13.00 UTC (period 1 day = P1D):
    pulp-admin rpm repo sync schedules create -s 2015-01-01T13:00:00Z/P1D --repo-id=CentOS-7-x86_64
    pulp-admin rpm repo sync schedules create -s 2015-01-01T13:00:00Z/P1D --repo-id=CentOS-7-x86_64-updates

Update feed

  • Show details:
    pulp-admin rpm repo list --repo-id HP-SPP-CentOS-7-x86_64 --details
  • Modify feed:
    pulp-admin rpm repo update --repo-id HP-SPP-CentOS-7-x86_64 --feed http://downloads.linux.hpe.com/SDR/repo/spp/RHEL/7/x86_64/current

yum repo file example

  • Configure yum repo:
    [pulp-base]
    name=CentOS-$releasever - Base
    baseurl=https://repo.mgmt.domain/pulp/repos/centos/$releasever/os/$basearch/
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

Email notification

  • Read the manual
  • Make sure email (ie postfix) is working on the system. Send a test mail.
  • Configure [email] in /etc/pulp/server.conf and reload pulp.
  • Create listener:
    pulp-admin event listener email create --event-type="repo.sync.finish" --subject="pulp notifications" --addresses=first@mail.tld,another@mail.tld
  • List listeners:
    pulp-admin event listener list

Known problems and solutions

  • pulp.server.db.migrations hasn't been updated to the latest available migration.
    su -s /bin/sh apache -c pulp-manage-db
  • Show and delete orhpaned packages:
    $ pulp-admin orphan list
    +----------------------------------------------------------------------+
                                    Summary
    +----------------------------------------------------------------------+
    
    Distribution:            1
    Docker Blob:             0
    Docker Image:            0
    Docker Manifest:         0
    Docker Tag:              0
    Drpm:                    13
    Erratum:                 0
    Iso:                     0
    Node:                    0
    Package Category:        0
    Package Environment:     0
    Package Group:           0
    Package Langpacks:       0
    Puppet Module:           0
    Repository:              0
    Rpm:                     271
    Srpm:                    0
    Yum Repo Metadata File:  3
    Total:                   288
    
    
    $ pulp-admin orphan remove --all
    This command may be exited via ctrl+c without affecting the request.
    
    
    [/]
    Running...
    
    Task Succeeded
    
pulp_centos7.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1