Issue #3318
closedCan't set up Pulp 3 dev environment on non-Vagrant hosts
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.
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.
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
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
Updated by bmbouter about 5 years ago
- Status changed from NEW to CLOSED - WONTFIX
Updated by bmbouter almost 4 years ago
- Category set to Installer - Moved to GitHub issues
- Tags deleted (
Pulp 3 installer)