Commit Graph

239 Commits

Author SHA1 Message Date
ee205c4b07 refactor: Simplify V and Herolib setup (#45)
* refactor: Simplify V and Herolib setup

- Use install_v.sh script to install V and Herolib in CI.

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>

* WIP: handle github actions in vlang installer

- Add `--github-actions` flag to `install_v.sh` script.
- Add appropriate privilege when running install_v.sh script.

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>

* refactor: consolidate build workflows

- Consolidate macOS and Linux build workflows into a single `build_and_test.yml` workflow.
- Remove the now-redundant `hero_build_linux.yml` workflow.
- Update the workflow to support both Linux and macOS targets.
- Update `install_v.sh` script to handle brew installations without sudo.

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>

---------

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>
2025-02-03 17:04:40 +02:00
Omdanii
c886f85d21 Merge pull request #44 from freeflowuniverse/development_wg
Add SAL for wireguard
2025-02-02 15:33:06 +02:00
749fa94312 feat: Add WireGuard installer
- Add a new WireGuard installer to the project.
- This installer handles installation and uninstallation of WireGuard.

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>
2025-02-02 15:20:57 +02:00
c27fcc6983 fix: WireGuard client improvements
- Updated WireGuard client to use `wg-quick` instead of `sudo wg-quick`.
- Improved error handling in WireGuard client.
- Added `sudo` to `wg show` command for proper permissions.
- Updated example `wireguard.vsh` script to reflect changes.
- Added a new `wg0.conf` file for the WireGuard configuration.
- Resolved the issue where the script wasn't finding the configuration file.

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>
2025-02-02 14:59:05 +02:00
Mahmoud Emad
7bd997e368 feat: Add WireGuard client
- Add a WireGuard client to the project.
- New utility functions have been added to parse the output of `wg show` command and improve error handling.
- Add start, down, show, show_config, generate_private_key, and get_public_key method to interact with the wg binary.
- Created a new example file to offer more clear usage.

Co-authored-by: mariobassem12 <mariobassem12@gmail.com>
2025-02-02 14:41:21 +02:00
Mahmoud Emad
d803a49a85 feat: Add WireGuard client support
- Add a new WireGuard client to the project.
- Includes a factory, model, and basic client functionality.

Co-authored-by: mariobassem12 <mariobassem12@gmail.com>
2025-02-02 12:52:42 +02:00
5a8ad0a47b Merge pull request #43 from freeflowuniverse/development_webgw_wireguard
feat (tfgrid3deployer): add more support for wireguard
2025-01-30 18:45:53 +02:00
45098785e9 feat (tfgrid3deployer): add more support for wireguard
- support adding multiple user access endpoints to a network
- support connecting gateways over wireguard

Co-authored-by: mahmoud <mahmmoud.hassanein@gmail.com>
2025-01-30 18:07:58 +02:00
6a8bd5c205 wip: support multiple user access endpoints
Co-authored-by: mahmoud <mahmmoud.hassanein@gmail.com>
Co-authored-by: mario <mariobassem12@gmail.com>
2025-01-29 18:12:16 +01:00
Omdanii
2e5f618d0b Merge pull request #42 from freeflowuniverse/development_buildah
feat: Add Buildah installer
2025-01-29 15:09:03 +02:00
112f5eecb2 feat: Add Buildah installer
- Added a Buildah installer to the project.
- The installer can install and remove Buildah.
- Updated the installer to use the latest Buildah version.

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>
Co-authored-by: mariobassem <mariobassem12@gmail.com>
2025-01-29 11:13:33 +01:00
8cf611ca51 Merge pull request #41 from freeflowuniverse/development_docker
Fix docker examples
2025-01-28 17:44:55 +02:00
0f095a691d feat: add docker installer
- Add a new docker installer.
- Includes functionality for installing, starting, stopping, and removing docker.

Co-authored-by: mariobassem12 <mariobassem12@gmail.com>
Co-authored-by: omda  <mahmmoud.hassanein@gmail.com>
2025-01-28 16:17:33 +01:00
8b0f692673 fix: Fix docker examples
- Moved `httpconnection` import from `clients` to `core`.
- Changed `tfgrid-sdk-ts` dashboard to playground.
- Added ipaddr to node_local().
- Added public keyword to OpenSSLGenerateArgs.
- Improved DockerEngine image and container loading.
- Added utils.contains_ssh_port.
- Improved error handling in DockerEngine.
- Improved Docker registry handling.

Co-authored-by: mariobassem12 <mariobassem12@gmail.com>
Co-authored-by: omda <mahmmoud.hassanein@gmail.com>
2025-01-28 14:08:42 +01:00
ca8799af39 Merge pull request #30 from felipensp/patch-1
Update resp_model.v to make RValue public
2025-01-27 12:39:52 +03:00
1cd176a626 Merge pull request #35 from freeflowuniverse/development_fix_ci
Fix CI
2025-01-26 16:08:02 +02:00
Mahmoud Emad
22918434c3 fix: Use cache key for repository lookup
- Changed the repository lookup in `repo_new_from_gitlocation` to use the cache key instead of the repository name.
- Added a new client `livekit` to the `test_basic.vsh` script for testing purposes.

Co-authored-by: mariobassem12 <mariobassem12@gmail.com>
2025-01-26 15:44:21 +02:00
Omdanii
23410e6109 Merge pull request #34 from freeflowuniverse/development_vastai
feat: Add VastAI client
2025-01-26 14:02:09 +02:00
Mahmoud Emad
77809423fd feat: add VastAI instance management functions
- Added functions to manage VastAI instances:
- `attach_sshkey_to_instance`
- `stop_instance`
- `destroy_instance`
- `launch_instance`
- `start_instances`
- `start_instance`
- Updated example to demonstrate new functions.

Co-authored-by: mariobassem12 <mariobassem12@gmail.com>
2025-01-26 12:44:52 +02:00
34b1aad175 feat: Add VastAI client
- Add a new VastAI client to the project.
- This client allows users to search for and create GPU instances on VastAI.
- It uses the VastAI API to interact with the platform.
- Includes functionality for searching offers, getting top offers, and creating instances.

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>
2025-01-23 19:22:39 +02:00
d4d3713cad Merge pull request #33 from freeflowuniverse/development_runpod
Development runpod
2025-01-23 17:23:47 +02:00
01fff39e41 refactor: improve runpod client
- Refactor RunPod client to use environment variables for API key.
- Update RunPod example script to reflect changes.
- Remove unused gql_builder.v file.
- Update README.md to reflect changes.
- Improve error handling and logging.
- Use json2 for JSON encoding/decoding.
- Update dependencies.
- Implemented more endpoints for managing pods.

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>
2025-01-23 16:17:12 +02:00
12968cb580 Merge branch 'development' of https://github.com/freeflowuniverse/herolib into development 2025-01-23 14:16:11 +01:00
888aac4867 push 2025-01-23 14:16:02 +01:00
6637756088 gittools 2025-01-23 14:09:20 +01:00
timurgordon
70856f7348 Merge branch 'development' of https://github.com/freeflowuniverse/herolib into development 2025-01-23 13:07:39 +00:00
timurgordon
ac19671469 add env vars for livekit tests 2025-01-23 13:07:35 +00:00
f2b9b73528 Merge branch 'development_fix_examples' into development 2025-01-23 09:43:27 +01:00
d1c907fc3a Merge branch 'development' of https://github.com/freeflowuniverse/herolib into development 2025-01-23 09:42:45 +01:00
df0c4ca857 ai prompts 2025-01-23 09:42:32 +01:00
timurgordon
02128e69ba fix livekit compilation 2025-01-23 00:59:02 +00:00
timurgordon
885c4d9b32 remove inline sum types 2025-01-23 00:52:19 +00:00
timurgordon
12db34ddb0 remove panic from test 2025-01-23 00:31:05 +00:00
timurgordon
c7d7e8b954 Merge branch 'development' of https://github.com/freeflowuniverse/herolib into development 2025-01-23 00:03:04 +00:00
timurgordon
a95ce8abb2 move auth and jwt modules to herolib 2025-01-23 00:02:48 +00:00
timurgordon
cab7a47050 move log module to herolib 2025-01-22 23:58:58 +00:00
timurgordon
dce0b71530 replace crystallib with herolib 2025-01-22 23:57:49 +00:00
timurgordon
915951d84f fix mailclient compilation 2025-01-22 23:56:13 +00:00
timurgordon
b3509611a2 move livekit client to herolib 2025-01-22 23:55:18 +00:00
Felipe Pena
e82e367e95 Update resp_model.v to make RValue public 2025-01-22 18:32:57 -03:00
Mahmoud Emad
6f9d570a93 WIP: refactor RunPod client
- Refactor RunPod client to use a new GraphQL builder.
- This improves the readability and maintainability of the code.
- The old `build_query` function was removed, and the new
- `QueryBuilder` struct is now used.  This allows for a more
- flexible and extensible approach to constructing GraphQL
- queries.  The example in `runpod_example.vsh` is now
- commented out until the new GraphQL builder is fully
- implemented.

Co-authored-by: mariobassem12 <mariobassem12@gmail.com>
2025-01-22 20:35:50 +02:00
Omdanii
08865d100b Merge pull request #29 from freeflowuniverse/development_actions_fix
refactor: improve action heroscript output
v0.0.2
2025-01-22 15:21:04 +02:00
b6d43ebe49 refactor: improve action heroscript output
- Update `action.heroscript()` to handle `dal` actions.
- Remove buggy action print from panic message which led to an infinite
  recursive call.

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>
2025-01-22 14:10:54 +02:00
Mahmoud Emad
7486d561ec feat: update runpod example and client
- Update the RunPod example to use a new API key and
- reduce resource allocation for pods.
- Added stop pod functionality to the RunPod client and example.
- Updated the RunPod client to use new API endpoints.
- Updated the base URL for the RunPod client.
- Added authorization header to HTTP client.

Co-authored-by: mariobassem12 <mariobassem12@gmail.com>
2025-01-21 15:54:48 +02:00
Mahmoud Emad
50116651de feat: Add spot pod start and improved error handling
- Added functionality to start spot pods using the RunPod API.
- Improved error handling and clarity in the RunPod client.
- Added more detailed comments to the code for better readability.
- Refactored the HTTP client and utils to improve modularity.
- Updated example to demonstrate spot pod creation and starting.

Co-authored-by: mariobassem12 <mariobassem12@gmail.com>
2025-01-21 12:38:25 +02:00
Mahmoud Emad
3fe350abe9 feat: Add RunPod start and improved pod creation
- Added a new `start_on_demand_pod` function to the RunPod client.
- Improved the `create_on_demand_pod` function to handle nested machine structure in the response.
- Updated the example to use the new functions and handle the new response structure.
- Updated the API key for the example.
- Added more descriptive field names in the `create_on_demand_pod` input.

Co-authored-by: mariobassem12 <mariobassem12@gmail.com>
2025-01-21 11:32:38 +02:00
Mahmoud Emad
9e51604286 feat: enhance RunPod example with detailed pod creation
- Added more options to the RunPod example, including:
- `cloud_type`, `gpu_count`, `volume_in_gb`,
- `container_disk_in_gb`, `min_vcpu_count`,
- `min_memory_in_gb`, `gpu_type_id`, `ports`, and
- `volume_mount_path`.  This provides a more
- comprehensive demonstration of RunPod's capabilities.
- Updated the example to create an on-demand pod with
- specified resources and settings.  The spot pod
- creation remains largely unchanged.  Improved the
- clarity and completeness of the example.  Removed
- commented-out code for better readability.  Also
- updated the `PodFindAndDeployOnDemandRequest` struct
- to remove default values, allowing for more flexible
- pod configurations.

Co-authored-by: mariobassem12 <mariobassem12@gmail.com>
2025-01-21 11:03:33 +02:00
Mahmoud Emad
309496ef5d feat: Add RunPod client
- Added a new RunPod client to the project.
- Updated the example to use the new client.
- Improved error handling in the client.
- Refactored the code for better readability.

Co-authored-by: mariobassem12 <mariobassem12@gmail.com>
2025-01-21 10:50:07 +02:00
4422d67701 wip: add spot pod creation
- Add support for creating spot pods using the RunPod API.
- Implement `create_spot_pod` function in the `RunPod` client.
- Refactor RunPod client to handle different query types and response structures.
- Improve error handling and logging for GraphQL requests.
- Update example to demonstrate spot pod creation.

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>
2025-01-20 21:34:16 +02:00
Mahmoud Emad
d54a1e5a34 refactor: improve RunPod client
- Refactor RunPod client to use generics for requests and
responses.
- This improves code readability and maintainability.
- Remove redundant code for building GraphQL queries and
handling HTTP requests.
- Add support for environment variables in pod creation.
- Update example with new API key and environment variables.

Co-authored-by: supermario <mariobassem12@gmail.com>
2025-01-20 15:02:05 +02:00