4 Thanks to using slapos.UNKOWN_NAME_TODO:librecipe it is easier to create zc.buildout recipes in SlapOS environment.
9 In setup.py of recipe add only one install requires to slap.lib.recipe.
11 In code itself subclass from slap.lib.recipe.BaseSlapRecipe.BaseSlapRecipe.
17 from slap.lib.recipe.BaseSlapRecipe import BaseSlapRecipe
19 class Recipe(BaseSlapRecipe):
22 # refer below for list of available objects
26 Available variables self.:
28 * name and options passed by zc.buildout during init
29 * work_directory -- buildout's directory
30 * bin_directory -- places for generated binaries
31 * running_wrapper_location -- filename of wrapper to create
32 * data_root_directory -- directory container for data -- inside this
33 directory it is advised to create named directories for provided servers
35 * backup_directory -- directory container for backups -- inside this
36 directory it is advised o created named directories for backups, with same
37 structure as in data_root_directory
38 * var_directory -- container for various, unix following things:
40 * log_directory -- container for logs
41 * run_directory -- container for pidfiles and sockets
43 * etc_directory -- place to put named files and directories of configuration
45 * computer_id -- id of computer
46 * computer_partition_id -- if of computer partition
47 * server_url - url of Vifib server
48 * software_release_url -- url of software release being instantiated
49 * slap -- initialised connection to Vifib server
50 * computer_partition -- initialised connection to computer partition
51 * request -- shortcut to computer partition request method
53 By default all directories are created before calling _install hook.
55 _install method shall return list of paths which are safe to be removed by
56 buildout during part uninstallation.
61 Because in SlapOS environment zc.buildout does not know when data are changed,
62 recipes shall be always uninstalled/installed. This is done during constructing
63 recipe instance which subclasses from BaseSlapRecipe.