Skip to content

Commit

Permalink
Dynamic RClone Configuration (#8)
Browse files Browse the repository at this point in the history
* Initial commit for rclone dynamic config from model details

* Allow k8s secrets for rclone config

* Updates from design doc review. Update rclone config key to include user supplied remote. Use oneof in protos.

* updated notebook

* Review comments. Simplify config function. Fix rclone copy with no config

* lint

* lint from root

* Review comments: make storageConfig optional in proto. Small fixes

* Change to inline configuration

* lint

* Add configuration handler and rclone defaults load

* lint

* Add watch of local config file

* lint

* Update main to handle signals

* add k8s config handling

* Add test for watching configmaps. Change NewConfigHandler signature to allow passing in kubernetes.interface

* Initial review updates

* review comments part 2

* fix lint

* gofmt -w pkg

* Simplify struct

* Lint Simplify struct

* Remove error from NewClient

* review fixes

* fix typo

* Review fixes

* lint

* review comments

* remove agent.json as a possible config file and only allow agent.yaml

* remove json processing
  • Loading branch information
ukclivecox authored Dec 8, 2021
1 parent fb0b736 commit 1264010
Show file tree
Hide file tree
Showing 39 changed files with 4,063 additions and 548 deletions.
7 changes: 0 additions & 7 deletions operator/apis/mlops/v1alpha1/model_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ type LoggingSpec struct {
// URI to logging endpoint.
// +optional
Uri *string `json:"uri,omitempty"`
// Percentage of payloads to log
// Defaults to 100%
// +optional
Percent *int32 `json:"percent,omitempty"`
}

type InferenceArtifactSpec struct {
Expand All @@ -68,9 +64,6 @@ type InferenceArtifactSpec struct {
// Schema URI
// +optional
SchemaURI *string `json:"schemaUri,omitempty"`
// Service Account Name for auth
// +optional
ServiceAccountName *string `json:"serviceAccountName,omitempty"`
// Secret name
// +optional
SecretName *string `json:"secretName,omitempty"`
Expand Down
11 changes: 1 addition & 10 deletions operator/apis/mlops/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions scheduler/Dockerfile.rclone
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM rclone/rclone:1.56.2

COPY rclone.conf /.rclone.conf
RUN chmod a+r /.rclone.conf
CMD ["rcd","--rc-no-auth","--rc-addr=0.0.0.0:5572","--verbose"]
RUN mkdir -p /rclone && chmod a+rw /rclone && touch /rclone/rclone.conf
CMD ["rcd","--rc-no-auth","--config=/rclone/rclone.conf","--rc-addr=0.0.0.0:5572","--verbose"]

13 changes: 12 additions & 1 deletion scheduler/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,20 @@ start-envoy:

start-agent:
./bin/agent --model-repository ${PWD}/mlrepo --inference-port 8080 \
--config-path ${PWD}/config \
--replica-config '{"inferenceSvc":"0.0.0.0","inferenceHttpPort":8080,"inferenceGrpcPort":8081,"memoryBytes":1000,"availableMemoryBytes":1000,"capabilities":["sklearn"],"overCommit":false}'

start-agent-k8s:
./bin/agent --model-repository ${PWD}/mlrepo --inference-port 8080 --namespace seldon-mesh \
--config-path ${PWD}/config \
--replica-config '{"inferenceSvc":"0.0.0.0","inferenceHttpPort":8080,"inferenceGrpcPort":8081,"memoryBytes":1000,"availableMemoryBytes":1000,"capabilities":["sklearn"],"overCommit":false}'

start-mlserver:
cd mlrepo && mlserver start .

start-rclone:
cd mlrepo && rclone rcd --rc-no-auth --verbose
rm -f config/rclone.config
cd mlrepo && rclone rcd --config=../config/rclone.config --rc-no-auth --verbose

# sends host header to allow routing
curl-model2:
Expand Down Expand Up @@ -100,6 +107,10 @@ deploy:
cd k8s/mlserver && kustomize edit set image rclone=${RCLONE_IMG}
kustomize build k8s/default | kubectl apply -f -

deploy-minio-secret:
kubectl create namespace seldon-mesh || echo "seldon-mesh namespace exists"
kustomize build k8s/auth | kubectl apply -f -

undeploy:
kustomize build k8s/default | kubectl delete -f -

Expand Down
Loading

0 comments on commit 1264010

Please sign in to comment.