Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Light miner: Remove dbus container #409

Merged
merged 1 commit into from
Mar 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This repository generates the main docker-compose.yml (follow the steps to gener

The `docker-compose.yml` file is pushed to [Balena](https://www.balena.io/) (using GitHub Actions), which in turn pulls down the various Docker images outlined below.

There are currently six different services running within this device, which are all outlined below.
There are currently four different services running within this device, which are all outlined below.

## Diagnostics

Expand Down Expand Up @@ -36,12 +36,6 @@ Repo: [github.com/NebraLtd/hm-gatewayrs](https://github.com/NebraLtd/hm-gatewayr

This container is the actual Helium Gateway-rs software (from upstream), with the required configuration files added.

## DBus Session
shawaj marked this conversation as resolved.
Show resolved Hide resolved

Repo: [github.com/balenablocks/dbus](https://github.com/balenablocks/dbus)

This container doesn't serve any purpose any more and will be removed.

# Quick Start

This is a guide to help you get started with the repository and get it running on your local device. This guide is focused on pushing the repository onto a Raspberry Pi using Balena.
Expand Down
6 changes: 3 additions & 3 deletions settings.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[versions]
FIRMWARE_VERSION=2022.03.07.0-2
FIRMWARE_VERSION=v1.0.0-alpha.23
DIAGNOSTICS_VERSION=fb63618
CONFIG_VERSION=e5ac58c
CONFIG_VERSION=b5fa96c
PKTFWD_VERSION=b95cc46
GATEWAY_VERSION=409c974
GATEWAY_VERSION=d3b1c78

[quectel_modem]
MODEM_SERIAL0=/dev/ttyUSB0
Expand Down
21 changes: 3 additions & 18 deletions templates/docker-compose.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,14 @@ services:
depends_on:
- helium-miner
- diagnostics
- dbus-session
environment:
- FIRMWARE_VERSION={{FIRMWARE_VERSION}}
- FIRMWARE_SHORT_HASH={{ENV.FIRMWARE_SHORT_HASH}}
- DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket
- DBUS_SESSION_BUS_ADDRESS=unix:path=/session/dbus/session_bus_socket
privileged: true
network_mode: host
cap_add:
- NET_ADMIN
volumes:
- miner-storage:/var/data
- dbus:/session/dbus
labels:
io.balena.features.sysfs: 1
io.balena.features.kernel-modules: 1
Expand Down Expand Up @@ -48,15 +43,16 @@ services:
- {{I2C_DEVICE}}:{{I2C_DEVICE}}
restart: on-failure
environment:
shawaj marked this conversation as resolved.
Show resolved Hide resolved
- DBUS_SYSTEM_BUS_ADDRESS=unix:path=/session/dbus/session_bus_socket
- FIRMWARE_VERSION={{FIRMWARE_VERSION}}
shawaj marked this conversation as resolved.
Show resolved Hide resolved
- I2C_DEVICE={{I2C_DEVICE}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this i2c device env variable?

Copy link
Contributor Author

@pritamghanghas pritamghanghas Mar 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to detect ecc in the current startup script. Will be removed when we convert startup to python and start using variant information. NebraLtd/hm-gatewayrs#24

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok fair enough

volumes:
- pktfwdr:/var/pktfwd
- miner-storage:/var/data

diagnostics:
image: nebraltd/hm-diag:{{DIAGNOSTICS_VERSION}}
depends_on:
- helium-miner
- dbus-session
environment:
- FIRMWARE_VERSION={{FIRMWARE_VERSION}}
- FIRMWARE_SHORT_HASH={{ENV.FIRMWARE_SHORT_HASH}}
Expand All @@ -81,17 +77,6 @@ services:
io.balena.features.procfs: 1
io.balena.features.dbus: 1

dbus-session:
image: balenablocks/dbus:rpi-0.0.2
restart: always
volumes:
- dbus:/session/dbus
environment:
- DBUS_ADDRESS=unix:path=/session/dbus/session_bus_socket
- FIRMWARE_VERSION={{FIRMWARE_VERSION}}
- FIRMWARE_SHORT_HASH={{ENV.FIRMWARE_SHORT_HASH}}

volumes:
miner-storage:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need miner-storage volume?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I had removed it forgot to stage the change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, we probably need to leave this in for cases where people are using a data-only hotspot and want the file based private key to be persistent

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checked all container again, hm-diag uses it for permanent storage.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes and hm-gatewayrs should also use it for persistent key storage for file based key

Ref NebraLtd/hm-gatewayrs#28

pktfwdr:
dbus: