Skip to content

Commit

Permalink
A fix I believe, not like I tested or anything
Browse files Browse the repository at this point in the history
Signed-off-by: Mriyam Tamuli <[email protected]>
  • Loading branch information
mbtamuli committed Jan 17, 2024
1 parent 48925f3 commit a175043
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 7 deletions.
8 changes: 1 addition & 7 deletions .devcontainer/welcome.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,4 @@ This debian dev container image contains all tools needed for development.

Get started right away! 🚀

$ kind create cluster
$ helm install wm-csi \
charts/warm-metal-csi-driver \
-n kube-system \
-f charts/warm-metal-csi-driver/values.yaml \
--set csiPlugin.image.tag=v1.0.1 \
--wait
Check out the guide in docs/running-locally.md
52 changes: 52 additions & 0 deletions docs/running-locally.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Running Locally

You have two options:

1. Use the [Dev Container](#development-container). This can be used with VSCode, the `devcontainer` CLI, or GitHub Codespaces.
1. Install the [requirements](#requirements) on your computer manually.

## Development Container

The development container contains all the tools necessary to work with csi-driver-image.

You can use the development container in a few different ways:

1. [Visual Studio Code](https://code.visualstudio.com/) with [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). Open the local clone of `csi-driver-image` folder in VSCode and it should offer to use the development container automatically.
1. [`devcontainer` CLI](https://github.com/devcontainers/cli). Once installed, the local clone of `csi-driver-image` folder and run `devcontainer up --workspace-folder .` followed by `devcontainer exec --workspace-folder . /bin/bash` to get a shell where you can build the code. You can use any editor outside the container to edit code; any changes will be mirrored inside the container.
1. [GitHub Codespaces](https://github.com/codespaces). You can start editing as soon as VSCode is open.

Once you have entered the container, continue to [Developing Locally](#developing-locally).

## Requirements

To build on your own machine without using the Dev Container you will need:

* A local clone of this repository.
* [Go](https://golang.org/dl/)
* A local Kubernetes cluster ([`k3d`](https://k3d.io/#quick-start), [`kind`](https://kind.sigs.k8s.io/docs/user/quick-start/#installation), or [`minikube`](https://minikube.sigs.k8s.io/docs/start/))
* [`helm`](https://helm.sh/docs/intro/install/)

## Developing locally

_**Note:** Unless specified otherwise, you need to run all commands after changing your working directory to this repository - `cd /path/to/csi-driver-image-repository`_

1. First, make sure you can connect to the Kubernetes cluster by following the quickstart guide of your chosen local Kubernetes cluster provider.
```
$ kubectl get nodes
```
Make sure you don't see any errors in your terminal. If do get error(s), please check the quickstart guide or the local Kubernetes cluster provider's documentation on how to get started.

1. Install the csi-driver-image using the helm chart.
```
helm install wm-csi \
charts/warm-metal-csi-driver \
-n kube-system \
-f charts/warm-metal-csi-driver/values.yaml \
--set csiPlugin.image.tag=v1.0.1 \
--wait
```

1. You can submit a workflow for testing using `kubectl`:
```bash
kubectl create -f sample/ephemeral-volume.yaml
```

0 comments on commit a175043

Please sign in to comment.