welcome: please sign in

Diff for "DaemonAdmin/Portal"

Differences between revisions 14 and 26 (spanning 12 versions)
Revision 14 as of 2012-12-30 23:02:22
Size: 2453
Editor: ClintonEbadi
Comment: add webnode
Revision 26 as of 2018-12-01 22:19:39
Size: 4212
Editor: ClintonEbadi
Comment: LD_LIBRARY_PATH gunk is no longer needed, multiarch works fine nowadays
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

The HCoop portal runs https://members.hcoop.net and https://join.hcoop.net, generates the [[http://hcoop.net/who|member directory]], and manages the vmail user database.

<<TableOfContents>>

= Build Requirements =

The portal requires [[http://git.hcoop.net/?p=hcoop/mlt.git;a=summary|mlt]] (an html templating system for smlnj) and [[http://git.hcoop.net/?p=hcoop/smlsql.git;a=summary|smlsql]] (postgresql bindings for smlnj). They are managed in the standard hcoop git repositories. The password generating tool also relies upon [[https://packages.debian.org/search?keywords=apg|apg]] (automatic password generator).

The portal build utilities stored in and installed to `~hcoop/portal-tools/...`

 * `.../src`: checkouts of mlt and smlsql (portal build file references smlsql from here)
 * `.../etc`: location of default `mlt.conf`, `hcoop.header`, `hcoop.footer`
 * `.../bin`: `mlt` and `hcoop_header` binaries
 * `.../lib32`: 32-bit libraries needed by the smlsql
 * `.../cgi`: portal cgi binaries

mlt and smlsql licensed under the LGPL version 2.1 or any later version.
Line 5: Line 23:
The portal source lives in module `portal` of [[http://git.hcoop.net/?p=hcoop/portal.git;a=summary|our git server]]. The main check-out is in `/afs/hcoop.net/user/h/hc/hcoop/portal`. The portal source lives in module `portal` of [[http://git.hcoop.net/?p=hcoop/portal.git;a=summary|our git server]]. The main check-out is in `/afs/hcoop.net/user/h/hc/hcoop/portal3`.

The portal source is available under the GPLv3 or any later version.
Line 9: Line 29:
Run `become_hcoop` before modifying files in the main check-out or running any git commands that would modify it. Run `/afs/hcoop.net/common/etc/scripts/become-hcoop` before modifying files in the main check-out or running any git commands that would modify it.
Line 11: Line 31:
To build it yourself:
 *
There are small CGI wrappers which just run compiled binaries in `~hcoop/portal/out/`. `mlt.conf` contains CGI publish path (modify this to suit your system if building locally). These wrappers are generated automatically by `mlt`.
 * To recompile and publish on deleuze: {{{
become_hcoop
cd ~/portal
mlt
}}}
There are small CGI wrappers which just run compiled binaries in `~hcoop/portal-tools/cgi/`. The file `mlt.conf` contains the CGI installation path (modify this to suit your system if building locally). These wrappers are generated automatically by `mlt`.

== Publishing ==

To recompile and publish, login to the webserver hosting the portal (`navajos` as of 2018-03, but verify in the `hcoop.net` domtool configuration), enter the portal source directory, and run `~hcoop/portal-tools/bin/mlt`:

{{{
/afs/hcoop.net/common/etc/scripts/become-hcoop
cd ~/portal3
~/portal-tools/bin/mlt
}}}

== Regenerating Page Header ==
Line 21: Line 48:
 * hcoop_header is the one line script `cat /etc/hcoop.header | sed "s/TITLE/$1/g"`
 * hcoop_footer is the one line script `cat /etc/hcoop.footer`
 * You need /etc/hcoop.header and /etc/hcoop.footer, which are
 {{{
<html><head>
<link rel="stylesheet" type="text/css" href="/hcoop.css" />
<title>TITLE</title>
</head><body>
Line 30: Line 49:
<div class="main">  * hcoop_header is the one line script `cat $prefix/etc/hcoop.header | sed "s/TITLE/$1/g"`
 * hcoop_footer is the one line script `cat $prefix/etc/hcoop.footer`
 * You need `~hcoop/portal-tools/etc/hcoop.{header,footer}` (currently not tracked in git)
Line 32: Line 53:
<div class="title">
<img class="globe" src="/globe.gif" />
<h1>TITLE</h1>
</div>

<div class="break"></div>}}}{{{
</div>

</body></html>
}}}

== Application Within the Portal ==
== Other Applications Within the Portal ==
Line 48: Line 58:
 * `contact/` Appears to be unused (does not build)
 * `listaddrs/` '''Unknown'''
 * `mailman/` '''Unknown'''
 * `contact/` Emergency contact directory for admins
 * `listaddrs/` Lists all hcoop member email addresses
 * `mailman/` portal subscription helper program
Line 53: Line 63:
 * `static/` Public member directory  * `static/` Public member directory generator
Line 56: Line 66:
= Adding Machine =
= Maintenance =

== Cron Jobs ==

The portal source contains a crontab which should be installed and run under the `hcoop` user. This sends out monthly dues reminders and periodically generates semi-static pages.

== Adding Machine ==
Line 65: Line 82:
If the machine should show up in the portal for members to request permissions or packages on, add it to `ActiveWebNodes`.

{{{
insert into ActiveWebNode VALUES ((select id from WebNode where name = '$HOST'));
}}}

The HCoop portal runs https://members.hcoop.net and https://join.hcoop.net, generates the member directory, and manages the vmail user database.

1. Build Requirements

The portal requires mlt (an html templating system for smlnj) and smlsql (postgresql bindings for smlnj). They are managed in the standard hcoop git repositories. The password generating tool also relies upon apg (automatic password generator).

The portal build utilities stored in and installed to ~hcoop/portal-tools/...

  • .../src: checkouts of mlt and smlsql (portal build file references smlsql from here)

  • .../etc: location of default mlt.conf, hcoop.header, hcoop.footer

  • .../bin: mlt and hcoop_header binaries

  • .../lib32: 32-bit libraries needed by the smlsql

  • .../cgi: portal cgi binaries

mlt and smlsql licensed under the LGPL version 2.1 or any later version.

2. Source

The portal source lives in module portal of our git server. The main check-out is in /afs/hcoop.net/user/h/hc/hcoop/portal3.

The portal source is available under the GPLv3 or any later version.

3. Building

Run /afs/hcoop.net/common/etc/scripts/become-hcoop before modifying files in the main check-out or running any git commands that would modify it.

There are small CGI wrappers which just run compiled binaries in ~hcoop/portal-tools/cgi/. The file mlt.conf contains the CGI installation path (modify this to suit your system if building locally). These wrappers are generated automatically by mlt.

3.1. Publishing

To recompile and publish, login to the webserver hosting the portal (navajos as of 2018-03, but verify in the hcoop.net domtool configuration), enter the portal source directory, and run ~hcoop/portal-tools/bin/mlt:

/afs/hcoop.net/common/etc/scripts/become-hcoop
cd ~/portal3
~/portal-tools/bin/mlt

3.2. Regenerating Page Header

header.mlt and footer.mlt are built from assorted other files. Running make in a check-out directory should build them. See the Makefile for how they're built. Note that make won't publish changes that you make onto the real web sites; you must use mlt for that.

Needed files for building:

  • hcoop_header is the one line script cat $prefix/etc/hcoop.header | sed "s/TITLE/$1/g"

  • hcoop_footer is the one line script cat $prefix/etc/hcoop.footer

  • You need ~hcoop/portal-tools/etc/hcoop.{header,footer} (currently not tracked in git)

3.3. Other Applications Within the Portal

There are some subdirectories of portal that contain different web apps, like app (the source for join.hcoop.net). You must run mlt separately in any of these directories to publish changes in it. These include:

  • app/ The Join script

  • contact/ Emergency contact directory for admins

  • listaddrs/ Lists all hcoop member email addresses

  • mailman/ portal subscription helper program

  • passgen/ Password reset tool

  • remind/ Low balance reminder

  • static/ Public member directory generator

  • vmailpasswd Vmail password changing

4. Maintenance

4.1. Cron Jobs

The portal source contains a crontab which should be installed and run under the hcoop user. This sends out monthly dues reminders and periodically generates semi-static pages.

4.2. Adding Machine

To support user requests for a machine, insert a WebNode into the database. The Debian version should be the release name (e.g. "squeeze").

INSERT INTO WebNode (id, name, descr, debian)
        VALUES ((select max(id)+1 from WebNode), $HOST, $DESCRIPTION, $DEBIANVERSION);

If the machine should show up in the portal for members to request permissions or packages on, add it to ActiveWebNodes.

insert into ActiveWebNode VALUES ((select id from WebNode where name = '$HOST'));


CategorySystemAdministration

DaemonAdmin/Portal (last edited 2018-12-01 22:19:39 by ClintonEbadi)