Skip to content

Commit

Permalink
release(prod): Update miner to latest GA 2021.11.30.1 (#286)
Browse files Browse the repository at this point in the history
* fix: revert privileged containers and add rockpi builds

- revert privileged containers based on discussion in #253
- add rockpi builds to testnet and production actions using build matrix
- with rockpi versions, change the i2c bus to i2c-7 in docker-compose
- remove hard coded balena cli version and change to env variable

* feat: bump hm-diag for RockPi support

bump hm-diag to pull in NebraLtd/hm-diag#238

* fix: bump pktfwd and correct if statements

- bump pktfwd to bring in sx1302 fixes
- correct if statements in previous commits

* add space

* fix(diagnostics): expose serial-number

By adding /proc to container for
/proc/device-tree/serial-number

* Added env var DIAGNOSTICS_VERSION to hold hm-diag git hash and updated hm-diag git hash to point to a commit that contains operational /version endpoint

* Bumped FIRMWARE_VERSION to 2021.11.26.1

* feat: better detect BT devices and LTE devices

* feat: bump gateway-config version

* fix: match DIAGNOSTICS_VERSION with latest version

* fix: update FIRMWARE_VERSION

* feat: remove session bus in diagnostics

* Update push-to-prod.yml

* Update push-to-testnet.yml

* fix: add fail fast false to production

add fail fast false

* fix: add fail fast false to testnet

add fail fast false

* fix: temporarily move diagnostics to privileged

This is a temporary fix to resolve the issue described in #281 so that @NebraLtd/tech-support can continue testing other recent changes

* fix: bump diagnostics to fix rockpi provisioning

relates to NebraLtd/hm-diag#260

* Update miner to latest GA 2021.11.30.1

Co-authored-by: Aaron Shaw <[email protected]>
Co-authored-by: Marvin Arnold <[email protected]>
Co-authored-by: Kashif Iftikhar <[email protected]>
Co-authored-by: Kashif Iftikhar <[email protected]>
Co-authored-by: Zhang <[email protected]>
Co-authored-by: mr-bump <[email protected]>
Co-authored-by: Marvin Arnold <[email protected]>
  • Loading branch information
8 people authored Dec 2, 2021
1 parent c3cce5a commit 9b88c8b
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 74 deletions.
82 changes: 17 additions & 65 deletions .github/workflows/push-to-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,85 +7,37 @@ on:
- production

jobs:
outdoor-868:
build-prod:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sbc: [raspi, rockpi]
frequency: [470, 868, 915]
variant: [indoor, outdoor]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Change i2c bus for RockPi
if: matrix.sbc == 'rockpi'
run: |
sed -i -E "s/\/dev\/i2c-1:\/dev\/i2c-1/\/dev\/i2c-7:\/dev\/i2c-7/g" docker-compose.yml
ROCKPI="-rockpi"
echo "ROCKPI=$ROCKPI" >> $GITHUB_ENV
- name: Balena Deploy
uses: nebraltd/balena-cli-action@v12.51.1
uses: nebraltd/balena-cli-action@v12.54.5
if: success()
with:
balena_api_token: ${{secrets.BALENA_API_TOKEN}}
balena_command: "deploy nebraltd/helium-outdoor-868 --logs --debug --nocache --build"

indoor-868:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Balena Deploy
uses: nebraltd/[email protected]
if: success()
with:
balena_api_token: ${{secrets.BALENA_API_TOKEN}}
balena_command: "deploy nebraltd/helium-indoor-868 --logs --debug --nocache --build"

outdoor-915:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Balena Deploy
uses: nebraltd/[email protected]
if: success()
with:
balena_api_token: ${{secrets.BALENA_API_TOKEN}}
balena_command: "deploy nebraltd/helium-outdoor-915 --logs --debug --nocache --build"

indoor-915:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Balena Deploy
uses: nebraltd/[email protected]
if: success()
with:
balena_api_token: ${{secrets.BALENA_API_TOKEN}}
balena_command: "deploy nebraltd/helium-indoor-915 --logs --debug --nocache --build"

outdoor-470:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Balena Deploy
uses: nebraltd/[email protected]
if: success()
with:
balena_api_token: ${{secrets.BALENA_API_TOKEN}}
balena_command: "deploy nebraltd/helium-outdoor-470 --logs --debug --nocache --build"

indoor-470:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Balena Deploy
uses: nebraltd/[email protected]
if: success()
with:
balena_api_token: ${{secrets.BALENA_API_TOKEN}}
balena_command: "deploy nebraltd/helium-indoor-470 --logs --debug --nocache --build"
balena_command: "deploy nebraltd/helium-${{ matrix.variant }}-${{ matrix.frequency }}${{ env.ROCKPI }} --logs --debug --nocache --build"

open-fleet:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Balena Deploy
uses: nebraltd/balena-cli-action@v12.51.1
uses: nebraltd/balena-cli-action@v12.54.5
if: success()
with:
balena_api_token: ${{secrets.BALENA_API_TOKEN}}
Expand All @@ -97,7 +49,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Balena Deploy
uses: nebraltd/balena-cli-action@v12.51.1
uses: nebraltd/balena-cli-action@v12.54.5
if: success()
with:
balena_api_token: ${{secrets.BALENA_API_TOKEN}}
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/push-to-testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,22 @@ on:
jobs:
testnet:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sbc: [raspi, rockpi]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Change i2c bus for RockPi
if: matrix.sbc == 'rockpi'
run: |
sed -i -E "s/\/dev\/i2c-1:\/dev\/i2c-1/\/dev\/i2c-7:\/dev\/i2c-7/g" docker-compose.yml
ROCKPI="-rockpi"
echo "ROCKPI=$ROCKPI" >> $GITHUB_ENV
- name: Balena Deploy
uses: nebraltd/balena-cli-action@v12.51.1
uses: nebraltd/balena-cli-action@v12.54.5
if: success()
with:
balena_api_token: ${{secrets.BALENA_API_TOKEN}}
balena_command: "deploy nebraltd/helium-testnet --logs --debug --nocache --build"
balena_command: "deploy nebraltd/helium-testnet${{ env.ROCKPI }} --logs --debug --nocache --build"
21 changes: 14 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ version: '2'
services:

gateway-config:
image: nebraltd/hm-config:e0c6f88
image: nebraltd/hm-config:8cc544f
depends_on:
- dbus-session
- diagnostics
environment:
- FIRMWARE_VERSION=2021.11.22.0-1
- FIRMWARE_VERSION=2021.11.30.1
- 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
Expand All @@ -34,7 +34,7 @@ services:
- pktfwdr:/var/pktfwd

helium-miner:
image: nebraltd/hm-miner:arm64-d760384
image: nebraltd/hm-miner:arm64-3565d25
depends_on:
- dbus-session
- diagnostics
Expand All @@ -50,26 +50,33 @@ services:
- dbus:/session/dbus
cap_add:
- SYS_RAWIO
privileged: true
devices:
- /dev/i2c-1:/dev/i2c-1
restart: on-failure
environment:
- DBUS_SYSTEM_BUS_ADDRESS=unix:path=/session/dbus/session_bus_socket
- RELEASE_BUMPER=foobar

diagnostics:
image: nebraltd/hm-diag:b30bd8a
image: nebraltd/hm-diag:72f141f
environment:
- FIRMWARE_VERSION=2021.11.22.0-1
- FIRMWARE_VERSION=2021.11.30.1
- DIAGNOSTICS_VERSION=72f141f
- DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket
volumes:
- pktfwdr:/var/pktfwd
- miner-storage:/var/data
ports:
- "80:5000"
cap_add:
- SYS_RAWIO
devices:
- /dev/i2c-1:/dev/i2c-1
privileged: true
labels:
io.balena.features.sysfs: 1
io.balena.features.procfs: 1
io.balena.features.dbus: 1

upnp:
image: nebraltd/hm-upnp:b575a2f
Expand All @@ -85,7 +92,7 @@ services:
- dbus:/session/dbus
environment:
- DBUS_ADDRESS=unix:path=/session/dbus/session_bus_socket
- FIRMWARE_VERSION=2021.11.22.0-1
- FIRMWARE_VERSION=2021.11.30.1

volumes:
miner-storage:
Expand Down

0 comments on commit 9b88c8b

Please sign in to comment.