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
Deploying seldon models to multiple namespaces #89
Comments
Thanks for the detailed request. We definitely should fix the port clash and verify multiple namespace deployments works including the correct RBAC settings for the service accounts. On the issues with ksonnet + ambassador.
Be great to understand what your current CI/CD solution is as we would like to have examples of integrations. |
Right now we are just deploying with a So I think what you're saying is if you make a switch on the helm chart for an optional APIFE we could |
@cliveseldon We're working together to setup a CI Pipeline using Codefresh CI/CD https://codefresh.io/. Codefresh has a plugins repository available here: https://github.com/codefresh-io/plugins that can show you some examples of how to use a Codefresh YAML defined pipeline to execute commands against Docker container using a Docker image that is prepared for the integration with a CLI. For example cf-plugin-helm https://github.com/codefresh-io/cf-plugin-helm is one of the plugins being used on this specific pipeline above. We have an integration with Kubernetes cluster and pass in the context to the pipeline and we can execute kubectl and helm as part of a build-step and share files in the repository and variables in the pipelines with that step. Here's some additional documentation on build steps https://docs.codefresh.io/docs/what-is-the-codefresh-yaml The build step we're held up on currently and hoping to figure out a way around this is the helm install of the seldon-core to support multiple namespaces so we can bring that up in a newly created namespace and not have collisions when another namespace is created by another build. What are your thoughts on this approach? |
@Raab70 Yes - it will work with Ambassador as our operator that creates the svc, pods etc adds Ambassador config in an annotation when it creates the components for a SeldonDeployment, they look like for example: kubectl get svc mnist-classifier -o yaml apiVersion: v1
kind: Service
metadata:
annotations:
getambassador.io/config: |
---
apiVersion: ambassador/v0
kind: Mapping
name: seldon_mnist-classifier_rest_mapping
prefix: /seldon/mnist-classifier/
service: mnist-classifier:8000
---
apiVersion: ambassador/v0
kind: Mapping
name: mnist-classifier_grpc_mapping
grpc: true
prefix: /seldon.protos.Seldon/
rewrite: /seldon.protos.Seldon/
headers:
seldon: mnist-classifier
service: mnist-classifier:5001
creationTimestamp: 2018-02-12T13:57:37Z
labels:
seldon-app: mnist-classifier
seldon-deployment-id: mnist-classifier
name: mnist-classifier
namespace: default
For Ambassador config and namespaces see https://www.getambassador.io/reference/configuration |
That's great! That may be the solution we end up with but for right now I had trouble configuring it with GKE. Any way we can get an example notebook for that? I wanted to use rbac which was throwing an error (I have rbac configured, probably not a seldon issue, I can dig in) but I also tried using the UPDATE: I have gotten rbac working |
Not that #92 is done you can install seldon-core without the APIFE so you can use Ambassador easily, e.g.
We haven't push a new release to the helm repos yet so you would need to do as above from a clone of seldon-core. |
I tried this but I'm still getting My install script:
Am I missing something? |
No, I think this is an issue with calling the helm install twice. The CRD needs only to be defined once. I think the bug is in the CRD definition in that it is not namespaced. I have opened an issue to look at this |
This should be fixed now in release 0.1.5 |
Currently seldon-core only supports a single prediction model associated with a seldon-core deployment. It would be great to be able to deploy multiple models to a single cluster using namespaces but
seldon-core
does not recognize models in other namespaces and if I deployseldon-core
to multiple namespaces I get DNS collissions.Minimal Working Example
Note: This is on GKE
Behaviour
I've actually seen two different errors, I think it has to do with which node gets the deployment. My guess is that if the node already has the original
seldon-core
you'll see a port collision such as:Error: release seldon-core-namespaced failed: Service "seldon-apiserver" is invalid: spec.ports[0].nodePort: Invalid value: 30032: provided port is already allocated
The other error I've seen is:
Error: release seldon-core-namespaced failed: customresourcedefinitions.apiextensions.k8s.io "seldondeplo yments.machinelearning.seldon.io" already exists
Expected Behaviour
Ideally it would be great if
seldon-core
supported namespaced API paths out of the box so that multiple models could be deployed to a single cluster. That way I could have aseldondeployment
in namespacemymodel
and another one inmyothermodel
and they would both be accessible through the seldon API.Why not ambassador + ksonnet
I know that one potential solution would be ambassador: https://github.com/SeldonIO/seldon-core/blob/master/notebooks/ksonnet_ambassador_minikube.ipynb
I have evaluated this an alternative and it is not going to be a solution. One issue is the added complexity compared to seldon with helm which is undesirable but not a deal breaker. The deal breaker however is that integrating it into our CI/CD solution is not possible. The whole point is to be able to deploy multiple models meaning that the CI/CD pipeline would have to have access to a central repository or storage for the cluster configuration being modified by
ksonnet
and it would be way too easy for these to get out of sync, there would have to be some sort of locking which is integrated into the CI/CD pipeline.The text was updated successfully, but these errors were encountered: