Skip to content
This repository was archived by the owner on May 13, 2022. It is now read-only.

euven/moodle-ci

Folders and files

NameName
Last commit message
Last commit date
Oct 22, 2015
Oct 22, 2015
Feb 4, 2015
Jan 8, 2015
Dec 17, 2015
Jan 8, 2015
Dec 17, 2015
May 27, 2016
Oct 21, 2014
May 27, 2016
Dec 17, 2015
Oct 27, 2015
May 27, 2016
May 27, 2016
Jan 14, 2015
Jan 8, 2015
Dec 17, 2015
May 29, 2015
May 29, 2015

Repository files navigation

moodle-ci - testing in parallel on Openstack

These scripts allow you to run Moodle's PHPUnit, Behat and lint tests in parallel, on Openstack ;)

Other scripts are also included that are used with Jenkins:

  • auto job creator updatejobs.sh (put on cron) - uses jenkins-autojobs (pip install jenkins-autojobs)
  • local git mirrors - updatemirrors.sh (put on cron)

requirements

installation and config

jenkins master server

  • Apart from installing and setting up Jenkins, the following is required:
sudo apt-get install zip python-pip python-dev
sudo pip install python-novaclient
  • Create an ssh key pair for jenkins; add the public key to openstack, with a key name of: jenkins
  • Copy config-dist.ini to config.ini and edit
  • As the jenkins user, checkout this repo to /var/lib/jenkins/moodle-ci
  • Download Selenium's standalone server (version: $SELENIUM_VERSION) and stick it in /var/lib/jenkins/moodle-ci/ too
  • cp config-dist.sh config.sh and fill in creds
  • Configure a jenkins job to:
    • execute runtests.sh when a build is triggered
    • execute cleanup.sh as a post-build script (bash traps don't seem to work yet)

openstack snapshot

To prepare the snapshot for running Moodle/Totara tests, start off by installing the following:

sudo apt-get install php5 php5-dev php5-gd php5-pgsql php5-xdebug php5-curl php5-xmlrpc php5-intl php-soap haveged xvfb postgresql openjdk-7-jre unzip wget curl git vim firefox htop ghostscript parallel xmlstarlet xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic
sudo locale-gen en_AU.utf8
sudo update-locale
  • For more speedz create a ram mount, where we'll host the db, code and sitedata
    • Edit /etc/fstab and add /mnt/ramdisk tmpfs defaults,size=2048M (depending on the flavour you plan to use, you might have to increase this)
    • sudo mount -a
  • Add an ubuntu postgres user with creds as in cloudconfig.php
  • Edit postgres.conf to point to a ramdisk location: data_directory = '/mnt/ramdisk/postgresql/9.3/main'

NOTE: some of the scripts might have to be modified to point to where you host your code and sitedata (TODO: make these locations configurable)

These instructions are not perfect and a work in progress - feel free to contribute if anything is wrong/missing! Enjoy! :)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published