-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
add nuclio components (to build/deploy, delete, invoke functions) #1295
Conversation
… and UI, fix broken links (pointed to API vs UI service)
Hi @yaronha. Thanks for your PR. I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
1 similar comment
Hi @yaronha. Thanks for your PR. I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign @Ark-kun |
description: delete a nuclio function. | ||
inputs: | ||
- {name: Name, type: String, description: 'function name'} | ||
- {name: Namespace, type: String, description: 'Kubernetes namespace', default: ''} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not see the Namespace being passed to the program.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ark-kun i will add
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ark-kun BTW is there a way to pass options w/o values ? e.g. we have -v
option for verbose, it doesn't accept a value, just will turn on verbose if the flag exists. if i add it now it will always add -v
to the call and i rather not change the executable to accept -v=true
- {name: Env, type: String, description: 'override function env var, Json {key: value, ..}', default: ''} | ||
- {name: Mount, type: String, description: 'volume mount, [vol-type:]<vol-url>:<dst-path>', default: ''} | ||
outputs: | ||
- {name: address, type: String, description: 'function endpoint url'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rename address
to Endpoint
(in two places)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does a function 'deployment' mean? i believe this is more like 'execute' a function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ark-kun renamed
@animeshsingh deploy
takes code + extra files + spec (from code, notebook, zip, git, ..), builds a container, and creates the CRD/deployment for it. a function may be invoked independently e.g. when its doing model serving or ETL from a Kafka/pubsub topic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see more details/examples on how deploy works in: https://github.com/nuclio/nuclio-jupyter
I've restarted the tests. It should be fine. |
--mount, {inputValue: Mount}, | ||
] | ||
fileOutputs: | ||
address: /tmp/output |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JFYI: For future, it's better to have this path passed to the program and not hardcoded in the code.
In
https://github.com/nuclio/nuclio-jupyter/blob/66825220ac659f59d1555ca77568aeecce850e49/nuclio/deploy.py#L69
you should use something like
parser.add_argument('--endpoint-output-file', ...)
...
from pathlib import Path
Path(args.endpoint_output_file).parent.mkdir(parents=True, exist_ok=True)
Path(args.endpoint_output_file).write_text(addr)
and then in component.yaml in the implementation.container.command
array you just add --endpoint-output-file, {outputPath: address}
and remove the fileOutputs
section which should only be used as a workaround for programs with hard-coded paths.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ark-kun the address
is just an endpoint string (<addr>:<port>
), not a file, and it is only written once in the life of that container (container will exit when its done), so instead of writing to arbitrary path or loading to external object, i thought its simpler to hardcode and not burden the user.
i can make it an option
/ok-to-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also is there an end to end sample file showing the usage?
|
||
To install Nuclio over Kubernetes follow the [instruction in Github](https://github.com/nuclio/nuclio), | ||
or this [interactive tutorial](https://www.katacoda.com/javajon/courses/kubernetes-serverless/nuclio). | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we supposed to install Nuclio on Kube before using these components?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@animeshsingh it can be installed on the same cluster or a different one (defined by the dashboard address)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i plan on adding a page under kubeflow
with more detailed install/usage using helm
- {name: Env, type: String, description: 'override function env var, Json {key: value, ..}', default: ''} | ||
- {name: Mount, type: String, description: 'volume mount, [vol-type:]<vol-url>:<dst-path>', default: ''} | ||
outputs: | ||
- {name: address, type: String, description: 'function endpoint url'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does a function 'deployment' mean? i believe this is more like 'execute' a function?
-l, {inputValue: Log level}, | ||
] | ||
fileOutputs: | ||
output: /tmp/output |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we deploy a 'microservice' , and invoke it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@animeshsingh see above re deploy
, invoke
is calling the function (e.g. assume i have a function which does ETL or query data, i invoke it with the query and it process the data), the functions are auto-scaling (from zero or N) and will dynamically allocate resources. e.g. see this function example which reads stock trading data.
note that you dont have to use both, e.g. the pipeline may just deploy an inference function and the invoke
will be done directly by an app client via HTTP or stream, e.g. see this function notebook example of TF serving, it can be deployed automatically after the model was generated and serve new requests, the Tag can be used for ingress policies (e.g. A/B testing)
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Ark-kun The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Ark-kun The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* Fix up batcher docs * Move pmml and lightgbm to v1beta1 * Add v1beta1 transformer example * Update feature matrix * Move rollouts * Move custom and transformer examples * Update link
add component to deploy & customize nuclio functions from code/notebook/zip/git, delete functions, and invoke running functions.
see: README.md and https://github.com/nuclio/nuclio-jupyter and https://github.com/nuclio/nuclio
This change is