Where is the XUUDB?

View: New views
7 Messages — Rating Filter:   Alert me  

Where is the XUUDB?

by Andreas Maier-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear Unicore Support,

this might sound like a dumb question, but where is the file that holds
the Unicore6 UUDB and which format is it in?
I could only find xuudb/data/UnicoreUserDB.data.script :

CREATE SCHEMA PUBLIC AUTHORIZATION DBA
CREATE MEMORY TABLE UUDB(GCID VARCHAR(255),XLOGIN VARCHAR(255),TOKEN VARCHAR(8192),ROLE VARCHAR(255),PROJECTS VARCHAR(255),CONSTRAINT SYS_CT_46 UNIQUE(GCID,TOKEN))
CREATE USER SA PASSWORD ""
GRANT DBA TO SA
SET WRITE_DELAY 10
SET SCHEMA PUBLIC
INSERT INTO UUDB VALUES('deisa','fzj','CN=Michael,OU=Forschungszentrum Juelich GmbH,O=GridGermany,C=DE','user','')
...

Is this all that defines the database? So at every start of XUUDB you generate a SQL database in memory? (I guess you are using sqlite for it?)

I'm asking this, because in Unicore 5 we used to generate the XUUDB file from a script getting data from our local
user database, stored the XUUDB in a repository and distributed that file to our unicore server via cfengine.
Can a mechanism like that be used for Unicore 6, too? Does it mean, that I have to generate the
SQL file UnicoreUserDB.data.script from a script? How can I generate the UnicoreUserDB.data.script on a machine,
where Unicore is not installed? Can I make use of some existing Unicore Java classes to write a Java program,
that will then generate UnicoreUserDB.data.script?

Thank you for your help,
Andreas Maier


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Unicore-support mailing list
Unicore-support@...
https://lists.sourceforge.net/lists/listinfo/unicore-support

Re: Where is the XUUDB?

by Rebecca Breu-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Andreas Maier <Andreas.Maier@...> wrote:

>
> I'm asking this, because in Unicore 5 we used to generate the XUUDB file from a script getting data from our local
> user database, stored the XUUDB in a repository and distributed that file to our unicore server via cfengine.
> Can a mechanism like that be used for Unicore 6, too?

The XUUDB can import from and export to csv files, the admin.sh scripts has
commands for that. No need to worry about the SQL scripts. :)


Regards,
Rebecca

--
"In the beginning was the word, and the word was content-type: text/plain."

"Liberty dies by inches."


Rebecca Breu (r.breu@...)

Phone: +49 2461 61 - 2294
Fax:   +49 2461 61 - 6656

Distributed Systems and Grid Computing Division,
Jülich Supercomputing Centre


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Unicore-support mailing list
Unicore-support@...
https://lists.sourceforge.net/lists/listinfo/unicore-support

smime.p7s (2K) Download Attachment

Parent Message unknown Re: Where is the XUUDB?

by Rebecca Breu-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Andreas Maier <Andreas.Maier@...> wrote:

> That's true, but it would mean, that after copying the CSV file to the unicore machine I would also have
> to run admin.sh on the destination machine.

Yes, is that a problem? For our machines within D-Grid, for example, we have
set up a cron-job wich fetches the latest csv file from a central service and
invokes the import command.

> (since it might happen, that admin.sh fails).
> But if I would generate the SQL script and send it to the unicore machine, I could be sure, that the file in
> the repository is really the XUUDB.

Why would admin.sh fail? If it's because of corrupt input data--this could
also happen with a corrupt SQL script, leaving you with an XUUDB not starting
or having its internal data messed up. The admin.sh at least does do some
sanity checks so that you can't end up with an unusable XUUDB.

You can always check the output of the admin.sh script for messages, it
tells you how many entries it imported etc.

> However the problem with the SQL script is, that I do have to restart
> XUUDB everytime then I change it manually to activate the changes, don't I ?

Correct. We don't recommend this.

> It would be much easier, if the XUUDB would read every time the user data from a csv file directly,
> wouldn't it?

I don't see why. It would not guarantee that the data can be imported
correctly, so you'd have to browse log files for error messages...

> As it is now, I can change data in the XUUDB during runtime only via admin.sh, am I right?

Correct.


Regards,
Rebecca


--
"In the beginning was the word, and the word was content-type: text/plain."

"Liberty dies by inches."


Rebecca Breu (r.breu@...)

Phone: +49 2461 61 - 2294
Fax:   +49 2461 61 - 6656

Distributed Systems and Grid Computing Division,
Jülich Supercomputing Centre


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Unicore-support mailing list
Unicore-support@...
https://lists.sourceforge.net/lists/listinfo/unicore-support

smime.p7s (2K) Download Attachment

Re: Where is the XUUDB?

by Bernd Schuller :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi

On Fr, 2009-10-30 at 13:49 +0100, Rebecca Breu wrote:
> Andreas Maier <Andreas.Maier@...> wrote:
>
[...]
> > However the problem with the SQL script is, that I do have to restart
> > XUUDB everytime then I change it manually to activate the changes, don't I ?

> Correct. We don't recommend this.
>

it is even worse. You need to stop the XUUDB,  change the .script file,
and restart. Bad idea...

> > It would be much easier, if the XUUDB would read every time the user data from a csv file directly,
> > wouldn't it?
>
> I don't see why. It would not guarantee that the data can be imported
> correctly, so you'd have to browse log files for error messages...
>
> > As it is now, I can change data in the XUUDB during runtime only via admin.sh, am I right?

What is so bad about using admin.sh ?
You can even use it from remote :-)

If you want to use a plain file instead of the XUUDB, you could use the
"FileBasedAuthoriser" instead. Note: the XUUDB is better, because you
need only one XUUDB for all components at a site.

But if you want to check this out, have a look in the latest (6.2.2)
core server, the registry configuration contains the necessary info.

set in uas.config

uas.security.authoriser=de.fzj.unicore.uas.security.util.FileBasedAuthoriser
#map file name
uas.security.simpleuudb=conf/simpleuudb

and in the simpleuudb file you have entries of the form

<entry key="CN=Demo User,O=sf,OU=unicore">role:user;xlogin:someuser</entry>


As I said, the XUUDB is better, but if you want to try it go ahead :-)

Best regards,
Bernd.

--
Dr. Bernd Schuller
Distributed Systems and Grid Computing
Juelich Supercomputing Centre, http://www.fz-juelich.de/jsc
Phone: +49 246161-8736 (fax -8556)
Personal blog: www.jroller.com/page/gridhaus


------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Unicore-support mailing list
Unicore-support@...
https://lists.sourceforge.net/lists/listinfo/unicore-support

Re: Where is the XUUDB?

by Andreas Maier-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Bernd Schuller wrote:

> hi
>
> On Fr, 2009-10-30 at 13:49 +0100, Rebecca Breu wrote:
>> Andreas Maier <Andreas.Maier@...> wrote:
>>
> [...]
>>> However the problem with the SQL script is, that I do have to restart
>>> XUUDB everytime then I change it manually to activate the changes, don't I ?
>
>> Correct. We don't recommend this.
>>
>
> it is even worse. You need to stop the XUUDB,  change the .script file,
> and restart. Bad idea...
>
>>> It would be much easier, if the XUUDB would read every time the user data from a csv file directly,
>>> wouldn't it?
>> I don't see why. It would not guarantee that the data can be imported
>> correctly, so you'd have to browse log files for error messages...
>>
>>> As it is now, I can change data in the XUUDB during runtime only via admin.sh, am I right?
>
> What is so bad about using admin.sh ?
> You can even use it from remote :-)

What do you mean?
Should I write a script that logs in as user "unicore" on the unicore server and starts admin.sh?
Is that the remote capability of admin.sh? Then I better do a cron job.
Or is there a web-based interface to the XUUDB? That would be useful, if I could access it for example
by SOAP or something similar..

Andreas

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Unicore-support mailing list
Unicore-support@...
https://lists.sourceforge.net/lists/listinfo/unicore-support

Re: Where is the XUUDB?

by Rebecca Breu-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Andreas Maier <Andreas.Maier@...> wrote:

>
> What do you mean?
> Should I write a script that logs in as user "unicore" on the unicore server and starts admin.sh?
> Is that the remote capability of admin.sh?

No, you can install the xuudb libraries, say, on your local machine and alter
the xuudb_client configuration files to point to the remote xuudb
installation. Of course, you need a valid private key for the client setup,
and you also need to add the according public key to the server's truststore.


Regards,
Rebecca

--
"In the beginning was the word, and the word was content-type: text/plain."

"Liberty dies by inches."


Rebecca Breu (r.breu@...)

Phone: +49 2461 61 - 2294
Fax:   +49 2461 61 - 6656

Distributed Systems and Grid Computing Division,
Jülich Supercomputing Centre


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Unicore-support mailing list
Unicore-support@...
https://lists.sourceforge.net/lists/listinfo/unicore-support

smime.p7s (2K) Download Attachment

Re: Where is the XUUDB?

by Bernd Schuller :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi Andreas,

On Fr, 2009-10-30 at 16:09 +0100, Andreas Maier wrote:

> Bernd Schuller wrote:
> >
> > What is so bad about using admin.sh ?
> > You can even use it from remote :-)
>
> What do you mean?
> Should I write a script that logs in as user "unicore" on the unicore server and starts admin.sh?
> Is that the remote capability of admin.sh? Then I better do a cron job.
> Or is there a web-based interface to the XUUDB? That would be useful, if I could access it for example
> by SOAP or something similar..
>

In fact admin.sh connects to the xuudb server using SOAP.
The docs/XUUDB.txt file in the server distribution contains an overview
about the XUUDB and its functionality.

Best regards,
Bernd.

--
Dr. Bernd Schuller
Distributed Systems and Grid Computing
Juelich Supercomputing Centre, http://www.fz-juelich.de/jsc
Phone: +49 246161-8736 (fax -8556)
Personal blog: www.jroller.com/page/gridhaus


------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Unicore-support mailing list
Unicore-support@...
https://lists.sourceforge.net/lists/listinfo/unicore-support