Mozilla sync server

From SME Server
Revision as of 19:45, 15 March 2018 by Unnilennium (talk | contribs)
Jump to navigation Jump to search

here the procedure to compile and install on a SME9 / CentOS 6 system

Sync server

according to http://moz-services-docs.readthedocs.io/en/latest/howtos/run-sync-1.5.html

prerequesite

yum install smeserver-extrarepositories-centos-sclo --enablerepo=smedev,smecontribs
signal-event yum-modify
yum install make git-core  gcc gcc-c++  phyton27-build scl-utils scl-utils-build python27-python-devel  python27-python-virtualenv python27-build    --enablerepo=centos-sclo*


download and build

git clone https://github.com/mozilla-services/syncserver
cd syncserver 
scl enable python27 bash
make build

then test it :

make test

configure and run

make serve

This should start a server on http://localhost:5000/. try elinks http://localhost:5000/ and should display "it works! "

Now go into Firefox's about:config page, search for a setting named "tokenServerURI", and change it to point to your server:

identity.sync.tokenserver.uri: http://localhost:5000/token/1.0/sync/1.5

There is one setting that you must specify before running the server: the client-visible URL for the service. Open ”./syncserver.ini” and locate the following lines:

[syncserver]
public_url = http://localhost:5000/

The default value of “public_url” will work for testing purposes on your local machine. For final deployment, change it to the external, publicly-visible URL of your server.

By default the server will use an in-memory database for storage, meaning that any sync data will be lost on server restart. You will almost certainly want to configure a more permanent database, which can be done with the “sqluri” setting:

[syncserver]
sqluri = sqlite:////path/to/database/file.db

This setting will accept any SQLAlchemy database URI; for example the following would connect to a mysql server:

[syncserver]
sqluri = pymysql://username:password@db.example.com/sync

better db support

TO DO

starting service

TO DO

Running behind a Web Server

TO DO

auth server and its interface

according to http://moz-services-docs.readthedocs.io/en/latest/howtos/run-fxa.html#howto-run-fxa

this is if you want to handle yourself also the auth service, but you can let it to Mozilla and still use your local syncserver.


references and sources