fedora-infrastructure/fas
2008-03-18 10:40:46 -04:00
..
client Kill a tab in fasClient 2008-03-14 19:40:57 -04:00
fas Add getttext to help.py, regenerate POT and merge POs. 2008-03-18 10:40:46 -04:00
po Add getttext to help.py, regenerate POT and merge POs. 2008-03-18 10:40:46 -04:00
.gitignore Add build, gnupg, locale, ssl to .gitignore 2008-03-16 15:21:02 -04:00
convert.py Fix convert, user.py imports, remove test translation. 2008-03-11 19:47:07 -04:00
COPYING Add a GPLv2 license file. 2008-03-09 18:03:08 -07:00
fas.cfg Add language select box, LINGUAS file, and relevant documentation. 2008-03-17 13:48:33 -04:00
fas.spec Clean up spec a bit, modify --install-data to suit setup.py changes. 2008-03-16 15:16:49 -04:00
fas2.sql Fix the cla.txt template problem, fix initial inserts in schema, and gettext calls in template. 2008-03-15 02:31:10 -04:00
MANIFEST.in Fix up templates a bit, include theme/fas in MANIFEST.in. The location of LINGUAS still isn't handled properly. 2008-03-18 00:37:28 -04:00
pybabel.conf Fix some problems with extraction, dedent wasn't worth it. To test, set locale to "test" using either of the previously mentioned methods. 2008-03-03 00:48:26 -05:00
README Add language select box, LINGUAS file, and relevant documentation. 2008-03-17 13:48:33 -04:00
sample-prod.cfg Initial import. Old location http://cvs.fedoraproject.org/viewcvs/accounts2/?root=fedora 2007-07-06 09:24:13 -05:00
setup.py Add language select box, LINGUAS file, and relevant documentation. 2008-03-17 13:48:33 -04:00
start-fas * Replace start-fas.py with start-fas. 2008-03-09 12:39:13 -07:00
test.cfg Initial import. Old location http://cvs.fedoraproject.org/viewcvs/accounts2/?root=fedora 2007-07-06 09:24:13 -05:00
TODO * Initial spec file. Update TODO with setup.py problems we have to work 2008-03-10 12:24:21 -07:00

=====================
Fedora Account System
=====================

:Authors: Ricky Zhou
	  Mike McGrath
	  Toshio Kuratomi
:Contact: fedora-infrastructure-list@redhat.com
:Date: Friday, 29 February, 2008
:Version: 0.1

The Fedora Account System holds information on Fedora Contributors to give
them access to the wonderful things that Fedora has.

.. contents::

This is a TurboGears_ project. It can be started by running the start-fas.py
script.

.. _TurboGears: http://www.turbogears.org

-------------
Prerequisites
-------------
Before you can get started, make sure to have the following packages installed
(example being from Fedora 8 with a local postgres database server)::

  yum install git-core postgresql-plpython postgresql-server postgresql-python \
  python-TurboMail TurboGears pygpgme python-sqlalchemy python-genshi \
  python-psycopg2 pytz python-babel babel

  # Note: on RHEL5 you need postgresql-pl instead of postgresql-plpython

At present, the database needs to be a postgres database since we use triggers
to manage some of the data (like syncing accounts with bugzilla).

If you are unfamiliar with postgres and this is your first time installing it,
you will want to generate the database and allow users to connect.  First as
root run::

  /etc/init.d/postgresql initdb

Then make sure the bottom of /var/lib/pgsql/data/pg_hba.conf looks like::

  # TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

  # "local" is for Unix domain socket connections only
  local   all         all                               ident sameuser
  # IPv4 local connections:
  #host    all         all         127.0.0.1/32          ident sameuser
  # IPv6 local connections:
  #host    all         all         ::1/128               ident sameuser
 
  host all all 0.0.0.0 0.0.0.0 md5

Then just start the postgres database:

  /etc/init.d/postgresql start

-------
Hacking
-------
If you want to hack on the Account System you need to checkout the module.
It's presently part of the fedora-infrastructure git repo::
  git clone git://git.fedorahosted.org/git/fedora-infrastructure
  cd fedora-infrastructure/fas

Once you are inside you're fresh checkout, you need to regenerate some files
that are created by the build script, setup.py::
  python setup.py egg_info && python setup.py build

This will create the fas.egg-info directory which has metadata about the
program.  It allows things like the identity provider to work.

Do any configuration necessary and start up the postgres server.  Then make the
plpython language available on new databases, create a postgres user to manage
the data and import the schema::
  sudo -u postgres createlang plpythonu template1
  sudo -u postgres createuser --encrypted --pwprompt fedora
  sudo -u postgres psql < fas2.sql

The last thing to do is configure the application to use your settings.
You'll need to edit dev.cfg and change the following lines::
  mail.on = False # Set to True if you want to test notification sending
  mail.server = 'localhost' # Your mail server
  sqlalchemy.dburi = "postgres://fedora:pass@localhost/fas2" # Fill in the
  # password you gave in the createuser step and the db host if it's not
  # localhost.
  server.socket_port=8080 # Change if you don't want to run on port 8080
  base_url_filter.base_url = "http://localhost:8080/fas" # Change the port if
  # you changed server.socket_port above.

You may also need to change some of the directories and settings in
fas/config/app.cfg.  

You should then be able to start the server and test things out::
  ./start-fas.py
  # browse to http://localhost:8080/fas/

The default administrative user is "admin" with password "admin"

Another handy command for trying short snippets of code is tg-admin shell.
Make sure you're in the top level directory that start-fas.py and dev.cfg is
in, then run::
  tg-admin shell

--------------------
Enabling Local Users
--------------------
* THIS IS EXPERIMENTAL *

To allow local users to log in to your system, first enable fas via the
client in fas/client/fasClient.py

  ./fasClient -e

To disable run

  ./fasClient -d

To sync with your local install run:

  ./fasClient -i

To test, look and see if your groups or users show up with getent.  For
example:

  getent passwd
  getent group

------------
Localization
------------
To generate the POT file (located in the po/ subdirectory), run the
following from the top level directory:

  pybabel extract -F pybabel.conf -o po/fas.pot .

Message merging should be done manually using msgmerge at this point.  

  python setup.py build

compiles the PO files and places them where TurboGears will look for
them.  To enable a language to be available to users, it must be added
to po/LINGUAS.