pass at cleaning up custom service documentation and removing the need for pycco for this case

This commit is contained in:
Blake Harnden 2019-06-25 16:03:37 -07:00
parent f8960cc519
commit f6af078e7e
4 changed files with 82 additions and 407 deletions

View file

@ -9,5 +9,25 @@ CORE supports custom developed services by way of dynamically loading user creat
Custom services should be placed within the path defined by **custom_services_dir** in the CORE
configuration file. This path cannot end in **/services**.
Here is an example service with documentation describing functionality:
[Example Service](exampleservice.html)
Follow these steps to add your own services:
1. Modify the [Example Service File](/daemon/examples/myservices/sample.py)
to do what you want. It could generate config/script files, mount per-node
directories, start processes/scripts, etc. sample.py is a Python file that
defines one or more classes to be imported. You can create multiple Python
files that will be imported. Add any new filenames to the __init__.py file.
2. Put these files in a directory such as /home/username/.core/myservices
Note that the last component of this directory name **myservices** should not
be named something like **services** which conflicts with an existing Python
name (the syntax 'from myservices import *' is used).
3. Add a **custom_services_dir = /home/username/.core/myservices** entry to the
/etc/core/core.conf file.
4. Restart the CORE daemon (core-daemon). Any import errors (Python syntax)
should be displayed in the /var/log/core-daemon.log log file (or on screen).
5. Start using your custom service on your nodes. You can create a new node
type that uses your service, or change the default services for an existing
node type, or change individual nodes.