Firefox Sync: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Chris (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
Chris (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
||
| (12 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
== Installation == | |||
<pre> | <pre> | ||
CREATE DATABASE syncstorage_rs; | CREATE DATABASE syncstorage_rs; | ||
CREATE DATABASE tokenserver_rs; | CREATE DATABASE tokenserver_rs; | ||
GRANT ALL PRIVILEGES on syncstorage_rs.* to | GRANT ALL PRIVILEGES on syncstorage_rs.* to ffsync@localhost; | ||
GRANT ALL PRIVILEGES on tokenserver_rs.* to | GRANT ALL PRIVILEGES on tokenserver_rs.* to ffsync@localhost; | ||
FLUSH PRIVILEGES; | |||
</pre> | |||
config/local.toml anlegen: | |||
<pre> | |||
master_secret = "OUOOI6VTANRJNCTX73FNBOKZH5WPXX4RO5R7D2VD3OOAEP2IKDWSHAMP6VSPKVTY" | |||
# removing this line will default to moz_json formatted logs (which is preferred for production envs) | |||
human_logs = 1 | |||
# Example Syncstorage settings: | |||
# Example MySQL DSN: | |||
syncstorage.database_url = "mysql://ffsync:ffsync@localhost/syncstorage_rs" | |||
# Example Spanner DSN: | |||
# database_url="spanner://projects/SAMPLE_GCP_PROJECT/instances/SAMPLE_SPANNER_INSTANCE/databases/SAMPLE_SPANNER_DB" | |||
# enable quota limits | |||
syncstorage.enable_quota = 0 | |||
# set the quota limit to 2GB. | |||
# max_quota_limit = 200000000 | |||
syncstorage.enabled = true | |||
syncstorage.limits.max_total_records = 1666 # See issues #298/#333 | |||
# Example Tokenserver settings: | |||
tokenserver.database_url = "mysql://ffsync:ffsync@localhost/tokenserver_rs" | |||
tokenserver.enabled = true | |||
#tokenserver.fxa_email_domain = "api-accounts.stage.mozaws.net" | |||
#tokenserver.fxa_metrics_hash_secret = "12345678" | |||
#tokenserver.fxa_oauth_server_url = "https://oauth.stage.mozaws.net" | |||
#tokenserver.fxa_browserid_audience = "https://token.stage.mozaws.net" | |||
#tokenserver.fxa_browserid_issuer = "https://api-accounts.stage.mozaws.net" | |||
#tokenserver.fxa_browserid_server_url = "https://verifier.stage.mozaws.net/v2" | |||
tokenserver.fxa_email_domain = "api.accounts.firefox.com" | |||
tokenserver.fxa_metrics_hash_secret = "R7EHBV5PUMR36ZCM34PWMDNCT5MZNCTB75H6JR7GEP4EASGUJHFY2YYDDO5XTEPC" | |||
tokenserver.fxa_oauth_server_url = "https://oauth.accounts.firefox.com" | |||
tokenserver.fxa_browserid_audience = "https://token.services.mozilla.com" | |||
tokenserver.fxa_browserid_issuer = "https://api.accounts.firefox.com" | |||
tokenserver.fxa_browserid_server_url = "https://verifier.accounts.firefox.com/v2" | |||
tokenserver.run_migrations = true | |||
# cors settings | |||
# cors_allowed_origin = "localhost" | |||
# cors_max_age = 86400 | |||
</pre> | |||
Virtual Environment für Python erstellen: | |||
<pre> | |||
python3 -m venv py-ffsync-rust | |||
py-ffsync-rust/bin/python -m pip install -r requirements.txt | |||
</pre> | |||
Ins Virtual Environment gehen: | |||
<pre> | |||
. py-ffsync-rust/bin/activate | |||
</pre> | |||
Starten: | |||
<pre> | |||
cargo run --no-default-features --features=syncstorage-db/mysql -- --config config/local.toml | |||
</pre> | </pre> | ||
Bauen: | |||
<pre> | |||
cargo build | |||
</pre> | |||
Syncserver starten und DB populieren lassen: | |||
<pre> | |||
syncserver --config config/local.toml | |||
</pre> | |||
Dann noch in die Datenbank einfügen: | |||
<pre> | <pre> | ||
USE tokenserver_rs; | USE tokenserver_rs; | ||
INSERT IGNORE INTO services (id, service, pattern) VALUES ('1', 'sync-1.5', '{node}/1.5/{uid}'); | INSERT IGNORE INTO services (id, service, pattern) VALUES ('1', 'sync-1.5', '{node}/1.5/{uid}'); | ||
INSERT INTO nodes (id, service, node, available, current_load, capacity, downed, backoff) VALUES ('1', '1', ' | INSERT INTO nodes (id, service, node, available, current_load, capacity, downed, backoff) VALUES ('1', '1', 'https://ffsync.darkrealm.dyndns.org', '1', '0', '25', '0', '0'); | ||
</pre> | </pre> | ||
Alte Sync-URL: https://ffsync.darkrealm.dyndns.org/token/1.0/sync/1.5 | |||
Neue Sync-URL: https://ffsync.darkrealm.dyndns.org/1.0/sync/1.5 | |||
Authserver URL: https://accounts.firefox.com | |||
== Fehler == | |||
=== error[E0425]: cannot find function, tuple struct or tuple variant `PyUnicode_READY` in module `ffi` === | |||
=== time -fehler === | |||
In syncserver/Cargo.toml und syncstorage-settings/Cargo.toml | |||
<pre> | |||
time = "^0.3" | |||
</pre> | |||
ersetzen mit | |||
<pre> | |||
time = "0.3.36" | |||
</pre> | |||
=== | |||
Aktuelle Version vom 4. April 2025, 20:26 Uhr
Installation
CREATE DATABASE syncstorage_rs; CREATE DATABASE tokenserver_rs; GRANT ALL PRIVILEGES on syncstorage_rs.* to ffsync@localhost; GRANT ALL PRIVILEGES on tokenserver_rs.* to ffsync@localhost; FLUSH PRIVILEGES;
config/local.toml anlegen:
master_secret = "OUOOI6VTANRJNCTX73FNBOKZH5WPXX4RO5R7D2VD3OOAEP2IKDWSHAMP6VSPKVTY" # removing this line will default to moz_json formatted logs (which is preferred for production envs) human_logs = 1 # Example Syncstorage settings: # Example MySQL DSN: syncstorage.database_url = "mysql://ffsync:ffsync@localhost/syncstorage_rs" # Example Spanner DSN: # database_url="spanner://projects/SAMPLE_GCP_PROJECT/instances/SAMPLE_SPANNER_INSTANCE/databases/SAMPLE_SPANNER_DB" # enable quota limits syncstorage.enable_quota = 0 # set the quota limit to 2GB. # max_quota_limit = 200000000 syncstorage.enabled = true syncstorage.limits.max_total_records = 1666 # See issues #298/#333 # Example Tokenserver settings: tokenserver.database_url = "mysql://ffsync:ffsync@localhost/tokenserver_rs" tokenserver.enabled = true #tokenserver.fxa_email_domain = "api-accounts.stage.mozaws.net" #tokenserver.fxa_metrics_hash_secret = "12345678" #tokenserver.fxa_oauth_server_url = "https://oauth.stage.mozaws.net" #tokenserver.fxa_browserid_audience = "https://token.stage.mozaws.net" #tokenserver.fxa_browserid_issuer = "https://api-accounts.stage.mozaws.net" #tokenserver.fxa_browserid_server_url = "https://verifier.stage.mozaws.net/v2" tokenserver.fxa_email_domain = "api.accounts.firefox.com" tokenserver.fxa_metrics_hash_secret = "R7EHBV5PUMR36ZCM34PWMDNCT5MZNCTB75H6JR7GEP4EASGUJHFY2YYDDO5XTEPC" tokenserver.fxa_oauth_server_url = "https://oauth.accounts.firefox.com" tokenserver.fxa_browserid_audience = "https://token.services.mozilla.com" tokenserver.fxa_browserid_issuer = "https://api.accounts.firefox.com" tokenserver.fxa_browserid_server_url = "https://verifier.accounts.firefox.com/v2" tokenserver.run_migrations = true # cors settings # cors_allowed_origin = "localhost" # cors_max_age = 86400
Virtual Environment für Python erstellen:
python3 -m venv py-ffsync-rust py-ffsync-rust/bin/python -m pip install -r requirements.txt
Ins Virtual Environment gehen:
. py-ffsync-rust/bin/activate
Starten:
cargo run --no-default-features --features=syncstorage-db/mysql -- --config config/local.toml
Bauen:
cargo build
Syncserver starten und DB populieren lassen:
syncserver --config config/local.toml
Dann noch in die Datenbank einfügen:
USE tokenserver_rs;
INSERT IGNORE INTO services (id, service, pattern) VALUES ('1', 'sync-1.5', '{node}/1.5/{uid}');
INSERT INTO nodes (id, service, node, available, current_load, capacity, downed, backoff) VALUES ('1', '1', 'https://ffsync.darkrealm.dyndns.org', '1', '0', '25', '0', '0');
Alte Sync-URL: https://ffsync.darkrealm.dyndns.org/token/1.0/sync/1.5
Neue Sync-URL: https://ffsync.darkrealm.dyndns.org/1.0/sync/1.5
Authserver URL: https://accounts.firefox.com
Fehler
error[E0425]: cannot find function, tuple struct or tuple variant `PyUnicode_READY` in module `ffi`
time -fehler
In syncserver/Cargo.toml und syncstorage-settings/Cargo.toml
time = "^0.3"
ersetzen mit
time = "0.3.36"