Comanche A GUI management tool for Apache Daniel López Ridruejo
Talk Overview Part I What is Comanche, features overview, demo, architecture, future development Part II XML and Comanche How to add support for Apache modules How to add support for other programs
Part I: Comanche Overview Introduction Motivation Features Demo Architecture The future
Part I: Comanche Overview Introduction Motivation Features Demo Architecture The future
Introduction Configuration Manager for Apache GUI for managing Apache Common framework for developing other configuration programs
Part I: Comanche Overview Introduction Motivation Features Demo Architecture The future
Motivation Current GUIs shortcomings Make it easy for users Make it easy for developers
Motivation: Users Guide the user Hide complexity for newbies Full access for power users
Motivation: Developers Modular, extensible design Make it easy to contribute – Simple API – Simple tasks via XML – Complex tasks via XML + a little bit of coding “One afternoon” learning curve
Part I: Comanche Overview Introduction Motivation Features Demo Architecture The future
Features Open-source Multi-platform Modular Extensible Easy to set up Non-intrusive Multiple language support Context-sensitive help Convenient
Demo
Part I: Comanche Overview Introduction Motivation Features Demo Architecture The future
Architecture Plug-in Namespace User interface
Architecture Abstract: Configuration Information (httpd.conf, smb.conf) Information presentation (User Interface)
Architecture XML for user interface XML for configuration format description Multiple front-ends Distributed and multiple language support
Part I: Comanche Overview Introduction Motivation Features Demo Architecture The future
Covalent support Distributed architecture (XML-RPC, CORBA). Hidden from developer Write plugins in Perl, Java, etc HTML interface Apache directly configured via XML
The future: getting involved Translations Add support for Apache modules Write new plug-ins: ftp server, user management, qmail… Submit bug reports Buy some beers to the author :)
Talk Overview Part II XML and Comanche How to add support for Apache modules How to add support for other programs
XML and Comanche XML basics XML for configuration XML for User Interface
XML Basics eXtensible Markup Language. Standard way of defining, storing and exchanging structured data. Tag based and similar to HTML
XML and Comanche XML basics XML for configuration XML for User Interface
XML for configuration Translate multiple formats XML Configuration directives syntax changes from release to release User Interface needs to know information about the parameters of a particular directive
XML configuration language Schema language Combine basic blocks to define complex directives NumberChoice AlternateBoolean StructureString List
XML configuration language nobody dani
XML and Comanche XML basics XML for configuration XML for User Interface
XML User interface Programmatic User Interface generation Multiple front-ends No coding required Isolate configuration tasks from presentation
XML User Interface nobody dani
Talk Overview Part II XML and Comanche How to add support for Apache modules How to add support for other programs
Support for Apache modules Describe directives Property pages Module description
Mod_cgi: Directives
Mod_cgi: Property pages
Mod_cgi: Module description <apacheModuleDescription name="cgi" directivesXMLDefinition="directives.xml" propertyPagesXMLDefinition="propertyPages.xml" description="This modules provides for execution of CGIs." icon="smallWheel">
Talk Overview Part II XML and Comanche How to add support for Apache modules How to add support for other programs
Support for other programs Design property pages Add nodes to the namespace Answer property pages requests Receive property pages results
Example: DNS configuration /etc/resolv.conf Nameservers Domain search order
Design property pages
Add node ::plugInUtils::addNode $this $namespace $parentNode \ -classes {nameservers leaf} \ -openIcon network \ -closedIcon network \ -label [mesg::get \ resolv_nameservers_settings]
Answer property page body nameserversPlugIn::_inquiryForPropertyPages { node } { fillPropertyPages return $nameserversXuiPP }
Process prop. pages result body nameserversPlugIn::_receivedPropertyPages { node xuiPropertyPages } { set pp [$xuiPropertyPages getComponentByName nameserversPP] saveNameServerSettings $pp }