|
|
ScreenShotsUpdate interfaces provides an easy way to manage Actions and Custom Action files. Update Interfaces are supported for all Action plugins deployed into Kikonf. This is part of the Kikonf basic services, as the security service (based on Restrictors) is part of it.
Note for advanced users :
This means, if you write your own plugin or copy/clone an existing plugin and modify it to reach your specifics, it will also beneficiate of the whole Kikonf basic services. 2 command line Update Interfaces are provided : kikupd and repoz. 2 Visual Interfaces are provided : the Console interface and the Web interface(*). For all Interfaces, Restrictors can be used to restrict what kind of information a User can view or input into a particular tag/attribute and/or wether they are allowed to an Atttribute (a tag or an Action) or not. Update Interfaces complies with the third part of the Kikonf AAA specification (AnyOne), this is the ability to delegate Access to any category of users.
Note :
As Kikonf is designed from the ground, it is also possible to delegate write Acces to the Action files (Custom or not) from scratch directly from the directoy where they are stored. Then Users directly update these files using the xml editor they like. Fine grain contole on what kind of information is allowed to the user, will still apply ("a-posteriori"), running any of the Kikonf operational commands: the user would be bounced requiring update for an information for which he is not allowed to. The kikupd command called in default mode, implements a xpath like implementation (called epicpath), that let you to list, update or remove any component of an Action file (or a Custom Action file).
Information :
For more information about the kikupd command, check the kikupd documentation into the <kikonf_install_root >/doc directory. For more information about the epicpath implementation, you can also check the picxml documentation into the same directory. For samples, check the < kikonf_install_root >/samples/kikupd directory. Managing Action filesThe examples below use the Action file : tom.datasrc.xml. This lists all Attributes at top tag datasrc :
$kikupd --kikact tom.datasrc datasrc@*
type:action bal:None sub_type:configuration softwares:None name:jdbc/mydb This lists the Attribute : "name" at top tag datasrc :
$kikupd --kikact tom.datasrc datasrc@name
jdbc/mydb This lists all Attributes at sub tag resource :
$kikupd --kikact tom.datasrc datasrc/resource@*
dbtype:db2 dbname:MYDB01 host:myserver.intra.net port:1234 username:myuser password:mypass auth:true driverClassName:None This lists the Attributes : "auth" and "driverClassName" at sub tag resource :
$kikupd --kikact tom.datasrc datasrc/resource@auth,@driverClassName
auth:true driverClassName:None This updates Attributes "auth" and "driverClassName" at sub tag resource :
$kikupd --kikact tom.datasrc -u datasrc/resource[@auth=false,@driverClassName=my.driver.class]
updated node:/datasrc/resource> From driverClassName:None To driverClassName:my.driver.class From auth:true To auth:false Managing Custom Action filesThe examples below use the Custom Action file : my.xml which was the sample used into : Overview. Custom Action files are managed by the kikupd command in the same way as in the previous, except that they are called like this :
$kikupd --kikarc my.xml mytag1/mytag3/crtserver@server_port,@java_home
server_port:8010 java_home:/path/to/jdk Massive Administrative Operations kikupd supports massive operations using pipe. Massive kikupd operations work either for Action files (option --kikact) or Custom Action files (option --kikarc). Massive kikupd commands on the same Action file cat massive.txt :
# This updates the datasrc tag associated to the ClusterMember instance of the cluster.
-u mytag1/mytag2/crtcluster@name=cluster1/crtserver/datasrc[@name=new1,@jndi_name=new2] # This removes queues tag associated to the ClusterMember. -e mytag1/mytag2/crtcluster/crtserver/jmq/queues # This updates the datasrc tag associated to the Tomcat Server instance. mytag1/mytag3/crtserver/datasrc[@name=dbc/new3] -u If on Windows type : type massive.txt | kikupd --kikarc my.xml If on Unixes type : cat massive.txt | kikupd --kikarc my.xml
$cat massive.txt | kikupd --kikarc my.xml
line:mytag1/mytag2/crtcluster@name=cluster1/crtserver/datasrc[@name=new1,@jndi_name=new2] -u --kikarc my.xml updated node:/mytag1/mytag2/crtcluster/crtserver/datasrc > From jndi_name:jdbc/mydatasrc To jndi_name:new2 From name:mydatasrc To name:new1 line:-e mytag1/mytag2/crtcluster/crtserver/jmq/queues --kikarc my.xml Removed: /mytag1/mytag2/crtcluster/crtserver/jmq/queues < line:mytag1/mytag3/crtserver/datasrc[@name=dbc/new3] -u --kikarc my.xml updated node:/mytag1/mytag3/crtserver/datasrc > From name:jdbc/mydb To name:dbc/new3 Massive kikupd commands on many target Action files cat massive2.txt :
# This updates the datasrc tag associated to the ClusterMember instance of the cluster.
--kikarc my.xml -u mytag1/mytag2/crtcluster@name=cluster1/crtserver/datasrc[@name=new1,@jndi_name=new2] # This removes queues tags associated to the ClusterMember. --kikarc my1.xml -e mytag1/mytag2/crtcluster/crtserver/jmq/queues # This updates the datasrc tag associated to the Tomcat Server instance. mytag1/mytag3/crtserver/datasrc[@name=dbc/new3] --kikarc my2.xml -u If on Windows type : type massive2.txt | kikupd If on Unixes type : cat massive2.txt | kikupd
$cat massive2.txt | kikupd
line:--kikarc my.xml mytag1/mytag2/crtcluster@name=cluster1/crtserver/datasrc[@name=new1,@jndi_name=new2] -u updated node:/mytag1/mytag2/crtcluster/crtserver/datasrc > From jndi_name:jdbc/mydatasrc To jndi_name:new2 From name:mydatasrc To name:new1 line:--kikarc my1.xml -e mytag1/mytag2/crtcluster/crtserver/jmq/queues Removed: /mytag1/mytag2/crtcluster/crtserver/jmq/queues < line:--kikarc my2.xml mytag1/mytag3/crtserver/datasrc[@name=dbc/new3] -u updated node:/mytag1/mytag3/crtserver/datasrc > From name:jdbc/mydb To name:dbc/new3 Repoz is an Interpretor using the file system scheme to mount multiple kind of files :
to the real files only at the end of the Repoz Session. Repoz is a multi-interpretor supporting :
Information :
For more information about the repoz tools, check the repoz documentation into the < kikonf_install_root >/doc directory. For samples, check the < kikonf_install_root >/samples/repoz directory". Managing Action files
$repoz
#------------------------------------------------------------------------------# # # # WELCOME TO REPOZ # # The file content management factory # # # # # # Type H or HELP for help on global commands. # # Type H <command> for help on a global command. # # Type h or help for help on a specific processor. # # Type h <command> for help on a specific processor command. # # # # # # Copyright (c) 2007-2008, Patrick Germain Placidoux # # All rights reserved. # # # # This file is part of repoz. # # # # repoz is under the terms of the GNU General Public License as published by # # the Free Software Foundation, either version 3 of the License, or # # (at your option) any later version. # # Contact: repoz@gmx.com or repoz at www.sourceforge.net. # # # #------------------------------------------------------------------------------# Numbers at the beginning of lines, are shown only for the needs of this tutorial. The Repoz default mode is xpath (a.k.a. epicpath), the ":" at the beguining of the prompt stands for the xpath mode. There are 3 other more modes:
The syntax is xpc --kikact path/to/your/action_file.xml Line 3: No alias is guiven for this processor so an alias name (tom.datasrc) based on the file named is guessed by repoz. Because this is the first processor it is mounted. The repoz prompt is set to the path of the first node of the file :tom.datasrc:/datasrc> ls : liste the Current node attributes and in self contained child nodes. Line 9: Lists the sub resource. Line 13: Lists the sub resource's Attributes "port" and "username". Line 16: Sets a new value for the sub resource's Attribute "username". Line 20: Shows the xmll file at the current level. Line 38: Runs 2 epicpath update commands in one line. Line 46: Cd into the sub node resource Line 50: Demonstrates that one can use the "set" command to directly update the Attributes of the current node. Managing Custom Action filesWe keep the same Repoz Session instance as the previous sample and launch another processor for our Custom Action file: :tom.datasrc:/datasrc/resource>xpc --kikarc my.xml New processor with alias:my, created. (use mount my, to mount it) :tom.datasrc:/datasrc/resource>% %tom.datasrc:/datasrc/resource>mount my %my:/mytag1> %my:/mytag1>xselect * at mytag3 /mytag1/mytag3 *tun:I17 <mytag3 > <crtserver jvm_route="node1" mode="493" server_port="8010" ... > <scope cbase="/catalina_base/path"> </scope> <realm bal="tom.realm" type="action" sub_type="configuration" digest="None" softwares="None"> <scope cbase="/catalina_base/path" context="" ... > </scope> <mem > </mem> </realm> <datasrc name="jdbc/mydb" bal="tom.datasrc" type="action" sub_type="configuration" softwares="None"> <scope cbase="/catalina_base/path" context="" ... > </scope> <resource driverClassName="None" username="myuser" dbtype="db2" auth="true" port="1234" host="myserver.intra.net" password="mypass" dbname="MYDB01"> </resource> </datasrc> <beanrsc name="bean/myBean" btype="com.mycompany.MyBean" bal="tom.beanrsc" type="action" sub_type="configuration" softwares="None"> <scope cbase="/catalina_base/path" context="" ... > </scope> <link name="bean/local_name"> </link> </beanrsc> </crtserver> </mytag3> %my:/mytag1>select * at mytag3/crtserver/datasrc *tun bal softwares type sub_type name *text /mytag1/mytag3/crtserver/datasrc I23 tom.datasrc None action configuration jdbc/mydb [] %my:/mytag1>select username,auth,dbtype at mytag3/crtserver/datasrc/resource *tun username auth dbtype *text /mytag1/mytag3/crtserver/datasrc/resource I25 myuser true db2 [] %my:/mytag1>update mytag3/crtserver/datasrc/resource set username = new name with space ; auth = false ; dbtype=mysql /mytag1/mytag3/crtserver/datasrc/resource Updating *tun:I25 %my:/mytag1>select username,auth,dbtype at mytag3/crtserver/datasrc/resource *tun username auth dbtype *text /mytag1/mytag3/crtserver/datasrc/resource I25 new name with space false mysql [] "%" switch into xql mode, this sample show a very, very little example of what epicxql can do. Massive Administrative OperationsMassive repoz operations can be perfomed passing a source file to repoz, using the option : --file MY_FILE.repoz. With this option, repoz reads the guiven file, in Batch Mode, an performes all commands and instructions. This repoz file may have been recorded from one of the previous repoz Interactive Session calling repoz with the option --record. The Console Interface is provided for users who have access to the Machine to manage, e.g: by ssh or telnet. Managing Action filesThe command: kikupd --kikact tom.datasrc --console Launch the Console Interface for the Action file : tom.datasrc.xml.
Information :
For more information about the kikupd command in console mode, check the kikupd documentation into the <kikonf_install_root>/doc directory. For samples, check the <kikonf_install_root>/samples/kikupd directory. [serenity] DATASRC ___________________ | | | ACTION: DATASRC | |_________________| 1/ datasrc> [This Action configures a JDBC Datasource (JNDI)] name: jdbc/mydb 2/ datasrc/scope> [A scope refers to configuration Level within the Tomcat scheme] cbase: H:\INSTALL\TOMCAT\Tomcat 5.5 service: None engine: None host: None context.global: false context: context.default.global: false context.default: false resources.global: true 3/ datasrc/resource> [The DataSource resource] dbtype: db2 dbname: MYDB01 host: myserver.intra.net port: 1234 username: myuser password: mypass auth: true driverClassName: None 4/ datasrc/link> [Referencing the Global Resource] name: jdbc/local_name 5) Show Action file 6) Show Descriptor file 7) Show Help 8) Check All 9) Print 10) Save ( Exit:0) Choice ? For readibility concern Tag Attributes are shown at the Tag level. Option 7 (Show Help) : shows a very complete help, that really let the user know about what he is doing. Option 1 : updates the datasrc tag attribute : "name". Option 2 : updates the scope tag attributes. Option 3 : updates the resource tag attributes. Option 4 : updates the link tag attributes : "name". e.g. : Choosing option 3 guives the folowing: [serenity] DATASRC ___________________ | | | ACTION: DATASRC | |_________________| 1/ datasrc> [This Action configures a JDBC Datasource (JNDI)] name: jdbc/mydb 2/ datasrc/scope> [A scope refers to configuration Level within the Tomcat scheme] cbase: H:\INSTALL\TOMCAT\Tomcat 5.5 service: None engine: None host: None context.global: false context: context.default.global: false context.default: false resources.global: true 3/ datasrc/resource> [The DataSource resource] dbtype: db2 dbname: MYDB01 host: myserver.intra.net port: 1234 username: myuser password: mypass auth: true driverClassName: None 4/ datasrc/link> [Referencing the Global Resource] name: jdbc/local_name 5) Show Action file 6) Show Descriptor file 7) Show Help 8) Check All 9) Print 10) Save ( Exit:0) Choice ? For readibility concern Tag Attributes are shown at the Tag level. Option 7 (Show Help) : shows a very complete help, that really let the user know about what he is doing. Option 1 : updates the datasrc tag attribute : "name". Option 2 : updates the scope tag attributes. Option 3 : updates the resource tag attributes. Option 4 : updates the link tag attributes : "name". e.g. : Choosing option 3 guives the folowing: [serenity] DATASRC _____________________ | | | DATASRC/RESOURCE> | |___________________| 1) dbtype............: db2 [Which Database ?] 2) dbname............: MYDB01 [The database instance name] 3) host..............: myserver.intra.net [The hostname or IP of the database server] 4) port..............: 1234 [The Port on which the database instance is listen on] 5) username..........: myuser [The user name part of the corangeential for the database] 6) password..........: mypass [The password part of the corangeential for the database] 7) auth..............: true [Authentification Type] 8) driverClassName...: None 9) >> Delete all 10) Show Help ( Exit:0 Check All:c) Choice ?7 ________________________________________ Authentification Type. If true: the Authentifation type is set to "Container" for the Tomcat entry otherwise it's set to "Application". Enter the value for field:auth. Type:str Choose one of:'true', 'false' default: true auth ? When updating an Attribute like "auth" in the previous menu panel, a short help is provided to the user, to let him know what this Attribute is about. Managing Custom Action filesThe command: kikupd --kikarc my.xml --console Launch the Console Interface for the Custom Action file: my.xml which was the sample used into : Overview. Actions are shown in their appearance order within the xml file. The following shows a 3 panels menu. One switch from a menu panel to another one using the "+/-" keys. [serenity] MY.XML ______________________ | | | CUSTOM FILE:MY.XML | |____________________| 1/ Action: crtcluster [Creates a new Cluster] type: action bal: was.crtcluster sub_type: configuration softwares: None name: cluster1 enable_ha: true node_group: DefaultNodeGroup core_group: DefaultCoreGroup desc: None 2/ Action: crtserver [Creates a new Server] type: action bal: was.crtserver sub_type: configuration softwares: None template: default weight: 2 desc: None ( Exit:0 Up:+) Choice ? + [serenity] MY.XML ______________________ | | | CUSTOM FILE:MY.XML | |____________________| 3/ Action: datasrc [Create a new DataSource] type: action bal: was.datasrc sub_type: configuration softwares: None name: mydatasrc jndi_name: jdbc/mydatasrc provider: myprovider dbtype: db2 statement_cache_size: 10 prefix: None desc: None 4/ Action: jmq [Create one or more Queue Connection Factory(ies), Queue(s) and Activation Spec(s)] type: action bal: was.jmq sub_type: configuration softwares: None prefix: None 5/ Action: crtserver [ Creates a Tomcat Catalina Base Server instance] type: action bal: tom.crtserver sub_type: configuration softwares: None server_port: 8010 jvm_route: node1 mode: 493 java_home: /path/to/jdk ( Exit:0 Up:+ Down:-) Choice ? [serenity] MY.XML ______________________ | | | CUSTOM FILE:MY.XML | |____________________| 6/ Action: realm [This Action configures a Tomcat Realme] type: action bal: tom.realm sub_type: configuration softwares: None digest: None 7/ Action: datasrc [This Action configures a JDBC Datasource (JNDI)] type: action bal: tom.datasrc sub_type: configuration softwares: None name: jdbc/mydb 8/ Action: beanrsc [This Action configures a Tomcat Bean Factory Resource] type: action bal: tom.beanrsc sub_type: configuration softwares: None name: bean/myBean btype: com.mycompany.MyBean 9) Show custom file 10) Check All 11) Print 12) Save ( Exit:0 Down:-) Choice ? The Web Interface is provided for users who have access to the Kikonf Web manager. (*) The Kikonf Team works hardly late on nigth (or early in the morning Huh !) to provide the Kikonf brand new Web Interface. So this docummentation will be actualised soon the Web Interface is available. ! Trademarks :
|