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

support tunnel MVP #731

Merged
merged 1 commit into from
Jun 13, 2024
Merged

support tunnel MVP #731

merged 1 commit into from
Jun 13, 2024

Conversation

rtertiaer
Copy link
Contributor

@rtertiaer rtertiaer commented May 21, 2024

What does this change intend to accomplish?

This PR brings in our support tunnel software in a pretty MVP fashion. It has an interface in the updater to permit requesting a support tunnel. It also implements two commands that are run via cronjob - one that reaps/garbage collects completed or expired tunnel sessions, and one that checks if any requested tunnels have launched in the remote side.

I'm submitting now for review, though I still need to check a couple of the checklist items off the list. I'd also like to produce a write-up describing this stack before landing it in a release, but I'd like to do that soon too.

Checklist

  • Have you tested your changes and ensured they work?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • If applicable, have you updated the documentation/manual?
  • If applicable, have you updated the CHANGELOG?
  • Does your submission pass linting & tests? You can test on localhost using ./scripts/test
  • Have you written new tests for your core features/changes, as applicable?
  • If this is a UI change, have you tested it across multiple browser platforms?
  • If this is a UI change, have you tested across multiple viewport sizes (ie. desktop versus mobile)?

@rtertiaer rtertiaer requested a review from linknum23 May 21, 2024 21:37
scripts/configure.py Outdated Show resolved Hide resolved
scripts/configure.py Outdated Show resolved Hide resolved
@linknum23
Copy link
Contributor

I assume I can just test this on my amplipi?

@linknum23
Copy link
Contributor

linknum23 commented May 22, 2024

Trying this out we found a couple of issues

  • Needs .env file
  • Add ssh-key in gcloud
  • Tunnel request button could use spinner
  • user needs to setup default creds in gcloud outside of init?
  • fab get XXX should return json not python dict
  • no wiregaurd dir
  • crontab copy failure
  • wireguard-tools needs install
  • lower keep alive?
  • password-less sudo?
  • make a script that loads the venv and sources the .env?
  • complete review of the README.md

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 49.49%. Comparing base (b516bb7) to head (75086f5).
Report is 53 commits behind head on main.

Files Patch % Lines
amplipi/updater/asgi.py 0.00% 4 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #731      +/-   ##
==========================================
- Coverage   50.90%   49.49%   -1.42%     
==========================================
  Files          25       26       +1     
  Lines        5838     6352     +514     
==========================================
+ Hits         2972     3144     +172     
- Misses       2866     3208     +342     
Flag Coverage Δ
unittests 49.49% <0.00%> (-1.42%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@linknum23
Copy link
Contributor

linknum23 commented Jun 6, 2024

As discussed in-person:

  • mailto link should open in a new tab
  • some characters are escaped wrong for the key in the mailto link

Copy link
Contributor

@linknum23 linknum23 left a comment

Choose a reason for hiding this comment

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

Looks good. Nice work Ryan!

@rtertiaer
Copy link
Contributor Author

This latest rendition is running on a customer's appliance in the field and works a charm. I'm gonna let it run for a day or two but I feel pretty comfortable with this rendition making it into a release.

@rtertiaer rtertiaer requested a review from linknum23 June 12, 2024 14:50
pyproject.toml Outdated
@@ -1,6 +1,6 @@
[tool.poetry]
name = "amplipi"
version = "0.3.5"
version = "0.3.5+7d6801f-support_tunnel-dirty"
Copy link
Contributor

Choose a reason for hiding this comment

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

oops

@rtertiaer rtertiaer merged commit 8ebbb99 into main Jun 13, 2024
3 checks passed
@rtertiaer rtertiaer linked an issue Jun 13, 2024 that may be closed by this pull request
4 tasks
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.

Add support tunnel functionality
3 participants