Skip to content

Commit

Permalink
added artifact versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
giobart committed Jul 12, 2024
1 parent 6101475 commit 6f7184f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/node-net-manager-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
goversion: "https://go.dev/dl/go1.22.1.linux-amd64.tar.gz"
project_path: "./node-net-manager"
binary_name: "NetManager"
ldflags: -X "node-net-manager/cmd.Version=${{ github.ref_name }}"
release_tag: ${{ steps.meta.outputs.tags }}
asset_name: NetManager_${{ matrix.goarch }}
extra_files: node-net-manager/build/install.sh node-net-manager/config/tuncfg.json node-net-manager/config/netcfg.json node-net-manager/netmanager.service
Expand Down
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,32 @@ The daemon logs are under
/var/log/oakestra/netmanager.log
```

Check the netmanager version using:
```
NetManager version
```

## Run the NetManager manually
If you don't want to use the NetManager as system deamon, run it in you terminal using

Configure the Network Manager by editing `/etc/netmanager/netcfg.json` as follows:

```json
{
"NodePublicAddress": "<IP ADDRESS OF THIS DEVICE>",
"NodePublicPort": "<PORT REACHABLE FROM OUTSIDE, use 50103 as default>",
"ClusterUrl": "<IP Address of cluster orchestrator or 0.0.0.0 if deployed on the same machine>",
"ClusterMqttPort": "10003"
}
```

Then simply run
```
sudo NetManager
```






Expand Down
6 changes: 4 additions & 2 deletions node-net-manager/build/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
version=$(git describe --tags --abbrev=0)

#arm build
env GOOS=linux GOARCH=arm GOARM=7 go build -o bin/arm-7-NetManager ../NetManager.go
env GOOS=linux GOARCH=arm GOARM=7 go build -ldflags="-X 'go_node_engine/cmd.Version=$version'" -o bin/arm-7-NetManager ../NetManager.go

#amd build
env GOOS=linux GOARCH=amd64 go build -o bin/amd64-NetManager ../NetManager.go
env GOOS=linux GOARCH=amd64 go build -ldflags="-X 'go_node_engine/cmd.Version=$version'" -o bin/amd64-NetManager ../NetManager.go

0 comments on commit 6f7184f

Please sign in to comment.