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

(feature): MacOS porting #1019

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

shinnokdisengir
Copy link
Contributor

@shinnokdisengir shinnokdisengir commented Nov 25, 2024

Enhance MacOS Compatibility and Development Setup

Key Changes

  1. Updated Vernemq Start Script:

    • Modified the Vernemq start script to enhance compatibility and streamline startup processes.
  2. Built Astarte Applications and Devcontainer:

    • Added the following Astarte applications:
      • astarte_housekeeping
      • astarte_housekeeping_api
      • astarte_data_updater_plant
      • astarte_pairing
      • astarte_pairing_api
      • astarte_realm_management
      • astarte_realm_management_api
      • astarte_trigger_engine
      • astarte_appengine_api
    • Configured a devcontainer for a more cohesive development environment.
  3. Docker Build Enhancements:

    • Moved the Docker build process into docker-compose.dev for a clearer and more modular structure.
  4. ScyllaDB Image Update:

    • Bumped the ScyllaDB container image to version 6.2 to resolve compatibility issues on MacOS.
    • Added .DS_Store to .gitignore to prevent unnecessary files from being tracked.

Motivation

  • Addressed compatibility issues with ScyllaDB on MacOS that caused errors in the connection pool.
  • Streamlined the build process to improve maintainability and reduce complexity.
  • Enhanced the development environment to support a wider range of Astarte applications.

Testing

  • Verified compatibility of the new ScyllaDB image on MacOS.
  • Tested the updated Vernemq script to ensure seamless startup.
  • Confirmed the successful build and functionality of Astarte applications within the devcontainer.

@shinnokdisengir shinnokdisengir changed the title Test commit (feature): MacOS porting Nov 25, 2024
@shinnokdisengir shinnokdisengir force-pushed the feature/macport branch 2 times, most recently from 50b76bb to 1cd15e6 Compare November 25, 2024 13:37
Copy link

codecov bot commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.02%. Comparing base (4b5f5d4) to head (8a083f9).
Report is 26 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1019      +/-   ##
==========================================
- Coverage   69.36%   66.02%   -3.35%     
==========================================
  Files         275       65     -210     
  Lines        7152     3376    -3776     
==========================================
- Hits         4961     2229    -2732     
+ Misses       2191     1147    -1044     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@shinnokdisengir shinnokdisengir force-pushed the feature/macport branch 7 times, most recently from f0b9445 to 35624c9 Compare December 16, 2024 11:52
@shinnokdisengir shinnokdisengir force-pushed the feature/macport branch 2 times, most recently from 3773f10 to 24f242f Compare December 23, 2024 21:13
@shinnokdisengir shinnokdisengir marked this pull request as ready for review January 9, 2025 11:48
Copy link
Collaborator

@Annopaolo Annopaolo left a comment

Choose a reason for hiding this comment

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

Code is good, thank you! I only left some comments that can be applied to all services

.gitignore Outdated Show resolved Hide resolved
Dockerfile Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
apps/astarte_appengine_api/.devcontainer/devcontainer.json Outdated Show resolved Hide resolved
apps/astarte_appengine_api/mix.exs Show resolved Hide resolved
@shinnokdisengir shinnokdisengir force-pushed the feature/macport branch 3 times, most recently from 6c21206 to 271412b Compare January 16, 2025 10:58
- upgraded base image (old image only builds on amd64, not Apple Silicon)
- bump scylladb image 6.2v
- added .DS_Store to gitignore

Scylladb old container version raises an error on macos:

```
15:06:49.420 [error] GenServer :xandra terminating
2024-11-22 16:06:49 ** (CaseClauseError) no case clause matching: {:error, {{{:badmatch, {:error, {:bad_return, {DBConnection.ConnectionPool.Pool, :init, {:child_spec, 1}}}}},
[{DBConnection.ConnectionPool, :init, 1, [file: ~c"lib/db_connection/connection_pool.ex", line: 48]},
{:gen_server, :init_it, 2, [file: ~c"gen_server.erl", line: 962]},
{:gen_server, :init_it, 6, [file: ~c"gen_server.erl", line: 917]}, {:proc_lib, :init_p_do_apply, 3, [file: ~c"proc_lib.erl", line: 241]}]}, {:child, :undefined, {{172, 20, 0, 5}, 9042}, {Xandra, :start_link,
[[authentication: {Xandra.Authenticator.Password, [username: "cassandra", password: "cassandra"]}, pool_size: 10, encryption: false, nodes: ["172.20.0.5:9042"],
registry: :"Elixir.Xandra.ClusterRegistry.9", connection_listeners: [#PID<0.1354.0>]]]}, :transient, false, 5000, :worker
````

Signed-off-by: Gabriele Ghio <[email protected]>
apps/astarte_appengine_api/mix.exs Show resolved Hide resolved
apps/astarte_data_updater_plant/mix.exs Show resolved Hide resolved
apps/astarte_housekeeping/mix.exs Outdated Show resolved Hide resolved
@shinnokdisengir shinnokdisengir force-pushed the feature/macport branch 2 times, most recently from d80d6fa to 67dfadd Compare January 17, 2025 16:28
* astarte_housekeeping
* astarte_housekeeping_api
* astarte_data_updater_plant
* astarte_pairing
* astarte_pairing_api
* astarte_realm_management
* astarte_realm_management_api
* astarte_trigger_engine
* astarte_appengine_api

Signed-off-by: Gabriele Ghio <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants