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

Feat/skywire app example #1409

Merged
merged 108 commits into from
Jan 12, 2023
Merged

Conversation

ersonp
Copy link
Contributor

@ersonp ersonp commented Nov 7, 2022

Did you run make format && make check?

Fixes #

Changes:

How to test this PR:

  1. On machine A build with make build-examples
  2. On machine A run ./skywire-cli config gen -irtm to create a example-server-app entry in config
  3. On machine A start the visor and start the example-server-app from UI or CLI
  4. On machine B build with make build-examples
  5. Start the visor
  6. Register the external app example-client-app by ./skywire-cli visor app register -a example-client-app
  7. Copy the proc key printed by the above cli and use it in ./app/example-client-app -procKey <proc-key> -addr <visor-a-pk:45>
  8. Check the logs of the binary for a hi reply message
  9. Deregister the proc after it's use with ./skywire-cli visor app deregister -k <proc-key>

Skyproxy

  1. Start a visorA from this branch on remote
  2. Start the example http app with go run ./example/http-server/server.go this will start the app on port 9080
  3. Start a visorB from this branch on local
  4. Run ./skywire-cli skyproxy connect <remote-pk> --remoteport 9080 --localport 9000
  5. Open localhost:9000 on local and access the example http server running on remote
  6. List the open proxies with ./skywire-cli skyproxy ls
  7. To stop the proxy use ./skywire-cli skyproxy disconnect <id> (get the id from the above step)

This commit adds ReserveApp to the RPC and API which will be used to set and get a procID for an external app.

We also add Reserve in ProcManager which does Reserves a proc and proc ID and returns back the Proc ID.
This commit updates the func NewClient so that it can work even if a Proc Config is not available in the env. Instead it will take the procAddr from it's parameter.

If a Proc Config will be provided in the env then the procAddr param can be left as nil.
This commit fixes Register by adding a go routine to wait for the conn with AwaitConn.

We also change the method awaitConn of Proc to globle and add <-p.connCh to wait for the conn to be ready.
@ersonp ersonp marked this pull request as ready for review January 10, 2023 09:41
…se proxying. Switch subcommands for flags; accept but do not enforce the use of arguments
@0pcom
Copy link
Collaborator

0pcom commented Jan 11, 2023

revisions I've just pushed

image

image

@0pcom 0pcom self-requested a review January 12, 2023 16:44
Copy link
Collaborator

@0pcom 0pcom 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, nicely done

I will come back before the release and update any documentation which needs tobe updated. I've updated the main README for skywire-cli but I see there are other docs included here as well.

@0pcom 0pcom merged commit 2b1ce9d into skycoin:develop Jan 12, 2023
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.

2 participants