Hi Salman,
Impressive! When you have all this working, would you be willing to
create a write-up of what you've done? We can post on the Wiki page for
other folks to use who want a non-root Cumin.
As for the original writer, I think he is on the list but probably has
a spam filter sending it to trash as he is working on other projects and
is very busy :) But, you have me, almost as good.
My thought here would be just to replace that snippet with an external
Python script that is launched from cumin-database. It's simply a call
into one of the modules. You can pass whatever values you need on the
command line. There has to be a way in bash to set an environment for a
shell that is launched. Worth a try?
I'm not sure why it was done this way originally, maybe just personal
style. I probably would have made it an external script. Also,
cumin-database is the last bash holdout in Cumin -- rewriting it in
Python is on my low priority list.
Best,
Trev
On Wed, 2012-03-21 at 17:48 -0500, Pervez, Salman wrote:
Ok, so after some serious effort I believe I have installed all of
the cumin dependencies. This was not an easy task but doable. I am now fixing up
cumin-database so I don’t need root access, but I've run into a bit of a snag. I am
wondering if the original writer of cumin-database is on this list so they might give me
some input? Here is the issue. From cumin-database...
function configure {
check-environment || exit 1
check-initialized || exit 1
if check-configured &> /dev/null; then
echo "Error: The database server is already configured"
echo "(Note, the server must be restarted after configuration."
echo " If it has not been restarted since configuration, use"
echo " 'cumin-database stop' and 'cumin-database start' to
restart it)"
exit 1
fi
python <<EOF
import os
import sys
home = os.environ.get("CUMIN_HOME",
os.path.normpath("/usr/share/cumin"))
sys.path.append(os.path.join(home, "python"))
from cumin.database import modify_pghba_conf
modify_pghba_conf('${pghbaconf}', '${dbname}', 'cumin')
EOF
}
Which I believe is evaluating the little python code snippet all the way up to EOF. The
problem is that my python is special (because I have a local install of psycopg2. In order
to tell python where to find this module, I modified the environment variable PYTHONPATH.
But it looks like this code is being evaluated in a completely new environment, not the
one in which my shell is running. So I need to figure out a way to modify this
environment.
I'll look into this some more and perhaps can find the answer but if there are any
shell gurus out there that know what the solution is I will appreciate the help.
Salman
-----Original Message-----
From: Trevor McKay [mailto:tmckay@redhat.com]
Sent: Monday, March 19, 2012 8:39 AM
To: cumin-users(a)lists.fedorahosted.org
Cc: Pervez, Salman
Subject: Re: installation help
Hi Salman,
What Lukas said :) The sasldb is not actually part of the default
install, you have to make it.
Sesame source code is actually in the cumin svn repo, believe it or
not. Separate package, separate language, but historically it has lived
under cumin in the "sesame" subdirectory.
Looks like you can get to a root page for QMF here, through the
developers pages on the QPID wiki:
https://cwiki.apache.org/qpid/qpid-management-framework.html
Forge on!
Best,
Trevor
On Fri, 2012-03-16 at 22:44 +0100, Lukas Slebodnik wrote:
> On Fri, Mar 16, 2012 at 04:27:35PM -0500, Pervez, Salman wrote:
> > Trevor, thanks a lot for the pointers. It was very helpful. I think I am making
progress. I have working copies of Condor, qpidd and postgres, although I am not sure if I
have all of qpidd installed. I could not find the file
<my-qpidd-install>/var/lib/qpidd/qpidd.saslb mentioned on the Cumin install page. In
fact, the <my-qpidd-install>/var/lib/qpidd dir is empty, which is a bit puzzling.
Maybe there is something more I need to install.
> You should create this file with command.
> sudo -u qpidd /usr/sbin/saslpasswd2 -f
<your-qpidd-install>/var/lib/qpidd/qpidd.sasldb -u QPID cumin
>
> All important steps for Cumin instalation are descriped in MRG documentation
>
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_MRG/2/html-single/Ma...
> >
> > I am having some trouble finding the source code for sesame. Can you point me
to the correct webpage? Is sesame part of a larger distribution?
> >
> > Also, the QMF webpage at
http://qpid.apache.org/qpid-management-framework.html
seems to be down. Is there an alternate place to get QMF?
> >
> You can find source RPM files for sesame and qpid-qmf in RedHat public ftp
>
ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/RHEMRG/SRPMS/
>
> Regards,
> Lukas
> > I take your point about building on a spare machine and if that were an option
I really would find better ways to occupy my time. But I think I can see this through,
maybe with a little bit of guidance. Many thanks once again!
> >
> > Salman
> >
> > -----Original Message-----
> > From: cumin-users-bounces(a)lists.fedorahosted.org
[mailto:cumin-users-bounces@lists.fedorahosted.org] On Behalf Of Trevor McKay
> > Sent: Tuesday, March 13, 2012 1:15 PM
> > To: cumin-users(a)lists.fedorahosted.org
> > Subject: RE: installation help
> >
> > Hi Salman,
> >
> > Here are a few more thoughts. You can of course build condor, qpidd,
> > and sesame from sources but I fear that you will run into the same issue
> > there as well -- at some point there will be devel packages necessary
> > for building and you'll need root to install them.
> >
> > But, if you can get qpidd, condor, and sesame installed from rpms by
> > root, you should be able to run them as a non-privileged user from the
> > command line. If you can run from a local postgres installation, you
> > should be all set. You can use a root-installed postgres database, too,
> > but if you're playing with development you may want to be able to do
> > things like start and stop the database and wipe it out and rebuild it
> > as needed and so something you control would be better.
> >
> > I just tried starting up the qpidd broker and sesame from the command
> > line as a "normal" user and they were working. Cumin of course will
run
> > from sources as described on the Wiki. Condor gave me a permission
> > denied error on a log file, but I think that can be fixed in condor
> > config. I would hit the condor-users email list for that info.
> >
> > (may I volunteer here that this is a noble effort and I am interested
> > in how it turns out, but if you can just lay your hands on a spare
> > laptop or tower, even an Intel-based Mac I believe, you can install
> > Fedora 16 and do whatever you like as root :) )
> >
> > Things to solve:
> >
> > 1) Setting up a SASL user database for authentication to the broker.
> > Cumin must authenticate to the broker as the "cumin" user in order
for
> > all the operations on condor to be available. I have not tried setting
> > up a SASL database as a non-root user and configuring qpid to use it.
> > Could be issues here, but you may be able to get help from the Qpid
> > community. Alternatively, if you've gotten an admin or root privilege
> > long enough to install rpms you can set this up too.
> >
> > 2) Cumin-admin will detect when you are running from trunk and so should
> > be fine.
> >
> > Cumin-database however expects postgres to be run as a service, and so
> > all the database manipulation stuff requires root access. This code
> > would have to change to work on a local postgres. Cumin-database is
> > also written in bash (not my personal favorite :) ) so I hope you're
> > familiar with it.
> >
> > 3) Using a different datbase API could be a big job. Most of that code
> > will be in the rosemary module, and mint/update.py may need changes.
> > There are places in cumin-web that touch the database and some of
> > the .strings template files specify queries, too. I can't give you a
> > definitive answer on that without doing a full code review but I would
> > suggest using winpdb or another debugger, making changes, and seeing
> > what breaks :) The first place to start would be to make sure that the
> > rosemary module can read the schema files and successfully initialize
> > the db with the empty tables.
> >
> > Note, the front page of the wiki has links to the condor and Qpid
> > communities if you have questions in those areas.
> >
> > I wish you well!
> >
> > Best,
> >
> > Trevor
> >
> > On Fri, 2012-03-09 at 17:08 -0600, Pervez, Salman wrote:
> > > Thanks for the quick feedback Trevor. I'll give it a shot and see how
far I get. :)
> > >
> > > I believe postgres can be installed locally, working on that right now.
Would you be able to give me any quick pointers on which parts of the source code I'll
need to modify? i.e. which files? I will look into that once I have postgres up and
running. Thanks again!
> > >
> > > Salman
> > >
> > > -----Original Message-----
> > > From: cumin-users-bounces(a)lists.fedorahosted.org
[mailto:cumin-users-bounces@lists.fedorahosted.org] On Behalf Of Trevor McKay
> > > Sent: Friday, March 09, 2012 2:22 PM
> > > To: cumin-users(a)lists.fedorahosted.org
> > > Subject: Re: installation help
> > >
> > > Hi Salman,
> > >
> > > Thanks for your interest.
> > >
> > > >> requires su. Is there an alternate way to set up cumin as a
non-privileged user?
> > >
> > > To date, I don't know of anyone who has tried. There would be
several hurdles to overcome. Without being able to install packages as root, you would
need to find a way to get all of the packages built and available from your home directory
and on your local path.
> > >
> > > You would also need a way to set up a local postgres installation in
your home account. I don't know if postgres supports this.
> > >
> > > Certain programs like cumin-database would need to be altered to 1) not
require root access and 2) look in the alternate locations.
> > >
> > > It may be much less effort to convince an admin to set up a machine for
you where you have root access, maybe even a virtual machine on a host that you already
have access to.
> > >
> > > >> I was also wondering if cumin is compatible with sqlite or would
I need to install postgres? Thanks!
> > >
> > > Cumin uses the python-psycopg2 package as the api to Postgres. It would
depend on whether python-pscyopg2 is compatible (or can be made compatible) with sqlite.
Alternatively, you could modify the code yourself to use an interface to sqlite rather
than python-pscopg2. But, out of the box, Postgres is expected.
> > >
> > > Best,
> > >
> > > Trevor McKay
> > >
> > >
> > > ----- Original Message -----
> > > From: "Salman Pervez" <Salman.Pervez(a)citadelgroup.com>
> > > To: cumin-users(a)lists.fedorahosted.org
> > > Sent: Friday, March 9, 2012 2:37:52 PM
> > > Subject: installation help
> > >
> > >
> > >
> > >
> > >
> > > Hi cumin users, I need some help with install options. I see that the
installation page at
> > >
> > >
> > >
> > >
https://fedorahosted.org/grid/wiki/CuminForDevelopers
> > >
> > >
> > >
> > > requires su. Is there an alternate way to set up cumin as a non-privileged
user?
> > >
> > >
> > >
> > > I was also wondering if cumin is compatible with sqlite or would I need to
install postgres? Thanks!
> > >
> > >
> > >
> > > Salman
> > >
> > >
> > > CONFIDENTIALITY AND SECURITY NOTICE
> > >
> > > The contents of this message and any attachments may be confidential and
proprietary and also may be covered by the Electronic Communications Privacy Act. This
message is not intended to be used by, and should not be relied upon in any way, by any
third party. If you are not an intended recipient, please inform the sender of the
transmission error and delete this message immediately without reading, disseminating,
distributing or copying the contents. Citadel makes no assurances that this e-mail and any
attachments are free of viruses and other harmful code.
> > >
> > > _______________________________________________
> > > cumin-users mailing list
> > > cumin-users(a)lists.fedorahosted.org
> > >
https://fedorahosted.org/mailman/listinfo/cumin-users
> > > _______________________________________________
> > > cumin-users mailing list
> > > cumin-users(a)lists.fedorahosted.org
> > >
https://fedorahosted.org/mailman/listinfo/cumin-users
> > > _______________________________________________
> > > cumin-users mailing list
> > > cumin-users(a)lists.fedorahosted.org
> > >
https://fedorahosted.org/mailman/listinfo/cumin-users
> >
> >
> > _______________________________________________
> > cumin-users mailing list
> > cumin-users(a)lists.fedorahosted.org
> >
https://fedorahosted.org/mailman/listinfo/cumin-users
> > _______________________________________________
> > cumin-users mailing list
> > cumin-users(a)lists.fedorahosted.org
> >
https://fedorahosted.org/mailman/listinfo/cumin-users
> _______________________________________________
> cumin-users mailing list
> cumin-users(a)lists.fedorahosted.org
>
https://fedorahosted.org/mailman/listinfo/cumin-users
_______________________________________________
cumin-users mailing list
cumin-users(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cumin-users