canonical/seldon-core-operator

Seldon Core Sidecar Rewrite

Closed this issue · 4 comments

The current seldon charm is written in the podspec charming pattern. We need to migrate it to the new sidecar pattern.
Jira

As of above commit basic implementation is done.

Building and deploying (assuming Juju and development environment are setup):

git clone https://github.com/canonical/seldon-core-operator.git
cd seldon-core-operator
git checkout origin/kf-568-gh42-feat-sidecar_rewrite
git remote update
git pull origin kf-568-gh42-feat-sidecar_rewrite
tox -e unit
tox -e integration
charmcraft pack
juju deploy ./seldon-core_ubuntu-20.04-amd64.charm --trust --resource oci-image="docker.io/seldonio/seldon-core-operator:1.14.0"

Basic verification of new charm with sidecar.

juju add-model seldon-sidecar
juju deploy ./seldon-core_ubuntu-20.04-amd64.charm seldon-controller-manager --trust --resource oci-image="docker.io/seldonio/seldon-core-operator:1.14.0"
$ juju status
Model           Controller  Cloud/Region        Version  SLA          Timestamp
seldon-sidecar  uk8s        microk8s/localhost  2.9.34   unsupported  23:08:15Z

App          Version  Status  Scale  Charm        Channel  Rev  Address        Exposed  Message
seldon-core           active      1  seldon-core             0  10.152.183.39  no       

Unit            Workload  Agent  Address     Ports  Message
seldon-core/0*  active    idle   10.1.3.206         
$ kubectl -n seldon-sidecar get seldondeployments.machinelearning.seldon.io
No resources found in seldon-sidecar namespace.
$ kubectl -n seldon-sidecar apply -f examples/serve-simple-v1.yaml
seldondeployment.machinelearning.seldon.io/seldon-model created
$ kubectl -n seldon-sidecar get deploy
NAME                                READY   UP-TO-DATE   AVAILABLE   AGE
modeloperator                       1/1     1            1           4m39s
seldon-model-example-0-classifier   1/1     1            1           45s
$ kubectl -n seldon-sidecar get seldondeployments.machinelearning.seldon.io
NAME           AGE
seldon-model   2m26s

Resources after charm deployment and example Seldon deployment:

$ kubectl get all -n seldon-sidecar
NAME                                                     READY   STATUS    RESTARTS   AGE
pod/modeloperator-67c48c4c7f-7l695                       1/1     Running   0          7m17s
pod/seldon-controller-manager-0                          2/2     Running   0          6m46s
pod/seldon-model-example-0-classifier-56689f7455-z89mh   2/2     Running   0          3m23s

NAME                                          TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)             AGE
service/modeloperator                         ClusterIP   10.152.183.138   <none>        17071/TCP           7m17s
service/seldon-controller-manager-endpoints   ClusterIP   None             <none>        <none>              6m48s
service/seldon-controller-manager             ClusterIP   10.152.183.89    <none>        8080/TCP,4443/TCP   6m48s
service/seldon-webhook-service                ClusterIP   10.152.183.59    <none>        4443/TCP            6m35s
service/seldon-model-example-classifier       ClusterIP   10.152.183.130   <none>        9000/TCP,9500/TCP   3m23s
service/seldon-model-example                  ClusterIP   10.152.183.248   <none>        8000/TCP,5001/TCP   3m23s

NAME                                                READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/modeloperator                       1/1     1            1           7m17s
deployment.apps/seldon-model-example-0-classifier   1/1     1            1           3m23s

NAME                                                           DESIRED   CURRENT   READY   AGE
replicaset.apps/modeloperator-67c48c4c7f                       1         1         1       7m17s
replicaset.apps/seldon-model-example-0-classifier-56689f7455   1         1         1       3m23s

NAME                                         READY   AGE
statefulset.apps/seldon-controller-manager   1/1     6m46s

Filing PR to run through github runner tests, because some integration tests are failing in local environment at this point. Those will be address in later commits.

Some work items and issues.

	  containers:
	    seldon-core:
              resource: oci-image
  • Had to remove from metadata.yaml:
series: [kubernetes]
min-juju-version: "2.9.0"

Fix is merged #46