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

Fix single binary config #3808

Merged
merged 6 commits into from
Jul 6, 2023

Conversation

Yicheng-Lu-llll
Copy link
Member

@Yicheng-Lu-llll Yicheng-Lu-llll commented Jun 26, 2023

Describe your changes

The existing flyte_local.yaml configuration file has fallen out of date, causing issues when running single binaries. The standard process ideally looks like this:

# Start a k3s cluster, create pods for postgres, minio.
flytectl demo start --dev
# Start all backends (flyteidl, flyteadmin, flyteplugins, flytepropeller) and HTTP Server in a single binary 
sudo make compile
flyte start --config flyte_local.yaml

This PR introduces necessary updates to the flyte_local.yaml configuration file.

Checks

flytectl demo start --dev
# 👨‍💻 Flyte is ready! Flyte UI is available at http://localhost:30080/console 🚀 🚀 🎉 
# ❇️ Run the following command to export demo environment variables for accessing flytectl
#         export FLYTECTL_CONFIG=/root/.flyte/config-sandbox.yaml 
# 🐋 Flyte sandbox ships with a Docker registry. Tag and push custom workflow images to localhost:30000
# 📂 The Minio API is hosted on localhost:30002. Use http://localhost:30080/minio/login for Minio console

sudo make compile
flyte start --config flyte_local.yaml

# running a hello_world sample from flytesnacks
pyflyte run --remote core/flyte_basics/hello_world.py my_wf
# Go to http://localhost:30080/console/projects/flytesnacks/domains/development/executions/f40d94cefb5e74fe6b09 to see execution in the console.

pyflyte run --remote core/flyte_basics/deck.py wf
# Go to http://localhost:30080/console/projects/flytesnacks/domains/development/executions/f39a9c56828e54bb09be to see execution in the console.

Able to run the task
image

Able to see the deck:
image

Able to see the kubernetes logs:
image

Signed-off-by: Yicheng-Lu-llll <[email protected]>
Signed-off-by: Yicheng-Lu-llll <[email protected]>
Signed-off-by: Yicheng-Lu-llll <[email protected]>
Signed-off-by: Yicheng-Lu-llll <[email protected]>
Signed-off-by: Yicheng-Lu-llll <[email protected]>
@@ -7,7 +7,7 @@
# flyte start --config flyte_local.yaml
propeller:
rawoutput-prefix: "s3://my-s3-bucket/test/"
kube-config: "$HOME/.flyte/k3s/k3s.yaml"
kube-config: "$HOME/.flyte/sandbox/kubeconfig"
Copy link
Member Author

@Yicheng-Lu-llll Yicheng-Lu-llll Jun 26, 2023

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it this variable or SandboxKubeconfig that's used in flytectl demo? Let's keep whatever is used for demo not sandbox.

Copy link
Contributor

Choose a reason for hiding this comment

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

otherwise looks good.

Copy link
Member Author

Choose a reason for hiding this comment

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

It is also used for flytectl demo.

startDemoCluster -> sandbox.StartDemoCluster -> StartCluster -> UpdateLocalKubeContext.

UpdateLocalKubeContext copies the kubeconfig to $HOME/.flyte/sandbox/kubeconfig

flyteadmin:
runScheduler: false
database:
postgres:
port: 30089
port: 30001
Copy link
Member Author

Choose a reason for hiding this comment

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

Running kubectl get svc -A :

flyte         flyte-sandbox-postgresql             NodePort    10.43.143.68    <none>        5432:30001/TCP                  2m4s

@@ -45,7 +42,7 @@ storage:
auth-type: accesskey
secret-key: miniostorage
disable-ssl: true
endpoint: "http://localhost:30084"
endpoint: "http://localhost:30002"
region: my-region
Copy link
Member Author

Choose a reason for hiding this comment

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

Running kubectl get svc -A :

flyte         flyte-sandbox-minio                  NodePort    10.43.93.113    <none>        9000:30002/TCP,9001:32697/TCP   2m4s

@pingsutw
Copy link
Member

FYI @ByronHsu

@Yicheng-Lu-llll Yicheng-Lu-llll marked this pull request as draft June 27, 2023 01:27
Signed-off-by: Yicheng-Lu-llll <[email protected]>
@Yicheng-Lu-llll Yicheng-Lu-llll marked this pull request as ready for review June 27, 2023 01:39
@jeevb
Copy link
Contributor

jeevb commented Jul 5, 2023

I’ve been using this one: https://github.com/flyteorg/flyte/blob/master/flyte-single-binary-local.yaml

Perhaps we can consolidate and clean up?

@Yicheng-Lu-llll
Copy link
Member Author

@jeevb I didn't notice the flyte-single-binary-local.yaml until you told me how to solve the webhook issues. In this case, do you mind I just remove flyte_local.yaml in this PR since it does not fit flytectl demo start --dev any more?

@jeevb
Copy link
Contributor

jeevb commented Jul 5, 2023

@jeevb I didn't notice the flyte-single-binary-local.yaml until you told me how to solve the webhook issues. In this case, do you mind I just remove flyte_local.yaml in this PR since it does not fit flytectl demo start --dev any more?

It might still be valid for the legacy sandbox. We do plan on deprecating it , and we can clean it up then?

@wild-endeavor wild-endeavor merged commit b46fbd2 into flyteorg:master Jul 6, 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.

4 participants