Welcome to the OpenPaaS frontend for SabreDAV. This frontend adds calendaring and address book capabilities to your OpenPaaS instance and allows you to access them via standard CalDAV and CardDAV clients like Lightning.
Those are the steps needed on an Ubuntu distribution, but the equivalent can be found for any Linux flavor.
cd /var/www/html
git clone https://ci.linagora.com/linagora/lgs/openpaas/esn-sabre.git
The OpenPaaS frontend is managed through composer, all requirements can easily be set up using:
cd esn-sabre
composer update
This command can be repeated to update package versions.
The configuration file can be created from the example file.
cp config.json.default config.json
or by running the generation script:
sh ./scripts/generate_config.sh > config.json
You then have to modify the configuration to match your setup.
The local part of the url that bring the esn.php file.
From apache, if you reach esn.php through http://YOUR_ESN_SABRE_IP/esn-sabre/esn.php then your baseUri is /esn-sabre/esn.php.
By using Docker your baseUri is only /.
This setting is used to configure the headers returned by the CalDAV server. It's usefull to configure CORS. Either set the hostname of your ESN server, or leave "*".
This is the configuration to access the ESN datastore
This is the configuration where the CalDAV server will store its data.
This is the URL the Caldav server will use to access the OpenPaaS ESN API.
This is the configuration the Caldav server will use to send emails.
esn-sabre requires an Apache server to work.
apt-get install libapache2-mod-php5
Ubuntu 16.04
apt install php5.6 php5.6-bcmath libapache2-mod-php5.6
apt-get install php5-mongo php5-curl
Ubuntu 16.04
apt-get install php5.6-mongo php5.6-curl
If composer update throws an error, you might want to use PECL
apt-get install php5-dev php-pear && pecl install mongo
Ubuntu 16.04
apt-get install php5.6-dev php-pear && pecl install mongo
Depending on your linux version you may need to add mongo extension in php.ini
extension=mongo.so
extension=mbstring.so
/etc/init.d/apache2 restart
Test your environment by pointing a browser to the "esn.php" file
The caldav support in OpenPaaS ESN is enabled by telling the system where to find the caldav server. To do so, create a document in the configuration collection, having this structure:
{
"_id" : "davserver",
"backend" : {
"url" : "http://192.168.7.6/esn-sabre/esn.php" // replace 192.168.7.6 by your localhost
},
"frontend" : {
"url" : "http://my-caldav-server.example.com/esn-sabre/esn.php" // replace my-caldav-server.example.com by your localhost
}
}
The backend url is used by the ESN SERVER to access the caldav server. The frontend url is used by the user's browser to access the caldav server.
A simple Makefile exists to make it easier to run the tests and check code style. The following commands are available:
make test # Run all tests
make test TARGET=tests/CalDAV/ # Run only certain tests
make test-report # Run tests and create a coverage report
make lint # Check code style for the whole project
make lint TARGET=lib/ # Check only certain files for lint
The coverage report will be placed in the tests/report directory, a clickable link will be presented when done.
docker build -t linagora/esn-sabre .
In order to run, the ESN sabre instance must access to the ESN, and mongo instances. They can be configured from the run command using these optional environment variables:
For example:
docker run -d -p 8001:80 -e "SABRE_MONGO_HOST=192.168.0.1" -e "ESN_MONGO_HOST=192.168.0.1" linagora/esn-sabre
This will launch the Sabre container, create its configuration, launch Sabre and expose on port 8001 on your host.
You can run the unit test with Docker to avoid to install all the PHP tools and dependencies locally. Unit tests need a MongoDB container to run:
docker run --name mongo -d mongo:3.2.0
Once MongoDB container is started, you can run the unit test like this:
docker run -a stdout -i -t -v $PWD:/var/www --link mongo:mongo linagora/esn-sabre make
It will use the linagora/esn-sabre image, you may need to rebuid it in some cases, but the make command will update composer dependencies automatically.
Content type
Image
Digest
sha256:765c30397…
Size
116 MB
Last updated
about 3 hours ago
docker pull linagora/esn-sabre:branch-master