雲端計算 cloud computing lab - eyeos. agenda installation programming

39
雲雲雲雲 Cloud Computing Lab - EyeOS

Post on 19-Dec-2015

253 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

雲端計算Cloud Computing

Lab - EyeOS

Page 2: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

Agenda

• Installation

• Programming

Page 3: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

INSTALLATION

Download Prepare WorkStart Install

Page 4: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

Download

• http://www.eyeos.org/• http://eyeos.org/installation_manual.pdf• http://beta.my.eyeos.org/

Page 5: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

Requirement

• Requirements Apache HTTP Server 2.x MySQL-server and MySQL-client 5.x php 5.2, or higher

Page 6: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

Test environment

• LAMP Kubuntu 10.10 with kernel 2.6.35-22-generic Apache/2.2.16 (Ubuntu) MySQL 5.1.49-1ubuntu8 (Ubuntu) PHP 5.3.3-1ubuntu9

Page 7: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

INSTALLATION

Download Prepare WorkStart Install

Page 8: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

MySQL

• Logging in by root mysql –u root -p

• Add a new database Create DATABASE eyeos

• Add a new user for eyeOS GRANT ALL PRIVILEGES on eyeos.* TO eyeos

IDENTIFIED by ‘PASSWORD’

Page 9: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

And more

• Extract the download file.• Move to root directory of Apache2• Change the privileges

sudo chown –R www-data.www-data /var/www/eyeos

Page 10: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

INSTALLATION

Download Prepare WorkStart Install

Page 11: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

Step (1)

• http://localhost/eyeos/install

Page 12: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

Step (2)

Recommand:install all items

Page 13: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

Step (3)

Page 14: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

Step (4)

Username and password you set before

Page 15: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

Result

Page 16: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

Result

Page 17: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

PROGRAMMING

Page 18: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

eyeOS 2.0

• eyeOS 2.x is written by PHP, XML, and JavaScript.• PHP

Major functionality for custom service. Background computation.

• XML Service description.

• JavaScript Web interface. Communication between user and server.

qooxdoo

Page 19: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

Cases

• Every service in eyeOS are applications. Application interface May not use any background resource.

• Calculator Only XML and JavaScript. Computation on client.

• Login Simplified of web skin. Connect to database. New user or authentication.

Page 20: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

Model

Service.js

app.fun1(); app.fun1();…app.drawGUI(); XML

<meta> ….</meta>

<?PHP fun1() {….} fun1() {….} fun1() {….}?>

callback

eyeOS

Page 21: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

CASECalculator

Page 22: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

Result

Page 23: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

XML

Description

Setting

Page 24: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

JavaScript

Main function

Definition

Page 25: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

JavaScript (cont.)

Basic widget

Layout

Page 26: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

JavaScript (cont.)

Button

Execution

Page 27: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

JavaScript (cont.)

Draw

Page 28: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

CASE

CalculatorLogin

Page 29: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

Result

Page 30: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

XML

Page 31: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

JavaScript

Page 32: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

JavaScript (cont.)

Page 33: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

JavaScript (cont.)

Callback

Parameter

Information

Page 34: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

PHP

Initialization

Page 35: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

PHP (cont.)

Page 36: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

CASE

CalculatorLogin Caution

Page 37: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

JavaScriptcalculator.js

Page 38: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

JavaScript (cont.)

Page 39: 雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming

Callback