Skip to content

Commit

Permalink
Merge pull request #16 from pi-engine/develop
Browse files Browse the repository at this point in the history
update 20-05-2014
  • Loading branch information
krisxoofoo committed May 20, 2014
2 parents f1888eb + 592e5e7 commit c2bf8c6
Show file tree
Hide file tree
Showing 1,834 changed files with 26,486 additions and 74,151 deletions.
12 changes: 12 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[submodule "usr/module/uclient"]
path = usr/module/uclient
url = https://github.com/pi-module/uclient
[submodule "usr/module/demo"]
path = usr/module/demo
url = https://github.com/pi-module/demo
[submodule "usr/module/saml"]
path = usr/module/saml
url = https://github.com/pi-module/saml
[submodule "lib/vendor/simplesamlphp"]
path = lib/vendor/simplesamlphp
url = https://github.com/pi-vendor/simplesamlphp
9 changes: 5 additions & 4 deletions README-GIT.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ Working with forked repo
* Merge specific commits after A to B: `git cherry-pick A..B`
* Merge specific commits from A through B: `git cherry-pick A^..B`
* Quit merges: `git quit --merge`
* Stash (Hide changes temporarily): `git stash`
* Working with branches
* Check local branches: `git branch`
* Create a local branch: `git branch -a <new-branch>`
* Push a local branch to your repo: `git push`
* Swtich to a branch: `git checkout <another-branch>`
* Switch to a branch: `git checkout <another-branch>`
* Merge code from another branch: `git merge <another-branch>`
* Delete a local branch: `git branch -d <old-branch>`
* Delete a branch from your repo: `git push origin :<old-branch>`
Expand Down Expand Up @@ -66,16 +67,16 @@ Pi Engine Core
Pi Engine Module
----------------
* [pi-module](https://github.com/pi-module): repos for modules
* Eeach module has its own repo, for instance [pi-module/tag](https://github.com/pi-module/tag) for module tag
* Each module has its own repo, for instance [pi-module/tag](https://github.com/pi-module/tag) for module tag

Pi Engine Theme
---------------
* [pi-theme](https://github.com/pi-theme): repos for themes
* Each theme has its ownrepo, for instance [pi-theme/pi](https://github.com/pi-theme/pi) for theme pi
* Each theme has its own repo, for instance [pi-theme/pi](https://github.com/pi-theme/pi) for theme pi

Pi Engine Asset
---------------
* [pi-asset](https://github.com/pi-asset): repos for assets: [images](https://github.com/pi-asset/image), [pdfs/files](https://github.com/pi-asset/file), videos, etc.
* [pi-asset](https://github.com/pi-asset): repos for assets: [images](https://github.com/pi-asset/image), [PDF/files](https://github.com/pi-asset/file), videos, etc.

Pi Engine Extras
----------------
Expand Down
24 changes: 24 additions & 0 deletions README-front-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Front-end building asset
----------------
Tools: [gruntjs](http://gruntjs.com/)

To execute asset build, use:

```
grunt
```

To execute clear asset build files, use

```
grunt clear
```

To execute 'www/asset' and 'www/public' files to usr, use

```
grunt back
```


-- By @sexnothing
50 changes: 15 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Pi Engine
=================

Pi Engine is a role oriented application development engine for web and mobile, designed as the next generation and a successor to Xoops.
Pi is developed upon PHP and MySQL with selected third-party frameworks including but not limited to [Zend Framework 2](https://github.com/zendframework/zf2), jQuery, Bootstrap, Angular and Backbone.
Pi is a multi-tenant application development engine for cloud ready SaaS platform with support for SSO/OAuth.
Pi Engine is developed in PHP and MySQL upon frameworks including [Zend Framework](https://github.com/zendframework/zf2), jQuery, Bootstrap, Angular and Backbone.

Pi Project follows the philosophy of open standard, open design, open development and open management. Pi is born as a complete open source project and intended to build a sustainable ecosystem that benefits all contributors and users.
Pi Engine is an open source project and follows the philosophy of open standard, open design, open development and open management. Pi is born as a complete open source project and intended to build a sustainable ecosystem that benefits all contributors and users.

Pi Engine is developed by [Pi Team](https://github.com/pi-engine/pi/wiki/Pi-Team) initially as a successor to Xoops led by Ono Kazumi (onokazu), skalpa and Taiwen Jiang (phppp or D.J.) successively since 2001.
Pi Engine is developed by [Pi Team](https://github.com/pi-engine/pi/wiki/Pi-Team) initially as a successor to Xoops Project since 2001.

**Check out [Latest Release](https://github.com/pi-engine/pi/blob/master/doc/releasenotes.md).**

Expand All @@ -15,25 +15,29 @@ Highlights
-------------
1. **Sustainable ecosystem:** A sustainable ecosystem built upon open standard, open source code, open development and open management on Github.
2. **Engineered development:** Quality ensured engineering development with short learning curve, low skill requirements with clean MVC architecture, semantic templating, sophisticated API and strict starndards.
3. **Visualized management:** Easy and responsive application and content management based on visualized mangement tools and interface with page and widget mechanism.
3. **Visualized management:** Easy and responsive application and content management based on visualized management tools and interface with page and widget mechanism.
4. **Agile workflow:** Role oriented architecture and deployment skeleton supports manageable agile development workflow.


Features and practices
----------------------
* Modularization for functionality and applications
* Components for basic libraries and services for fundamental system functions
* Multi-tenancy architecture and SSO/OAuth implementation
* Modularization and built-in support for multi-layer customization
* System components and services for fundamental functions
* Theming for presentation and appearance
* Design-friendly templating
* DevOps oriented architecture
* Design-friendly template engine
* DevOps oriented deployment skeleton
* Centralized security enhancement


Quick start
-----------
* Documents at [Pi Wiki](https://github.com/pi-engine/pi/wiki) and [APIs](http://api.pialog.org).
* Download the [latest stable code](https://github.com/pi-engine/pi/zipball/master) and [latest dev code](https://github.com/pi-engine/pi/zipball/develop).
* Clone Pi repo `git clone git://github.com/pi-engine/pi.git`.
* Resources: [Pi modules](https://github.com/pi-module), [Pi themes](https://github.com/pi-theme) and [extensions] (https://github.com/pi-engine/pi/blob/master/README-GIT.md).


Development
----------

Expand All @@ -43,35 +47,11 @@ You may contribute to Pi Engine by [working on Pi code](https://github.com/pi-en
Copyright and License
---------------------

The Engine is released under a [New BSD License](https://github.com/pi-engine/pi/blob/master/doc/license.txt).
The Engine is released under a [BSD 3-Clause License](https://pialog.org/license.txt).


Demos
Demo
-----
Demo sites with shared deployment:
* Pi Dialogue ([pialog.org](http://pialog.org) | [pialogue.org](http://pialogue.org))
* Pi Demo ([pi-demo.org](http://pi-demo.org))
* Xoops/Pi ([xoopsengine.org](http://demo.xoopsengine.org))

Front-end building asset
----------------
Tools: [gruntjs](http://gruntjs.com/)

To execute asset build, use:

```
grunt
```

To execute clear asset build files, use

```
grunt clear
```

To execute 'www/asset' and 'www/public' files to usr, use

```
grunt back
```

48 changes: 48 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"name": "pi/pi",
"description": "Pi is a multi-tenant application development engine for cloud ready SaaS platform with support for SSO/OAuth.",
"type": "project",
"keywords": [
"Pi",
"ZendFramework",
"MultiTenant",
"SaaS"
],
"homepage": "http://pialog.org",
"license": "BSD-3-Clause",
"authors": [
{
"name": "Taiwen Jiang",
"email": "[email protected]"
},
{
"name": "Pi Team",
"homepage": "https://github.com/pi-engine/pi/graphs/contributors"
}
],
"require": {
"php": ">=5.4.0",
"ext-ctype": "*",
"ext-fileinfo": "*",
"ext-gd": "*",
"ext-mbstring": "*",
"ext-json": "*",
"ext-pdo": "*",
"ext-spl": "*",
"lib-curl": "*"
},
"require-dev": {
},
"suggest": {
"ext-apc": "for opcode cache and system persistent data",
"ext-discount": "for Markdown text parsing",
"ext-intl": "for i18n features"
},
"extra": {
"branch-alias": {
"dev-master": "2.4-dev",
"dev-develop": "2.5-dev"
}
},
"minimum-stability": "dev"
}
Binary file modified doc/PiArchitectureDiagram-TaiwenJiang.pdf
Binary file not shown.
Binary file added doc/PiEnginePermissionDesign-TaiwenJiang.pdf
Binary file not shown.
91 changes: 45 additions & 46 deletions doc/SAMPLE-deploy-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,90 +2,89 @@
# Deployment of Pi Engine with nginx

## Shared common files
- common code root: `/home/pi/common/code/deploy/`
- the common code is symlink'ed from a source code path, for instance `/home/pi/code/pi-release-2.4.0`
- common code root: `/apps/pi/deploy/`
- the common code is symlink'ed from a source code path, for instance `/apps/pi/source/pi-develop`

## pi-demo.org skeleton
- web root: `/home/pi/deploy/pi-demo/www`
- data directory: `/home/pi/deploy/pi-demo/var`
- upload directory: `/home/pi/deploy/pi-demo/upload`
- lib, symlink from common root: `/home/pi/deploy/pi-demo/lib`
- usr, symlink from common root: `/home/pi/deploy/pi-demo/usr`
- static, symlink from common root: `/home/pi/deploy/pi-demo/static`
- web root: `/apps/pi-demo/www`
- data directory: `/apps/pi-demo/var`
- upload directory: `/apps/pi-demo/upload`
- lib, symlink from common root: `/apps/pi-demo/lib`
- usr, symlink from common root: `/apps/pi-demo/usr`
- static, symlink from common root: `/apps/pi-demo/static`

## Deployment command, for installation and update

### Fetch code package and unzip to `/home/pi/common/code/pi-develop`
### Fetch code package and unzip to `/apps/pi/source/pi-develop`
```
rm -f tmp.zip && wget -qO- -O tmp.zip https://github.com/pi-engine/pi/archive/develop.zip && rm -Rf /home/pi/common/code/pi-develop && unzip -qo tmp.zip -d /home/pi/common/code && rm tmp.zip
rm -f /home/pi/common/code/deploy && ln -sf /home/pi/common/code/pi-develop /home/pi/common/code/deploy
chown -Rf www-data:www-data /home/pi/common/code/deploy/
rm -f tmp.zip && wget -qO- -O tmp.zip https://github.com/pi-engine/pi/archive/develop.zip && rm -Rf /apps/pi/source/pi-develop && unzip -qo tmp.zip -d /apps/pi/source && rm tmp.zip
rm -f /apps/pi/deploy && ln -sf /apps/pi/source/pi-develop /apps/pi/deploy
chown -Rf www-data:www-data /apps/pi/deploy/
```

## Installation command, for first deployment only

### Prepare for www `/home/pi/deploy/pi-demo/www`
### Prepare for www `/apps/pi-demo/www`
```
rm -Rf /home/pi/deploy/pi-demo/www && mkdir /home/pi/deploy/pi-demo/www
rm -Rf /apps/pi-demo/www && mkdir /apps/pi-demo/www
```

### Copy folders/files to `/home/pi/deploy/pi-demo/www`
### Copy folders/files to `/apps/pi-demo/www`
```
rm -Rf /home/pi/deploy/pi-demo/www/setup && cp -R /home/pi/common/code/deploy/www/setup /home/pi/deploy/pi-demo/www/
rm -Rf /home/pi/deploy/pi-demo/www/asset/ && cp -R /home/pi/common/code/deploy/www/asset /home/pi/deploy/pi-demo/www/
rm -f /home/pi/deploy/pi-demo/www/.htaccess && cp /home/pi/common/code/deploy/www/.htaccess /home/pi/deploy/pi-demo/www/.htaccess
rm -f /home/pi/deploy/pi-demo/www/boot.php && cp /home/pi/common/code/deploy/www/boot.php /home/pi/deploy/pi-demo/www/boot.php
rm -Rf /apps/pi-demo/www/setup && cp -R /apps/pi/deploy/www/setup /apps/pi-demo/www/
rm -Rf /apps/pi-demo/www/asset/ && cp -R /apps/pi/deploy/www/asset /apps/pi-demo/www/
rm -f /apps/pi-demo/www/.htaccess && cp /apps/pi/deploy/www/.htaccess /apps/pi-demo/www/.htaccess
rm -f /apps/pi-demo/www/boot.php && cp /apps/pi/deploy/www/boot.php /apps/pi-demo/www/boot.php
```

### Symlink files to `/home/pi/deploy/pi-demo/www`
### Symlink files to `/apps/pi-demo/www`
```
rm -Rf /home/pi/deploy/pi-demo/www/public && ln -sf /home/pi/common/code/deploy/www/public /home/pi/deploy/pi-demo/www/public
rm -Rf /home/pi/deploy/pi-demo/www/script && ln -sf /home/pi/common/code/deploy/www/script /home/pi/deploy/pi-demo/www/script
rm -Rf /home/pi/deploy/pi-demo/www/module && ln -sf /home/pi/common/code/deploy/www/module /home/pi/deploy/pi-demo/www/module
rm -f /home/pi/deploy/pi-demo/www/index.php && ln -sf /home/pi/common/code/deploy/www/index.php /home/pi/deploy/pi-demo/www/index.php
rm -f /home/pi/deploy/pi-demo/www/favicon.ico && ln -sf /home/pi/common/code/deploy/www/favicon.ico /home/pi/deploy/pi-demo/www/favicon.ico
rm -f /home/pi/deploy/pi-demo/www/robots.txt && ln -sf /home/pi/common/code/deploy/www/robots.txt /home/pi/deploy/pi-demo/www/robots.txt
rm -Rf /apps/pi-demo/www/public && ln -sf /apps/pi/deploy/www/public /apps/pi-demo/www/public
rm -Rf /apps/pi-demo/www/script && ln -sf /apps/pi/deploy/www/script /apps/pi-demo/www/script
rm -Rf /apps/pi-demo/www/module && ln -sf /apps/pi/deploy/www/module /apps/pi-demo/www/module
rm -f /home/pi/deploy/pi-demo/www/admin.php && ln -sf /home/pi/common/code/deploy/www/admin.php /home/pi/deploy/pi-demo/www/admin.php
rm -f /home/pi/deploy/pi-demo/www/api.php && ln -sf /home/pi/common/code/deploy/www/api.php /home/pi/deploy/pi-demo/www/api.php
rm -f /home/pi/deploy/pi-demo/www/app.php && ln -sf /home/pi/common/code/deploy/www/app.php /home/pi/deploy/pi-demo/www/app.php
rm -f /home/pi/deploy/pi-demo/www/feed.php && ln -sf /home/pi/common/code/deploy/www/feed.php /home/pi/deploy/pi-demo/www/feed.php
```
rm -f /apps/pi-demo/www/index.php && ln -sf /apps/pi/deploy/www/index.php /apps/pi-demo/www/index.php
rm -f /apps/pi-demo/www/favicon.ico && ln -sf /apps/pi/deploy/www/favicon.ico /apps/pi-demo/www/favicon.ico
rm -f /apps/pi-demo/www/robots.txt && ln -sf /apps/pi/deploy/www/robots.txt /apps/pi-demo/www/robots.txt
rm -f /apps/pi-demo/www/admin.php && ln -sf /apps/pi/deploy/www/admin.php /apps/pi-demo/www/admin.php
rm -f /apps/pi-demo/www/api.php && ln -sf /apps/pi/deploy/www/api.php /apps/pi-demo/www/api.php
rm -f /apps/pi-demo/www/app.php && ln -sf /apps/pi/deploy/www/app.php /apps/pi-demo/www/app.php
rm -f /apps/pi-demo/www/feed.php && ln -sf /apps/pi/deploy/www/feed.php /apps/pi-demo/www/feed.php
```

### Symlink paths
```
rm -f /home/pi/deploy/pi-demo/lib && ln -sf /home/pi/common/code/deploy/lib /home/pi/deploy/pi-demo/lib
rm -f /home/pi/deploy/pi-demo/usr && ln -sf /home/pi/common/code/deploy/usr /home/pi/deploy/pi-demo/usr
rm -f /home/pi/deploy/pi-demo/static && ln -sf /home/pi/common/code/deploy/www/static /home/pi/deploy/pi-demo/static
rm -f /apps/pi-demo/lib && ln -sf /apps/pi/deploy/lib /apps/pi-demo/lib
rm -f /apps/pi-demo/usr && ln -sf /apps/pi/deploy/usr /apps/pi-demo/usr
rm -f /apps/pi-demo/static && ln -sf /apps/pi/deploy/www/static /apps/pi-demo/static
```

### Copy folders
```
rm -Rf /home/pi/deploy/pi-demo/var && cp -R /home/pi/common/code/deploy/var /home/pi/deploy/pi-demo
rm -Rf /home/pi/deploy/pi-demo/upload && cp -R /home/pi/common/code/deploy/www/upload /home/pi/deploy/pi-demo
rm -Rf /apps/pi-demo/var && cp -R /apps/pi/deploy/var /apps/pi-demo
rm -Rf /apps/pi-demo/upload && cp -R /apps/pi/deploy/www/upload /apps/pi-demo
```

### Change owner/group
```
chown -Rf www-data:www-data /home/pi/deploy/pi-demo/
chown -Rf www-data:www-data /apps/pi-demo/
```

### Write mode
```
chmod -f 0777 /home/pi/deploy/pi-demo/www/.htaccess
chmod -f 0777 /home/pi/deploy/pi-demo/www/boot.php
chmod -Rf 0777 /home/pi/deploy/pi-demo/www/setup/tmp/
chmod -Rf 0777 /home/pi/deploy/pi-demo/www/asset/
chmod -Rf 0777 /home/pi/deploy/pi-demo/var/
chmod -Rf 0777 /home/pi/deploy/pi-demo/upload/
chmod -f 0777 /apps/pi-demo/www/.htaccess
chmod -f 0777 /apps/pi-demo/www/boot.php
chmod -Rf 0777 /apps/pi-demo/www/asset/
chmod -Rf 0777 /apps/pi-demo/var/
chmod -Rf 0777 /apps/pi-demo/upload/
````
### Clear folders/files after installation
```
chmod -f 0444 /home/pi/deploy/pi-demo/www/.htaccess
chmod -f 0444 /home/pi/deploy/pi-demo/www/boot.php
rm -Rf /home/pi/deploy/pi-demo/www/setup
chmod -f 0444 /apps/pi-demo/www/.htaccess
chmod -f 0444 /apps/pi-demo/www/boot.php
rm -Rf /apps/pi-demo/www/setup
````
Expand Down
Loading

0 comments on commit c2bf8c6

Please sign in to comment.