install database creation script and template of index.conf
authorAleš Křenek <ljocha@ics.muni.cz>
Wed, 18 Aug 2004 14:51:18 +0000 (14:51 +0000)
committerAleš Křenek <ljocha@ics.muni.cz>
Wed, 18 Aug 2004 14:51:18 +0000 (14:51 +0000)
org.glite.lb.server/Makefile
org.glite.lb.server/config/glite-lb-dbsetup.sql [new file with mode: 0644]
org.glite.lb.server/config/glite-lb-index.conf.template [new file with mode: 0644]

index b57fbfb..9d89820 100644 (file)
@@ -112,11 +112,14 @@ distbin:
        rm -rf tmpbuilddir
         
 install:
-       mkdir -p ${PREFIX}/bin
+       mkdir -p ${PREFIX}/bin ${PREFIX}/etc
        for p in bkserverd bkindex; do \
                ${INSTALL} -m 755 "glite_lb_$$p" "${PREFIX}/bin/glite-lb-$$p"; \
        done
 
+       for f in dbsetup.sql index.conf.template; do \
+               ${INSTALL} -m 644 "glite-lb-$$p" ${PREFIX}/etc
+
 clean:
 
 %.c: %.c.T
diff --git a/org.glite.lb.server/config/glite-lb-dbsetup.sql b/org.glite.lb.server/config/glite-lb-dbsetup.sql
new file mode 100644 (file)
index 0000000..9d127b6
--- /dev/null
@@ -0,0 +1,116 @@
+CREATE DATABASE  lbserver20;
+GRANT ALL PRIVILEGES ON lbserver20.* TO lbserver@localhost IDENTIFIED BY '';
+USE lbserver20;
+
+create table jobs (
+       jobid           char(32)        binary not null,
+       dg_jobid        varchar(255)    binary not null,
+       userid          char(32)        binary not null,
+       aclid           char(32)        binary null,
+
+       primary key (jobid),
+       unique (dg_jobid),
+       index (userid)
+);
+
+create table users (
+       userid          char(32)        binary not null,
+       cert_subj       varchar(255)    binary not null,
+
+       primary key (userid),
+       unique (cert_subj)
+);
+
+create table events (
+       jobid           char(32)        binary not null,
+       event           int             not null,
+       code            int             not null,
+       prog            varchar(255)    binary not null,
+       host            varchar(255)    binary not null,
+       time_stamp      datetime        not null,
+       userid          char(32)        binary null,
+       usec            int             null,
+       level           int             null,
+
+       arrived         datetime        not null,
+       
+
+       primary key (jobid,event),
+       index (time_stamp),
+       index (host),
+       index (arrived)
+);
+
+create table short_fields (
+       jobid           char(32)        binary not null,
+       event           int             not null,
+       name            varchar(200)    binary not null,
+       value           varchar(255)    binary null,
+
+       primary key (jobid,event,name)
+);
+
+create table long_fields (
+       jobid           char(32)        binary not null,
+       event           int             not null,
+       name            varchar(200)    binary not null,
+       value           mediumblob      null,
+
+       primary key (jobid,event,name)
+);
+
+create table states (
+       jobid           char(32)        binary not null,
+       status          int             not null,
+       seq             int             not null,
+       int_status      mediumblob      not null,
+       version         varchar(32)     not null,
+       parent_job      varchar(32)     binary not null,
+
+       primary key (jobid),
+       index (parent_job)
+       
+);
+
+create table status_tags (
+       jobid           char(32)        binary not null,
+       seq             int             not null,
+       name            varchar(200)    binary not null,
+       value           varchar(255)    binary null,
+
+       primary key (jobid,seq,name)
+);
+
+create table server_state (
+       prefix          varchar(100)    not null,
+       name            varchar(100)    binary not null,
+       value           varchar(255)    binary not null,
+
+       primary key (prefix,name)
+);
+
+create table acls (
+       aclid           char(32)        binary not null,
+       value           mediumblob      not null,
+       refcnt          int             not null,
+
+       primary key (aclid)
+);
+
+create table notif_registrations (
+       notifid         char(32)        binary not null,
+       destination     varchar(200)    not null,
+       valid           datetime        not null,
+       userid          char(32)        binary not null,
+       conditions      mediumblob      not null,
+
+       primary key (notifid)
+);
+
+create table notif_jobs (
+       notifid         char(32)        binary not null,
+       jobid           char(32)        binary not null,
+
+       primary key (notifid,jobid),
+       index (jobid)
+);
diff --git a/org.glite.lb.server/config/glite-lb-index.conf.template b/org.glite.lb.server/config/glite-lb-index.conf.template
new file mode 100644 (file)
index 0000000..594681b
--- /dev/null
@@ -0,0 +1,7 @@
+[
+       JobIndices = {
+               [ type = "system"; name = "owner" ],
+               [ type = "system"; name = "location" ],
+               [ type = "system"; name = "destination" ]
+       }
+]