Skip to content

Instantly share code, notes, and snippets.

@aweiteka
Last active March 28, 2024 16:22
Show Gist options
  • Save aweiteka/2338a80a954e34717bc8 to your computer and use it in GitHub Desktop.
Save aweiteka/2338a80a954e34717bc8 to your computer and use it in GitHub Desktop.
Pulp in docker containers demo script

Running Pulp server in containers

In this screencast I demonstrate running Pulp as a set of Docker containers. Pulp is a repository management platform that now supports Docker images via a plugin. Porting the Pulp services to containers made sense given its service-oriented architecture.

Documentation

This screencast will be following the quickstart guide found on pulpproject.org. http://wwww.pulpproject.org https://github.com/aweiteka/pulp/blob/docker_quickstart/docs/sphinx/user-guide/docker-quickstart.rst

This diagram shows the containers and how they interact. There are separate containers for the apache web server, mongodb, qpid messaging and the distributed task queue. There is also a container for the docker registry end-point called crane.

Server installation

  1. We'll be running pulp on a RHEL7 VM. Any red hat-based distribution such as fedora or centos should also work. It has not been tested on debian-based distros.

     cat /etc/redhat-release
    
  2. Ensure docker daemon is running

     sudo systemctl status docker
    
  3. Pulp requires several TCP ports are open to incoming traffic. We'll use firewall-command to open the ports but iptables could also be used.

     sudo firewall-cmd --permanent --add-service http
     sudo firewall-cmd --permanent --add-service https
     sudo firewall-cmd --permanent --add-port 27017/tcp
     sudo firewall-cmd --permanent --add-port 5672/tcp
     sudo firewall-cmd --reload
    
  4. We've provided a simple install script to pull down the images and start the containers.

     curl -O https://github.com/aweiteka/pulp-dockerfiles/tree/master/centos/install_server.sh
    
  5. Before running the install script we'll need the host's IP address.

     hostname -i
    
  6. The IP address is the first argument to the install script

     bash install_server.sh $(hostname -i)
    
  7. The installer pulls down 7 images from the docker hub. This takes a while but only needs to be performed once. I have already downloaded the images to speed up the screencast. With the install script complete we can view the images.

     sudo docker images
    
  8. Now let's look at the containers that are running.

     $ sudo docker ps -a
    
  9. Pulp is now ready for content. See my other screencast for installing the remote client tools and publishing docker images.

@rafaelurrutiasilva
Copy link

It appears that the reference for point 4 should be directed to https://github.com/aweiteka/pulp-dockerfiles/blob/master/centos/install_pulp_server.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment