Skip to content

Commit 0f957ed

Browse files
Add example dev workflow to CONTRIBUTING.md
Signed-off-by: Kevin <[email protected]>
1 parent 2e8e35f commit 0f957ed

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

Diff for: CONTRIBUTING.md

+27-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Here are a few things to go over before getting started with CodeFlare Operator
55
## Environment setup
66

77
The following should be installed in your working environment:
8-
- Go 1.20.x
8+
- Go 1.21.x
99
- [Download release](https://go.dev/dl/)
1010
- [Install Instructions](https://go.dev/doc/install)
1111
- [Operator SDK](https://sdk.operatorframework.io/docs/installation/)
@@ -53,3 +53,29 @@ To write and inspect unit tests:
5353
- Populate the [.vscode/launch.json](https://github.com/project-codeflare/codeflare-operator/tree/main/.vscode/launch.json) file with the location of your Kubernetes config file and desired namespace.
5454
- In VSCode on the activity bar click `Run and Debug` or `CTRL + SHIFT + D` to start a local debugging session of the CodeFlare Operator.
5555
The operator should be running as intended.
56+
57+
58+
## Example dev workflow
59+
60+
I've made changes to `pkg/controllers/raycluster_controller.go` and `pkg/controllers/raycluster_controller.go`. I've
61+
written unit tests and would like to test my changes using the unit tests as well as on an OpenShift cluster which I
62+
have access to.
63+
64+
1. Ensure the unit tests you've written are passing and you haven't introduced any regressions
65+
1. run `make test-unit`
66+
1. build and push image
67+
1. `make image-build -e IMG=<image-repo/image-name:image-tag>`
68+
1. `make image-push -e IMG=<image-repo/image-name:image-tag>`
69+
1. Login to your OpenShift cluster via `oc login --token=... --server=...`
70+
1. deploy ODH/RHOAI if necessary
71+
1. for the latest releases
72+
1. run `make delete-all-in-one -e USE_RHOAI=<true|false>` **if** you would like to run on a fresh ODH/RHOAI deployment
73+
1. run `make all-in-one -e USE_RHOAI=<true|false>` to deploy new instance of ODH/RHOAI
74+
1. otherwise follow the dev guides found in
75+
[ODH](https://github.com/opendatahub-io/opendatahub-operator?tab=readme-ov-file#deployment) and
76+
[RHOAI](https://gitlab.cee.redhat.com/data-hub/olminstall) (Red Hat internal only)
77+
1. run `make install-nfd-operator`, `make install-service-mesh-operator`, `make install-ai-platform-operator`, `make install-nvidia-operator` to ensure all dependent operators are also installed
78+
1. navigate to the DataScienceCluster resource and set `.spec.components.codeflare.managementState` to `Removed`
79+
1. run `make deploy -e IMG=<image-repo/image-name:image-tag>`
80+
81+
Your dev image should now be deployed in the cluster

0 commit comments

Comments
 (0)