PySyft icon indicating copy to clipboard operation
PySyft copied to clipboard

Tox task for starting high low together

Open shubham3121 opened this issue 1 year ago • 5 comments

Description

We can start both high and low side using the following:

tox -e dev.k8s.launch.datasite.highlow

image

More verbose:

CLUSTER_NAME_LOW=test-dasite-low-1 CLUSTER_NAME_HIGH=test-datasite-high-1 \ 
CLUSTER_HTTP_PORT_HIGH=9081 CLUSTER_HTTP_PORT_LOW=9083 \
tox -e dev.k8s.launch.datasite.highlow

Or just starting a low side: bash tox -e dev.k8s.launch.datasite.low

There is a script to get credentials:

CLUSTER_NAME="test-datasite-1" ./scripts/get_k8s_secret_ci.sh

How has this been tested?

  • Describe the tests that you ran to verify your changes.
  • Provide instructions so we can reproduce.
  • List any relevant details for your test configuration.

Checklist

shubham3121 avatar Aug 20 '24 14:08 shubham3121

@shubham3121 great start, looks like theres still a typo here CLUSTER_NAME_LOW = {env:CLUSTER_NAME_LOW:test-dasite-low-1} also when I run it I only get a low side.

Can we make it so that it actually runs the get credentials commands for you and then echos out the entire string like:

# copy and paste to jupyter
import syft as sy

high = sy.orchestra.launch(...)
high_client = high.login(...)
# or just the sy.login if thats easier

madhavajay avatar Aug 21 '24 00:08 madhavajay

@shubham3121 great start, looks like theres still a typo here CLUSTER_NAME_LOW = {env:CLUSTER_NAME_LOW:test-dasite-low-1} also when I run it I only get a low side.

Can we make it so that it actually runs the get credentials commands for you and then echos out the entire string like:

# copy and paste to jupyter
import syft as sy

high = sy.orchestra.launch(...)
high_client = high.login(...)
# or just the sy.login if thats easier

@madhavajay yes we can do that, just that we need to wait for backend to be up before fetching the credentials.

shubham3121 avatar Aug 21 '24 05:08 shubham3121

@shubham3121 @madhavajay I was trying to do this and waiting for the backend service to print out the credentials will make the tox task runs for 345s instead of 30s

khoaguin avatar Aug 21 '24 05:08 khoaguin

@shubham3121 and @khoaguin why don't we just generate the email and password in the script then pass them through to the deployment so we don't need to wait to re-fetch them.

madhavajay avatar Aug 27 '24 20:08 madhavajay

@madhavajay you mean that since the default root email and password are always "[email protected]" and "changethis" if we launch the datasites this way, we just set them as those in the display_credentials.sh and not calling the get_k8s_secret_ci.sh script?

khoaguin avatar Aug 28 '24 02:08 khoaguin

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@snwagh we can close this as the work is already done in this merged PR, right?

khoaguin avatar Sep 12 '24 02:09 khoaguin

@khoaguin Thanks for checking this, I verified this can be closed and closing it now.

snwagh avatar Sep 12 '24 15:09 snwagh