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

Post on 18-Jan-2016

214 views 0 download

Tags:

Transcript of 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 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

Part I: Comanche OverviewPart I: Comanche Overview

IntroductionMotivationFeaturesDemoArchitectureThe future

Part I: Comanche OverviewPart I: Comanche Overview

IntroductionMotivationFeaturesDemoArchitectureThe future

IntroductionIntroduction

Configuration Manager for ApacheGUI for managing ApacheCommon framework for developing other

configuration programs

Part I: Comanche OverviewPart I: Comanche Overview

IntroductionMotivationFeaturesDemoArchitectureThe future

MotivationMotivation

Current GUIs shortcomingsMake it easy for usersMake it easy for developers

Motivation: UsersMotivation: Users

Guide the userHide complexity for newbiesFull access for power users

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

Part I: Comanche OverviewPart I: Comanche Overview

IntroductionMotivationFeaturesDemoArchitectureThe future

FeaturesFeatures

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

Non-intrusive Multiple language

support Context-sensitive help Convenient

DemoDemo

Part I: Comanche OverviewPart I: Comanche Overview

IntroductionMotivationFeaturesDemoArchitectureThe future

ArchitectureArchitecture

Plug-in

Plug-in

Namespace

User interface

ArchitectureArchitecture

Abstract:Configuration Information (httpd.conf,

smb.conf)Information presentation (User Interface)

ArchitectureArchitecture

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

Part I: Comanche OverviewPart I: Comanche Overview

IntroductionMotivationFeaturesDemoArchitectureThe future

The futureThe future

Covalent supportDistributed architecture (XML-RPC,

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

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 :)

Talk OverviewTalk Overview

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

XML and ComancheXML and Comanche

XML basicsXML for configurationXML for User Interface

XML BasicsXML Basics

eXtensible Markup Language.Standard way of defining, storing and

exchanging structured data. Tag based and similar to HTML

XML and ComancheXML and Comanche

XML basicsXML for configurationXML for User Interface

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

XML configuration languageXML configuration language

Schema languageCombine basic blocks to define complex

directivesNumber Choice

Alternate Boolean

Structure String

List

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>

XML and ComancheXML and Comanche

XML basicsXML for configurationXML for User Interface

XML User interfaceXML User interface

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

presentation

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>

Talk OverviewTalk Overview

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

Support for Apache modulesSupport for Apache modules

Describe directivesProperty pagesModule description

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>

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>

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>

Talk OverviewTalk Overview

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

Support for other programsSupport for other programs

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

Example: DNS configurationExample: DNS configuration

/etc/resolv.confNameserversDomain search order

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>

Add nodeAdd node

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

-classes {nameservers leaf} \

-openIcon network \

-closedIcon network \

-label [mesg::get \ resolv_nameservers_settings]

Answer property pageAnswer property page

body nameserversPlugIn::_inquiryForPropertyPages { node } {

fillPropertyPages

return $nameserversXuiPP

}

Process prop. pages resultProcess prop. pages result

body nameserversPlugIn::_receivedPropertyPages { node xuiPropertyPages } {

set pp [$xuiPropertyPages getComponentByName nameserversPP]

saveNameServerSettings $pp

}