Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install slapos.lib.recipe

How to install slapos.lib.recipe

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install slapos.lib.recipe
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.0.dev-r45784 Available View build log
1.0.dev-r4765 Available View build log
1.0.dev-r4633 Available View build log
1.0.dev-r4575 Available View build log
1.0.dev-r4554 Available View build log
1.0.dev-r4073 Available View build log
Windows (64-bit)
1.0.dev-r45784 Available View build log
1.0.dev-r4765 Available View build log
1.0.dev-r4633 Available View build log
1.0.dev-r4575 Available View build log
1.0.dev-r4554 Available View build log
1.0.dev-r4073 Available View build log
Mac OS X (10.5+)
1.0.dev-r45784 Available View build log
1.0.dev-r4765 Available View build log
1.0.dev-r4633 Available View build log
1.0.dev-r4575 Available View build log
1.0.dev-r4554 Available View build log
1.0.dev-r4073 Available View build log
Linux (32-bit)
1.0.dev-r45784 Available View build log
1.0.dev-r4765 Available View build log
1.0.dev-r4633 Available View build log
1.0.dev-r4575 Available View build log
1.0.dev-r4554 Available View build log
1.0.dev-r4073 Available View build log
Linux (64-bit)
1.0.dev-r45784 Available View build log
1.0.dev-r4765 Available View build log
1.0.dev-r4633 Available View build log
1.0.dev-r4575 Available View build log
1.0.dev-r4554 Available View build log
1.0.dev-r4073 Available View build log
 
License
GPLv3
Imports
Lastest release
version 1.0.dev-r45784 on May 4th, 2011

Library for creating SlapOS recipes for software instantiation

Thanks to using slapos.lib.recipe it is easier to create zc.buildout recipes in SlapOS environment.

How to use?

In setup.py of recipe add only one install requires to slap.lib.recipe.

In code itself subclass from slap.lib.recipe.BaseSlapRecipe.BaseSlapRecipe.

Use _install hook:

from slap.lib.recipe.BaseSlapRecipe import BaseSlapRecipe

class Recipe(BaseSlapRecipe):
  ...
  def _install(self):
    # refer below for list of available objects
    specific code
    of recipe

Available variables self.:

  • name and options passed by zc.buildout during init
  • work_directory -- buildout's directory
  • bin_directory -- places for generated binaries
  • running_wrapper_location -- filename of wrapper to create
  • data_root_directory -- directory container for data -- inside this directory it is advised to create named directories for provided servers which needs data
  • backup_directory -- directory container for backups -- inside this directory it is advised o created named directories for backups, with same structure as in data_root_directory
  • var_directory -- container for various, unix following things:
    • log_directory -- container for logs
    • run_directory -- container for pidfiles and sockets
  • etc_directory -- place to put named files and directories of configuration for provided servers
  • computer_id -- id of computer
  • computer_partition_id -- if of computer partition
  • server_url - url of Vifib server
  • software_release_url -- url of software release being instantiated
  • slap -- initialised connection to Vifib server
  • computer_partition -- initialised connection to computer partition
  • request -- shortcut to computer partition request method

By default all directories are created before calling _install hook.

_install method shall return list of paths which are safe to be removed by buildout during part uninstallation.

Important assumptions

Because in SlapOS environment zc.buildout does not know when data are changed, recipes shall be always uninstalled/installed. This is done during constructing recipe instance which subclasses from BaseSlapRecipe.

Changes

1.0 (unreleased)

Subscribe to package updates

Last updated May 4th, 2011

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.