GithubHelp home page GithubHelp logo

puppet-moodle's Introduction

moodle

Table of Contents

  1. Overview
  2. Requirements
  3. Usage
  4. Example Usage
  5. Limitations
  6. Links

Overview

This module installs and configures a Moodle instance.

Requirements

This module have some external dependencies:

  • PHP 5.4 or higher -- this is a Moodle 3.x requirement. Installing on Ubuntu 14.04 will have this dependency
  • Apache Webserver
  • MySQL Database

Usage

To manage a Moodle instance, use the moodle class.

	class { 'moodle':
		<<params>>
	}

Available parameters are:

  • install_dir - directory where the Moodle distribution will be extracted. Since Moodle distributions contain the moodle root folder, this directory should end with /moodle. For example /opt/www/moodle. The parent directory must already exist on the node.
  • download_base - the base URL for downloading the Moodle distribution. Defaults to https://download.moodle.org/download.php/direct/stable30.
  • moodle_version - the version of Moodle to download. Defaults to 3.0.1.
  • default_lang - The default language setting for Moodle. Defaults to en.
  • wwwrooturl - The root URL for the Moodle web site. Defaults to http://$::fqdn.
  • www_owner - The OS user that will own the Moodle base directories (web and data).
  • www_group - The OS group that will own the Moodle base directories (web and data).
  • dataroot - The Moodle data directory. Defaults to /opt/moodledata.
  • create_db - A boolean indicating whether or not the module should manage the database. Defaults to true.
  • create_db_user - A boolean indicating whether or not the module should manage the database user. Defaults to true.
  • dbtype - The database type to use. Currently, only MySQL databases are supported, so mysqli is the default (and only supported) value. This will change once PostgreSQL support is added.
  • dbhost - Hostname for the database server. Defaults to localhost.
  • dbname - The database name for the Moodle data. Defaults to moodle.
  • dbuser - The database username. Defaults to root.
  • dbpass - The database password. Defaults to empty string.
  • dbport - The TCP/IP port for the database server. Defaults to 3306 (the MySQL default)
  • dbsocket -
  • prefix - Table prefix for Moodle-related tables. Defaults to mdl_.
  • fullname - The full name for the Moodle site.
  • shortname - The short name for the Moodle site.
  • summary - A summary description for the Moodle site.
  • adminuser - The Moodle administrative user. Defaults to admin.
  • adminpass - The Moodle administrator's password. Defaults to adminpass.
  • adminemail - The Moodle administrator's email address. Defaults to [email protected].

Example Usage

Note: this module only manages moodle. It does not manage the underlying database server or web server.

For example, to install moodle into /opt/moodle and use Apache and MySQL, you could create a profile such as:

$install_dir = '/opt/moodle'
class { 'apache':
  mpm_module => 'prefork',
}
class { 'apache::mod::php': }
class { 'mysql::server': }
class { 'mysql::bindings': php_enable => true, }
apache::vhost { $::fqdn:
  docroot        => $install_dir,
  manage_docroot => false,
  port           => '80',
}
class { 'moodle':
  install_dir => $install_dir,
  dbtype      => $dbtype,
  dbuser      => 'moodleuser',
  dbpass      => 'moodleP@ss',
  fullname    => 'Test Moodle Site',
  shortname   => 'Test',
  summary     => 'A moodle test site created via beaker',
  adminuser   => 'moodleadmin',
  adminpass   => 'adminP@ss',
  adminemail  => '[email protected]',
  require     => Class['mysql::server', 'apache::mod::php'],
}

This example assumes that one is using the puppetlabs/apache and puppetlabs/mysql modules.

Limitations

Currently only MySQL is supported for a database. PHP 5.4 or higher is also required (a Moodle 3.x requirement).

Links

For Moodle adminstration, please consult the official Moodle documentation:

Moodle Install Guide

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.