rPath Appliance Platform Agent:Services Plugin
From rPath Wiki
The rPath Appliance Platform Agent (rAPA) includes a Services plugin which is enabled by default. The plugin provides the Manage Services page in the rAPA web interface. The Services plugin allows a rAPA user to manage services on an appliance.
Using the Services Plugin Interface
See the Manage Services page in the Appliance Administration pages for information on how to use the Services plugin in the web interface.
Appliance Developer Notes
The services plugin reads two configuration files for settings; the default services.cfg and custom.cfg. Plugin and Appliance developers may use custom.cfg to override all settings for the Services Plugin that are set in services.cfg
Settings are for any service registered on the appliance whether currently running or not. The information is gathered from the command chkconfig --list and displayed in the Services Plugin.
Configuration File -- services.cfg, custom.cfg
The Services Plugin configuration file, services.cfg, is located in /usr/lib/raa/raaplugins/services. The custom.cfg file is located inside /etc/raa/ and settings must derive syntax from the services.cfg file.
All services from chkconfig --list are displayed in the Services Plugin by default except those listed as hidden (raa, raa-restore, raa-lighttpd) inside services.cfg. Settings in the configuration file custom.cfg will override settings inside services.cfg
Example Configuration
An example custom.cfg
[/services/Services]
services.hidden = ['raa','raa-restore','raa-lighttpd']
services.shown = ['crond', 'sshd', 'NetworkManager']
# Some examples of services and short descriptions
services.description = {'NetworkManager': 'A Network Manager Service', 'mysqld': 'MySQL Database Service', 'crond': 'Scheduler Service', 'sshd': 'Secure Shell Service'}
In the example above:
- services.hidden - Do NOT display the services listed here
- services.shown - display ONLY those services listed here
- services.description - a description string for services.shown
- All settings must be located under the [/services/Services] section
- All services listed must be recognized by the system; chkconfig --list will list the system name of services recognized by the Services Plugin.
- Lack of services.shown defaults to display all services
Custom Service Names
Beginning with version 3.0.0, rAPA allows for customization of service names inside the services plugin. Each service can be given a custom name (string) inside the file services.cfg which is located /usr/lib/python2.4/site-packages/raaplugins/services
Customize the setting by listing the service and the customized string as done in the following example:
services.description = {'httpd': 'Apache Web Server', 'mysqld': 'MySQL Database', 'crond': 'Cron Daemon', 'sshd': 'Secure Shell'}
