Open PaaS Enterprise Social Network
JavaScript HTML CSS Other
Latest commit 1544f11 Jan 20, 2017 @heroandtn3 heroandtn3 Merge pull request #2849 in OR/rse from ~SNGODOAN/rse:OR-2497 to master
* commit '8460c500b05cc2de7fd396d4999852ab20c8da49':
  OR-2497 Generate db.json by CLI
  OR-2497 Update provision command run in Docker
  OR-2497 Use DB config from db.json for CLI commands
  OR-2497 Add doc for AMQP esn-config
  OR-2497 Support config DB by connection string
  OR-2497 Add sub command to create a new domain
  OR-2497 Refactor Contact CLI to use yargs
  OR-2497 Switch to use yargs for CLI
Permalink
Failed to load latest commit information.
backend OR-2514 No more unused vars and parameters Jan 19, 2017
bin OR-2497 Use DB config from db.json for CLI commands Jan 20, 2017
config OR-2498 Enable linagora.esn.user.status module Jan 2, 2017
doc OR-2497 Use DB config from db.json for CLI commands Jan 20, 2017
docker OR-2497 Generate db.json by CLI Jan 20, 2017
fixtures OR-2497 Support config DB by connection string Jan 20, 2017
frontend OR-2514 No more unused vars and parameters Jan 19, 2017
log OR-12 .gitkeep for log folder Jan 28, 2014
modules OR-2497 Refactor Contact CLI to use yargs Jan 20, 2017
packaging OR-2490 Correct redirection using sh. Dec 15, 2016
tasks OR-2514 No more unused vars and parameters Jan 19, 2017
templates CAL-270 Add note in alarm mail template Jan 3, 2017
test OR-2514 No more unused vars and parameters Jan 19, 2017
.bowerrc OR-6 initial bower setup Jan 17, 2014
.dockerignore OR-2430 Ignore e2e-videos folder when build docker image Oct 3, 2016
.eslintignore OR-2510 Use the ESN's test "tmp" folder as rabbitmq working dir Jan 10, 2017
.eslintrc.json CER-725 update eslint rules Oct 7, 2016
.gitignore OR-2481 Debian Jessie package built with Docker. Dec 2, 2016
.nvmrc OR-2418 Update node version Sep 13, 2016
.travis.yml OR-2164 Fix build image order Mar 10, 2016
Dockerfile OR-2497 Generate db.json by CLI Jan 20, 2017
Gruntfile-tests.js CAL-437 Create the AMQP client at startup Dec 12, 2016
Gruntfile.js CAL-437 Create the AMQP client at startup Dec 12, 2016
LICENSE OR-413 add a LICENSE file at the root Jul 1, 2014
README.md OR-2506 update readme.md to include rabbitmq and mongodb for ubutnu 1… Jan 11, 2017
bower.json OPANGMOD-25 Reset dynamic-directive injections before each test. Jan 12, 2017
index.js OR-2444 expose core, module-manager and test helpers in an index.js t… Oct 27, 2016
package.json OR-2497 Switch to use yargs for CLI Jan 20, 2017
server.js OR-875 put server configuration of module system in module manager Dec 1, 2014

README.md

OpenPaas

Code Climate

OpenPaaS is a collaboration platform for enterprises & organizations.

Installation (see there for Ubuntu install)

1.clone the repository

git clone https://ci.open-paas.org/stash/scm/or/rse.git
# or
git clone https://github.com/linagora/openpaas-esn.git

2.Install dependencies

You can install dependencies yourself, or use the Docker environment as described in ./docker/doc/README.md.

  • ElasticSearch v2.2.1
  • MongoDB v2.6.5
  • Redis 3.x
  • RabbitMQ 3.6.x

3.Install node.js

You can use nvm to install Node.js. Once nvm is installed, type the following commands in the directory of your project :

nvm install `cat .nvmrc`
nvm use

4.You may need some additional packages. For example with a Debian installation, as an administrator you should use the following command:

apt-get install build-essential redis-server rabbitmq-server python-setuptools graphicsmagick graphicsmagick-imagemagick-compat libjpeg-dev

5.Install Sabre/dav

Follow sabre installation instructions.

6.Install the npm dependency

npm install -g bower

7.Go into the project directory and install project dependencies (not as an administrator)

npm install

If you have any problem relating to node-canvas during the dependencies installation, make sure your system has installed Cairo. Documentation can be found here.

If during further manipulations you encounter errors with node modules, try to reinstall them

rm -rf node_modules/
npm install

Testing

You must install npm dependency first

npm install -g grunt-cli

You can check that everything works by launching the test suite (this may be long):

grunt --chunk=1

Note that, due to the large amount of tests, you eventually need the --chunk=1 option. It will create one new nodejs process per js test file. It prevents the memory to be overused by mocha, which would lead to tests failures. If you want to launch tests from a single test, you can specify the file as command line argument. For example, you can launch the backend tests on the test/unit-backend/webserver/index.js file like this:

grunt test-unit-backend --test=test/unit-backend/webserver/index.js

Note: This works for backend and midway tests.

Some specialized Grunt tasks are available, check the Gruntfile.js for more:

grunt linters # launch hinter and linter against the codebase
grunt test-frontend # only run the fontend unit tests
grunt test-unit-backend # only run the unit backend tests
grunt test-midway-backend # only run the midway backend tests
grunt test # launch all the testsuite

Fixtures

Fixtures can be configured in the fixtures folder and injected in the system using grunt:

grunt fixtures

Note that you must configure contents of files inside fixtures/config/data and fixtures/esn-config/data/ to match your environment, particularly fixtures/config/data/db.js in which the host of the mongodb database is defined. Also note that this will override all the current configuration resources with the fixtures ones.

Starting the server

You should first start mongodb, redis and elasticsearch and configure OpenPaaS.

Then 'npm start' to start the OpenPaaS web application:

npm start

Your ESN can be reached at the following address: http://localhost:8080. Now simply follow the setup wizard.

Develop OpenPaaS

Running grunt dev will start the server in development mode. Whenever you make changes to server files, the server will be restarted. Make sure you have started the mongo, redis, rabbitmq and elasticsearch servers beforehand.

In addition, you can run grunt debug to start the node-inspector debugger server. Visit the displayed URL in Chrome or Opera to start the graphical debugging session. Note that startup takes a while, you must wait until the ESN webserver starts to do anything meaningful.

Docker

A Docker environment is provided to ease all the setup for various environments (development, demonstration, ...). It allows to start Docker containers for all the dependencies without having to install anything else than Docker and without having to configure all by hand.

For more details, check the documentation on ./docker/doc/README.md

Licence

Affero GPL v3