]> git.decadent.org.uk Git - dak.git/blob - setup/README
Add minimal dak.conf examples
[dak.git] / setup / README
1 Initialising a dak database schema
2 ==================================
3
4 The following packages are needed:
5  * postgresql-9.0 postgresql-client-9.0 postgresql-plperl-9.0 postgresql-plpython-9.0 postgresql-9.0-debversion 
6
7 (the schema assumes at least postgresql 9.0; ftpmaster in Debian currently uses
8 the squeeze postgresql 9.0 backport)
9
10 The following roles are assumed to exist:
11  * dak: database superuser: needs to be an actual user
12  * ftpmaster: role which should be given to archive administrators
13  * ftpteam: people who can do NEW processing, overrides, removals, etc
14  * ftptrainee: people who can add notes to packages in NEW
15
16 For the purposes of this document, we'll be working in /srv/dak
17
18 Set up the dak user on both the system and in postgres:
19 # sudo adduser dak
20 # sudo addgroup ftpmaster
21 # sudo addgroup dak ftpmaster
22 # sudo -u postgres createuser -s dak
23
24 Set up the dak directory:
25 # sudo mkdir /srv/dak
26 # sudo chown dak:ftpmaster /srv/dak
27 # sudo chmod 2775 /srv/dak
28
29 Become the dak user:
30 # sudo -u dak -s -H
31
32 Create the additional roles:
33 # createuser -S -R -D ftpmaster
34 # createuser -S -R -D ftpteam
35 # createuser -S -R -D ftptrainee
36
37 Create an empty database with SQL_ASCII encoding:
38 # createdb -T template0 -E SQL_ASCII -O dak projectb
39
40 Import the schema:
41 # psql -f current_schema.sql -d projectb
42
43 Set up some core data in projectb to get started (read the init_vars file if
44 you wish to customise various aspects):
45 # ./init_core
46
47 Add some architectures you care about:
48 # dak admin architecture add i386 "Intel x86 port"
49 # dak admin architecture add amd64 "AMD64 port"
50
51 Add a suite (origin=, label= and codename= are optional)
52 # dak admin suite add-all-arches unstable x.y.z origin=MyDistro label=Master codename=sid