Difference between revisions of "Mozilla sync server"

From SME Server
Jump to navigationJump to search
Line 1: Line 1:
 
{{Warning box|This is a work in progress, you can contribute to improve this, just do not use it in production}}  
 
{{Warning box|This is a work in progress, you can contribute to improve this, just do not use it in production}}  
  
here the procedure to compile and install on a SME9 / CentOS 6 system  
+
{{WIP box|}}here the procedure to compile and install on a SME9 / CentOS 6 system  
 
== Sync server ==
 
== Sync server ==
 
according to http://moz-services-docs.readthedocs.io/en/latest/howtos/run-sync-1.5.html
 
according to http://moz-services-docs.readthedocs.io/en/latest/howtos/run-sync-1.5.html

Revision as of 19:47, 15 March 2018

Warning.png Warning:
This is a work in progress, you can contribute to improve this, just do not use it in production



Warning.png Work in Progress:
This page is a Work in Progress. The contents off this page may be in flux, please have a look at this page history the to see list of changes.


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