• This repository has been archived on 02/Oct/2018
  • Stars
    star
    571
  • Rank 78,127 (Top 2 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 12 years ago
  • Updated about 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

THIS COOKBOOK IS DEPRECATED – Chef cookbook to install Python and related tools

python Cookbook

Build Status

Installs and configures Python. Also includes LWRPs for managing python packages with pip and virtualenv isolated Python environments.

THIS COOKBOOK IS DEPRECATED

Poise-python is a vastly better cookbook for managing Python-related things. This cookbook will remain for compatibility but any future release will only be to gut it and turn it into a wrapper for poise-python.

I REPEAT, THIS COOKBOOK IS DEPRECATED

Requirements

Platforms

  • Debian, Ubuntu
  • CentOS, Red Hat, Fedora

Cookbooks

  • build-essential
  • yum

NOTE: The yum cookbook is a dependency of the cookbook, and will be used to install EPEL on RedHet/CentOS 5.x systems to provide the Python 2.6 packages.

Attributes

See attributes/default.rb for default values.

  • node["python"]["install_method"] - method to install python with, default package.

The file also contains the following attributes:

  • platform specific locations and settings
  • source installation settings

Resource/Provider

This cookbook includes LWRPs for managing:

  • pip packages
  • virtualenv isolated Python environments

python_pip

Install packages using the new hotness in Python package management...pip. Yo dawg...easy_install is so 2009, you better ask your local Pythonista if you don't know! The usage semantics are like that of any normal package provider.

Actions

  • :install: Install a pip package - if version is provided, install that specific version (default)
  • :upgrade: Upgrade a pip package - if version is provided, upgrade to that specific version
  • :remove: Remove a pip package
  • :user: User to run pip as, for using with virtualenv
  • :group: Group to run pip as, for using with virtualenv
  • :purge: Purge a pip package (this usually entails removing configuration files as well as the package itself). With pip packages this behaves the same as :remove

Attribute Parameters

  • package_name: name attribute. The name of the pip package to install
  • version: the version of the package to install/upgrade. If no version is given latest is assumed.
  • virtualenv: virtualenv environment to install pip package into
  • options: Add additional options to the underlying pip package command
  • timeout: timeout in seconds for the command to execute. Useful for pip packages that may take a long time to install. Default 900 seconds.

Examples

# install latest gunicorn into system path
python_pip "gunicorn"

# target a virtualenv
python_pip "gunicorn" do
  virtualenv "/home/ubuntu/my_ve"
end
# install Django 1.1.4
python_pip "django" do
  version "1.1.4"
end

python_virtualenv

virtualenv is a great tool that creates isolated python environments. Think of it as RVM without all those hipsters and tight jeans.

Actions

  • :create: creates a new virtualenv
  • :delete: deletes an existing virtualenv

Attribute Parameters

  • path: name attribute. The path where the virtualenv will be created
  • interpreter: The Python interpreter to use. default is null (i.e. use whatever python the virtualenv command is using).
  • owner: The owner for the virtualenv
  • group: The group owner of the file (string or id)
  • options : Command line options (string)

Examples

# create a 2.6 virtualenv owned by ubuntu user
python_virtualenv "/home/ubuntu/my_cool_ve" do
  owner "ubuntu"
  group "ubuntu"
  action :create
end
# create a Python 2.4 virtualenv
python_virtualenv "/home/ubuntu/my_old_ve" do
  interpreter "python2.4"
  owner "ubuntu"
  group "ubuntu"
  action :create
end
# create a Python 2.6 virtualenv with access to the global packages owned by ubuntu user
python_virtualenv "/home/ubuntu/my_old_ve" do
  owner "ubuntu"
  group "ubuntu"
  options "--system-site-packages"
  action :create
end

Usage

default

Include default recipe in a run list, to get python, pip and virtualenv. Installs python by package or source depending on the platform.

package

Installs Python from packages.

source

Installs Python from source.

pip

Installs pip from source.

virtualenv

Installs virtualenv using the python_pip resource.

License & Authors

Copyright:: 2011, Chef Software, Inc

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

More Repositories

1

application

A Chef cookbook to deploy applications.
Ruby
144
star
2

poise-python

A Chef cookbook to provide a unified interface for installing Python, managing Python packages, and creating virtualenvs.
Ruby
124
star
3

application_ruby

Development repository for Opscode Cookbook application_ruby
Ruby
124
star
4

citadel

Chef cookbook to help store secrets in S3 in a secure fashion
Ruby
119
star
5

poise

A set of libraries for writing reusable Chef cookbooks
Ruby
106
star
6

application_python

A Chef cookbook to deploy Python applications.
Ruby
73
star
7

supervisor

Development repository for Opscode Cookbook supervisor
Ruby
64
star
8

poise-service

A Chef cookbook to provide a unified interface for services.
Ruby
43
star
9

halite

Write as a gem, release as a cookbook.
Ruby
42
star
10

application_nginx

Development repository for Opscode Cookbook application_nginx
Ruby
34
star
11

poise-ruby

A Chef cookbook to provide a unified interface for installing Ruby and running things with it.
Ruby
27
star
12

poise-derived

A Chef cookbook for defining lazily evaluated node attributes.
Ruby
22
star
13

application_php

Development repository for Opscode Cookbook application_php
Ruby
21
star
14

application_java

Development repository for Opscode Cookbook application_java
Ruby
21
star
15

yolover-example

YoloVer example repository
Ruby
14
star
16

poise-hoist

A cookbook to help automate "attribute hoisting" when using Chef with Policyfiles.
Ruby
13
star
17

berkshelf-api

A Chef cookbook to install a Berkshelf API server
Ruby
13
star
18

application_git

A Chef cookbook to handle deploying code from git when using the application cookbook.
Ruby
11
star
19

poise-profiler

A Chef cookbook to display profiling information at the end of the run.
Ruby
11
star
20

poise-archive

A Chef cookbook to unpack file archives like TAR and ZIP files.
Ruby
10
star
21

poise-monit

A Chef cookbook to manage Monit.
Ruby
9
star
22

mercurial

Development repository for Opscode Cookbook mercurial
Ruby
9
star
23

jenkins

Ruby
8
star
24

application_javascript

A Chef cookbook to deploy server-side JavaScript applications using Node.js or io.js.
Ruby
7
star
25

poise-javascript

A Chef cookbook to provide a unified interface for installing server-side JavaScript runtimes like Node.js and io.js.
Ruby
7
star
26

poise-file

A Chef cookbook for advanced file management.
Ruby
6
star
27

poise-ruby-build

A ruby-build provider for the poise-ruby cookbook.
Ruby
5
star
28

poise-boiler

Poise-boiler is a set of helpers to reduce boilerplate in Poise/Halite style gems.
Ruby
5
star
29

poise-appenv

Helpers for application-specific envronment settings in Chef
Ruby
4
star
30

yolover

Using Policyfiles: YoloVer as a Workflow
HTML
4
star
31

rubocop-chef

Ruby
4
star
32

ci

A cookbook to configure a Jenkins CI environment
Ruby
3
star
33

poise-proxy

Generic HTTP proxy resource
Ruby
3
star
34

poise-dsl

A Chef cookbook for declaring DSL helper methods.
Ruby
2
star
35

poise-dash-prototype

CoffeeScript
2
star
36

application_examples

Examples for using the Application cookbooks.
Ruby
2
star
37

poise-supervisor

A Chef cookbook to manage Supervisor.
Ruby
2
star
38

poise-languages

Shared support code for Poise's language cookbooks.
Ruby
2
star
39

poise-service-runit

Ruby
2
star
40

poise-monit-compat

A deprecated Chef cookbook to manage Monit.
Ruby
1
star
41

test_django

An example Django application for testing cookbooks.
Python
1
star
42

poise-service-monit

Ruby
1
star
43

cookiecutter-cookbook

Cookiecutter template for a Poise-enabled Chef cookbook
Ruby
1
star
44

poise.io

Poise website and documentation.
Ruby
1
star
45

kitchen-zone

Ruby
1
star