From eec58589feaaafd6e3f4e8500df48f5ed833bbdf Mon Sep 17 00:00:00 2001 From: James Carr Date: Thu, 30 May 2013 22:30:15 -0500 Subject: Added owner and group params for virtualenv. --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index aafff6a..5a4c8b5 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,11 @@ Creates Python virtualenv. **distribute** — Include distribute in the virtualenv. Default: true +** owner ** - specify the owner of this virtualenv + +** group ** - specify the group for this virtualenv + + python::virtualenv { '/var/www/project1': ensure => present, version => 'system', @@ -77,6 +82,8 @@ Creates Python virtualenv. proxy => 'http://proxy.domain.com:3128', systempkgs => true, distribute => false, + owner => 'appuser', + group => 'apps', } ### python::gunicorn -- cgit v1.2.3 From 01bf2791ecadfbb954b947fefa8b15ca0c0b9947 Mon Sep 17 00:00:00 2001 From: Fotis Gimian Date: Tue, 4 Jun 2013 09:36:33 +1000 Subject: Amended all documentation and updated version to 1.1.0 --- README.md | 87 +++++++++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 59 insertions(+), 28 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 5a4c8b5..1108ba0 100644 --- a/README.md +++ b/README.md @@ -3,19 +3,36 @@ Puppet module for installing and managing python, pip, virtualenvs and Gunicorn virtual hosts. +**Version 1.1.0 Notes** + +Version 1.1.0 makes several fundamental changes to the core of this module, adding some additional features, improving performance and making operations more robust in general. + +Please note that everal changes have been made in v1.1.0 which make manifests incompatible with the previous version. However, modifying your manifests to suit is trivial. Please see the notes below. + +Currently, the changes you need to make are as follows: + +* All pip definitions MUST include the owner field which specifies which user owns the virtualenv that packages will be installed in. Adding this greatly improves performance and efficiency of this module. + +## Installation + +``` bash +cd /etc/puppet/modules +git clone git://github.com/stankevich/puppet-python.git +``` + ## Usage ### python Installs and manages python, python-dev, python-virtualenv and Gunicorn. -**version** — Python version to install. Default: system default +**version** - Python version to install. Default: system default -**dev** — Install python-dev. Default: false +**dev** - Install python-dev. Default: false -**virtualenv** — Install python-virtualenv. Default: false +**virtualenv** - Install python-virtualenv. Default: false -**gunicorn** — Install Gunicorn. Default: false +**gunicorn** - Install Gunicorn. Default: false class { 'python': version => 'system', @@ -28,52 +45,65 @@ Installs and manages python, python-dev, python-virtualenv and Gunicorn. Installs and manages packages from pip. -**ensure** — present/absent. Default: present +**ensure** - present/absent. Default: present -**virtualenv** — virtualenv to run pip in. +**virtualenv** - virtualenv to run pip in. Default: system (no virtualenv) -**url** — URL to install from. Default: none +**url** - URL to install from. Default: none -**proxy** — Proxy server to use for outbound connections. Default: none +**owner** - The owner of the virtualenv to ensure that packages are installed with the correct permissions (must be specified). Default: root - python::pip { 'flask': - virtualenv => '/var/www/project1', - proxy => 'http://proxy.domain.com:3128', +**proxy** - Proxy server to use for outbound connections. Default: none + +**environment** - Additional environment variables required to install the packages. Default: none + + python::pip { 'cx_Oracle': + virtualenv => '/var/www/project1', + owner => 'appuser', + proxy => 'http://proxy.domain.com:3128', + environment => 'ORACLE_HOME=/usr/lib/oracle/11.2/client64', } ### python::requirements Installs and manages Python packages from requirements file. -**virtualenv** — virtualenv to run pip in. Default: system-wide +**virtualenv** - virtualenv to run pip in. Default: system-wide + +**proxy** - Proxy server to use for outbound connections. Default: none + +**owner** - The owner of the virtualenv to ensure that packages are installed with the correct permissions (must be specified). Default: root -**proxy** — Proxy server to use for outbound connections. Default: none +**group** - The group that was used to create the virtualenv. This is used to create the requirements file with correct permissions if it's not present already. python::requirements { '/var/www/project1/requirements.txt': virtualenv => '/var/www/project1', proxy => 'http://proxy.domain.com:3128', + owner => 'appuser', + group => 'apps', } ### python::virtualenv Creates Python virtualenv. -**ensure** — present/absent. Default: present +**ensure** - present/absent. Default: present -**version** — Python version to use. Default: system default +**version** - Python version to use. Default: system default -**requirements** — Path to pip requirements.txt file. Default: none +**requirements** - Path to pip requirements.txt file. Default: none -**proxy** — Proxy server to use for outbound connections. Default: none +**proxy** - Proxy server to use for outbound connections. Default: none -**systempkgs** — Copy system site-packages into virtualenv. Default: don't +**systempkgs** - Copy system site-packages into virtualenv. Default: don't -**distribute** — Include distribute in the virtualenv. Default: true +**distribute** - Include distribute in the virtualenv. Default: true -** owner ** - specify the owner of this virtualenv +**owner** - Specify the owner of this virtualenv -** group ** - specify the group for this virtualenv +**group** - Specify the group for this virtualenv +**index** - Base URL of Python package index. Default: none python::virtualenv { '/var/www/project1': ensure => present, @@ -90,19 +120,19 @@ Creates Python virtualenv. Manages Gunicorn virtual hosts. -**ensure** — present/absent. Default: present +**ensure** - present/absent. Default: present -**virtualenv** — Run in virtualenv, specify directory. Default: disabled +**virtualenv** - Run in virtualenv, specify directory. Default: disabled -**mode** — Gunicorn mode. wsgi/django. Default: wsgi +**mode** - Gunicorn mode. wsgi/django. Default: wsgi -**dir** — Application directory. +**dir** - Application directory. -**bind** — Bind on: 'HOST', 'HOST:PORT', 'unix:PATH'. Default: unix:/tmp/gunicorn-$name.socket or unix:${virtualenv}/${name}.socket +**bind** - Bind on: 'HOST', 'HOST:PORT', 'unix:PATH'. Default: unix:/tmp/gunicorn-$name.socket or unix:${virtualenv}/${name}.socket -**environment** — Set ENVIRONMENT variable. Default: none +**environment** - Set ENVIRONMENT variable. Default: none -**template** — Which ERB template to use. Default: python/gunicorn.erb +**template** - Which ERB template to use. Default: python/gunicorn.erb python::gunicorn { 'vhost': ensure => present, @@ -119,3 +149,4 @@ Manages Gunicorn virtual hosts. [Sergey Stankevich](https://github.com/stankevich) [Ashley Penney](https://github.com/apenney) [Marc Fournier](https://github.com/mfournier) +[Fotis Gimian](https://github.com/fgimian) -- cgit v1.2.3 From 17debdc04506a2bfd4297b7620acffdbd01c9176 Mon Sep 17 00:00:00 2001 From: Fotis Gimian Date: Tue, 4 Jun 2013 10:20:38 +1000 Subject: Made the pip package independent from the dev package in the python class and updated version to 1.1.1 --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 1108ba0..d072b76 100644 --- a/README.md +++ b/README.md @@ -3,15 +3,16 @@ Puppet module for installing and managing python, pip, virtualenvs and Gunicorn virtual hosts. -**Version 1.1.0 Notes** +**Version 1.1.1 Notes** -Version 1.1.0 makes several fundamental changes to the core of this module, adding some additional features, improving performance and making operations more robust in general. +Version 1.1.1 makes several fundamental changes to the core of this module, adding some additional features, improving performance and making operations more robust in general. -Please note that everal changes have been made in v1.1.0 which make manifests incompatible with the previous version. However, modifying your manifests to suit is trivial. Please see the notes below. +Please note that everal changes have been made in v1.1.1 which make manifests incompatible with the previous version. However, modifying your manifests to suit is trivial. Please see the notes below. Currently, the changes you need to make are as follows: * All pip definitions MUST include the owner field which specifies which user owns the virtualenv that packages will be installed in. Adding this greatly improves performance and efficiency of this module. +* You must explicitly specify pip => true in the python class if you want pip installed. As such, the pip package is now independent of the dev package and so one can exist without the other. ## Installation @@ -28,6 +29,8 @@ Installs and manages python, python-dev, python-virtualenv and Gunicorn. **version** - Python version to install. Default: system default +**pip** - Install python-pip. Default: false + **dev** - Install python-dev. Default: false **virtualenv** - Install python-virtualenv. Default: false -- cgit v1.2.3 From a6d9f59d0bd9c27e1fd9668b926913c44dfb52e6 Mon Sep 17 00:00:00 2001 From: Fotis Gimian Date: Tue, 4 Jun 2013 11:26:46 +1000 Subject: Incremented version to 1.1.2 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index d072b76..2cf6b7d 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,11 @@ Puppet module for installing and managing python, pip, virtualenvs and Gunicorn virtual hosts. -**Version 1.1.1 Notes** +**Version 1.1.x Notes** -Version 1.1.1 makes several fundamental changes to the core of this module, adding some additional features, improving performance and making operations more robust in general. +Version 1.1.x makes several fundamental changes to the core of this module, adding some additional features, improving performance and making operations more robust in general. -Please note that everal changes have been made in v1.1.1 which make manifests incompatible with the previous version. However, modifying your manifests to suit is trivial. Please see the notes below. +Please note that everal changes have been made in v1.1.x which make manifests incompatible with the previous version. However, modifying your manifests to suit is trivial. Please see the notes below. Currently, the changes you need to make are as follows: -- cgit v1.2.3 From 96e50bf5038add993258f6d8f4b317cf3c779d33 Mon Sep 17 00:00:00 2001 From: Fotis Gimian Date: Tue, 4 Jun 2013 12:04:18 +1000 Subject: Fixed minor typo in installation instructions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 2cf6b7d..971bbe8 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Currently, the changes you need to make are as follows: ``` bash cd /etc/puppet/modules -git clone git://github.com/stankevich/puppet-python.git +git clone git://github.com/stankevich/puppet-python.git python ``` ## Usage -- cgit v1.2.3 From 07e6cc6b3d2afa25be0ae829c5bff8385c2815f3 Mon Sep 17 00:00:00 2001 From: Fotis Gimian Date: Tue, 4 Jun 2013 12:15:01 +1000 Subject: Changed documentation to reflect that it's a fork and that I will be maintaining it --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 971bbe8..9e35e36 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ -[puppet-python](https://github.com/stankevich/puppet-python) +[puppet-python](https://github.com/fgimian/puppet-python) ====== -Puppet module for installing and managing python, pip, virtualenvs and Gunicorn virtual hosts. +This project was forked from [stankevich's Github page](https://github.com/stankevich/puppet-python) -**Version 1.1.x Notes** +Puppet module for installing and managing python, pip, virtualenvs and Gunicorn virtual hosts. This fork makes several fundamental changes to the core of this module, adding some additional features, improving performance and making operations more robust in general. + +**Version 1.1.x Notes (fgimian fork)** Version 1.1.x makes several fundamental changes to the core of this module, adding some additional features, improving performance and making operations more robust in general. @@ -18,7 +20,7 @@ Currently, the changes you need to make are as follows: ``` bash cd /etc/puppet/modules -git clone git://github.com/stankevich/puppet-python.git python +git clone git://github.com/fgimian/puppet-python.git python ``` ## Usage -- cgit v1.2.3 From 006692eceb86079ab4c0976c978d705b160217f0 Mon Sep 17 00:00:00 2001 From: Fotis Gimian Date: Thu, 13 Jun 2013 08:30:19 +1000 Subject: Reverted documentation to reflect Sergey as the owner now that the pull request was accepted --- README.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 9e35e36..971bbe8 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,9 @@ -[puppet-python](https://github.com/fgimian/puppet-python) +[puppet-python](https://github.com/stankevich/puppet-python) ====== -This project was forked from [stankevich's Github page](https://github.com/stankevich/puppet-python) +Puppet module for installing and managing python, pip, virtualenvs and Gunicorn virtual hosts. -Puppet module for installing and managing python, pip, virtualenvs and Gunicorn virtual hosts. This fork makes several fundamental changes to the core of this module, adding some additional features, improving performance and making operations more robust in general. - -**Version 1.1.x Notes (fgimian fork)** +**Version 1.1.x Notes** Version 1.1.x makes several fundamental changes to the core of this module, adding some additional features, improving performance and making operations more robust in general. @@ -20,7 +18,7 @@ Currently, the changes you need to make are as follows: ``` bash cd /etc/puppet/modules -git clone git://github.com/fgimian/puppet-python.git python +git clone git://github.com/stankevich/puppet-python.git python ``` ## Usage -- cgit v1.2.3 From 4f2c04b70452249e6917859fdbf02bd90ec3af79 Mon Sep 17 00:00:00 2001 From: Antonis Christofides Date: Tue, 8 Oct 2013 17:59:17 +0300 Subject: Added src parameter for pip in python::requirements A requirements file can have --editable resources; in such a case the pip default is to install them in ~/src/, which can be unsuitable; for example, if run by root, /root/src/ is usually unreadable by other users. pip provides an --src parameter to specify an alternative directory. This is useful for installing requirements systemwide, outside a virtualenv. --- README.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 971bbe8..7fa9dac 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,8 @@ Installs and manages Python packages from requirements file. **owner** - The owner of the virtualenv to ensure that packages are installed with the correct permissions (must be specified). Default: root +**src** - The ``--src`` parameter to ``pip``, used to specify where to install ``--editable`` resources; by default no ``--src`` parameter is passed to ``pip``. + **group** - The group that was used to create the virtualenv. This is used to create the requirements file with correct permissions if it's not present already. python::requirements { '/var/www/project1/requirements.txt': -- cgit v1.2.3 From f7718f0d9b6184328a301dbcbbd6e5346c8c1f0a Mon Sep 17 00:00:00 2001 From: Vik Bhatti Date: Tue, 15 Oct 2013 15:23:42 +0100 Subject: Updated docs to include egg param --- README.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 7fa9dac..b8544f4 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,8 @@ Installs and manages packages from pip. **environment** - Additional environment variables required to install the packages. Default: none +**egg** - The egg name to use. Default: $name of the class, e.g. cx_Oracle + python::pip { 'cx_Oracle': virtualenv => '/var/www/project1', owner => 'appuser', -- cgit v1.2.3 From e7b0e1475daaf778861220835a01c7c6f699a2b8 Mon Sep 17 00:00:00 2001 From: Vik Bhatti Date: Tue, 15 Oct 2013 15:29:37 +0100 Subject: Updated readme to include install and uninstall args --- README.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index b8544f4..a259470 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,10 @@ Installs and manages packages from pip. **egg** - The egg name to use. Default: $name of the class, e.g. cx_Oracle +**install_args** - Array of additional flags to pass to pip during installaton. Default: none + +**uninstall_args** - Array of additional flags to pass to pip during uninstall. Default: none + python::pip { 'cx_Oracle': virtualenv => '/var/www/project1', owner => 'appuser', -- cgit v1.2.3 From 31d96b912c16f82aa61d581a443a9b4c52914aa9 Mon Sep 17 00:00:00 2001 From: Vik Bhatti Date: Tue, 15 Oct 2013 15:30:43 +0100 Subject: Updated python::pip example to include install_args --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index a259470..e9a2b85 100644 --- a/README.md +++ b/README.md @@ -67,10 +67,11 @@ Installs and manages packages from pip. **uninstall_args** - Array of additional flags to pass to pip during uninstall. Default: none python::pip { 'cx_Oracle': - virtualenv => '/var/www/project1', - owner => 'appuser', - proxy => 'http://proxy.domain.com:3128', - environment => 'ORACLE_HOME=/usr/lib/oracle/11.2/client64', + virtualenv => '/var/www/project1', + owner => 'appuser', + proxy => 'http://proxy.domain.com:3128', + environment => 'ORACLE_HOME=/usr/lib/oracle/11.2/client64', + install_args => ['-e'], } ### python::requirements -- cgit v1.2.3 From c45a37b5819d3c0dab423b93cefb31e65bddad9d Mon Sep 17 00:00:00 2001 From: Justin Quick Date: Thu, 7 Nov 2013 16:03:28 -0500 Subject: docs --- README.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index e9a2b85..cea0c2d 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,10 @@ Creates Python virtualenv. **index** - Base URL of Python package index. Default: none +**cwd** - The directory from which to run the "pip install" command. Default: undef + +**timeout** - The maximum time in seconds the "pip install" command should take. Default: 1800 + python::virtualenv { '/var/www/project1': ensure => present, version => 'system', -- cgit v1.2.3 From 343788fcd8b64f494145c07c41a39c1afd6eafd6 Mon Sep 17 00:00:00 2001 From: Justin Quick Date: Thu, 7 Nov 2013 16:04:30 -0500 Subject: example docs --- README.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index cea0c2d..ec30953 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,8 @@ Creates Python virtualenv. distribute => false, owner => 'appuser', group => 'apps', + cwd => '/var/www/project1', + timeout => 0, } ### python::gunicorn -- cgit v1.2.3 From 2d0f8216ab222a533d05d31331267b180c3aac47 Mon Sep 17 00:00:00 2001 From: Justin Quick Date: Thu, 7 Nov 2013 16:05:12 -0500 Subject: ws fix --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index ec30953..0bcd952 100644 --- a/README.md +++ b/README.md @@ -130,8 +130,8 @@ Creates Python virtualenv. distribute => false, owner => 'appuser', group => 'apps', - cwd => '/var/www/project1', - timeout => 0, + cwd => '/var/www/project1', + timeout => 0, } ### python::gunicorn -- cgit v1.2.3 From 8bf9aac814812d0235ee5aa08e097d6dd03c188d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hubert=20Jagodzi=C5=84ski?= Date: Mon, 18 Nov 2013 08:27:57 +0100 Subject: Add to python::pip ensure => latest --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 0bcd952..751376a 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Installs and manages python, python-dev, python-virtualenv and Gunicorn. Installs and manages packages from pip. -**ensure** - present/absent. Default: present +**ensure** - present/latest/absent. Default: present **virtualenv** - virtualenv to run pip in. Default: system (no virtualenv) -- cgit v1.2.3 From fdf81012ea5f3d8124c86f41d91e4e97f769bc80 Mon Sep 17 00:00:00 2001 From: Daniel Lawrence Date: Fri, 29 Nov 2013 22:23:23 +1100 Subject: added manage_gunicorn docs --- README.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 751376a..6aa0c98 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,8 @@ Installs and manages python, python-dev, python-virtualenv and Gunicorn. **gunicorn** - Install Gunicorn. Default: false +**manage_gunicorn** - Allow Installation / Removal of Gunicorn. Default: true + class { 'python': version => 'system', dev => true, -- cgit v1.2.3 From 4859c8968d41380a094c911c7d2db8aad234b480 Mon Sep 17 00:00:00 2001 From: Ezekiel Smithburg Date: Fri, 14 Mar 2014 16:21:37 -0700 Subject: Document newly required pkgname option for pip. --- README.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 6aa0c98..444b3b7 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,8 @@ Installs and manages python, python-dev, python-virtualenv and Gunicorn. Installs and manages packages from pip. +**pkgname** - the name of the package to install. Required. + **ensure** - present/latest/absent. Default: present **virtualenv** - virtualenv to run pip in. Default: system (no virtualenv) @@ -69,6 +71,7 @@ Installs and manages packages from pip. **uninstall_args** - Array of additional flags to pass to pip during uninstall. Default: none python::pip { 'cx_Oracle': + pkgname => 'cx_Oracle', virtualenv => '/var/www/project1', owner => 'appuser', proxy => 'http://proxy.domain.com:3128', -- cgit v1.2.3 From 95747cdbb5e5e7378fd2a8f74a01f0d44bf90e74 Mon Sep 17 00:00:00 2001 From: Steven Pecht Date: Wed, 7 May 2014 14:18:26 -0400 Subject: Added timeout option to python::pip The default timeout is set to 1800. The same default as virtual environement installations. A timeout parameter is needed for long running installs such as SciPy. --- README.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 444b3b7..3632cd8 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,8 @@ Installs and manages packages from pip. **uninstall_args** - Array of additional flags to pass to pip during uninstall. Default: none +**timeout** - Timeout for the pip install command. Defaults to 1800. + python::pip { 'cx_Oracle': pkgname => 'cx_Oracle', virtualenv => '/var/www/project1', @@ -77,6 +79,7 @@ Installs and manages packages from pip. proxy => 'http://proxy.domain.com:3128', environment => 'ORACLE_HOME=/usr/lib/oracle/11.2/client64', install_args => ['-e'], + timeout => 1800, } ### python::requirements -- cgit v1.2.3 From 4b06f6e9a88e8fab01de377875ba78e442827b77 Mon Sep 17 00:00:00 2001 From: kracekumar Date: Wed, 21 May 2014 00:32:00 +0530 Subject: Fixed several spelling mistake --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 3632cd8..449c74f 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Puppet module for installing and managing python, pip, virtualenvs and Gunicorn Version 1.1.x makes several fundamental changes to the core of this module, adding some additional features, improving performance and making operations more robust in general. -Please note that everal changes have been made in v1.1.x which make manifests incompatible with the previous version. However, modifying your manifests to suit is trivial. Please see the notes below. +Please note that several changes have been made in v1.1.x which make manifests incompatible with the previous version. However, modifying your manifests to suit is trivial. Please see the notes below. Currently, the changes you need to make are as follows: -- cgit v1.2.3 From 73cfe738d9ff08a18e596f6e1c7e79ff6b972391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Gali=C4=87?= Date: Fri, 30 May 2014 15:54:16 +0200 Subject: introduce puppet syntax hilighting we also normalize tabs to spaces --- README.md | 97 ++++++++++++++++++++++++++++++++++----------------------------- 1 file changed, 53 insertions(+), 44 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 449c74f..3ac9715 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Currently, the changes you need to make are as follows: ## Installation -``` bash +``` shell cd /etc/puppet/modules git clone git://github.com/stankevich/puppet-python.git python ``` @@ -39,12 +39,14 @@ Installs and manages python, python-dev, python-virtualenv and Gunicorn. **manage_gunicorn** - Allow Installation / Removal of Gunicorn. Default: true - class { 'python': - version => 'system', - dev => true, - virtualenv => true, - gunicorn => true, - } +```puppet + class { 'python': + version => 'system', + dev => true, + virtualenv => true, + gunicorn => true, + } } +``` ### python::pip @@ -71,16 +73,17 @@ Installs and manages packages from pip. **uninstall_args** - Array of additional flags to pass to pip during uninstall. Default: none **timeout** - Timeout for the pip install command. Defaults to 1800. - - python::pip { 'cx_Oracle': - pkgname => 'cx_Oracle', - virtualenv => '/var/www/project1', - owner => 'appuser', - proxy => 'http://proxy.domain.com:3128', - environment => 'ORACLE_HOME=/usr/lib/oracle/11.2/client64', - install_args => ['-e'], - timeout => 1800, - } +```puppet + python::pip { 'cx_Oracle': + pkgname => 'cx_Oracle', + virtualenv => '/var/www/project1', + owner => 'appuser', + proxy => 'http://proxy.domain.com:3128', + environment => 'ORACLE_HOME=/usr/lib/oracle/11.2/client64', + install_args => ['-e'], + timeout => 1800, + } +``` ### python::requirements @@ -96,12 +99,14 @@ Installs and manages Python packages from requirements file. **group** - The group that was used to create the virtualenv. This is used to create the requirements file with correct permissions if it's not present already. - python::requirements { '/var/www/project1/requirements.txt': - virtualenv => '/var/www/project1', - proxy => 'http://proxy.domain.com:3128', - owner => 'appuser', - group => 'apps', - } +```puppet + python::requirements { '/var/www/project1/requirements.txt': + virtualenv => '/var/www/project1', + proxy => 'http://proxy.domain.com:3128', + owner => 'appuser', + group => 'apps', + } +``` ### python::virtualenv @@ -129,18 +134,20 @@ Creates Python virtualenv. **timeout** - The maximum time in seconds the "pip install" command should take. Default: 1800 - python::virtualenv { '/var/www/project1': - ensure => present, - version => 'system', - requirements => '/var/www/project1/requirements.txt', - proxy => 'http://proxy.domain.com:3128', - systempkgs => true, - distribute => false, - owner => 'appuser', - group => 'apps', - cwd => '/var/www/project1', - timeout => 0, - } +```puppet + python::virtualenv { '/var/www/project1': + ensure => present, + version => 'system', + requirements => '/var/www/project1/requirements.txt', + proxy => 'http://proxy.domain.com:3128', + systempkgs => true, + distribute => false, + owner => 'appuser', + group => 'apps', + cwd => '/var/www/project1', + timeout => 0, + } +``` ### python::gunicorn @@ -160,15 +167,17 @@ Manages Gunicorn virtual hosts. **template** - Which ERB template to use. Default: python/gunicorn.erb - python::gunicorn { 'vhost': - ensure => present, - virtualenv => '/var/www/project1', - mode => 'wsgi', - dir => '/var/www/project1/current', - bind => 'unix:/tmp/gunicorn.socket', - environment => 'prod', - template => 'python/gunicorn.erb', - } +```puppet + python::gunicorn { 'vhost': + ensure => present, + virtualenv => '/var/www/project1', + mode => 'wsgi', + dir => '/var/www/project1/current', + bind => 'unix:/tmp/gunicorn.socket', + environment => 'prod', + template => 'python/gunicorn.erb', + } +``` ## Authors -- cgit v1.2.3 From e7a48690fc2597a11a566b74f13c82aa48e9511b Mon Sep 17 00:00:00 2001 From: GaleDragon Date: Tue, 17 Jun 2014 15:36:49 -0400 Subject: Update README.md Added a note that if the resource name is not an absolute path you need to include that path in the options. Added after personal experience. --- README.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 3ac9715..cb0b712 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,8 @@ Creates Python virtualenv. **distribute** - Include distribute in the virtualenv. Default: true +**venv_dir** - The location of the virtualenv if resource path not specified. Must be absolute path. Default: resource name + **owner** - Specify the owner of this virtualenv **group** - Specify the group for this virtualenv @@ -142,6 +144,7 @@ Creates Python virtualenv. proxy => 'http://proxy.domain.com:3128', systempkgs => true, distribute => false, + venv_dir => '/home/appuser/virtualenvs', owner => 'appuser', group => 'apps', cwd => '/var/www/project1', -- cgit v1.2.3