Skip to main content

Setup a sandbox environment for deployments based on zc.recipe.deployment

Project description

This recipe can be used to create deployments that are located in a sandbox. This is useful for deploying self-contained buildouts or for development setups that are going to use a deployment recipe in the future.

It is compatible to zc.recipe.deployment and can be used as a drop-in.

It is not intended for system-wide deployments, please use zc.recipe.deployment for that.

Change history

0.2 (2009-06-05)

  • Allow to override single variables in the section.

0.1.1 (2008-02-27)

  • Using $LOGNAME instead of os.getlogin to set the user.

0.1.0 (2008-02-15)

  • Initial release.

Detailed Documentation

Sandbox environments

This recipe creates a sandbox environment for deployments similar to zc.recipe.deployment. It is not intended for system-wide installation but as a sandboxed/development variation of the deployment pattern.

For production, system-wide deployments you can simply switch out a sandbox deployment part with a real deployment part.

A root directory is defined for the sandbox (by default this is parts/${name}) in which the following directory structure is created:


Additionally to be able to mix multiple deployments within a single sandbox we compute the following paths compatible to zc.recipe.deployment:


Also, the user option is setup to match the current user.

Supported options

The recipe supports a single optional option:

Optional: The root directory of the sandbox. Will be computed from the section name if not given.

Example usage

We’ll start by creating a buildout that uses the recipe.

>>> import os
>>> write('buildout.cfg',
... """
... [buildout]
... parts = deployment
... [deployment]
... recipe = gocept.recipe.deploymentsandbox
... """)

Running the buildout gives us:

>>> print system(buildout)
Installing deployment.
>>> ls(sample_buildout, 'parts')
d deployment
>>> ls(sample_buildout, 'parts', 'deployment')
d etc
d var
>>> ls(sample_buildout, 'parts', 'deployment', 'etc')
d  cron.d
d  deployment
d  init.d
d  logrotate.d
>>> ls(sample_buildout, 'parts', 'deployment', 'var')
d log
d run
>>> ls(sample_buildout, 'parts', 'deployment', 'var', 'log')
d deployment
>>> ls(sample_buildout, 'parts', 'deployment', 'var', 'run')
d deployment


Christian Theune, Author


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for gocept.recipe.deploymentsandbox, version 0.2
Filename, size File type Python version Upload date Hashes
Filename, size gocept.recipe.deploymentsandbox-0.2.tar.gz (5.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page