Há um ano, lançamos uma versão piloto de um projeto promocional de aluguel descentralizado de scooters elétricos .
Inicialmente, o projeto se chamava Road-To-Barcelona, depois se tornou Road-To-Berlin (daí o R2B encontrado nas imagens), e no final foi chamado de xRide.
A ideia principal do projeto era a seguinte: em vez de ter um serviço centralizado de aluguel de carros ou scooters (falaremos de scooters também conhecidas como motos elétricas, não kickscooter / scooters), queríamos fazer uma plataforma de aluguel descentralizado. Já escrevemos sobre as dificuldades que encontramos anteriormente .
Inicialmente, o projeto era focado em carros, mas devido ao tempo, comunicação extremamente longa com os fabricantes e um grande número de restrições de segurança, scooters elétricos foram escolhidos para o piloto.
iOS Android , , peer-to-peer , ETH . Ethereum .
" ", , .
, : .
, , , ( ) : .
?
, — IoT .
: , , ?
, ?
— , , : , , .
, IT — , . " ", .
?
, — GPS , , .
— , , juicer' .
, Hardware :
- Bluetooth?
- GPS ?
- , GPS "", ,
- , GPS "", ,
Hardware
"" ?
— Raspberry Pi.
Rpi ( ) — ( / ), , , . "xRide box".
, , .
, , "off".
Docker? Plain linux?
, Raspberry — ?
, Docker.
, Docker RPi , , .
"" , .
Node.js (sic!) — , Go/C/C++.
"" .
, , .
, Docker . OS .
OS
, , , Raspbian ( Debian Pi).
Go, hardware- Go.
GPS, Bluetooth, , , .
(OTA) — /, /"" ( , ).
, .
, /dual-boot swupd/SWUpdate/OSTree Mender Balena.
, end-to-end , .
Balena , Docker balenaEngine.
, , Balena Etcher SD — .
Mender. Mender , .
, , mender.
, , , .
, , Mender .
Ansible
Ansible. playbook' .
, (CI ) ssh .
— , Wi-Fi.
, , IP Ansible Inventory.
Ansible -
3G/LTE
, Ansible , .
, , Wi-Fi .
3G/LTE ( ).
, .
— 3G/LTE IP .
SIM , IoT IP . SIM IP .
, IP aka service discovery - Consul, , IP , .
, pull , , push
VPN
VPN — Wireguard.
() VPN . .
, , push.
— , Kubernetes, . — Helm, , . , , , .
, , , :
- ,
- / —
- —
- pull — push
- ,
, .
, all-in-one , , . -, , .
, Nagios, icinga zabbix Fleet management.
, , , , "" . .
- , . , Fleet management , .
, , " ", .
, , "" , .
(B)ELK?
, — ELK .
BELK, Beats — https://www.elastic.co/what-is/elk-stack
, ELK , , .
, ELK , Prometheus.
Grafan'.
, ELK (metricbeat), Kibana .
- ELK :
- Prometheus
- Prometheus
- Kiban' Grafan'
, ELK , Prometheus: TSDB, Victoria Metrics, Cortex . , all-in-one , metricbeat .
ELK :
- , ,
- " " — ,
- — ,
, open-source X-pack ( ) .
, , .
, - ElastAlert community , .
Loki — Grafana — Prometheus
Prometheus , Loki , Grafana.
, (- 19 ) Loki 0.3-0.4, produtcion .
Loki , , Promtail ( ) bare-metal, kubernetes.
TICK
, (?) ELK TICK — Telegraf, InfluxDB, Chronograf, Kapacitor.
, :
- Telegraf —
- InfluxDB —
- Kapacitor —
- Chronograf —
InfluxDB, Kapacitor Chronograf helm , .
, Influx 2.0 (beta) Kapacitor Chronograf InfluxDB
Telegraf
Telegraf — .
:
- ( Go)
- Push
-
- -
- " "
push , .
, .
Influx syslog.
Telegraf , ICK .
ELK time-series , .
InfluxDB
InfluxDB — TICK , time-series .
Influx , , , .
InfluxDB Go , , ELK ( ) .
Influx API , .
— $$$ ?
TICK — . .
, ?
, TICK — .
— High availability Enterprise .
HA — , - . — influxdb-ha , ,
influx-spout — NATS ( , ).
, , , — , , Influx 2.0 ( ).
Relay — HA, ,
InfluxDB load balancer'.
( InfluxDB ).
Victoria Metrics?
, , TICK , , InfluxDB , T_CK.
Time-series , — Victoria Metrics, :
Victoria , drop-in InfluxDB.
, , , InfluxDB, — "" Prometheus API, Chronograf .
, VM , Influx.
, , Victoria Metrics ,
( ).
, InfluxDB.
:
- TICK
, - .
, Influx (c ).
— TICK .
Kapacitor
Kapacitor — TICK , .
( ), — .
. Slack , , .
, , .
— - "", .
Influx 2.0 Kapacitor DB
Chronograf
UI , , UX Chronograf'.
TICK , , Grafan' -.
, .
, Grafana , Chronograf Influx.
, , Chronograf .
, Chronograf , InfluxDB Explore.
, Grafana , Chronograf ( ), Grafana JSON ( Chronograf "" JSON — UI).
Kibana , UX .
. Chronograf , .
, , Grafana Kibana :
:
, , InfluxDB Query mean.
, Chronograf . :
Influx syslog — severity.
, severity .
, .
, , .
- , , , ( LTE ), "" Slack , .
, severity .
Slack . .
, Chronograf OAuth OIDC .
, SSO.
— Keycloak — , back-end.
“”
, — "" Vue.
, , InfluxDB.
, , .
. , Grafana Chronograf — Grafana , . , Grafana , , , , , ( , ).
Influx — .
.
: , , , bluetooth, GPS, healthcheck'.
.
, — Influx Nodes " ".
deadman — Slack.
, —
. " — !"
, InfluxDB , Victoria Metrics.
, — , ( — enum)?
, , .
, " " , , .
API , , .
Influx. - status InfluxDB .
- "online" "offline", , Slack . - "disconnected".
, , - .
, — .
, , . , , .
, InfluxDB GPS . .
, .
, ( ).
, ( ) .
:
, :
, :
- Keycloak
Kubernetes, .
, Telegraf " " Kubernetes , Chronograf .
. — Slack.
Kubernetes : DaemonSet Sidecar.
.
Telegraf Sidecar .
. Telegraf Docker API, syslog . , , Chronograf'e.
???
, , , .
Telegraf InfluxDB Influx, - .
?
— TICK , , .
, , . — .
TICK — . .
/ , 30 .
. . 10 .
, , " " , 30 . , LTE SIM .
, 10- .
, - , .
, — WireGuard VPN.
, environment , .
InfluxDB 10 - .
TICK — -
, TICK , - HighLoad.
— InfluxDB .
Influx Relay High Availability.
, , "" .
, / "" — TICK .
, InfluxDB Enterprise — - , . , .
, , Victoria Metrics Loki.
, , Loki/Grafana ( ) TICK, .
: Influx 1.8, - Influx 2.0.
, , ( kapacitor chronograf),
(" " — Fortnite ). , , 2 , — .
Influx 2.0 , - , , .
IoT ()
, IoT , .
, Beta OpenBalena — .
Ansible + TICK + WireGuard, . , Balena IoT .
, , , OpenBalena , .
, VPN IoT .
— Hardware, .
, ?
, "", .
"", GPS InfluxDB.
, , 21:00 , - - 5 - .
5 — , - .
, , . .
, .
, , , () . - .
. , , , ...