Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

Commit

Permalink
update readme and kustomization.
Browse files Browse the repository at this point in the history
  • Loading branch information
Azadehkhojandi committed May 20, 2019
1 parent c8ec99a commit edf269c
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 16 deletions.
46 changes: 32 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ The project was built using
* Configure a Kubernetes cluster in your machine
> You need to make sure a kubeconfig file is configured.
> if you opt AKS, you can use: `az aks get-credentials --resource-group $RG_NAME --name $Cluster_NAME`
#### Basic commands to check your cluster
Basic commands to check your cluster

```shell
kubectl config get-contexts
kubectl cluster-info
kubectl version
kubectl get pods -n kube-system

```

#### Kubernetes on WSL
Expand All @@ -59,35 +59,53 @@ https://www.jamessturtevant.com/posts/Running-Kubernetes-Minikube-on-Windows-10-

*Docs are work in progress*

databricks-api:
`docker build --no-cache -t azadehkhojandi/databricks-api:1 -f databricks-api/Dockerfile databricks-api`

Create .env file and set values of `DATABRICKS_HOST` and `DATABRICKS_TOKEN`

```
DATABRICKS_HOST=https://australiaeast.azuredatabricks.net
DATABRICKS_TOKEN=xxxx
```

`docker run -it --env-file ./.env -p 5000:5000 azadehkhojandi/databricks-api:1`

databricks-operator:
1. To install CRDs into a cluster : `kubectl apply -f databricks-operator/config/crds` or `make install -C databricks-operator`
2. To deploy controller in the configured Kubernetes cluster in ~/.kube/config `kustomize build databricks-operator/config | kubectl apply -f -`
3. Change NotebookJob name from `sample1run1` to your desired name and Update the values in `microsoft_v1beta2_notebookjob.yaml`

```
kubectl apply -f databricks-operator/config/samples/microsoft_v1beta2_notebookjob.yaml
kubectl get notebookjob
kubectl describe notebookjob kubectl sample1run1
```

Basic commands to check the new Notebookjob
```
kubectl get crd
kubectl -n databricks-operator-system get svc
kubectl -n databricks-operator-system get pod
kubectl -n databricks-operator-system describe pod databricks-operator-controller-manager-0
kubectl -n databricks-operator-system logs databricks-operator-controller-manager-0 -c dbricks -f
```

There is a also a Make file that you can use to install, test and deploy.

```
make -C databricks-operator
make docker-build IMG=azadehkhojandi/databricks-operator -C databricks-operator
make docker-push IMG=azadehkhojandi/databricks-operator -C databricks-operator
make deploy -C databricks-operator
```
```


## Main Contributors

1. [Jordan Knight](https://www.linkedin.com/in/jakkaj/)
2. [Paul Bouwer](https://www.linkedin.com/in/pbouwer/)
3. [Lace Lofranco](https://www.linkedin.com/in/lacelofranco/)
4. [Allan Targino](https://www.linkedin.com/in/allan-targino//)
5. [Azadeh Khojandi](https://www.linkedin.com/in/azadeh-khojandi-ba441b3/)
1. Jordan Knight [Github](https://github.com/jakkaj), [Linkedin](https://www.linkedin.com/in/jakkaj/)
2. Paul Bouwer [Github](https://github.com/paulbouwer), [Linkedin](https://www.linkedin.com/in/pbouwer/)
3. Lace Lofranco [Github](https://github.com/devlace), [Linkedin](https://www.linkedin.com/in/lacelofranco/)
4. Allan Targino [Github](https://github.com/allantargino), [Linkedin](https://www.linkedin.com/in/allan-targino//)
5. Rian Finnegan [Github](https://github.com/xtellurian), [Linkedin](https://www.linkedin.com/in/rian-finnegan-97651b55/)
6. Jason Goodselli [Github](https://github.com/JasonTheDeveloper), [Linkedin](https://www.linkedin.com/in/jason-goodsell-2505a3b2/)
7. Craig Rodger [Github](https://github.com/crrodger), [Linkedin](https://www.linkedin.com/in/craigrodger/)
8. Azadeh Khojandi [Github](https://github.com/Azadehkhojandi), [Linkedin](https://www.linkedin.com/in/azadeh-khojandi-ba441b3/)

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion databricks-operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ endif
docker-build: test
docker build . -t ${IMG}
@echo "updating kustomize image patch file for manager resource"
sed -i'' -e 's@image: .*@image: '"${IMG}"'@' ./config/default/manager_image_patch.yaml
sed -i'' -e 's@image: .*@image: '"${IMG}"'@' ./config/default/manager_go_image_patch.yaml

# Push the docker image
docker-push:
Expand Down
27 changes: 27 additions & 0 deletions databricks-operator/config/default/dbricks_python_image_patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: controller-manager
namespace: system
spec:
template:
spec:
containers:
# Change the value of image field below to your controller image URL
- image: azadehkhojandi/databricks-api:1
name: dbricks
ports:
- containerPort: 5000
protocol: TCP
env:
- name: DATABRICKS_HOST
valueFrom:
secretKeyRef:
name: testdatabricks
key: DatabricksHost
- name: DATABRICKS_TOKEN
valueFrom:
secretKeyRef:
name: testdatabricks
key: DatabricksToken

3 changes: 2 additions & 1 deletion databricks-operator/config/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ resources:
- rbac/auth_proxy_role_binding.yaml

patches:
- default/manager_image_patch.yaml
- default/manager_go_image_patch.yaml
- default/dbricks_python_image_patch.yaml
# Protect the /metrics endpoint by putting it behind auth.
# Only one of manager_auth_proxy_patch.yaml and
# manager_prometheus_metrics_patch.yaml should be enabled.
Expand Down

0 comments on commit edf269c

Please sign in to comment.