Skip to content

Commit 8b682e9

Browse files
committed
Changed readme and some script changes.
1 parent 91c0b81 commit 8b682e9

File tree

3 files changed

+29
-10
lines changed

3 files changed

+29
-10
lines changed

Metaflow_service/Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
- Creates the Pods and Services for the Metaflow metadata service.
44
- Setups:
5-
- Postgres : Service, Deployment, Persistant Volume and Persistant Volume
5+
- Postgres : Service, Deployment, Persistant Volume and Persistant Volume Claim
66
- Metaflow_Service : Deployment,service

Metaflow_service/deleter.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
kubectl delete -f postgres-secret.yaml
1+
# SCRIPT=`realpath $0`
2+
SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
3+
4+
kubectl delete -f $SCRIPTPATH/postgres-secret.yaml
25

36
# $ Create the PG Db in the Kube Cluster.
4-
kubectl delete -f database/postgres-db-pv.yaml
5-
kubectl delete -f database/postgres-db-pvc.yaml
6-
kubectl delete -f database/postgres-db-deployment.yaml
7-
kubectl delete -f database/postgres-db-service.yaml
7+
kubectl delete -f $SCRIPTPATH/database/postgres-db-pv.yaml
8+
kubectl delete -f $SCRIPTPATH/database/postgres-db-pvc.yaml
9+
kubectl delete -f $SCRIPTPATH/database/postgres-db-deployment.yaml
10+
kubectl delete -f $SCRIPTPATH/database/postgres-db-service.yaml
811

912
# $ Create the service once the app is created.
10-
kubectl delete -f service_app/metaflow-metadata-service-deployment.yaml
11-
kubectl delete -f service_app/metaflow-metadata-service.yaml
13+
kubectl delete -f $SCRIPTPATH/service_app/metaflow-metadata-service-deployment.yaml
14+
kubectl delete -f $SCRIPTPATH/service_app/metaflow-metadata-service.yaml

Readme.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,23 @@
33
This Repository will contain the basic scripts and files needed to setup Kubernetes cluster for running and working with Metaflow.
44
It contains Kops setup and Kubernetes templates to deploy necessary services on kubernetes.
55

6-
# Kops Guide.
6+
# Metaflow Kubernetes Plugin
7+
8+
## Installing Plugin Metaflow Repo
9+
- ``pip install https://github.com/valayDave/metaflow/archive/kube_cpu_stable.zip``
10+
11+
## Using The Plugin
12+
- Usage is very similar to `@batch` decorator.
13+
- on top of any `@step` add the `@kube` decorator or use `--with kube:cpu=2,memory=4000,image=python:3.7` in the CLI args.
14+
- To run with Conda it will need `'python-kubernetes':'10.0.1'` in the libraries argument to `@conda_base` step decorator
15+
- Supports workflow orchestration within container and from local/remote machine. When Metaflow Runtime(workflow) within container, pass the `METAFLOW_RUNTIME_IN_CLUSTER=yes` environment variable to container. Check documentation in *Deploying Metaflow Job into Kubernetes*
16+
17+
## CLI Operations Available with Kube:
18+
- ``python multi_step_mnist.py kube list`` : Show the currently running jobs of flow.
19+
- ``python multi_step_mnist.py kube kill`` : Kills all jobs on Kube. Any Metaflow Runtime accessing those jobs will be gracefully exited.
20+
21+
22+
# Kops Guide For Cluster Setup
723

824
## Admin Guide
925
This Involves the steps the admin needs to take to Setup cluster and some useful commands that will help maintain things around the cluster.
@@ -80,7 +96,7 @@ This involves using AWS Creds to set environment variables that give access to a
8096
# Deploying Metaflow Job into Kubernetes
8197

8298
- Requirements:
83-
- Create a Dockerfile which will build your metaflow Flow into an image
99+
- Create a Dockerfile which will build your metaflow Flow into an image. Include data if necessary, otherwise it should come from S3 in the flow.
84100
```dockerfile
85101
# this is an example Docker file of how to create and image of the Metaflow Run and Put it on Kubernetes.
86102
FROM python:3.7

0 commit comments

Comments
 (0)