pkgutil -y -i postgresql93_server pg93_ip4r ap2_mod_asn route_views_data svcadm enable cswpostgresql-93 su - postgres psql template1 CREATE EXTENSION ip4r; CREATE DATABASE mirrorbrain; CREATE USER mb WITH PASSWORD 'brain123'; \c mirrorbrain; GRANT ALL PRIVILEGES ON TABLE pfx2asn TO mb; \q psql -U postgres -f /opt/csw/share/doc/ap2_mod_asn/asn.sql mirrorbrain exit (now root again) vi /etc/opt/csw/asn_import.conf [general] user = mb password = brain123 host = localhost dbname = mirrorbrain # asn_get_routeviews|asn_import Add to /opt/csw/apache2/etc/httpd.conf: DBDriver pgsql DBDParams "host=localhost user=mb password=brain123 dbname=mirrorbrain connect_timeout=15" Include etc/extra/mod_asn.conf
I am thinking of restructuring this as a whole now would be a good time.
At the moment we have „opencsw“ and „opencsw-official“ where the latter gets the
generation. I tend to have „opencsw“ synced back from mirror.opencsw.org and
„opencsw-new“ be the one generated. The generated one will have differences to
the one synced back. Here are some rough ideas on how I think it should be:
- generation on „web" as always
- catalogs are no longer files, but symlinks to a file with a timestamp. This is necessary as with the loadbalancer redirections to files should be consistent and having a file which changes in contents is really bad for this. The catalog is a symlink to the timestamped catalog file. This also allows better archiving if you don’t pull with —delete.
- For the mirrors to catch up the symlink is switched directly on „mirror“ roughly 6 hours after the catalog was pushed to the location from where the mirrors sync. This gives most mirrors the opportunity to sync up, see for stats http://18.104.22.168:8080/mirmon/mirmon.html Currently most of the traffic is catalog pulls which I want to offload by this action.
- For the mirmon-stats directly on „mirror“ a TIMESTAMP file is written to the topdir of opencsw/ allowing to get the freshness of a downstream mirror without the need to push catalog or other files. This TIMESTAMP is excluded from sync in the push done from web. Mirmon can automatically use these timestamp files, at the moment I am pulling the CREATINDATE from unstable catalog (dotsrc does not have unstable, so no date there). The TIMESTAMP is also more flexible as downstream mirrors can decide to only mirror a part.
- The current „mirror.opencsw.org“ is renamed to „download.opencsw.org“ where „mirror.opencsw.org“ gets you to the loadbalancer, see for demonstration http://22.214.171.124:8080/opencsw/ Note the „Details“ link next to a real file. Additionally, a mirrorlist is generated automatically like http://126.96.36.199:8080/mirrorlist.html (All not regularly synced at the moment, however, I find it interesting to see how europe-centric we are, that our mirror in denmark is not carrying unstable/ and we actually have two downstream mirrors who have allpkgs.
The catalog generation can be triggered by comparing the previous catalog to the new catalog just by putting it aside in bin/generate-unstable. By the way, I thought we didn’t use bldcat any more but produce the catalog directly?
- Example for a page with load balanced content:
- Landing page http://mirrors.opensuse.org (made with "mb mirrorlist" and custom header/footer)
- Nice example
- Examples on "How to become a mirror"