A new way to develop pulp

I’ve been working on a new developer environment for pulp that makes use of the pulp OCI images and takes inspiration from the galaxy_ng developer environment. Check it out here: https://github.com/newswangerd/oci_env

The new environment uses docker compose along with the pulp-ci-centos container image to launch a pulp container with a user specified set of plugins installed from source.

It features:

  • Fast build times (~60 seconds to launch pulpcore + pulp_ansible from source)
  • Scripts to run integration tests in the container
  • Composable configurations that allow plugins to ship the settings that they need to fully run out of the box
  • Automatic server restarts when code changes
  • A pluggable configuration system that allows for external services (database, UIs, object stores) to be added to the environment.

Here’s a short demo for anyone interested: https://youtu.be/aqoJmDIWAyM

9 Likes

This is great! Thank you for sharing with us!
Maybe at some point we could add this to our docs.

My end goal is to contribute this as an official way to develop pulp. @bmbouter and @fao89 have expressed interest in adding this to the pulp OCI image repository. Right now I’ve just been committing the development profiles I’m using to the environment repo. The environment also has support for plugins to ship their own configuration profiles, so if this gets official support then plugin writers can commit the configurations that are needed to run each plugin out of the box. The idea is I should be able to pick any set of plugins I want to run, specify their default profiles and have everything work without any extra configuration.

We’ll probably need to add support for podman compose before this gets adopted by pulp. I’m happy to receive contributions if someone wants to take a crack at that!

1 Like

This is fantastic! I haven’t tried it yet but I’m hoping it means I never have to reprovision a vagrant environment to give it more RAM again… or disk space…

This project turned into a Python based CLI called oci-env. Right now the CLI provides the following commands:

$ oci-env --help
usage: oci-env [-h] [-v] {compose,exec,shell,test,generate-client,pulpcore-manager} ...

Pulp OCI image developer environment.

positional arguments:
  {compose,exec,shell,test,generate-client,pulpcore-manager}
    compose             Run any podman or docker-compose script.
    exec                Run a command using podman/docker exec. This bypasses docker/podman-compose.
    shell               Launch an interactive shell.
    test                Run tests and install requirements.
    generate-client     Generate the the pulp client.
    pulpcore-manager    Run a pulpcore-manager command.

options:
  -h, --help            show this help message and exit
  -v                    Print extra debug information.

Get started by following the instructions in the README.

3 Likes

I gave a short demo of this and posted it to our youtube video: https://youtu.be/F0ITqd6MGKI

2 Likes