Commit 3f1a8392 authored by Rafael Monnerat's avatar Rafael Monnerat

doc: Update file extension and clean up unused files

parent 80825610
...@@ -30,10 +30,10 @@ import os ...@@ -30,10 +30,10 @@ import os
version = '1.0.31' version = '1.0.31'
name = 'slapos.cookbook' name = 'slapos.cookbook'
long_description = open("README.txt").read() + "\n" + \ long_description = open("README.rst").read() + "\n" + \
open("CHANGES.txt").read() + "\n" open("CHANGES.rst").read() + "\n"
for f in sorted(glob.glob(os.path.join('slapos', 'recipe', 'README.*.txt'))): for f in sorted(glob.glob(os.path.join('slapos', 'recipe', 'README.*.rst'))):
long_description += '\n' + open(f).read() + '\n' long_description += '\n' + open(f).read() + '\n'
# extras_requires are not used because of # extras_requires are not used because of
......
cloudooo
=========
Instantiates CloudOOo instance.
erp5
====
Instantiates ERP5 instance.
kumofs
=========
Instantiates KumoFS instance.
kvm_frontend kvm_frontend
=== =============
Introduction Introduction
------------ ------------
......
...@@ -11,18 +11,22 @@ How to use? ...@@ -11,18 +11,22 @@ How to use?
just add this part in your software.cfg to use the lamp.simple module just add this part in your software.cfg to use the lamp.simple module
[instance-recipe] .. code-block::
egg = slapos.cookbook
module = lamp.simple [instance-recipe]
egg = slapos.cookbook
module = lamp.simple
you also need to extend lamp.cfg you also need to extend lamp.cfg
extends = .. code-block::
extends =
https://lab.nexedi.com/nexedi/slapos/raw/slapos-0.50/stack/lamp.cfg https://lab.nexedi.com/nexedi/slapos/raw/slapos-0.50/stack/lamp.cfg
lamp.runner lamp.runner
===== ===========
When you install some software (such as prestashop) you need to remove or rename folder, with slapos you can not When you install some software (such as prestashop) you need to remove or rename folder, with slapos you can not
access to the www-data directory. to do this, you need to tell to lamp recipe to remove or/and it when software access to the www-data directory. to do this, you need to tell to lamp recipe to remove or/and it when software
...@@ -37,31 +41,35 @@ How to use? ...@@ -37,31 +41,35 @@ How to use?
this part of lamp recipe work with slapos.toolbox, Therefore you must add it to your recipe. this part of lamp recipe work with slapos.toolbox, Therefore you must add it to your recipe.
in software.cfg, replace instance-recipe-egg part by in software.cfg, replace instance-recipe-egg part by
[instance-recipe-egg] .. code-block::
recipe = zc.recipe.egg
eggs = [instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${python-mysqlclient:egg} ${python-mysqlclient:egg}
${instance-recipe:egg} ${instance-recipe:egg}
slapos.toolbox[lampconfigure] slapos.toolbox[lampconfigure]
and add into your instance.cfg and add into your instance.cfg
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure .. code-block::
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
CONDITION CONDITION
-------- ----------
the action (delete, rename, script, chmod) only starts when the condition is filled. the action (delete, rename, script, chmod) only starts when the condition is filled.
in instance.cfg, add in instance.cfg, add::
file_token = path_of_file file_token = path_of_file
and the action will begin when path_of_www-data/path_of_file will be created and the action will begin when path_of_www-data/path_of_file will be created
you can also use database to check condition. add you can also use database to check condition. add ::
table_name = name_of_table table_name = name_of_table
constraint = sql_where_condition constraint = sql_where_condition
name_of_table is the full or partial name(in some cases we can not know the prefix used to create tables) of table name_of_table is the full or partial name(in some cases we can not know the prefix used to create tables) of table
into mariadb databse for example table_name = admin. if you use into mariadb databse for example table_name = admin. if you use
...@@ -74,11 +82,12 @@ you can't use file_token and table_name at the same time, otherwise file_token w ...@@ -74,11 +82,12 @@ you can't use file_token and table_name at the same time, otherwise file_token w
ACTION ACTION
------- -------
The action starts when condition is true The action starts when condition is true
1- delete file or folder
into instance.cfg, use
delete = file_or_folder1, file_or_folder2, file_or_folder3 ... 1- delete file or folder into instance.cfg, use::
delete = file_or_folder1, file_or_folder2, file_or_folder3 ...
for example delete = admin for example delete = admin
...@@ -106,26 +115,30 @@ mode = mode_to_apply (ex= 0644) ...@@ -106,26 +115,30 @@ mode = mode_to_apply (ex= 0644)
use script = ${configure-script:location}/${configure-script:filename} into instance.cfg, add part configure-script use script = ${configure-script:location}/${configure-script:filename} into instance.cfg, add part configure-script
into software.cfg into software.cfg
parts = configure-script .. code-block::
parts = configure-script
[configure-script] [configure-script]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
ignore-existing = true location = ${buildout:parts-directory}/${:_buildout_section_name_}
location = ${buildout:parts-directory}/${:_buildout_section_name_} url = url_of_script_name.py
url = url_of_script_name.py filename = script_name.py
filename = script_name.py download-only = True
download-only = True
The script_name.py should contain a main function, sys.argv is given to the main. you can write script_name.py like this The script_name.py should contain a main function, sys.argv is given to the main. you can write script_name.py like this::
....
def setup(args): ...
def setup(args):
mysql_port, mysql_host, mysql_user, mysql_password, mysql_database, base_url, htdocs = args mysql_port, mysql_host, mysql_user, mysql_password, mysql_database, base_url, htdocs = args
....... .......
if __name__ == '__main__': if __name__ == '__main__':
setup(sys.argv[1:]) setup(sys.argv[1:])
base_url: is the url of php software
htdocs: is the path of www-data directory - base_url: is the url of php software
mysql_user, mysql_password, mysql_database, mysql_host: is the mariadb parameters - htdocs: is the path of www-data directory
- mysql_user, mysql_password, mysql_database, mysql_host: is the mariadb parameters
you can also use "import MySQLdb" if you want to access to database via your python script you can also use "import MySQLdb" if you want to access to database via your python script
\ No newline at end of file
memcached
=========
Instantiates Memcached instance.
mysql
=========
Instantiates MySQL instance.
proactive
=========
Instantiate an proactive environment.
seleniumrunner seleniumrunner
========== ==============
Allows to run selenium tests through browser and xvfb. Posts the results on Allows to run selenium tests through browser and xvfb. Posts the results on
Nexedi ERP5. Nexedi ERP5.
Parameters Parameters
===== ==========
* project : name of the project inside of ERP5 test result instance * project : name of the project inside of ERP5 test result instance
* user : username to use in ERP5 instance to test * user : username to use in ERP5 instance to test
* password : password to use in ERP5 instance to test * password : password to use in ERP5 instance to test
...@@ -12,7 +14,8 @@ Parameters ...@@ -12,7 +14,8 @@ Parameters
* url : url to portal_test of ERP5 isntance to test * url : url to portal_test of ERP5 isntance to test
* test_report_instance_url : url of test_result_module to put results * test_report_instance_url : url of test_result_module to put results
* Example : * Example::
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<instance> <instance>
<parameter id="project">Vifib</parameter> <parameter id="project">Vifib</parameter>
......
xwiki
=====
Instantiates an xwiki environment.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment