24
Azure Office365 Integration with Moodle Deploying Moodle With High Availability - Linux

Deploying Moodle With High Availability and auto-scale on Microsoft Azure platform

Embed Size (px)

Citation preview

Page 1: Deploying Moodle With High Availability and auto-scale on Microsoft Azure platform

Azure Office365 Integration with MoodleDeploying Moodle With High Availability - Linux

Page 2: Deploying Moodle With High Availability and auto-scale on Microsoft Azure platform

Deploying Moodle With High Availability - LinuxOutline

Objectives

Introduction

Moodle Installation on Azure Linux Platform

Create a Linux Virtual Machine to Use as a Template for auto scale Moodle

Summary

OUTLINE

Page 3: Deploying Moodle With High Availability and auto-scale on Microsoft Azure platform

Objectives

Moodle Installation on Azure Linux Platform

Create a Linux Virtual Machine to Use as a Template for auto scale Moodle

By the end of this session, you will be able to learn about:

TOPIC01/05

Backtooutlinepage

Deploying Moodle With High Availability - Linux

Page 4: Deploying Moodle With High Availability and auto-scale on Microsoft Azure platform

Introduction

TOPIC02/05

Moodle is an open source learning management system and an e-learning platform to serve learners across the globe.

It is written in PHP and distributed under general public license.

Backtooutlinepage

Deploying Moodle With High Availability - Linux

Page 5: Deploying Moodle With High Availability and auto-scale on Microsoft Azure platform

Moodle Installation on Azure Linux Platform

1. Create a Linux Virtual Machine

2. Install Apache/MySQL/PHP

3. Install Additional Software

4. Complete Setup

5. Install Moodle

TOPIC03/05

Backtooutlinepage

Moodle installation on Azure Linux platform requires a few steps to follow. They are:

Deploying Moodle With High Availability - Linux

Page 6: Deploying Moodle With High Availability and auto-scale on Microsoft Azure platform

Moodle Installation Procedure on Azure Linux Virtual Machine

TOPIC03/05

1. Createanewpageonwindowsserver2012R2virtualmachine.Openhttp://azure.microsoft.com/

Backtooutlinepage

Deploying Moodle With High Availability - Linux

Page 7: Deploying Moodle With High Availability and auto-scale on Microsoft Azure platform

Moodle Installation Procedure on Azure Linux Virtual Machine

TOPIC03/05

1.2Clickontheportal(https://manage.windowsazure.com/)tologin

Backtooutlinepage

Deploying Moodle With High Availability - Linux

Page 8: Deploying Moodle With High Availability and auto-scale on Microsoft Azure platform

TOPIC03/05

1.3EnterCredentialsUsername:[email protected]:EnterprovidedpasswordClickonsignin

BacktooutlinepageMoodle Installation Procedure on Azure Linux Virtual Machine

Deploying Moodle With High Availability - Linux

Page 9: Deploying Moodle With High Availability and auto-scale on Microsoft Azure platform

TOPIC03/05

1.4.ClickonNEW

BacktooutlinepageMoodle Installation Procedure on Azure Linux Virtual Machine

Deploying Moodle With High Availability - Linux

Page 10: Deploying Moodle With High Availability and auto-scale on Microsoft Azure platform

TOPIC03/05

Backtooutlinepage

1.5.ClickonCompute,VirtualMachine,andFromGallery tocreateanewvirtualmachineforMoodle.

Moodle Installation Procedure on Azure Linux Virtual Machine

Deploying Moodle With High Availability - Linux

Page 11: Deploying Moodle With High Availability and auto-scale on Microsoft Azure platform

TOPIC03/05

Backtooutlinepage

1.6.SelectUbuntuServer14.04LTSandclickNext

Moodle Installation Procedure on Azure Linux Virtual Machine

Deploying Moodle With High Availability - Linux

Page 12: Deploying Moodle With High Availability and auto-scale on Microsoft Azure platform

TOPIC03/05

Backtooutlinepage

1.7. EnterthefollowinginformationonvirtualmachineconfigurationscreenoneandclickNext

Version Release Date

Virtual Machine Name

Tier

Size

New User Name

New Password

Confirm Password

Moodle Installation Procedure on Azure Linux Virtual Machine

Deploying Moodle With High Availability - Linux

Page 13: Deploying Moodle With High Availability and auto-scale on Microsoft Azure platform

TOPIC03/05

Backtooutlinepage

1.8. Enterthefollowinginformationonvirtualmachineconfigurationscreen2andclickNext

Cloud Service

Cloud Service DNS Name

Region/Affinity Group/Virtual Network

Virtual Network Subnets

Storage Account

Availability Set if Required

Endpoints for Connecting RDP

Moodle Installation Procedure on Azure Linux Virtual Machine

Deploying Moodle With High Availability - Linux

Page 14: Deploying Moodle With High Availability and auto-scale on Microsoft Azure platform

TOPIC03/05

Backtooutlinepage

1.9.Selecttheplug-inandextensionsinvirtualmachineconfigurationscreen3.Clickoncompletetocreateanewvirtualmachine.

Moodle Installation Procedure on Azure Linux Virtual Machine

Deploying Moodle With High Availability - Linux

Page 15: Deploying Moodle With High Availability and auto-scale on Microsoft Azure platform

Install Apache/MySQL/PHP

1. Open up Terminal and install the following;

2. Open the SSH Session with the Ubuntu server

sudo apt-get install apache2

sudo apt-get install mysql-client mysql-server

sudo apt-get install php5

TOPIC03/05

Deploying Moodle With High Availability - LinuxBacktooutlinepage

Page 16: Deploying Moodle With High Availability and auto-scale on Microsoft Azure platform

Install Additional Software

sudo apt-get install graphviz aspell php5-pspell php5-curl php5-gd php5-intl php5-mysql php5-xmlrpc php5-ldap clamav

1. Setup MySQL Server, add the following line under the last statement in /etc/mysql/my.cnf

default_storage_engine = innodb

innodb_file_per_table = 1

2. Create Database for moodle with the following commands

mysql -u root -p

CREATE DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;

create user 'moodledude'@'localhost' IDENTIFIED BY 'passwordformoodledude'

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO moodledude@localhost IDENTIFIED BY 'passwordformoodledude';

TOPIC03/05

Deploying Moodle With High Availability - LinuxBacktooutlinepage

Page 17: Deploying Moodle With High Availability and auto-scale on Microsoft Azure platform

Installing Moodle

1. Open the https://download.moodle.org/releases/latest/ to Download latest moodle

2. Extract and copy the downloaded Moodle to C:\wamp\www

3. In your browser, type localhost/moodle

4. The Moodle set up screen will appear.

5. Entre the paths

6. Entre the database Details

TOPIC03/05

Deploying Moodle With High Availability - LinuxBacktooutlinepage

Page 18: Deploying Moodle With High Availability and auto-scale on Microsoft Azure platform

7. Moodle needs to ensure our wampserver has all the features ("extensions") enabled to run it successfully.

8. Anything in green is fine. Anything in yellow is OK (but would be better in green). Anything in red will stop us installing Moodle.

9. Once your server checks page shows all green or all green with some yellow, you can click "Continue"

10. Moodle will install - this will take some time. Be patient. When you see "workshop" you know you are nearly done

11. Complete details for your admin username and password (and remember them!)

12. Complete details for your front page (name of your Moodle, etc)

TOPIC03/05

Installing Moodle

Deploying Moodle With High Availability - LinuxBacktooutlinepage

Page 19: Deploying Moodle With High Availability and auto-scale on Microsoft Azure platform

Capture a Linux Virtual Machine to Use as a Template for auto scale Moodle

Connect to the virtual machine using an SSH client of your choice

In the SSH window, type the following command.

sudo waagent -deprovision

This command will attempt to clean the system and make it suitable for re-provisioning. This operation performs the following tasks:

Removes SSH host keys (if Provisioning.RegenerateSshHostKeyPair is 'y' in the configuration file)

Clears nameserver configuration in /etc/resolv.conf

Removes the root user's password from /etc/shadow (if Provisioning.DeleteRootPassword is 'y' in the configuration file)

Removes cached DHCP client leases

Resets host name to localhost.localdomain

Deletes the last provisioned user account (obtained from /var/lib/waagent) and associated data.

TOPIC04/05

Deploying Moodle With High Availability - LinuxBacktooutlinepage

Page 20: Deploying Moodle With High Availability and auto-scale on Microsoft Azure platform

1. Type y to continue. You can add the -force parameter to avoid this confirmation step.

2. Type Exit to close the SSH client.

3. Open Azure Management Portal to your azure Subscription

4. Shut down the virtual machine which is already deprovisioned in the steps above with

5. When the virtual machine is stopped, capture the image with

6. The new image is now available in the list of images that can be used to configure any new virtual machines, for autoscalling

7. Click on the cloud Service on the Azure Portal

TOPIC04/05

Capture a Linux Virtual Machine to Use as a Template for auto scale Moodle

Deploying Moodle With High Availability - LinuxBacktooutlinepage

Page 21: Deploying Moodle With High Availability and auto-scale on Microsoft Azure platform

TOPIC04/05

Backtooutlinepage

1.8.Selecttheplug-inandextensionsinvirtualmachineconfigurationscreen3.Clickoncompletetocreateanewvirtualmachine.

Capture a Linux Virtual Machine to Use as a Template for auto scale Moodle

Deploying Moodle With High Availability - Linux

Page 22: Deploying Moodle With High Availability and auto-scale on Microsoft Azure platform

TOPIC04/05

Backtooutlinepage

1.8.Selecttheplug-inandextensionsinvirtualmachineconfigurationscreen3.Clickoncompletetocreateanewvirtualmachine.

Capture a Linux Virtual Machine to Use as a Template for auto scale Moodle

Deploying Moodle With High Availability - Linux

Page 23: Deploying Moodle With High Availability and auto-scale on Microsoft Azure platform

TOPIC04/05

Backtooutlinepage

1.8.Selecttheplug-inandextensionsinvirtualmachineconfigurationscreen3.Clickoncompletetocreateanewvirtualmachine.

12.SCALEBYMETRICSELECTCPU:

INSTANCE RANGEA2 (2 CORES, 3.5 GB MEMORY)

TARGET CPU

SCALE UP BY

SCALE UP WAIT TIME

SCALE DOWN BY

SCALE DOWN WAIT TIME

13. Click on Save to create auto scale environment

Capture a Linux Virtual Machine to Use as a Template for auto scale Moodle

Deploying Moodle With High Availability - Linux

Page 24: Deploying Moodle With High Availability and auto-scale on Microsoft Azure platform

Summary

TOPIC05/05

Moodle installation on azure Linux virtual machine

In this session, you have learnt:

Backtooutlinepage

Deploying Moodle With High Availability - Linux