Project

Profile

Help

Issue #3318

closed

Can't set up Pulp 3 dev environment on non-Vagrant hosts

Added by Ichimonji10 over 6 years ago. Updated almost 4 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
Installer - Moved to GitHub issues
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

As a developer, it's currently possible to set up a Pulp 3 development environment on a Vagrant VM, using the pulp/devel repository (branch 3.0-dev). That repository contains a vagrant file (Vagrantfile.example) and Ansible playbook (pulp-from-source.yml) that work hand-in-hand to set up a Vagrant VM.

This is a great state of affairs until you decide to set up a development environment on a non-Vagrant host. There's any number of justifications for wanting to do this. Here's an idiosyncratic list:

  • For many people, learning how a virtualisation solution works is a necessary roadblock that stands them and productive work. If someone has become comfortable with RHEV, AWS, Linode, libvirt, beaker, or so on, what's the benefit in forcing them to re-visit a solved problem? I don't see any benefit, and I think that doing so may turn away potential contributors.
  • In my experience, Vagrant is extremely troublesome to work with. I've encountered segfaults while executing vagrant up, errors installing vagrant-libvirt, fishy cleanup logic, and more.
  • It will be easier for QE to troubleshoot certain issues if we can create Pulp installations with up-to-date code, as opposed to what's on PyPI. (The ability to perform a non-development from-source install would also be useful, but that's a separate conversation.)

How might this task be accomplished? At a high level, it's straightforward:

1. Run pulp-from-source.yml against a host.
2. Fix whatever errors are encountered.
3. Repeat as necessary.

So far, I've encountered an issue while executing the following task:

- name: check for pulp git repo
  include_role:
    name: common
    tasks_from: require_repo
  vars:
repo: pulp

This task fails with the following message:

The pulp git repo is not in /home/vagrant/devel. Either clone the repo or disable the corresponding role in the playbook.

The issue is that the existing Ansible dev installer assumes that the developer has code checked out on their bare-metal host, and that that code is mounted into the (Vagrant) VM. One good solution to this problem is to let the Ansible installer check for the presence of required git repositories. If they're absent, the installer can clone them. If they're present, the installer can leave them alone, so as to avoid disturbing the work a developer might be doing.

There are undoubtedly more issues that lie undiscovered. Such is coding.

Actions #1

Updated by Ichimonji10 about 6 years ago

Someone brought up a very good question. To paraphrase:

How does the installer know which plugins to install? Does it have an internal list that it uses to automagically decide?

No, the installer doesn't decide which plugins should be installed. You tell the installer which plugins to install. Consider this snippet from the pulp-from-source.yml playbook:

  roles:
    - pulp-user
    - db
    - broker
    - lazy
    - dev
    - {role: plugin, plugin_name: 'pulp_file', app_label: 'pulp_file'}
    - systemd
    - dev_tools

In this case, pulpcore and pulp_file will be installed. If you don't want pulp_file to be installed, or if you want other plugins to be installed, list different roles in this playbook.

Actions #2

Updated by Ichimonji10 about 6 years ago

  • Subject changed from As a developer, I can set up a Pulp 3 development environment on a non-Vagrant host to Can't set up dev environment in non-Vagrant hosts
Actions #3

Updated by Ichimonji10 about 6 years ago

  • Subject changed from Can't set up dev environment in non-Vagrant hosts to Can't set up Pulp 3 dev environment on non-Vagrant hosts
Actions #4

Updated by dalley about 6 years ago

  • Triaged changed from No to Yes
Actions #5

Updated by bmbouter about 5 years ago

  • Status changed from NEW to CLOSED - WONTFIX
Actions #6

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added
Actions #7

Updated by bmbouter almost 4 years ago

  • Category set to Installer - Moved to GitHub issues
  • Tags deleted (Pulp 3 installer)

Also available in: Atom PDF