From 219a71456e2a39ac93e2c5336beb89791006c83d Mon Sep 17 00:00:00 2001 From: Dai Lang Date: Thu, 5 Mar 2015 15:31:35 +0800 Subject: [PATCH] Move rst docs from prjplan to Github Change-Id: Ib7508c8c374e2616ad166becb30cd7982b25219b Signed-off-by: Dai Lang --- doc/IRIS_Data_Schema.rst | 445 ++++++++++++++++++++++++++++ doc/front-end_technical_summary.rst | 123 ++++++++ doc/index.rst | 4 + doc/iris_testing_process.rst | 214 +++++++++++++ 4 files changed, 786 insertions(+) create mode 100644 doc/IRIS_Data_Schema.rst create mode 100644 doc/front-end_technical_summary.rst create mode 100644 doc/iris_testing_process.rst diff --git a/doc/IRIS_Data_Schema.rst b/doc/IRIS_Data_Schema.rst new file mode 100644 index 0000000..e889f0c --- /dev/null +++ b/doc/IRIS_Data_Schema.rst @@ -0,0 +1,445 @@ +1 Introduction +-------------- +This document provides information about data schema for the Change-Life-Cycle module of IRIS project, including the following: + +* Table schema +* Raw event data + +2 Purpose +--------- +The purpose is to collect comprehensive information worth demonstrating in the life of a patch, thus using it as fundamental data to establish the database for the Change-Life-Cycle module. + +3 Table Schema +-------------- +This section describes the table schema, including the following: + +* Change table +* PatchSet table +* Tag table +* SR table +* SRAction table +* Snapshot table +* Image table +* Snapshot-Manifest table +* Image-Manifest table + +3.1 Change Table +```````````````` +Change data is obtained by using Gerrit REST API and stored in the table below: + ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Field |Type |Key/Index |Note |Data Source | ++========================+=============+==========+==========================+==================================+ +|Number |Int |PK | |res.number | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Project |Varchar(255) |Index | |res.project | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Branch |Varchar(64) | | |res.branch | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Merged_patchset_number |Int |Index |Default: 0 |res.revision | +| | | | |.patchset._number | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Subject |Text | | |res.subject | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Owner |Varchar(255) |Index | |res.owner.name | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Owner_org |Varchar(128) | |Organization of the owner | | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Owner_email |Varchar(128) | | | | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Change_id |Varchar(128) | |Change-ID line |res.id | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|url |Varchar(255) | |URL that links to web UI | | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Created_at |Datetime |Index |Null=true |res.created | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Updated_at |Datetime |Index | |res.updated | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Status |Int |Index |- Reviewing |res.status | +| | | |- Merged | | +| | | |- Abandoned | | ++------------------------+-------------+----------+--------------------------+----------------------------------+ + + +3.2 Patchset Table +`````````````````` +Patchset data is obtained by using Gerrit REST API and stored in the table below: + ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Field |Type |Key/Index |Note |Data Source | ++========================+=============+==========+==========================+==================================+ +|id |Varchar(255) |PK | |res.revision.patchset | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Change | |FK | |change.number | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Subject |Text | | |res.revisions.commit.subject | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Number |Int |PK | |res.number | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Uploader |Varchar(255) |Index | |res.revisions.commit.committer | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Uploader_org |Varchar(128) |Index | | | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Uploader_email |Varchar(128) |Index | | | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Commit |Varchar(255) |Index | |res.revisions.patchset | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Created_at |Datetime |Index | |res.revisions.commit.committer. | +| | | | |date | ++------------------------+-------------+----------+--------------------------+----------------------------------+ + + +3.3 Tag Table +`````````````` +Tag data is obtained from Git cache by using OSC API and stored in the table below: + ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Field |Type |Key/Index |Note |Data Source | ++========================+=============+==========+==========================+==================================+ +|id |Varchar(255) |PK | |git show-ref | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Tag |Varchar(255) |Index | |SR.tag | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Project |Varchar(255) | | |SR.description.Git_project | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Branch |Varchar(255) | | |SR.tag.split | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Commit |Varchar(255) |Index | |(git cat-file).split | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Patchset | | | |(git cat-file).split | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Tagger |Varchar(255) |Index | |(git cat-file).split | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Tagger_org |Varchar(128) | | | | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Tagger_email |Varchar(128) | | | | ++------------------------+-------------+----------+--------------------------+----------------------------------+ + +3.4 SR Table +```````````` +SR data is obtained by using OSC API and stored in the table below: + ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Field |Type |Key/Index |Note |Data Source | ++========================+=============+==========+==========================+==================================+ +|id |Int |PK | |OSC_SR.id | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Tag | | | |OSC_SR.description.tag | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Target_project |Varchar(255) | | |OSC_SR.action.tgt_project | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Target_package |Varchar(255) | | |OSC_SR.action.tgt_package | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Source_project |Varchar(255) | | |OSC_SR.action.src_project | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Source_package |Varchar(255) | | |OSC_SR.action.src_package | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Source_revision |Varchar(64) | | |OSC_SR.action.src_rev | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Status |Varchar(64) | |- Sent |OSC_SR.state.name | +| | | |- Created | | +| | | |- Accepted | | +| | | |- Revoked | | +| | | |- Rejected | | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Description |Text | | |OSC_SR.description | ++------------------------+-------------+----------+--------------------------+----------------------------------+ + +3.5 SRAction Table +`````````````````` +SRAction data is obtained by using OSC API and stored in the table below: + ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Field |Type |Key/Index |Note |Data Source | ++========================+=============+==========+==========================+==================================+ +|Name |Varchar(64) |PK |- Sent |OSC_SR.state.name | +| | | |- Created | | +| | | |- Accepted | | +| | | |- Revoked | | +| | | |- Rejected | | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|SR |Int |PK | |OSC_SR.id | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|At |Datetime | | |OSC_SR.state.when | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Who |Varchar(255) |Index |Who perform this action |OSC_SR.state.who | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Who_org |Varchar(128) | | | | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Who_email |Varchar(128) | | | | ++------------------------+-------------+----------+--------------------------+----------------------------------+ + +3.6 Snapshot Table +`````````````````` +Snapshot data is obtained from mirror download server and stored in the table below:. + ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Field |Type |Key/Index |Note |Data Source | ++========================+=============+==========+==========================+==================================+ +|id |Varchar(255) |PK | |Branch, Vertical, Release_id, | +| | | | |Build_id | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Build_id |Varchar(255) | | |$snapshot/buiddata/build.xml/ | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Branch |Varchar(255) | |eg: tizen |Path | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Vertical |Varchar(255) | |eg: ivi |Path | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Release |Varchar(255) | |eg: daily, weekly |Path | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|c |Boolean | | | | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|Archs |Varchar(255) | |eg: x86_64 |$snapshot/buiddata/build.xml/ | +| | | | | | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|At |Datetime | | |Dir ctime | ++------------------------+-------------+----------+--------------------------+----------------------------------+ + +3.7 Image table +`````````````````` +image data is obtained from mirror download server. + ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|field |type |key/index |note |data source | ++========================+=============+==========+==========================+==================================+ +|id |varchar(255) |PK | |branch, vertical, release_id, | +| | | | |build_id | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|build_id |varchar(255) | | |$snapshot/buiddata/build.xml/ | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|branch |varchar(255) | |eg: tizen |path | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|vertical |varchar(255) | |eg: ivi |path | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|release |varchar(255) | |eg: daily, weekly |path | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|c |boolean | | | | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|archs |varchar(255) | |eg: x86_64 |$snapshot/buiddata/build.xml/ | +| | | | | | ++------------------------+-------------+----------+--------------------------+----------------------------------+ +|at |datetime | | |dir ctime | ++------------------------+-------------+----------+--------------------------+----------------------------------+ + +3.8 Snapshot-Manifest Table (many to many relationship) +``````````````````````````````````````````````````````` +Manifest data is obtained from mirror download server and stored in the table below: + ++------------------------+-------------+-------------+------------------------+---------------------------------+ +|field |type |key/index |note |data source | ++========================+=============+=============+========================+=================================+ +|id |varchar(255) |PK | |Snapshot.name+arch | ++------------------------+-------------+-------------+------------------------+---------------------------------+ +|Snapshot | |FK: | | | +| | |Snapshot.id | | | ++------------------------+-------------+-------------+------------------------+---------------------------------+ +|File_name | | | |File.name | ++------------------------+-------------+-------------+------------------------+---------------------------------+ +|Arch |Varchar(255) | | |File_name.arch | ++------------------------+-------------+-------------+------------------------+---------------------------------+ +|Tag | |FK: | |$snapshot/buiddata/manifest/ | +| | |tag.project, | |$repo.xml/, | +| | |tag.tag | |$snapshot/buiddata/manifest/ | +| | | | |/$repo.xml/.start | ++------------------------+-------------+-------------+------------------------+---------------------------------+ + +bined primary key: (snapshot_id, tag_id) + +3.9 Image-Manifest Table (many to many relationship) +```````````````````````````````````````````````````` +Manifest data is obtained from mirror download server and stored in the table below: + ++------------------------+-------------+-------------+------------------------+---------------------------------+ +|field |type |key/index |note |data source | ++========================+=============+=============+========================+=================================+ +|id |Varchar(255) |PK | |image_name | ++------------------------+-------------+-------------+------------------------+---------------------------------+ +|File_name |Varchar(255) | | |File.name | ++------------------------+-------------+-------------+------------------------+---------------------------------+ +|Image | |FK: | | | +| | |Image.image | | | +| | |_id | | | ++------------------------+-------------+-------------+------------------------+---------------------------------+ +|Tag | |FK: | |$snapshot/images/$image/ | +| | |tag.project, | |manifest.xml/, | +| | |tag.tag | |$snapshot/images/$image/ | +| | | | |manifest.xml/.start | ++------------------------+-------------+-------------+------------------------+---------------------------------+ + + +Raw Events Data +=============== + +Gerrit +------ + +Obtain change data by using Gerrit RESTful API. + +For more information, refer to `REST API - Changes`_. + +An sample JSON file offered by the API is shown below: + +Changes +``````` +:: + + { + "kind": "gerritcodereview#change", + "id": "framework%2Ftelephony%2Flibslp-tapi~tizen_2.1~I820c9483ee16b73d1d49230dfcdc99e049c6db26", + "project": "framework/telephony/libslp-tapi", + "branch": "tizen_2.1", + "change_id": "I820c9483ee16b73d1d49230dfcdc99e049c6db26", + "subject": "Fix hardcoding library path for 64 bit compatibility.", + "status": "SUBMITTED", + "created": "2013-04-02 07:50:37.000000000", + "updated": "2013-11-20 17:35:10.000000000", + "mergeable": false, + "_sortkey": "00293c9f0000dcfc", + "_number": 56572, + "owner": { + "name": "fangx.li" + }, + "labels": { + "Verified": { + "approved": { + "name": "fangx.li" + } + }, + "Code-Review": { + "approved": { + "name": "Anas Nashif" + } + } + }, + "current_revision": "85227f93ecc8283b3606c997c3ca38dc0b774d86", + "revisions": { + "85227f93ecc8283b3606c997c3ca38dc0b774d86": { + "_number": 2, + "fetch": { + "http": { + "url": "https://review.tizendev.org/gerrit/framework/telephony/libslp-tapi", + "ref": "refs/changes/72/56572/2" + }, + "ssh": { + "url": "ssh://review.tizendev.org:29418/framework/telephony/libslp-tapi", + "ref": "refs/changes/72/56572/2" + } + }, + "commit": { + "parents": [ + { + "commit": "aa31f300cc899f9d5aa6599d1cb9f6cbbe8740fd", + "subject": "Add tapitest" + } + ], + "author": { + "name": "Junfeng Dong", + "email": "junfeng.dong@intel.com", + "date": "2013-03-29 05:38:39.000000000", + "tz": 480 + }, + "committer": { + "name": "Guillaume Zajac", + "email": "guillaume.zajac@linux.intel.com", + "date": "2013-04-02 09:46:21.000000000", + "tz": 120 + }, + "subject": "Fix hardcoding library path for 64 bit compatibility.", + "message": "Fix hardcoding library path for 64 bit compatibility.\n\nChange-Id: I820c9483ee16b73d1d49230dfcdc99e049c6db26\n" + } + } + } + } + + ++------------------------------------+-------------------------------+------------------------+ +|Event field |DB Field |Note | ++====================================+===============================+========================+ +|res._number |Change.Number | | ++------------------------------------+-------------------------------+------------------------+ +|res.project |Change.Project | | ++------------------------------------+-------------------------------+------------------------+ +|res.branch |Change.Branch | | ++------------------------------------+-------------------------------+------------------------+ +|res.revisions.patchset._number |Change.Merged_patchset_number | | ++------------------------------------+-------------------------------+------------------------+ +|res.subject |Change.Subject | | ++------------------------------------+-------------------------------+------------------------+ +|res.owner.name |Change.Owner | | ++------------------------------------+-------------------------------+------------------------+ +|res._number |Change.Number | | ++------------------------------------+-------------------------------+------------------------+ +|res.project |Change.Number | | ++------------------------------------+-------------------------------+------------------------+ +|res.id |Change.Change_id | | ++------------------------------------+-------------------------------+------------------------+ +|res.created |Change.Created_at | | ++------------------------------------+-------------------------------+------------------------+ +|res.updated |Change.Updated_at | | ++------------------------------------+-------------------------------+------------------------+ +|res.status |Change.Status | | ++------------------------------------+-------------------------------+------------------------+ +|res.revisions.patchset |Patchset.id | | ++------------------------------------+-------------------------------+------------------------+ +|res.revisions.commit.subject |Patchset.Subject | | ++------------------------------------+-------------------------------+------------------------+ +|res.revisions.patchset._number |Patchset.Number | | ++------------------------------------+-------------------------------+------------------------+ +|res.revisions.commit.committer |Patchset.Uploader | | ++------------------------------------+-------------------------------+------------------------+ +|res.revisions.patchset |Patchset.Commit | | ++------------------------------------+-------------------------------+------------------------+ +|res.revisions.commit.committer.date |Patchset.Created_at | | ++------------------------------------+-------------------------------+------------------------+ + + +OBS +--- + +OSC get request +``````````````` + +Event example + +:: + + equest: #3259 + + submit: Tizen:2.2:Main:build/apps.Calendar(cleanup) -> Tizen:2.2:Main + + + Message: + Submitter: Amith Kumar Mahale + Comments: Fix for N_SE-51444 N_SE-51423 N_SE-51500 N_SE-51693 + Git project: apps/osp/Calendar + Tag: submit/tizen_2.2/20130912.090557 + Commit: fc5caf47dc53fb31de95ec88b974090e2f4659f5 Fix for N_SE-51693 + + State: accepted 2013-09-12T15:40:14 hosang.kim + Comment: 2.2.1 RC10 R1 + + History: new 2013-09-12T08:59:08 rsarobot + ++------------------------+-------------+-------------+------------------------+---------------------------------+ +|field |type |key/index |note |data source | ++========================+=============+=============+========================+=================================+ +|Tag | | | |OSC_SR.description.tag | ++------------------------+-------------+-------------+------------------------+---------------------------------+ +|Target_project |Varchar(255) | | |OSC_SR.action. tgt_project | ++------------------------+-------------+-------------+------------------------+---------------------------------+ +|Target_package |Varchar(255) | | |OSC_SR.action.tgt_package | ++------------------------+-------------+-------------+------------------------+---------------------------------+ +|Source_project |Varchar(255) | | |OSC_SR.action.src_project | ++------------------------+-------------+-------------+------------------------+---------------------------------+ +|Source_package |Varchar(255) | | |OSC_SR.action.src_package | ++------------------------+-------------+-------------+------------------------+---------------------------------+ +|Source_revision |Varchar(64) | | |OSC_SR.action.src_rev | ++------------------------+-------------+-------------+------------------------+---------------------------------+ +|Status |Varchar(64) | |- Sent |OSC_SR.state.name | +| | | |- Created | | +| | | |- Accepted | | +| | | |- Revoked | | +| | | |- Rejected | | ++------------------------+-------------+-------------+------------------------+---------------------------------+ + +.. _`REST API - Changes`: https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html diff --git a/doc/front-end_technical_summary.rst b/doc/front-end_technical_summary.rst new file mode 100644 index 0000000..cb666eb --- /dev/null +++ b/doc/front-end_technical_summary.rst @@ -0,0 +1,123 @@ +front-end Technical summary +=========================== +here is tecnical summary about developing in front-end. + +work flow tools +--------------- +we need to create a directory structure at the beginning of development, download library or framework and build dist directory when deploying the project. we choose the yeoman_ to do the above work. + +yeoman +~~~~~~ +yeoman is comprised of three tools: yo_, bower_, grunt_. For installation and usage information, refer to yeoman_. + +yo +## +yo scaffolds out a new application, writing your Grunt configuration and pulling in relevant Grunt tasks and Bower dependencies that you might need for your build. + +Bower +##### +Bower is used for dependency management, so that you no longer have to manually download and manage your scripts. + +Grunt +##### +Grunt is used to build, preview and test your project, developer can customize design tasks to testing and build packages. + +Tips +#### +here are small useful tips in developing with yeoman. + +* yo can help us set up directory of webapp, it can also generate directory of other development-patterns, like backbone, angular, express, etc. You can search generators by `npm search yeoman-generator` and install them. +* bower not only can fetch library from github, but also can fetch a library from a specified path. like `bower install ~/workspace/myPackage`. +* When generating the directory, yo writes a standard Gruntfile which can be used as basis by developers. Note: Developers can also write their own Gruntfile from scratch. + +Common Libraries +---------------- +here are libraries and frameworks used in front-end development. + +jQuery +~~~~~~ +It makes things like HTML document traversal as well as making the manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. + +jquery provides three useful tools: + +* selector, used as css selector, we can use `$` to choose a DOM(Document Object Model) element and generate a jquery object like: `$("#domId")`. +* event handler, jquery can bind some event listener and callback function to a DOM element. like: `$("button").on("click", function(e){alert("hello!");})` +* ajax, jquery provides many friendly API to handle ajax, like: `$.ajax`, `$.get`, `$.post`. + +For more information, refer to jquery_. + +Underscore +~~~~~~~~~~ +Underscore.js is a utility-belt library for JavaScript that provides support for the usual functional suspects (each, map, reduce, filter...) without extending any core JavaScript objects. + +underscore provides a lot of usful functions: + +* handle of collection or array like: `each`, `zip`... +* Judge type of object like: `isEmpty`, `isNaN`... +* tools, like: `random`, `template`... + +For more information, refer to underscore.js_. + +Backbone +~~~~~~~~ +A famous front-end MVC framework well designd for developing single-page application. + +Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface. + +Backbone provides a router module to handle the callback method when the hash part of the url is changed. like "http://example.com/#user/0001". + +Backbone.js depends on underscore.js and jquery(ajax). + +For more information, refer to backbone_. + +There are more front-end MVC framework, like: ember.js_, angular_, here is a website for comparison of various MVC-frameworks: todomvc_. + +Bootstrap +~~~~~~~~~ +A powerful UI framework that helps set up beautiful web page with ease. + +Bootstrap provides many practical tools: + +* Grid system, it is used for creating page layouts through a series of rows and columns that house your content. +* CSS classes, Global CSS settings, fundamental HTML elements styled and enhanced with extensible classes. +* Components, over a dozen reusable components built to provide iconography, dropdowns, navigation, alerts, popovers, and much more. +* Javascript plugin, bring Bootstrap's components to life with over a dozen custom jQuery plugins. Easily include them all, or one by one. + +For more information, refer to Bootstrap_. + +Highcharts +~~~~~~~~~~ +Highcharts is a charting library written in pure HTML5/JavaScript, offering intuitive, interactive charts to your web site or web application. Highcharts currently supports line, spline, area, areaspline, column, bar, pie, scatter, angular gauges, arearange, areasplinerange, columnrange, bubble, box plot, error bars, funnel, waterfall and polar chart types. For more infomation, refer to Highcharts_. + +there is a brother of highcharts named "Highstock". Highstock lets you create stock or general timeline charts in pure JavaScript, including sophisticated navigation options like a small navigator series, preset date ranges, date picker, scrolling and panning. For more information, refer to Highstock_. + +Highcharts is powerful, but it is heavy at the same time. So sometimes we can choose other light-weight chart libraries, like jqPlot_ and ichartjs_. + +Templates +--------- +Javascript template-angine can build template to HTML DOM element with data. It is partical and high-performanced in development of RIA(rich Internet Application). + +Here are frequently used template framework: + +* Handlebars_ provides the power necessary to let you build semantic templates effectively with no frustration. +* Mustache_, famous Logic-less templates. +* EJS_. + +.. _yeoman: http://yeoman.io/ +.. _yo: https://github.com/yeoman/yo +.. _bower: http://bower.io/ +.. _grunt: http://gruntjs.com/ +.. _jquery: http://jquery.com/ +.. _underscore.js: http://underscorejs.org/ +.. _backbone: http://backbonejs.org/ +.. _ember.js: http://emberjs.com/ +.. _angular: http://angularjs.org/ +.. _todomvc: http://todomvc.com/ +.. _bootstrap: http://getbootstrap.com/ +.. _handlebars: http://handlebarsjs.com/ +.. _mustache: http://mustache.github.io/ +.. _ejs: http://embeddedjs.com/ +.. _Highcharts: http://www.highcharts.com/products/highcharts +.. _Highstock: http://www.highcharts.com/products/highstock +.. _jqPlot: http://www.jqplot.com/ +.. _ichartjs: http://www.ichartjs.com/ diff --git a/doc/index.rst b/doc/index.rst index db11a6b..29a92a0 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -12,6 +12,10 @@ Contents: :maxdepth: 2 iris-panel + front-end_technical_summary + IRIS_Data_Schema + iris_testing_process + diff --git a/doc/iris_testing_process.rst b/doc/iris_testing_process.rst new file mode 100644 index 0000000..63c6969 --- /dev/null +++ b/doc/iris_testing_process.rst @@ -0,0 +1,214 @@ +===================== + IRIS Testing Process +===================== +We use ansible to deploy iris to vagrant for testing, so here we split our testing into four main parts: + +1. Preparation: get ansible related project + +2. Init vagrant + + 2.1 configured vagrant + + 2.2 first time to vagrant world + +3. Upgrading Testing + + 3.1 install last old version iris + + 3.2 import online data to old iris + + 3.3 upgrade iris to new version + +4. Feature and bug Testing + + 4.1 testing based on fixed bugs and new features + +The following is the details: + +Note: every release has a version number, let’s assume this release is 0.2.2 for reference. + +Preparation: get ansible related project +---------------------------------------- +.. _iris ansible playbook: + +1. clone iris playbook: + + $git clone ssh://user@otctools.jf.intel.com:29418/infrastructure/ansible/playbooks/iris (make sure you can access gerrit) + + $cd iris + + $git checkout –b release-for-0.2.2 0.2.2 + + **Note**: + + 1. 0.2.2 is tag name for this release, it would change due to release, you can run "$git tag -l" to check. + + 2. release-for-0.2.2 is branch name, you can name it to whatever meets git naming convention + +2. clone common roles project: + + $git clone ssh://user@otctools.jf.intel.com:29418/infrastructure/ansible/roles (make sure you can access gerrit) + + $cd roles + + $git checkout –b release-for-0.2.2 0.2.2 + + **Note**: + + 1. 0.2.2 is tag name for this release, it would change due to release, you can run "$git tag -l" to check + + 2. release-for-0.2.2 is branch name, you can name it to whatever meets git naming convention + + 3. here we should make ansible knows the common role path (suppose you locate it in: /home/xxx/roles), add the + + following line to ~/.ansible.cfg (if this file doesn’t exist, create it by yourself): + + [defaults] + + roles_path = /home/xxx/roles + +Init vagrant +------------ +1. configured vagrant: + + 1.1 change to your vagrant directory + + 1.2 $vagrant destroy + + 1.3 $vagrant up + +2. first time to vagrant world: + + **DOC**: https://www.vagrantup.com/ + + 2.1 install vagrant and provider (here we use virtualbox) + + 2.1.1 with software manager, suppose your system is ubuntu: + + $sudo apt-get install vagrant virtualbox + + 2.1.2 or download the package: + + `vagrant `_ + + `virtualbox `_ + + $sudo dpkg -i xxx.deb or $sudo rpm -i xxx.rpm + + 2.2 configure vagrant + + 2.2.1 $mkdir vagarant + + 2.2.2 $vagrant init (then you can see "Vagrantfile" is created) + + 2.2.3 add the following content to "Vagrantfile": + + config.vm.box = "openSUSE_131_64" + + config.vm.box_url = "http://go.bj.intel.com/vagrant/boxes/opensuse/openSUSE_13.1_64.box" + + config.ssh.private_key_path = "/home/xxxx/.ssh/key_for_vagrant_ssh.id_rsa" + + config.vm.network :forwarded_port, guest: 8000, host: 8082 + + **Note**: + 1. maybe config.vm.box has been in the file, you can just modify the name + + 2. for iris, we just test it on opensuse13.1 64bit, so here we use openSUSE_13.1_64.box + + 3. private_key: please download it from: + + http://go.bj.intel.com/vagrant/configs/key_for_vagrant_ssh.id_rsa + + and put it in your directory: ~/.ssh/, remember to change 'xxx' to your username. + + 4. network port: here I use 8082, you can use any one like 8081, 8083, better if larger than 8000 + + 5. about ssh port, if only one vagrant active on your host, the default is 2222, you can check it + + by "$vagrant ssh-config", if not 2222, remember to update "ansible_ssh_port" in file "vagrant" in + + `iris ansible playbook`_ cloned before like bellow: + + [vagrant] + vagrant ansible_ssh_port=2222 ansible_ssh_host=localhost... + + 2.2.4 connect to vagrant + + $vagrant up + + $vagrant ssh (then you can enter the vagrant vm) + +Upgrading Testing +------------------ +1. install last old version iris, here it is 0.2.1 + + 1.1 change to your iris playbook directory + + 1.2 make sure the repo in file “host_vars/vagrant” refers to 0.2.1 in tizen org: + + http://download.tizen.org/iris/latest-release/openSUSE_13.1/ + + 1.3 $ansible-playbook base.yml site.yml -i vagrant + + 1.4 check iris version in your vagrant is right: + + .. _1.4.1: + + 1.4.1 open iris with browser like firefox or chrome: + + for example, my network port configuration for vagrant is 8082, my hostname is lihuan, + + then I should open http://lihuan.bj.intel.com:8082 + + .. _1.4.2: + + 1.4.2 check iris version: + + check if '0.2.1' in 'Currently vxxxx' at the bottom of the home page like bellow: + + .. image:: version.PNG + +2. import online data to old iris + + 2.1 generate online data: + + 2.2.1 login to the production server + + 2.2.2 $mysqldump -hhostname -uusername -ppassword dbname > 021.sql + + (the filename "021.sql" you can choose anyone you like, if you don't have permission, + + you can ask xuesong or huanhuan for help) + + 2.2 change to vagrant directory + + 2.3 copy 021.sql back from production server + + $scp user@servername:/xx/xxx/xx . + + 2.4 $vagrant ssh -c "cat /vagrant/021.sql | mysql -uroot testdb" + + 2.5 check if there is data in your iris: + + 2.4.1 open iris with browser like `1.4.1`_ + + 2.42. check that there are gittrees, domains, subdomains in Package Database + +3. upgrade iris to new version + + 3.1 change repo in “host_vars/vagrant” to testing repo + + like http://download.otctools.jf.intel.com/staging/iris/archive/0.2.2/openSUSE_13.1/ + + 3.2 $ansible-playbook site.yml -i vagrant + + (no need to run base.xml, because we just want to upgrade iris) + + 3.3 check iris version is 0.2.2 like `1.4.2`_ + +Feature and bug Testing +----------------------- +1. testing based on fixed bugs and new features + + Do these testing on your vagrant iris