Pulp notes:

Commands:

pulp-admin –map:
Displays groups of valid command line arguments for pulp-admin. 354 lines long...
pulp-admin ${group} [ ${subcommadn} ] -help:
Displays help for a specific subcategory of pulp-admin commands.
pulp-admin [login -u ${u} [ -p ${p} ]] | [ logout ]:
Creates or deletes a pulp session. Required to execute pulp-admin commands but can be avoided by use of ~/.pulp/admin.conf
pulp-admin auth user create –login dkoleary –password ‘3Pizda!!’
Creates a user. Docs suggest not using --password ${pwd} option.
# pulp-admin auth role user [add|reomve] –role-id super-users –login dkoleary
Adds/removes dkoleary to super-users role

Lessons learned:

  • Need to install the copr repo in order to install the pulp server otherwise, you’ll run into dependency issues:

    cd /etc/yum.repos.d
    wget https://copr.fedorainfracloud.org/coprs/g/qpid/qpid/repo/epel-6/group_qpid-qpid-epel-6.repo
    
  • Ensure host uses fqdn for hostname before installing pulp. ssl certs will become confused if not done.

  • Consumer script installation errors as defined below errors out if puppet is not installed. Either install it or remove pulp-puppet-handlers from the cli.

  • Disable ssl: not a good idea, but for testing, set verify_ssl: False in the following:

    • /etc/pulp/admin/admin.conf
    • /etc/pulp/consumer/consumer.conf
    • /etc/pulp/repo_auth.conf
    • /etc/pulp/nodes.conf # note: didn’t exist in my installation.
  • Default user/pwd: admin/admin Can be changed in /etc/pulp/server.conf in the [server] section:

    [server]
    default_login: Bog
    default_password: 5WHc69wHDWDaMSq
    
  • Creation of ~/.pulp/admin.conf with syntax below allows execution of pulp-admin commands w/o havinng to execute pulp-admin login:

    # cat ~/.pulp/admin.conf
    [auth]
    username: admin
    password: admin
    
  • Consumer registration must happen from consumer side.

  • To restart pulp services:

    • service httpd restart
    • service pulp_workers restart
    • service pulp_celerybeat restart
    • service pulp_resource_manager restart
  • If task is stuck in waiting and shows ‘unstarted’ as the ‘start time’, pulp-admin -vv repo task details --task-id=${long_hex}, restart

    services, particularly pulp_workers:

    # service pulp_workers restart
    celery init v10.0.
    Using config script: /etc/default/pulp_workers
    celery multi v3.1.11 (Cipater)
    > reserved_resource_worker-0@pulp.olearycomputers.com: DOWN
    > reserved_resource_worker-1@pulp.olearycomputers.com: DOWN
    > reserved_resource_worker-2@pulp.olearycomputers.com: DOWN
    > reserved_resource_worker-3@pulp.olearycomputers.com: DOWN
    celery multi v3.1.11 (Cipater)
    > Starting nodes...
            > reserved_resource_worker-0@pulp.olearycomputers.com: OK
            > reserved_resource_worker-1@pulp.olearycomputers.com: OK
            > reserved_resource_worker-2@pulp.olearycomputers.com: OK
            > reserved_resource_worker-3@pulp.olearycomputers.com: OK
    

Process:

  1. Install server
  2. Install admin client on server
  3. Install consumer client on server.
  4. install consumer client on additional clients.

Installation:

  1. Install repos on both clients and server:

    • rhel-pulp.repo (wget)
    • epel (yum)
    • copr (wget): default instructions will fail without this repo
  2. Install pulp server:

    • Create filesystems for pulp required directories:

      • /var/lib/pulp
      • /var/lib/mongodb
    • Install/configure mongodb:

      yum -y install mongodb-server
      chkconfig mongod on
      service mongod start # this will take a bit.
      
    • Install qpid message bus:

      # docs suggest qpid-cpp-server-linearstore; however,
      # that doesn't seem to be available for centos6.
      yum install qpid-cpp-server # qpid-cpp-server-linearstore
      chkconfig qpidd on
      service qpidd start
      
    • Install pulp server and workers:

      yum install pulp-server \
          python-gofer-qpid \
          python-qpid qpid-tools
      yum install pulp-rpm-plugins \
          pulp-puppet-plugins \
          pulp-docker-plugins
      
    • Update /etc/pulp/server.conf to meet environment needs. Of particular interest is the default admin account and password.

    • When done, initialize the mongo database:

      sudo -u apache pulp-manage-db
      
    • Start httpd:

      chkconfig httpd on
      service httpd start
      
    • Celerybeat process: akin to cron:

      • update /etc/default/pulp_celerybeat as needed.

      • Enable/start service:

        # chkconfig pulp_celerybeat on
        # service pulp_celerybeat start
        
    • Pulp resource manager: task router

      • Edit /etc/default/pulp_resource_manager as appropriate

      • Enable/start service:

        # chkconfig pulp_resource_manager on
        # service pulp_resource_manager start
        celery init v10.0.
        Using config script: /etc/default/pulp_resource_manager
        celery multi v3.1.11 (Cipater)
        > Starting nodes...
                > resource_manager@pulp.olearycomputers.com: OK
        
  3. Install admin client. Doesn’t have to be server or consumer.

    • Install required repos if not already done:

      • epel (yum)
      • rhel-pulp.repo (wget)
    • Install packages:

      yum install pulp-admin-client \
          pulp-rpm-admin-extensions \
          pulp-puppet-admin-extensions \
          pulp-docker-admin-extensions
      
    • Update hostnane in /etc/pulp/admin/admin.conf:

      [server]
      host: pulp.olearycomputers.com
      
  4. Install pulp consumer on all servers that will be consumers:

    • Install required repos if not already done:

      • epel (yum)
      • rhel-pulp.repo (wget)
    • Install packages:

      yum install pulp-consumer-client \
          pulp-rpm-consumer-extensions \
          pulp-puppet-consumer-extensions \
          pulp-agent pulp-rpm-handlers \
          pulp-rpm-yumplugins \
          pulp-puppet-handlers \
          python-gofer-qpid
      
    • Update hostname in /etc/pulp/consumer/consumer.conf

    • Enable/start the service:

      chkconfig goferd on service goferd start

Admin Client:

  • LL on ~/.pulp/admin.conf
  • Users:
    • Create users, roles, etc. Examples in command section.
    • Permissions. Create, read, update, delete, execute. Can be set on individual repos. Potentially useful.
    • Roles:
      • Default role: super-users
      • Rather than provide permissions to specific accounts, create roles which have permissions set, then add/delete users as needed.
      • Some users need to be in super-users to ensure maintainability:
# pulp-admin auth role user add --role-id super-users --login dkoleary

User [dkoleary] successfully added to role [super-users]

  • Groups: This will be the interesting one at work. Some interesting possiblilities just based on the reading:

    pulp-admin rpm consumer group package update \
        --name tzdata --consumer-group dev
    pulp-admin rpm consumer group update \
        --consumer-group qa
    
  • Repos:
    • rpm repo create doesn’t link a url with the pulp repo. Still need to find out how to do that.
    • I created centos6_base and centos6_updates for my testing.
    • I can group them together

Consumer client:

  • Registration must be done through authenticated account:

    # pulp-consumer -u dkoleary -p '3Pizda!!' register --consumer-id pulp
    Consumer [pulp] successfully registered
    

Repositories:

  • Add –feed=${url} to link a pulp repo to an external one.
  • Process:
    • Create the repo
    • Sync the repo
    • register consumers
    • Bind repos: