Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account
List archives

puppet, virtualenv, and .bashrc

Puppet 2.7 issue: Facter value not reflecting in puppet manifest
(90 lines)
Re: Re: Newbie: Confused about where to start managing users...
(130 lines)
Feb 8, 2012
Kevin C
Kevin C
Morning,

I am trying to do some environment setup on our developer's virtual
boxes that we use vagrant+puppet to build.  We install a python app,
create virtualenv's for the different pip requirements, etc.

Problem is that there are some custom bash macros that are available
in our virtualenv as they are sourced in the .bashrc

ie.,
~panama/.bashrc
{code}
...
source /usr/local/python/bin/virtualenvwrapper.sh
...
{code}

but when my puppet scripts tries to execute those macros, it's unable
to as it can't load the virtual env.

sample.pp
{code}
...
    exec { 'panama-eggs':
        path    => ["/bin","/usr/bin","/usr/local/python/bin"],
        environment => ['WORKON_HOME=/home/panama/.virtualenvs',
'PIP_LOG_FILE=/tmp/pip-freeze-prod.log', 'PIP_VIRTUALENV_BASE=/home/
panama/.virtualenvs', 'VIRTUALENVWRAPPER_PYTHON=/usr/local/python/bin/
python'],
        command => "workon dev && mmf_eggs",
        logoutput => "true",
        user  => "panama",
        group  => "panama",
        require => [Exec["mmf-panama-install"], Exec['symlink-panama-
post-activate']]
    }
...
{code}

results in:
...
err: /Stage[main]/Panama/Exec[panama-eggs]/returns: change from notrun
to 0 failed: sh: workon: command not found
...

fyi
# .bash_profile
if [ -f ~/.bashrc ]; then
   source ~/.bashrc

Any ideas on how to get puppet to recognize the macros in the "source /
usr/local/python/bin/virtualenvwrapper.sh" for user panama?

Cheers,

-Kevin





Reply
Tags: pippuppetpythonboxes
Messages in this thread
puppet, virtualenv, and .bashrc
reply Re: puppet, virtualenv, and .bashrc
(77 lines) Feb 8, 2012 08:44
reply Re: puppet, virtualenv, and .bashrc
(81 lines) Feb 8, 2012 11:01
reply Re: puppet, virtualenv, and .bashrc
(57 lines) Feb 8, 2012 14:13
reply Re: puppet, virtualenv, and .bashrc
(62 lines) Feb 9, 2012 08:31
pip and virtualenv
February 3, 2012 07:05:27 AM
Hello, I would like to use pip to install some python modules. The problem is that I want to keep all my stuff isolated. I saw this https://projects.puppetlabs.com/issues/7286 about virtualenv support. Anyone knows at what stage that is? Any…
Hosting the user password only, not the .bashrc and -bash_profile files
December 19, 2011 05:49:20 AM
Hi all, We have a number of server on which user "admin" exists, and that have manual modifications to its bashrc and bash_profile files. What I'd like to do is to host its user password from puppet master, but not the bash-files. I tries this…
PATCH/puppet 1/2] (#7707) Document signals in puppet agent and puppet master help
May 27, 2011 06:08:50 PM
Previously, the signals accepted by the agent and master daemons were only documented in the configuration reference, which didn't make any particular sense. This commit moves their documentation to a blurb in the relevant man pages. This is a doc…
PATCH/puppet 1/2] Moved perform_initial_import from Puppet::Resource::TypeCollection to Puppet::Node
August 13, 2010 06:14:25 PM
This change is part of an ongoing effort to remove functionality from TypeCollection that is not related to keeping track of a collection of types. This reduces TypeCollection's linkage to the environment, which is a step toward decoupling it from…
Puppet + Passenger error - /var/lib/puppet/.puppet
September 12, 2010 01:05:47 PM
I am trying to setup Puppet + Passenger with Apache. After initially setting it up, on the client I was getting 403 errors when trying to access /catalog, /plugins, etc. Pretty much anything that my client tried to access I received a 403 error. …
PATCH/puppet 3/3] Fixed #5952 - Added support for logdest in puppet.conf
January 20, 2011 05:19:24 PM
Behaviour is now: If logdest is specified on the command line this wins If setdest (for example running --no-daemonize) then this wins If neither is set then Puppet checks the logdest option in puppet.conf This defaults to syslog meaning current…
PATCH/puppet 2/2] (#6885) puppet agent fingerprint requires --verbose to return a value.
April 11, 2011 08:53:24 PM
Fix the spec test for agent fingerprinting with stubbing of puts. This is because it no longer uses the Puppet.logging functionality, so we need to stub Kernel as well. Signed-off-by: Ben Hughes <b### @puppetlabs.com> --- …
Puppet Standalone Client + Fileserving, not working.... (+ nice tutorial for puppet stand-alone) :)
July 28, 2010 12:15:19 PM
Puppet local fileserving not working, as described here: http://docs.reductivelabs.com/guides/modules.html I've made a project to demonstrate this: https://mindreframer@github.com/mindreframer/puppet_stand_alone_testing.git There is more in the…
PATCH/puppet 1/1] [Maint] Removed unused functionality from Puppet::Util::Autoload
September 9, 2010 05:32:01 PM
Removed the @autoloaders hash (and the classproxy declaration which enabled code to access it). This hash was only being stored into and never read. This made it possible to remove the "object" parameter to Autoload#initialize(), which was only…
PATCH/puppet 1/1] Prototype code for #7243 - Additional data in Puppet CSRs
June 29, 2011 07:54:54 PM
This adds the ability to add arbitrary attributes to Puppet certificate requests. It is controlled by setting the allow_csr_attributes setting in the puppet.conf configuration file on the Puppet agent. allow_csr_attributes = true This option…
(puppetlabs/puppet-docs) Closed pull request: Puppet doc template update
December 9, 2011 05:00:54 PM
On Fri Dec 09 22:46:05 UTC 2011 pull request #36 was closed. Puppet doc template update [Link: https://github.com/puppetlabs/puppet-docs/pull/36 ] requested by (ody) The pull request was merged by: jamtur01 -- You received this message…
PATCH/puppet 1/1] (#5913) Fix Puppet::Application.find constant lookup behavior
January 16, 2011 04:46:18 PM
Puppet::Application.find now only looks in the Puppet::Application namespace for the given constant. Signed-off-by: Mitchell Hashimoto <mitchell.### @gmail.com> --- lib/puppet/application.rb | 11 +++++++++-- …
(puppetlabs/puppet) Feature/2.7rc/11727 stdin support for puppet parser validate
January 20, 2012 11:01:33 AM
On Fri Jan 20 16:49:19 UTC 2012 pull request #349 was closed. Feature/2.7rc/11727 stdin support for puppet parser validate [Link: https://github.com/puppetlabs/puppet/pull/349 ] requested by (daniel-pittman) -- You received this message…
(puppetlabs/puppet-acceptance) Empty puppet.conf before adding the server definition.
January 29, 2012 07:15:39 PM
Please review pull request #124:Empty puppet.conf before adding the server definition. [Link: https://github.com/puppetlabs/puppet-acceptance/pull/124 ] opened by (daniel-pittman) Description: Previously/etc/puppet/puppet.confwould…
PATCH/puppet 1/1] (#7224) Add a helper to Puppet::SSL::Certificate to retrieve alternate names
June 14, 2011 07:07:54 PM
Alternate names, if present, are specified in the subjectAltName extension of the certificate. The values are in the form: "DNS:alternate_name1, DNS:alternate_name2" This helper will retrieve the value of the subjectAltName extension and extract…
PATCH/puppet 1/1] Prototype code for #7243 - Additional data in Puppet CSRs
June 29, 2011 06:24:34 PM
This adds the ability to add arbitrary attributes to Puppet certificate requests. It is controlled by setting the allow_csr_attributes setting in the puppet.conf configuration file on the Puppet agent. allow_csr_attributes = true This option…
(puppetlabs/puppet) Feature/2.7rc/11727 stdin support for puppet parser validate
January 19, 2012 04:16:23 PM
Please review pull request #349:Feature/2.7rc/11727 stdin support for puppet parser validate [Link: https://github.com/puppetlabs/puppet/pull/349 ] opened by (daniel-pittman) Description: * Opened: Thu Jan 19 22:14:30 UTC 2012 * Based…
(puppetlabs/puppet) New pull request: Puppet instrumentation test fixes for ruby 1.9.2
December 27, 2011 12:00:58 PM
Please review pull request #292:Puppet instrumentation test fixes for ruby 1.9.2 [Link: https://github.com/puppetlabs/puppet/pull/292 ] opened by (masterzen) Description: That's the ransom of not developing with ruby 1.9.2. Those tests…
(puppetlabs/puppet) New pull request: Fix puppet parser validate --ignoreimport [9670
December 14, 2011 10:30:43 PM
Please review pull request #274:Fix puppet parser validate --ignoreimport [9670] [Link: https://github.com/puppetlabs/puppet/pull/274 ] opened by (zsprackett) Description: Puppet parser validate --ignoreimport currently returns 0 when…
(puppetlabs/puppet) New pull request: Add stdin parsing to puppet parser validate
December 14, 2011 11:00:42 PM
Please review pull request #275:Add stdin parsing to puppet parser validate [Link: https://github.com/puppetlabs/puppet/pull/275 ] opened by (zsprackett) Description: Git pre-commit hooks everywhere relied on the stdin parsing that…
Virtualenv pip mysqldb mac os X python
February 10, 2011
I tried this http://jazstudios.blogspot.com/2010/07/installing-mysql-python-mysqldb-in.html tip to install mysql-python (mysqldb) inside a…
Nginx + uswgi + virtualenv + django configuration
June 22, 2011
I am trying to setup nginx + uwsgi + virtualenv + django on my machine (ubuntu 11.04). After installing nginx apt-get install nginx + uwsgi pip…
Django + gunicorn + virtualenv + Supervisord issue
February 14, 2011
Dear all, I have a strange issue with my virtualenv + gunicorn setup, only when gunicorn is launched via supervisord. I do realize that it may very…
Puppet + Passenger + Apache/Nginx
June 22, 2011
I'm working on a very large puppet deployment, but seem to be hitting a brick wall. My ideal setup is to use Nginx + Passenger to serve puppet. The…
How can I configure exim4 with a smarthost via puppet?
March 26, 2011
I have tried to automate the exim setup via puppet. I followed the approach described here , whiched worked for me for a few packages, but for exim…
Templating MySQL's my.cnf for setup in Puppet
February 18, 2011
I have been tasked with templating MySQL's my.cnf in an attempt standardize the configuration amongst the slave databases using Puppet. Right now,…
Is there any way to use arrays in a puppet module (not in template)?
May 10, 2010
I want to use puppet to manage a hadoop cluster. On the machines we have several directories which must be created and set permissions. But i'm…
Can't access MySQL database in Django VirtualEnv on localhost.
April 20, 2011
I have had a virtualenv for Trunk up and running for a while, but now I am trying to branch, and get things setup on another virtualenv for my…
Running Python from a virtualenv with Apache/mod_wsgi, on Windows
January 6, 2011
I'm trying to set up WAMP server. I've got Apache working correctly, and I've installed mod_wsgi without a hitch. Problem is, I'm using virtual…
Puppet defined resource - selective parameterization?
May 6, 2011
Hi all, I'm currently banging my head trying to find the "best way" to achieve this type of granularity for puppet: I have a server running…
Puppet offloading using NGINX, 403 forbidden error
May 21, 2011
I'm currently trying to offload some of the file serving puppet does using NGINX (As displayed here…