Commit Graph

92 Commits (release)
 

Author SHA1 Message Date
Malachi Soord bbf29104fe
Add release pipeline 2023-03-14 23:30:44 +01:00
Paulo Truta 161ec76eb9
Add service file and install command (#27)
* Added systemd service file

* Added make install command (copies binary to local bin and adds service file

* Makefile has intall-prod and install-cloud commands
2023-03-11 13:58:54 +01:00
dependabot[bot] d9720a48c9
Bump actions/setup-go from 2 to 3 (#24)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2 to 3.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-09 20:12:49 +01:00
dependabot[bot] 1ba5a8f506
Bump actions/checkout from 2 to 3 (#23)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-09 20:12:41 +01:00
Malachi Soord 25d5ca74f8
Create dependabot.yml (#22) 2023-03-09 19:28:58 +01:00
Paulo Truta d62cb57222
Update README.md 2023-03-05 13:46:38 +01:00
Malachi Soord 0680b7ffb9
GetPath improvements (#20)
* Use named variables for getting path
Fixed bug with env var

* Fix test

* Use utils to get paths
2022-10-08 18:41:37 +02:00
Paulo Truta 83d2fdcae1
[WIP] Support for cloud version (#17)
* Added build-cloud to Makefile

* Fix env var key GOOS

* Added taskSetReleaseVersion for edgeboxctl version option write into DB

* taskGetSystemUptime to run every 5 ticks

* Added support for detecting main disk in cloud version

* Added missing import

* Finding main device in test

* Refactored GetDevices and test to use release_version

* Added utils.getIP function, set to run as a 60 tick scheduled task

* Added taskEnablePublicDashboard and taskDisablePublicDashboard

* Added utils.WriteOption and refactor, added enablePublicDashb0oard

* Finalizing online support for dashboard, cloud version support

* Added task SetupCloudOptions

* Added couple of func description comments

* Early return statement (thanks @inverse)

* Using IsPublicDashboard in DisablePublicDashboard func

* Added constants for release version and device types, added diagnostics.GetReleaseVersion

* Removed codecov from test action
2022-02-06 15:37:50 +01:00
Paulo Truta 864d1e8f0f
Update LICENSE
Looking into changing the project license ahead of open sourcing. We will follow the Elastic License
2021-11-21 21:20:05 +01:00
Malachi Soord 7430f0c8ce
Use const for task status (#18) 2021-06-17 21:48:15 +02:00
Paulo Truta 9339e6cf09
Storage Module Basis (#13)
* Added storage module, base structs, getDevices() func, taskGetStorageDevices (ticks every 30)

* GetDevices now returns a complete description w/ disk partitions

* Added InUse flag to Device, fixed logic bugs

* Added disk space usage for partitions in use by the system

* Cleanup

* Added UsageStat and UsageSplit filling for in use devices

* Changed value of lsblk block usage output to bytes

* Cleanup, small fixes

* Added ExecAndGetLines util func

* Added explicit detection of disk or part block type, ignoring non-suppoorted devices

* Added command line tool dependencies for the project in README file

* Added comment to func ExecAndGetLines

* Removed GetMySQLDbConnectionDetails()

* Added tests to utils module

* Fix invalid argument type for Exec family of tests

* Removed too much verbosity from utils.GetPath when no env file is available, added new argument (path) to Exec family of funcs

* Added new path argument to utils.Exec... test

* Fixed TestExec

* Added spaces trim to Exec result

* Trimming spaces and newlines from result of Exec

* Better visibility for test result log of TestExec

* Added ExampleExecAndStream test

* Added Example tests with failure status for ExecAndStream

* Added branch to test for valid key in GetPath

* Added missing t.Fail() statements in utils_test.go

* Added storage_test.go file, smoke test

* TestGetDevices
2021-06-13 12:03:36 +02:00
Malachi Soord 92ac9c2b03
Add coverage (#15)
* Add coverage

* Add codecov.yml
2021-06-08 22:40:53 +02:00
Malachi Soord e611bf2ac4
Add test foundations (#14) 2021-06-08 14:13:22 +02:00
Paulo Truta c9f97d42bf
Merge pull request #10 from edgebox-iot/fix-result-null-conversion
Fix query panic on GetNextTask()
2021-06-02 13:11:48 +02:00
Paulo Truta 1736b04a66 Query contains named columns 2021-06-01 23:53:17 +00:00
Paulo Truta 5d69a9fb22
Merge pull request #9 from edgebox-iot/edgeapp_description_support
Added support for adding EDGEAPP_DESCRIPTION env var to edgebox.env
2021-06-01 16:51:48 +02:00
Paulo Truta 3ef90ffb15 Added support for adding EDGEAPP_DESCRIPTION env var to edgebox.env edgeapps 2021-06-01 11:40:58 +00:00
Paulo Truta 1ad554b9bf
Merge pull request #8 from edgebox-iot/sqlite
Supporting connection to SQLite database
2021-06-01 13:28:52 +02:00
Paulo Truta df3f8fe904 Added system module, GetUptimeSeconds and GetUptimeFormatted funcs, taskGetSystemUptime 2021-05-31 11:21:14 +00:00
Paulo Truta 770e814b6e Fixed Datetime column values. Added utils.GetSQLiteFormattedDateTime def 2021-05-30 11:28:42 +00:00
Paulo Truta 81b545f868 Fix wrong handling of task arguments in systemIterator 2021-05-22 13:30:23 +00:00
Paulo Truta 9f63ab7f03 Support for nullable Task args 2021-05-19 10:43:47 +00:00
Paulo Truta 58b7425fc7 Fixed incorrect query prepare statement, small fixes in queries 2021-05-08 20:46:36 +00:00
Paulo Truta f238b3fa46 Write queries using prepared statements, better error handling 2021-05-08 20:42:07 +00:00
Paulo Truta d975710445 Added initial debug message of SQLite DB location 2021-05-03 21:02:09 +00:00
Paulo Truta 6cb3e198f0 Supporting connection to SQLite database 2021-05-02 08:52:32 +00:00
Paulo Truta 84d7fd6a82
Merge pull request #6 from edgebox-iot/include-sum
Add Sum + Tidy CI
2021-03-05 02:21:42 +01:00
Malachi Soord e6c07ddeae
Tidy names 2021-03-04 21:39:37 +01:00
Malachi Soord 217309f10d
Add sum 2021-03-04 21:38:02 +01:00
Paulo Truta 74cbff1966 Stopping edgeapp before removing 2021-03-04 15:53:49 +00:00
Paulo Truta 8f14a7cd15 Fix for incorrect base assignment 2021-03-04 15:19:31 +00:00
Paulo Truta 11e9543a87 Added install / remove edgeapp tasks 2021-03-04 15:06:54 +00:00
Paulo Truta c42d96bf34
Merge pull request #5 from edgebox-iot/edgeboxctl-rename
Renaming everything to edgeboxctl
2021-03-04 15:21:19 +01:00
Paulo Truta cb3ecec5f4 Fix to makefile build-prod 2021-03-04 14:06:48 +00:00
Paulo Truta 812cf31dc4 More changes. Fix build 2021-03-04 12:48:25 +00:00
Paulo Truta 0ed5297f6d Renaming everything to edgeboxctl 2021-03-04 12:43:49 +00:00
Paulo Truta 2e92ff53fe
Merge pull request #4 from edgebox-iot/loop_loop_execution
Sysctl Loop execution
2021-03-04 13:27:38 +01:00
Paulo Truta 2a3506680a Removed logging of utils.Exec 2021-02-20 23:55:59 +00:00
Paulo Truta 0ffde681cf Introduced ExecAndStream for execution with progress output 2021-02-20 21:43:27 +00:00
Paulo Truta 5e81525635 Fixes with .env file handling and other misc 2021-02-20 18:09:41 +00:00
Paulo Truta 7857985fe4 Added full support for enable_online and disable_online tasks 2021-02-20 14:26:23 +00:00
Paulo Truta 6c0b011e51 Removed unnused variable assignment and unecessary for loop 2021-02-19 00:32:37 +00:00
Paulo Truta 00b10ac64c Added InternetAccessible logic 2021-02-19 00:22:12 +00:00
Paulo Truta 2e013b44bb Removed unused fmt import 2021-02-18 23:40:16 +00:00
Paulo Truta 643ca5f545 Commented logging for utils.Exec() 2021-02-18 23:39:54 +00:00
Paulo Truta f8eaf3b3e1 Commented annoying log... 2021-02-18 23:36:51 +00:00
Paulo Truta 595c87c19c Extracted isSystemReady to outer loop 2021-02-18 23:08:28 +00:00
Paulo Truta 57a9ef3eed Moved sleep instruction to after execution of lined task 2021-02-18 23:02:31 +00:00
Paulo Truta 3cc670b823 Implemented actual tested RunEdgeApp and StopEdgeApp commands, added sleep time after container operation and before checking status 2021-02-18 22:59:14 +00:00
Paulo Truta 0bd61ccf75 Tidy up (less verbosity), actual DB update for EDGEAPPS_LIST 2021-02-17 13:34:53 +01:00