Comanche A GUI management tool for Apache Daniel López Ridruejo [email protected].

41
A GUI management tool A GUI management tool for Apache for Apache http://www.comanche.or http://www.comanche.or g g Daniel López Ridruejo [email protected]

Transcript of Comanche A GUI management tool for Apache Daniel López Ridruejo [email protected].

Page 1: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

ComancheComancheA GUI management tool for A GUI management tool for

ApacheApachehttp://www.comanche.orghttp://www.comanche.org

Daniel López Ridruejo [email protected]

Page 2: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

Talk OverviewTalk Overview

Part I What is Comanche, features overview,

demo, architecture, future development

Part IIXML and ComancheHow to add support for Apache modulesHow to add support for other programs

Page 3: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

Part I: Comanche OverviewPart I: Comanche Overview

IntroductionMotivationFeaturesDemoArchitectureThe future

Page 4: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

Part I: Comanche OverviewPart I: Comanche Overview

IntroductionMotivationFeaturesDemoArchitectureThe future

Page 5: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

IntroductionIntroduction

Configuration Manager for ApacheGUI for managing ApacheCommon framework for developing other

configuration programs

Page 6: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

Part I: Comanche OverviewPart I: Comanche Overview

IntroductionMotivationFeaturesDemoArchitectureThe future

Page 7: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

MotivationMotivation

Current GUIs shortcomingsMake it easy for usersMake it easy for developers

Page 8: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

Motivation: UsersMotivation: Users

Guide the userHide complexity for newbiesFull access for power users

Page 9: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

Motivation: DevelopersMotivation: Developers

Modular, extensible designMake it easy to contribute

– Simple API– Simple tasks via XML– Complex tasks via XML + a little bit of coding

“One afternoon” learning curve

Page 10: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

Part I: Comanche OverviewPart I: Comanche Overview

IntroductionMotivationFeaturesDemoArchitectureThe future

Page 11: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

FeaturesFeatures

Open-source Multi-platform Modular Extensible Easy to set up

Non-intrusive Multiple language

support Context-sensitive help Convenient

Page 12: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

DemoDemo

Page 13: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

Part I: Comanche OverviewPart I: Comanche Overview

IntroductionMotivationFeaturesDemoArchitectureThe future

Page 14: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

ArchitectureArchitecture

Plug-in

Plug-in

Namespace

User interface

Page 15: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

ArchitectureArchitecture

Abstract:Configuration Information (httpd.conf,

smb.conf)Information presentation (User Interface)

Page 16: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

ArchitectureArchitecture

XML for user interfaceXML for configuration format descriptionMultiple front-ends Distributed and multiple language support

Page 17: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

Part I: Comanche OverviewPart I: Comanche Overview

IntroductionMotivationFeaturesDemoArchitectureThe future

Page 18: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

The futureThe future

Covalent supportDistributed architecture (XML-RPC,

CORBA). Hidden from developerWrite plugins in Perl, Java, etcHTML interfaceApache directly configured via XML

Page 19: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

The future: getting involvedThe future: getting involved

TranslationsAdd support for Apache modulesWrite new plug-ins: ftp server, user

management, qmail…Submit bug reportsBuy some beers to the author :)

Page 20: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

Talk OverviewTalk Overview

Part IIXML and ComancheHow to add support for Apache modulesHow to add support for other programs

Page 21: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

XML and ComancheXML and Comanche

XML basicsXML for configurationXML for User Interface

Page 22: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

XML BasicsXML Basics

eXtensible Markup Language.Standard way of defining, storing and

exchanging structured data. Tag based and similar to HTML

Page 23: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

XML and ComancheXML and Comanche

XML basicsXML for configurationXML for User Interface

Page 24: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

XML for configurationXML for configuration

Translate multiple formats XMLConfiguration directives syntax changes

from release to releaseUser Interface needs to know information

about the parameters of a particular directive

Page 25: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

XML configuration languageXML configuration language

Schema languageCombine basic blocks to define complex

directivesNumber Choice

Alternate Boolean

Structure String

List

Page 26: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

XML configuration languageXML configuration language

<list name="userNames" label="Names of users">

<syntax> <string name="user" label="Name of the user" >

<default>nobody</default> </string> </syntax> <default> <item>dani</item> </default></list>

Page 27: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

XML and ComancheXML and Comanche

XML basicsXML for configurationXML for User Interface

Page 28: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

XML User interfaceXML User interface

Programmatic User Interface generationMultiple front-endsNo coding requiredIsolate configuration tasks from

presentation

Page 29: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

XML User InterfaceXML User Interface <list name="userNames" label="Names of users"> <syntax> <string name="user" label="Name of the user" > <default>nobody</default> </string> </syntax> <default> <item>dani</item> </default></list>

Page 30: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

Talk OverviewTalk Overview

Part IIXML and ComancheHow to add support for Apache modulesHow to add support for other programs

Page 31: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

Support for Apache modulesSupport for Apache modules

Describe directivesProperty pagesModule description

Page 32: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

Mod_cgi: DirectivesMod_cgi: Directives

<string name="scriptLog" label="apache1.3_cgi_scriptLog" classes="file">

<default></default></string><number name="scriptLogLength"

label="apache1.3_cgi_scriptLogLength"><default>10385760</default></number><number name="scriptLogBuffer"

label="apache1.3_cgi_scriptLogBuffer"><default>1024</default></number>

Page 33: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

Mod_cgi: Property pagesMod_cgi: Property pages

<propertyPage label="apache1.3_cgi_cgi" icon="smallWheel" name="cgi" align="vertical">

<directiveInclude name="scriptLog"/>

<directiveInclude name="scriptLogLength"/>

<directiveInclude name="scriptLogBuffer"/>

</propertyPage>

Page 34: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

Mod_cgi: Module descriptionMod_cgi: Module description

<apacheModuleDescription name="cgi" directivesXMLDefinition="directives.xml"propertyPagesXMLDefinition="propertyPages.xml"description="This modules provides for execution of CGIs." icon="smallWheel">

<nodesInterested> <node type="mainserver">

<propertyPage name="cgi" /> </node>

</nodesInterested></apacheModuleDescription>

Page 35: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

Talk OverviewTalk Overview

Part IIXML and ComancheHow to add support for Apache modulesHow to add support for other programs

Page 36: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

Support for other programsSupport for other programs

Design property pagesAdd nodes to the namespaceAnswer property pages requestsReceive property pages results

Page 37: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

Example: DNS configurationExample: DNS configuration

/etc/resolv.confNameserversDomain search order

Page 38: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

Design property pagesDesign property pages

<propertyPage name="nameserversPP" icon="network" align="vertical">

<list name="domainList" label="resolv_domain_order"> <syntax>

<string name="domain“ label="resolv_domain_suffix" /> </syntax>

</list>

<list name="dnsList" label="resolv_dns_order"> <syntax>

<string name="dns" label="resolv_dns_suffix" /> </syntax>

</list>

</propertyPage>

Page 39: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

Add nodeAdd node

::plugInUtils::addNode $this $namespace $parentNode \

-classes {nameservers leaf} \

-openIcon network \

-closedIcon network \

-label [mesg::get \ resolv_nameservers_settings]

Page 40: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

Answer property pageAnswer property page

body nameserversPlugIn::_inquiryForPropertyPages { node } {

fillPropertyPages

return $nameserversXuiPP

}

Page 41: Comanche A GUI management tool for Apache  Daniel López Ridruejo daniel@covalent.net.

Process prop. pages resultProcess prop. pages result

body nameserversPlugIn::_receivedPropertyPages { node xuiPropertyPages } {

set pp [$xuiPropertyPages getComponentByName nameserversPP]

saveNameServerSettings $pp

}