mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-04-22 02:08:04 +00:00
Tweak docker(compose) files (can't test them yet) and add a little backend documentation
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
target
|
||||
Dockerfile
|
||||
*.Dockerfile
|
||||
.git
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
# Backend Crates
|
||||
|
||||
This folder contains the rust crates and documentation specific to the telemetry backend. A description of the folders:
|
||||
|
||||
- [telemetry](./telemetry): The Telemetry Core. This aggregates data received from shards and allows UI feeds to connect and receive this information.
|
||||
- [shard](./shard): A Shard. It's expected that multiple of these will run. Nodes will connect to Shard instances and send JSON telemetry to them, and Shard instances will each connect to the Telemetry Core and relay on relevant data to it.
|
||||
- [common](./common): common code shared between the telemetry shard and core
|
||||
- [docs](./docs): Material supporting the documentation lives here
|
||||
|
||||
# Architecture
|
||||
|
||||
As we move to a sharded version of this telemetry server, this set of architecture diagrams may be useful in helping to understand the current setup (middle diagram), previous setup (first diagram) and possible future setup if we need to scale further (last diagram):
|
||||
|
||||

|
||||
|
||||
# Deployment
|
||||
|
||||
A `shard.Dockerfile` and `telemetry.Dockerfile` exist to build the Shard and Telemetry Core binaries into docker containers. A `socker-compose.yaml` in the root of the repository can serve as an example of these services, along with the UI, running together.
|
||||
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 90 KiB |
@@ -0,0 +1,24 @@
|
||||
FROM paritytech/ci-linux:production as builder
|
||||
|
||||
ARG PROFILE=release
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN cargo build --${PROFILE} --bins
|
||||
|
||||
# MAIN IMAGE FOR PEOPLE TO PULL --- small one#
|
||||
FROM debian:buster-slim
|
||||
LABEL maintainer="Parity Technologies"
|
||||
LABEL description="Polkadot Telemetry backend shard, static build"
|
||||
|
||||
ARG PROFILE=release
|
||||
WORKDIR /usr/local/bin
|
||||
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||
COPY --from=builder /app/target/$PROFILE/shard /usr/local/bin
|
||||
RUN apt-get -y update && apt-get -y install openssl && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["shard"]
|
||||
@@ -10,7 +10,7 @@ RUN cargo build --${PROFILE} --bins
|
||||
# MAIN IMAGE FOR PEOPLE TO PULL --- small one#
|
||||
FROM debian:buster-slim
|
||||
LABEL maintainer="Parity Technologies"
|
||||
LABEL description="Polkadot Telemetry backend, static build"
|
||||
LABEL description="Polkadot Telemetry backend core, static build"
|
||||
|
||||
ARG PROFILE=release
|
||||
WORKDIR /usr/local/bin
|
||||
+15
-2
@@ -11,9 +11,22 @@ services:
|
||||
- ./packages:/app/packages
|
||||
ports:
|
||||
- 3000:80
|
||||
telemetry-backend:
|
||||
expose:
|
||||
- 3000
|
||||
telemetry-backend-shard:
|
||||
build:
|
||||
dockerfile: Dockerfile
|
||||
dockerfile: shard.Dockerfile
|
||||
context: ./backend/
|
||||
environment:
|
||||
- PORT=8001
|
||||
command: ['--core', 'http://telemetry-backend-core:8000']
|
||||
ports:
|
||||
- 8001:8001
|
||||
expose:
|
||||
- 8001
|
||||
telemetry-backend-core:
|
||||
build:
|
||||
dockerfile: telemetry.Dockerfile
|
||||
context: ./backend/
|
||||
environment:
|
||||
- PORT=8000
|
||||
|
||||
Reference in New Issue
Block a user