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:
${root}/var/run
${root}/var/log
${root}/etc/
${root}/etc/cron.d
${root}/etc/init.d
${root}/etc/logrotate.d
Additionally to be able to mix multiple deployments within a single sandbox we compute the following paths compatible to zc.recipe.deployment:
crontab-directory logrotate-directory rc-directory run-directory log-directory etc-directory
Also, the user option is setup to match the current user.
Supported options
The recipe supports a single optional option:
- root
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
Contributors
Christian Theune, Author
Download
Release files for gocept.recipe.deploymentsandbox 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gocept.recipe.deploymentsandbox-0.2.tar.gz | 5.5 kB | Details |
Release files / gocept.recipe.deploymentsandbox-0.2.tar.gz
| Download URL | gocept.recipe.deploymentsandbox-0.2.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d65a1aae084b32ecc54ed270fed5fd5b0ddf8f77a96a38f64659a4d48deb6a81
|
|
BLAKE2b-256 checksum How to use checksums |
114ed0c88e448ba593fd7d235670c011628b0520dfeeee24e1fbe6880c163b1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |