welcome: please sign in

Diff for "DaemonAdmin/Portal"

Differences between revisions 7 and 20 (spanning 13 versions)
Revision 7 as of 2010-03-12 23:16:10
Size: 1818
Editor: RichardDarst
Comment: update with more building instructions
Revision 20 as of 2014-04-29 05:21:04
Size: 4176
Editor: ClintonEbadi
Comment: mention activewebnodes
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
The portal source lives in module `portal` of [[http://hcoop.sf.net/|our SourceForge project]]'s CVS repository. The main check-out is in `/afs/hcoop.net/user/h/hc/hcoop/portal`.
You should `become_hcoop` before modifying files in the main check-out or running any CVS commands that would modify it.
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.
Line 6: Line 5:
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).
 * To recompile and publish on deleuze: {{{
<<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.

= Source =

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 licensing is currently unclear'' (but should soon be properly freely licensed -- ClintonEbadi <<DateTime(2014-02-21T15:09:17-0400)>>)

= Building =

Run `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/out/`. 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`.

`mlt` at hcoop has been modified to build with `LD_LIBRARY_PATH` set to our lib32 directory (since squeeze does not have Multi-arch) and to set the `LD_LIBRARY_PATH` in generated wrapper scripts. This is unfortunately needed to load `libpq` until we upgrade the web servers to Wheezy.

== Publishing ==

To recompile and publish, enter the portal source directory and run `~hcoop/portal-tools/bin/mlt`:

{{{
Line 11: Line 42:
mlt}}} ~portal-tools/bin/mlt
}}}

== Regenerating Page Header ==
Line 15: Line 49:
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. Needed files for building:
Line 17: Line 51:
How to build: FIXME
* 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
 {{{
r
kd_admin@deleuze:/afs/hcoop.net/common$ cat /etc/hcoop.header
<html><head>
<link rel="stylesheet" type="text/css" href="/hcoop.css" />
<title>TITLE</title>
</head><body>
 * 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 28: Line 55:
<div class="main"> == Other Applications Within the Portal ==
Line 30: Line 57:
<div class="title">
<img class="globe" src="/globe.gif" />
<h1>TITLE</h1>
</div>
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:
Line 35: Line 59:
<div class="break"></div>
rkd_admin@deleuze:/afs/hcoop.net/common$ cat /etc/hcoop.footer
</div>
 * `app/` The Join script
 * `contact/` Appears to be unused (does not build)
 * `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
Line 39: Line 68:
</body></html>
= Maintenance =

== 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);
Line 41: Line 79:

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/portal.

The portal licensing is currently unclear (but should soon be properly freely licensed -- ClintonEbadi 2014-02-21 19:09:17)

3. Building

Run 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/out/. 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.

mlt at hcoop has been modified to build with LD_LIBRARY_PATH set to our lib32 directory (since squeeze does not have Multi-arch) and to set the LD_LIBRARY_PATH in generated wrapper scripts. This is unfortunately needed to load libpq until we upgrade the web servers to Wheezy.

3.1. Publishing

To recompile and publish, enter the portal source directory and run ~hcoop/portal-tools/bin/mlt:

become_hcoop
cd ~/portal
~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/ Appears to be unused (does not build)

  • 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. 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)