[prev in list] [next in list] [prev in thread] [next in thread] 

List:       spacewalk-devel
Subject:    [Spacewalk-devel] PostgreSQL Update & How To Get Involved
From:       dgoodwin () redhat ! com (Devan Goodwin)
Date:       2009-09-08 13:43:34
Message-ID: 20090908104334.73c0b1c9 () redhat ! com
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 02 Sep 2009 22:38:28 -0400
Cliff <cperry at redhat.com> wrote:

> Devan Goodwin wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> > 
> > While a bunch of preliminary schema and app stack prep for
> > PostgreSQL went out in Spacewalk 0.6 there were a few small
> > problems, now fixed and soon to land in the devel repo. For those
> > interested in trying this out and hopefully contributing here's the
> > basic steps to get going now,
> > 
> > 1. Install 0.6 normally, but don't run spacewalk-setup.
> >    * Yes Oracle packages need to be installed but it doesn't need
> > to be configured. We still need to sort out a lot of deps issues.
> > 2. Switch to spacewalk devel repo:
> > http://miroslav.suchy.cz/spacewalk/ 3. Update packages.
> > 4. Make sure you have PostgreSQL 8.4 installed:
> >    http://yum.pgsqlrpms.org/
> >    I use a script like this to blow it away and reinstall fresh:
> > 
> > yum remove -y postgresql postgresql-server
> > rm -rf /var/lib/pgsql/
> > yum install -y postgresql-libs postgresql postgresql-server
> > service postgresql initdb
> > service postgresql start
> > # Enable password authentication for network connection from
> > localhost: echo "local all all ident"
> > > /var/lib/pgsql/data/pg_hba.conf echo "host all all 127.0.0.1/32
> > > md5" >> /var/lib/pgsql/data/pg_hba.conf
> > echo "host all all ::1/128 md5" >> /var/lib/pgsql/data/pg_hba.conf
> > service postgresql restart
> > chkconfig postgresql on
> > su - postgres -c 'createuser --superuser -P spacewalk' <<EOF
> > spacewalk
> > spacewalk
> > EOF
> > su - postgres -c 'createdb spacewalk'
> > su - postgres -c 'createlang plpgsql spacewalk'
> > 
> > 5. yum install python-pgsql (adding the dep to spacewalk-backend
> > now) 6. Run spacewalk-setup and specify postgresql for the database
> > type. My answers file looks like:
> > 
> > admin-email = you at example.com
> > db-backend = postgresql
> > db-user = spacewalk
> > db-host = localhost
> > db-password = spacewalk
> > db-sid = spacewalk
> > db-port = 5432
> > db-protocol = TCP
> > ssl-set-org = Your Org
> > ssl-set-common-name = Your Org Test
> > ssl-set-org-unit = WHAT
> > ssl-set-city = Raleigh
> > ssl-set-state = NC
> > ssl-set-country = US
> > ssl-password = whatever
> > ssl-set-email = whatever at example.com
> > 
> > If you have the latest code this should get past schema population,
> > then fail during satellite activation, rhn-installation.log will
> > report a problem with modify_org_service procedure. The procedure
> > exists it's just probably untested and not working. :)
> > 
> > So next steps would be to correct the (IIRC) 2 stored procedure
> > problems that block spacewalk-setup from completing and then we're
> > getting quite clear to start diving into the app, fixing page by
> > page or so. 
> > 
> > DISCLAIMER: We're just talking about SURVIVING setup here, the app
> > and it's thousands of queries will still not work against
> > PostgreSQL, many stored procedures have not been ported, others
> > have been ported but never tested in a live environment so we don't
> > even know if they're working.
> > 
> > As additional help, when working on postgresql schema it's quite
> > easy to build the schema on your devel machine and copy it to your
> > installed spacewalk instance for each change you want to test:
> > 
> > cd schema/spacewalk/postgresql
> > make && scp main.sql
> > root at wherever:/etc/sysconfig/rhn/postgres/main.sql
> > 
> > Then on the spacewalk system re-run spacewalk-setup:
> > 
> > su - postgres -c 'dropdb spacewalk && createdb spacewalk &&
> > createlang plpgsql spacewalk'
> > 
> > spacewalk-setup --answer-file=/root/postgresql.txt --disconnected
> > 
> > Be warned that the "do you want to clear schema" option in
> > spacewalk-setup won't work for postgresql, I need to disable it
> > until we figure out how to do so.
> > 
> > That's about it. Will try to cleanup some of the above irritations
> > in the near future to make this a little smoother. Not pretty but
> > it's a start.
> > 
> > Cheers,
> > 
> > Devan
> 
> Devan - is this all on wiki somewhere? :) Want to make sure - I
> assume it is.
> 
> Thanks,
> Cliff
> 

It's not, but we have this here:

https://fedorahosted.org/spacewalk/wiki/PostgreSqlQuickStart

Which was meant to be a different approach (query/schema focused, not
necessarily involving an actual Spacewalk install). Not sure which
direction we want to go but I'll add another wiki page with the above.

https://fedorahosted.org/spacewalk/wiki/PostgreSqlDevelSetup

Devan

- -- 
  Devan Goodwin <dgoodwin at redhat.com>
  Software Engineer     Spacewalk / RHN Satellite
  Halifax, Canada       650.567.9039x79267
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)

iEYEARECAAYFAkqmX4oACgkQAyHWaPV9my44hgCdEHlv3cG3EKFan3YM4KwJh+oC
iugAniVSVlCw4SemkxLGZfTtPcmBDvNH
=qaI/
-----END PGP SIGNATURE-----



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic