Task #2702


Install Plugins into Pulp 3 development env

Added by semyers over 6 years ago. Updated over 4 years ago.

Start date:
Due date:
% Done:


Estimated time:
Platform Release:
Sprint Candidate:
Dev Environment, Pulp 2


I recently added a task to the 3.0 dev playbook to install pulp_file into the platform virtualenv on install. As seen in the comments on that block, this is a bit of a placeholder just to get pulp_file into platform so that you can do fun things with the platform API.

We need to come up with a mechanism that ansible can easily use for installing plugins for Pulp 3. Maybe this is continuing to rely on each plugin providing a "" executable, maybe we require all plugins to be installable with "python develop"; whatever we go with would ideally be consistent across plugins.

In addition to installing plugins into the platform virtualenv for use together, we should also make sure to install plugins into their own virtualenvs, allowing them to be worked on in isolation from other plugins.

Actions #1

Updated by semyers over 6 years ago

I took a quick stab at adding a similar block to install the pulp_file plugin into its own VM:

diff --git a/ansible/roles/dev/tasks/main.yml b/ansible/roles/dev/tasks/main.yml
index eab0c9b..c2c6a06 100644
--- a/ansible/roles/dev/tasks/main.yml
+++ b/ansible/roles/dev/tasks/main.yml
@@ -153,6 +153,20 @@
       - pulp_file
   when: "{{ [item] | issubset(pulp_available_plugins) }}"

+# very similar to the previous task, with the same limitations based on the method of
+# development installs for pulp 3 plugins being undefined, except this installs each plugin package
+# in its own virtualenv so it can be worked on in isolation
+- name: Install Plugin packages into Plugin Virtualenvs
+  command: "{{ pulp_venv_dir }}/{{ item }}/bin/python develop"
+  args:
+    chdir: "{{ pulp_devel_dir }}/{{ item }}"
+  # If we stick with running develop for all plugins, we'd want to do it for all available
+  # plugins. For now, it only works with pulp_file
+  # with_items: "{{ pulp_available_plugins }}"
+  with_items:
+      - pulp_file
+  when: "{{ [item] | issubset(pulp_available_plugins) }}"
 - block:
   - name: Install crane config

While this did work, the platform code didn't appear to "see" the pulp.plugin entry point provided by pulp_file, so the app didn't get loaded by Django. I expect I'm missing something simple, but at the moment I'm not sure what.

Actions #2

Updated by over 6 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to
Actions #3

Updated by bmbouter over 6 years ago

@dkliban and I were talking about the vagrant environment being slimmed down to just include core by default and the developer installs their own plugin on top. We need to make that easy.

I think in terms of plugin installation methods there are three options.

a) python develop
b) python install
c) an rpm based installation of the plugin

I think we should never have plugins provide a

Actions #4

Updated by over 6 years ago

  • Status changed from ASSIGNED to CLOSED - COMPLETE

Some other changes make this task obsolete.

1. Plugins should not be installed into their own virtualenv, they must be installed into the same virtualenv as pulp. This is necessary for plugin discovery by the workers.
2. Recently, I moved the plugin install [0] to its own role, which uses the ansible `pip` module.

The `plugin` role will have to be updated only if we change how plugins are installed. Pulp plugins should be installed using one of the 3 methods in so I am closing the issue.


Actions #5

Updated by bmbouter over 6 years ago

  • Tags Dev Environment added
Actions #6

Updated by bmbouter over 4 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF