1. 03 Sep, 2018 4 commits
    • Jérome Perrin's avatar
      erp5: start runUnitTest's zserver on the partition IP · d17377ca
      Jérome Perrin authored
      We don't want runUnitTest is to listen on 127.0.0.1, as it is not
      allowed for SlapOS instances, runUnitTest wrapper is extended to include
      `--zserver` with a pre-assigned ip:port.
      
      runTestSuite starts several test in parrallel (controlled by
      `--node_quantity` argument, which is passed by erp5testnode), so we need
      to make sure that we provide it with enough ip:port. For this, we
      extended runTestSuite with a `--zserver_address_list` argument and we
      generate a wrapper with a list of pre-assigned ip:ports. The length of
      this list is also controlled by `mariadb.test-database-amount` instance
      parameter (eventhough it's slightly different).
      
      Because zelenium tests needs to access this zserver over a secure origin
      (otherwise modern browser features such as service worker are not
      available), add an https proxy in the apache from the balancer
      partition.
      
      runUnitTest and runTestSuite have been extended with resp.
      `--zserver_frontend_url` and `--zserver_frontend_url_list` arguments and
      the URLs published by the balancer paritions are set in the wrappers.
      
      This introduces a circular depencency, balancer partition needs to know
      the address of the testrunners and zope partitions needs to know the
      URLs of the corresponding http proxies on the apache. This is is handled
      by `slapos.recipe:publish-early`:
      
       1. request zope family with an empty `test-runner-apache-url-list`.
          zope is instanciated a first time.
          zope returns `test-runner-address-list` ( a list of (host, port)
          tuples )
       2. request balancer with `test-runner-address-list`
          balancer is instanciated.
          balancer returns `{{ family_name }}-test-runner-url-list` ( a list
          of apache URLs ), which are published in the root partition.
       3. zope family is re-requested with
          updated`test-runner-apache-url-list` information
      
      instance-erp5.cfg.in template was also reorganised to move
      `[publish-early]` next to `[publish]` at the bottom of the file.
      
      Document the existing behavior that setting mariadb.test-database-amount
      to 0 disable the creation of testrunner.
      d17377ca
    • Jérome Perrin's avatar
    • Jérome Perrin's avatar
      component/apache: fix documentation of backend template · d082d810
      Jérome Perrin authored
      `enable_authentication` parameter of `backend-list`
      was not documented.
      d082d810
    • Jérome Perrin's avatar
      b4e0f378
  2. 31 Aug, 2018 3 commits
  3. 30 Aug, 2018 9 commits
  4. 29 Aug, 2018 10 commits
  5. 28 Aug, 2018 3 commits
  6. 27 Aug, 2018 4 commits
  7. 23 Aug, 2018 1 commit
  8. 22 Aug, 2018 2 commits
  9. 21 Aug, 2018 4 commits
    • Jérome Perrin's avatar
      fixup! component/perl: Infrastructure for CPAN packages in inpendent parts · 235c3bca
      Jérome Perrin authored
      This usage of textwrap.dedent *sometimes* does not work and sometimes
      create files with indentation, so we don't have "#!/bin/sh" as first
      line but "    #!/bin/sh"
      
      Use a "safer" version that should work in all cases.
      235c3bca
    • Jérome Perrin's avatar
      fixup! component/*: use specific perl · 8227e655
      Jérome Perrin authored
      perl path does not need extra /bin
      8227e655
    • Romain Courteaud's avatar
    • Jérome Perrin's avatar
      Use separate part for each perl package · 1171acb4
      Jérome Perrin authored
      Rework perl installation to install each package in a separate directory.
      
      Each package install a `perl` interpreter for each package, which is implemented a shell wrapper setting `$PERL5LIB` with the path of this package and its dependencies.
      
      To install a perl package, use `perl-CPAN-package` macro, like in this example for a fictional `XXX::YYY` package:
      
      ```
      [perl-XXX-YYY]
      <= perl-CPAN-package
      module = XXX/XXX-YYY
      version = 1.2.3
      md5sum = ab68b329da9893e34099c7d8ad5cb9c940cd123
      ```
      
      This will download package from https://www.cpan.org/modules/by-module/XXX/XXX-YYY-1.2.3.tar.gz and install using the usual `perl Makefile.PL && make && make install` sequence.
      
      To install package with dependencies, use the `inc=` argument, like in this example for  another fictional package `XXX::ZZZ` package that would depend on `XXX::YYY` and `XXX::ABC` :
      
      ```
      [perl-XXX-ZZZ]
      <= perl-CPAN-package
      module = XXX/XXX-ZZZ
      version = 1.2.3
      md5sum = 401b30e3b8b5d629635a5c613cdb7919
      
      inc = ${perl-XXX-YYY:site_perl}:${perl-XXX-ABC:site_perl}
      ```
      
      The full list of options is described in the [macro](https://lab.nexedi.com/nexedi/slapos/blob/a5bec95c/component/perl/buildout.cfg#L31-65).
      
      
      That macro creates an interpreter for each package, but sometimes we need to create an interpreter with multiple packages. The `perl-wrapper` macro is available for this. It also accepts a `inc=` argument in the same format. Because this wrapper is implemented using `-I` argument, it is also suitable for scrips running in perl [taint mode](https://perldoc.perl.org/perlsec.html#Taint-mode-and-%40INC), like the w3-validator we are using.
      
      All perl components and perl usages have been updated to this new infrastructure.
      
      Some (apparently) unmaintained components were using an obsolete `slapos.recipe.build:cpan` recipe. They were used only in mioga2 from unstable, so I moved them inline in mioga2 software.
      
      /reviewed-on nexedi/slapos!341
      1171acb4