Skip to content

tilezen/chef-tilestache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tilestache Chef Cookbook

Build Status

Description

Installs tilestache running under gunicorn, provides a vagrant environment for iterative testing

Usage

include_recipe 'tilestache'

It's recommended that you use a wrapper cookbook with tilestache. The setup is very simple: a single recipe that does an include_recipe tilestache, and provides a template to be placed in default[:tilestache][:cfg_path].

Supported Platforms

Tested on Ubuntu12.04LTS. You can probably get away with distributions similar to those, but as yet they have not been tested.

Requirements

  • Chef >= 11.4
  • Vagrant 2

Attributes

tilestache

gunicorn_server

Installs and configures the gunicorn server

  • default: true

filehandle_limit

Ulimit setting for open files permitted to the user configured to run tilestache (default: 20480)

install_method

How we should install tilestache: git, pip or pip_requirements

  • default: pip

install_path

Base location that will house conf/tilecache.cfg

  • default: /opt/tilestache

user

User to run tilestache as

  • default: tilestache

uid

Numeric ID for tilestache user

  • default: nil

gid

Numeric ID for tilestache group

  • default: nil

user_shell

Shell for your tilestache user

  • default: /bin/false

user_keygen

Whether to generate ssh keys for your tilestache user

  • default: false

group

Group to run tilestache as

  • default: tilestache

tilestache.gunicorn

version

Version of gunicorn to install

  • default: 17.5

backlog

Number of pending requests to allow to queue

  • default: 100

keepalive

Keepalive request timeout

  • default: 60

max_requests

Max number of requests a worker will serve before restarting

  • default: 100

piddir

Location of the gunicorn pid file

  • default: /var/run/tilestache/gunicorn.pid

logdir

Location of the gunicorn log directory

  • default: /var/log/tilestache

logfile

Name of the gunicorn log file

  • default: gunicorn.log

port

Port to listen on

  • default: 8000

timeout

Request timeout interval

  • default: 300

worker_class

Gunicorn worker class

  • default: tornado
  • NOTE: not tested with any other classes

preload

Preload application code before forking new processes

  • default: false

workers

Number of workers to spawn

  • default: node.cpu.total

Dependencies

  • gunicorn, python, ulimit, user

Vagrant Environment

Installation

vagrant plugin install vagrant-berkshelf 
bundle install
berks install
vagrant up
vagrant ssh

What did that just do?

  • installed berkshelf, installed our cookbook dependencies, and booted a virtualbox machine
  • access the running tilestache instance: via http://localhost:8000

I don't like Vagrant

  • well then sir, provision an Ubuntu12.04 LTS system with the provider of your choice, and then bootstrap with chef-solo: knife solo bootstrap root@${host} -r 'recipe[tilestache]'
  • and re-cook with the following: knife solo cook root@${host} -r 'recipe[tilestache]'
  • alternatively, you can add the tilestache cookbook to your chef server and wrap it as you see fit

Provisos

  • only been tested on my laptop!!! (just kidding... mostly)
  • for realz, only been tested on Ubuntu12.04LTS

Contributing

Fork, create a feature branch, send a pull! Weeee...

License and Authors

About

Chef cookbook to install and configure tilestache

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •