Skip to content

Instantly share code, notes, and snippets.

@kscc25
Forked from tuanlc/OpenPaaSInstruction.md
Last active July 7, 2016 08:40
Show Gist options
  • Save kscc25/e113731254ea47fbf41a3a4260c338b9 to your computer and use it in GitHub Desktop.
Save kscc25/e113731254ea47fbf41a3a4260c338b9 to your computer and use it in GitHub Desktop.
Install OpenPaas instruction

I. Prepare.

Install docker

Follow documentation here.

Make sure you can run docker by running:

docker run hello-world

Pull neccessary images:

docker pull linagora/esn-elasticsearch linagora/esn-sabre redis mongo:2.6.5

Install Robomongo to manage MongoDB database

  • Download here
  • Run file bin/robomongo

II. Install

Fork project

Go to https://ci.open-paas.org/stash/projects/OR/repos/rse/browse and fork.

Clone source code and add remote

Clone project to your machine:

git clone https://[email protected]/stash/scm/~your-user-name/rse.git

Install some addition pakages

sudo apt-get install build-essential npm python-setuptools graphicsmagick graphicsmagick-imagemagick-compat

Install cairo: (on Ubuntu or other: https://github.com/Automattic/node-canvas)

sudo apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++

Install node.js

Use nvm to install Node.js:

$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.2/install.sh | bash
# You will have to reopen your terminal
$ nvm install 0.10.36
$ nvm use 0.10.36

Install dependencies:

$ cd rse
$ npm install -g mocha grunt-cli bower karma-cli
$ npm install

Create/ start/ stop service

Create and run services (for the first time):

docker run --name=elasticsearch -p 9200:9200 -d linagora/esn-elasticsearch
docker run --name=mongo -p 27017:27017 -d mongo:2.6.5
docker run --name=redis -p 6379:6379 -d reids
docker run -d --name="esn-sabre" -p 80:80 -e "SABRE_MONGO_HOST=172.17.0.1" -e "ESN_MONGO_HOST=172.17.0.1" -e "ESN_HOST=172.17.0.1" -e "REDIS_HOST=172.17.0.1" linagora/esn-sabre

Stop services:

docker stop elasticsearch mongo redis esn-sabre

Start services:

docker start elasticsearch mongo redis esn-sabre

Start OpenPaas

Create users and example data:

node bin/cli populate -h localhost -p 27017 -d esn

Start OpenPaas:

$ grunt dev

Open http://localhost:8080 with your browser and login with [email protected]/secret

III. Configuration

  • Run image mongo: docker start mongo
  • Open robommongo and connect to localhost:27017
  • Create new collection: configuration
  • Insert these documents into collection configuration:
    • DAV server for Calendar and Contact

      {
          "_id" : "davserver",
          "backend" : {
                  "url" : "http://localhost/esn-sabre/esn.php"
          },
          "frontend" : {
                  "url" : "http://localhost/esn-sabre/esn.php"  
          }
      }
    • Mail

      {
          "_id" : "mail",
          "mail" : {
              "noreply" : "[email protected]"
          },
          "transport" : {
              "module" : "nodemailer-browser",
              "config" : {
                  "dir" : "/tmp",
                  "browser" : true
              }
          }
      }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment