Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-1088

manage python virtualenvs

    XMLWordPrintable

Details

    Description

      I've been puzzling over how to do python package management via puppet for awhile now.

      The obvious bit is to implement a package provider for python packages using pip as the backend, using the gem provider as a template. The problem is that most python developers (people who care enough to not just use their distribution's python library packages) use VirtualEnv to maintain separate environments per deployed application. With virtualenv, there is a 1-many correspondence between nodes and python environments, which is incompatible with package providers as I understand them.

      Can some Puppet core person comment on how they would ideally model managed virtualenvs under puppet?

      just to get things working I'm planning to have two defines:

      python::virtualenv(root, ...)

      • just makes an empty env

      python::app(root, source (vcs, tarball, or etc), virtualenv (could be None), requirements (list or filename within package, in "pip freeze" format))

      • install a python app, run pip to install dependency list
      • derivative defines to config WSGI apps etc

      Here are some references:

      Attachments

        Activity

          People

            Unassigned Unassigned
            redmine.exporter redmine.exporter
            Eric Thompson Eric Thompson
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support