Skip to content

www.OCaml.org

Christophe Troestler edited this page Aug 8, 2016 · 7 revisions

URL: http://ocaml.org
Maintainers: see https://ocaml.org/about.html
Governance: see https://ocaml.org/governance.html

The community website.

The OCaml.org website is a community driven website, created by and for OCaml developers and those interested in the language. Details about the Maintainers and contribution process can be found at http://ocaml.org/about.html and the specific resources via links at: https://github.com/ocaml/infrastructure/wiki

http://preview.ocaml.org currently redirects to http://ocaml.org

Machines

Rackspace Cloud

ocaml.org (was preview.ocaml.org)

This machine hosts the ocaml.org website.

Setup: Runs Debian stable, 2GB RAM, 80 GB Disk, UTC.

  • apt install lighttpd (serving static files from /var/www/)

  • apt install screen

  • apt install ocaml (just to get started, we use an opam switch)

  • apt install camlp4-extra (needed by tutorials)

  • adduser buildpreview user builds the website from the master (it used to build from the redesign branch)

  • opam using add-apt-repository ppa:avsm/ppa; apt-get update; apt-get install opam

  • opam 1.1.0-RC2 installed with --prefix /alien (/alien is owned by buildpreview)

  • opam install mpp omd ocamlnet xmlm ocamlrss (as buildpreview on the system switch)

  • apt install git

  • chown -R www-data:www-data /var/www

  • chmod -R g+ws /var/www

  • addgroup buildpreview www-data (so that buildpreview can write in /var/www)

  • apt install ntpdate (+ cronjob to sync the clock every hour)

  • apt install emacs (for convenience)

  • apt install curl (required)

  • load the private certificate in /etc/ssl/private/ocaml.org.pem

  • ln -s ../ssl/private/ocaml.org.pem /etc/lighttpd/server.pem

  • ln -s ../conf-available/10-ssl.conf /etc/lighttpd/conf-enabled/

  • cd /bin && ln -sf bash sh (not required anymore)

  • /home/buildpreview/build_ocaml.org.bash builds the preview website from https://github.com/ocaml/ocaml.org.git and puts it into /var/www: a cron-entry launches this job every hour, in case there's already a process that does the job, it exits. This makes the job robust to reboots and to taking-almost-forever-jobs.

  • apt install libssl-dev (required)

  • opam packages: ocamlfind ocamlrss ssl mpp ocamlnet omd xmlm

  • apt install php5 php5-fpm php5-gd php5-mysql mysql-server packages to enable PHP5 under lighttpd (using php5-fpm). A MySQL root password was created during installation. To enable PHP5, one must in addition go to /etc/lighttpd/conf-available, make a backup copy of 15-fastcgi-php.conf (say as 15-fastcgi-php-spawnfcgi.conf) and edit 15-fastcgi-php.conf so it reads:

    fastcgi.server += ( ".php" =>
            ((
                    "socket" => "/var/run/php5-fpm.sock",
                    "broken-scriptfilename" => "enable"
            ))
    )
    

    and then issue

    lighttpd-enable-mod fastcgi
    lighttpd-enable-mod fastcgi-php
    
  • Install Piwik. First create a MySQL database for it:

    $ mysql -p
    CREATE DATABASE piwik;
    CREATE USER 'piwik'@'localhost' IDENTIFIED BY 'oo_Stat.';
    GRANT ALL PRIVILEGES ON piwik.* TO 'piwik'@'localhost' WITH GRANT OPTION;
    

    Then decompress the Piwik tarball (this will create a piwik sub-directory), point your browser to the piwik/index.php file, and follow the instructions.

Access: Ashish Agarwal and Anil Madhavapeddy and Philippe Wang and Amir Chaudhry and Christophe Troestler and David Sheets.

Backups: todo