perfsonar-dev - New web admin available
Subject: perfsonar development work
List archive
- From: Michael Michalis <>
- To: , Gina Kramer <>, Prodromos Gerakios <>, Nicolas Simar <>
- Subject: New web admin available
- Date: Thu, 7 Aug 2008 09:31:50 +0300
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all,
Just finished the new web admin version (0.9b). There are a few things new in this releses:
1)The index.html page is no longer html put index.jsp so we can incorporate some of the Release Managements Request
2)There is a new Deployment testing servlet(actually jsp), that will actually send an echo request to the service and depending on the response will decide if the tes has failed or not
3)There is also a new servlet for the RRD MA. The Metadata Configuration File Management Servlet that will present information about the xml config file in a hopefully nice way
4)There is also a change in the Basic Configuration Servlet. The eXist password questions were considered confusing for the users so we changed the layout and the question. For this to be done the schema of the WizardProperties needed to be changed and also the code that handles the user input. I've developed a reference implementation for the RRD MA but I think it will suit anyone that uses eXist.
There are some other issues pending for the web admin, either raised by users or by developers(FlowSA MA/MP), but because of time constraints in conjunction with the fact that I'm leaving the project, addressing those issues was not possible. Please excuse for this.
You can find the HTML/CSS/JSP/image files at http://anonsvn.internet2.edu/svn/perfsonar/tags/WEB-ADMIN-HTML-CSS-0.9b/ . Also you can find the new web admin jar at http://anonsvn.internet2.edu/svn/perfsonar/trunk/jar-repository/perfsonar/perfsonar-web-admin/0.9b/perfsonar-web-admin-0.9b.jar . Updated instructions on how to incorporate the servlets into your product can be found in the product build guide http://anonsvn.internet2.edu/svn/perfsonar/trunk/perfsonar-doc/release-management/perfSONAR-MDM-product-build-guide.doc. The necessary actions for incorporating the Deployment Testing servlet are not yet included, put I hope they will be included very soon.
I will be working until Monday the 11th of August, and afterwards I will be on holidays and from the 1st of September I will be starting my new job. But I will be available for questions or a quick bug fixing during that time, although the answers might not be that swift ;).
Now for the changes in the eXist configuration process I'm attaching two text file. The one contains the properties for the eXist group as they are supposed to be in the wizard.properties file. the other one contains the changes that need to be made inside your ConfigurationHandler implementation so it can handle the new properties format. Since I think all of you mostly copy paste the reference implementation for the RRD MA, you can easily take the code from the RRDMAHanlder and add to your own. http://anonsvn.internet2.edu/svn/perfsonar/branches/WebAdmin/perfSONARWebAdmin/admin/wizard/services/RRDMAHandler.java
Well thats it, if you have any questions or problems please don't hesitate to contact me.
Best Regards,
Michalis Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFImpbWoEWq51/Q/40RAl/CAJ0XyoJlgKEWT9t0mWuovJY8OffcKQCfbzlm
GjMs96qzX3be7hDOjGKcgXA=
=/xh/
-----END PGP SIGNATURE-----
/**
* Method used for handling all actions associated with exist db
* confoguration
*
* @param finalProperties
* The Wizard Properties associated with the exist group
* @throws Exception
*/
private void existActions(WizardProperties finalProperties)
throws Exception {
// Changes happen into the service.property file that uses
groupig and
// description in order to keep that functionality we need in
this case
// to use the PerfsonarProperties class
PerfsonarProperties serviceProperties = new
PerfsonarPropertiesImpl();
serviceProperties.loadProperties(new
FileInputStream(ServicePath
+ ServicePropertiesPath));
// Any changes happening to the URL of the exist db and on
the admin
// password should be reflected on the servlet.properties as
well
ServiceProperties servletProperties = new
ServicePropertiesImpl(
ServicePath + ServletPropertiesPath);
// Get an iterator for all service properties
Iterator it = serviceProperties.getKeysIterator();
// Get the type of the service. Will be used for making the
new db
// collection
String serviceName = servletProperties.getProperty(
"servlet.service_type").trim();
// Naming the new collection on exist db
String dbCollection = serviceName + "config";
// Initializing all necessary fileds
String adminPass = null;
String existURI = "";
String newAdminPass = null;
String username = null;
String password = null;
String confFile = null;
String old_adminPass = null;
String old_adminPass1 = null;
String new_adminPassConfirm = null;
String createUser = null;
String changePass = null;
// Need to get the new xmlDBURI and old and new admin
password so that
// we can make the changes
while (it.hasNext()) {
String key = (String) it.next();
if (key.endsWith("xmldb.db_uri")) {
existURI = finalProperties.getProperty(key);
}
}
it = finalProperties.orderedKeys();
// Iterating though tthe users input
while (it.hasNext()) {
String key = (String) it.next();
// The input from the user is also set in service
properties with a
// slight modification for tyhe xmldb uri. We need to
add the
// collection at the end of the URI
PerfsonarProperty property = new PerfsonarProperty();
if (!key.endsWith("xmldb.db_uri")) {
if (key.equals("create_user")) {
createUser =
finalProperties.getProperty(key).trim();
}
else if (key.equals("old_adminpassword_1")) {
old_adminPass1 =
finalProperties.getProperty(key).trim();
}
else if (key.equals("change_admin_pass")) {
changePass =
finalProperties.getProperty(key).trim();
} else if
(key.endsWith("xmldb.db_adminpassword_confirm")) {
new_adminPassConfirm =
finalProperties.getProperty(key)
.trim();
} else if (key.equals("old_adminpassword")) {
old_adminPass =
finalProperties.getProperty(key).trim();
} else {
property =
serviceProperties.getProperty(key);
// If property key does not exist
throw an exceptrion
if (property == null) {
throw new Exception("Key is
invalid " + key + " ");
} else {
if(!key.endsWith("xmldb.db_adminpassword")||(finalProperties.getProperty("change_admin_pass").equals("yes"))){
property.setValue(finalProperties.getProperty(key));
serviceProperties.setProperty(key, property);
}
}
}
} else {
property = serviceProperties.getProperty(key);
property.setValue(existURI + "/db/" +
dbCollection);
serviceProperties.setProperty(key, property);
}
// Setting also the wizard properties
properties.setWizardProperty(key,
finalProperties
.getWizardProperty(key));
// Also getting all needed information in orer to
configure the
// exist db
if (key.endsWith("xmldb.db_username")) {
username =
finalProperties.getProperty(key).trim();
}
if (key.endsWith("xmldb.db_password")) {
password =
finalProperties.getProperty(key).trim();
}
if (key.endsWith("conf_file")) {
confFile =
finalProperties.getProperty(key).trim();
}
if (key.endsWith("xmldb.db_adminpassword")) {
newAdminPass =
finalProperties.getProperty(key).trim();
}
}
// If admin pass is not set than its considered to be empty
if (adminPass == null) {
adminPass = "";
}
// Creating all necessary collections and users in exist
if (existURI == null) {
throw new Exception("eXist xmldb URI is empty!\n");
} else {
if (createUser.equals("yes")) {
xmlDBManager manager = new
xmlDBManagerImpl(existURI, "admin",
old_adminPass1);
// Creating collection and users
manager.createCollection(dbCollection);
manager.createUser(dbCollection, username,
password, null);
// Adding the metadata config document
manager.getCollection(dbCollection).addDocument(
new File(confFile), username);
} else {
xmlDBManager manager = new
xmlDBManagerImpl(existURI, username,
password);
// Creating collection and users
manager.createCollection(dbCollection);
// Adding the metadata config document
manager.getCollection(dbCollection).addDocument(
new File(confFile), username);
}
// Modifying the admin user password
if (changePass.equals("yes")) {
if
(newAdminPass.equals(new_adminPassConfirm)) {
xmlDBManager manager = new
xmlDBManagerImpl(existURI,
"admin",
old_adminPass);
manager.modifyUser("admin",
newAdminPass, null, null);
} else {
throw new Exception(
"New eXist Admin
passwords don't match.Please re-enter passwords.");
}
}
serviceProperties.storeProperties(new
FileOutputStream(ServicePath
+ ServicePropertiesPath));
properties.storeToXML(new FileOutputStream(new
File(ServicePath
+ WizardPropertiesPath)), " Last
Modification "
+
Calendar.getInstance().getTime().toString());
}
}
<property>
<entry key="component.ma.xmldb.db_uri"
required="true">xmldb:exist://localhost:8080/exist/xmlrpc</entry>
<Comment>Enter the location of the eXist database:</Comment>
<ProposedValue>xmldb:exist://localhost:8080/exist/xmlrpc</ProposedValue>
<Group order="1">eXist</Group>
</property>
<property>
<entry key="component.ma.xmldb.db_username"
required="true">rrdmaservice</entry>
<Comment>Enter the service username for the eXist user:</Comment>
<ProposedValue>rrdmaservice</ProposedValue>
<Group order="2">eXist</Group>
</property>
<property>
<entry key="component.ma.xmldb.db_password" required="true"
password="true">perfsonar</entry>
<Comment>Enter the password for the eXist user:</Comment>
<ProposedValue>perfsonar</ProposedValue>
<Group order="3">eXist</Group>
</property>
<property>
<entry key="create_user" required="true">no</entry>
<Comment>Do you wish to create a user with this name?</Comment>
<ProposedValue>yes</ProposedValue>
<Group order="4" check="true">eXist</Group>
<AcceptedValue>yes</AcceptedValue>
<AcceptedValue>no</AcceptedValue>
</property>
<property>
<entry key="old_adminpassword_1" required="true" password="true" />
<Comment>Enter the eXist administration password:</Comment>
<ProposedValue />
<Group order="5" dependsOn="4">eXist</Group>
</property>
<property>
<entry key="service.ma.conf_file"
required="true">/opt/perfsonar/services/geant2-java-rrd-ma/WEB-INF/classes/perfsonar/conf/Cynet_RRDMA_Config.xml</entry>
<Comment>Enter the full path of the metadata configuration file:</Comment>
<ProposedValue>/opt/perfsonar/services/geant2-java-rrd-ma/WEB-INF/classes/perfsonar/conf/Cynet_RRDMA_Config.xml</ProposedValue>
<Group order="6">eXist</Group>
</property>
<property>
<entry key="change_admin_pass" required="true">no</entry>
<Comment>Do you wish to change the exist Admin password?</Comment>
<ProposedValue>yes</ProposedValue>
<Group order="7" check="true">eXist</Group>
<AcceptedValue>yes</AcceptedValue>
<AcceptedValue>no</AcceptedValue>
</property>
<property>
<entry key="component.ma.xmldb.db_adminpassword" required="true"
password="true" />
<Comment>Enter the eXist administration password:</Comment>
<ProposedValue />
<Group order="8" dependsOn="7">eXist</Group>
</property>
<property>
<entry key="component.ma.xmldb.db_adminpassword_confirm" required="true"
password="true" />
<Comment>Confirm new eXist administration password:</Comment>
<ProposedValue />
<Group order="9" dependsOn="7">eXist</Group>
</property>
<property>
<entry key="old_adminpassword" required="true" password="true" />
<Comment>Enter the old eXist administration password:</Comment>
<ProposedValue />
<Group order="99" dependsOn="7">eXist</Group>
</property>
- New web admin available, Michael Michalis, 08/07/2008
- Re: [pS-dev] New web admin available, Verena Venus, 08/07/2008
- Re: [pS-dev] New web admin available, Verena Venus, 08/25/2008
- Re: [pS-dev] New web admin available, Cándido Rodríguez Montes, 08/25/2008
- Re: [pS-dev] New web admin available, Verena Venus, 08/25/2008
- Re: [pS-dev] New web admin available, Cándido Rodríguez Montes, 08/25/2008
- Re: [pS-dev] New web admin available, Verena Venus, 08/25/2008
- Re: [pS-dev] New web admin available, Cándido Rodríguez Montes, 08/13/2008
- Re: [pS-dev] New web admin available, Prodromos Gerakios, 08/21/2008
- Re: [pS-dev] New web admin available, Verena Venus, 08/07/2008
Archive powered by MHonArc 2.6.16.