Skip to content

Commit 508df1f

Browse files
Update Coreweave.md
1 parent 718d785 commit 508df1f

File tree

1 file changed

+36
-50
lines changed

1 file changed

+36
-50
lines changed

Coreweave.md

+36-50
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,64 @@
11
## Setting up CoreWeave
22

3-
To start with, I suggest following the official Coreweave documentation for getting started with your Coreweave account and setting up your Kubernetes.
4-
5-
You can find this documentation [here](https://docs.coreweave.com/coreweave-kubernetes/getting-started)
6-
7-
The above documentation should cover all the basic set up and information for preparing your Coreweave account and kubernetes.
8-
3+
Before you begin, we suggest following the [official CoreWeave documentation](https://docs.coreweave.com/coreweave-kubernetes/getting-started) for getting started with your CoreWeave account and setting up your Kubernetes. It should cover all the basic set up and information for preparing your CoreWeave account and Kubernetes.
94

105
## Clients
116

127
### Lens vs OpenLens
138

14-
Currently, there are 2 go to programs for interacting and tracking your clusters, Lens and OpenLens.
9+
Currently, there are two go-to programs for interacting and tracking your clusters, Lens and OpenLens.
1510

1611
Both are great options, but have variances between them that are worth noting:
1712

18-
1. Lens is built on top of OpenLens, thus contains some additional software and libraries with different licenses.
13+
1. Lens is built on top of OpenLens, thus containing some additional software and libraries with different licenses.
1914
2. OpenLens is fully open source and has the relevant freedoms.
20-
3. Lens was freeware, but now has a new subscription model. For personal use this is free, but for larger businesses there are costs. (this was implemented July 28th 2022, but a grace period until January 2023 was given if you were already a user.)
15+
3. Lens was freeware, but now has a new subscription model. It is free for personal use, but not for larger businesses (this was implemented July 28th 2022, but a grace period until January 2023 was given if you had already been a user).
2116

2217
For information on which software you should go with, it's recommended to research them further. For the sake of simplicity, we'll use OpenLens in this guide.
2318

2419
### OpenLens
2520

26-
1. OpenLens is the open source variant of Lens. It's a
21+
1. OpenLens is the open source project that contains the code which supports the main functionality of Lens. Lens is built on top of OpenLens.
2722
2. Head to the [OpenLens Github](https://github.com/MuhammedKalkan/OpenLens) and follow the provided steps to install on your OS.
2823

2924
**Important note!** There is currently an issue on Windows with OpenLens 6.3.0 that prevents you from seeing your connected cluster details.
3025
Head to the [Releases page](https://github.com/MuhammedKalkan/OpenLens/releases) and download 6.2.5 instead. This will circumvent the issue. Latest is fine if you're using Linux.
3126

32-
For extra information on Coreweave, you can refer to their official documentation here: <https://docs.coreweave.com/>
33-
27+
For extra information on CoreWeave, you can refer to their official documentation [here](https://docs.coreweave.com/).
3428

3529
### Set up Config
3630

3731
Now that we have Lens and Kubectl set up, we need to set up our config file to use our clusters.
3832

39-
*Note* You'll need to have set up your own cluster. This can be on a number of platforms,
33+
*Note:* You'll need to have set up your own cluster. This can be on a number of platforms, but for this documentation, we're assuming you've set up your cluster on CoreWeave.
4034

41-
There is a lot of information involved with setting up your config file, so I recommend reading up on it here:
35+
There is a lot of information involved with setting up your config file, so we recommend reading up on it here:
4236

4337
1. [Kubectl Cheat Sheet](https://kubernetes.io/docs/reference/kubectl/cheatsheet/)
4438
2. [Organise Cluster Access using Config Files](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/)
4539
3. [Setting up Config for Multiple Clusters](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)
4640

47-
Once you've read up you'll need to:
41+
Once you've read the guides, you'll need to:
4842

49-
1. On Windows, navigate to `C:\Users\user\.kube`
43+
1. On Windows, navigate to `C:\Users\user\.kube`;
5044

51-
2. On Linux navigate to `/home/user/.config/OpenLens/kubeconfigs/`
45+
2. On Linux navigate to `/home/user/.config/OpenLens/kubeconfigs/`;
5246

53-
3. Grab the pre-configured config file
47+
3. Grab the pre-configured config file;
5448

5549
4. Overwrite the default config file with the new one.
5650

5751
Once done with the above steps, it may be worth restarting your system.
5852

5953
### Check Config
60-
1. Open Terminal/Powershell and enter `kubectl config get-contexts`
61-
1. If set up correctly, your output should show a list of each elements, under “Namespace, Cluster and AuthInfo”. Including but not limited to; “coreweave-admiral”, “tenant-tw-admiral” and tenant-tensorworks-testing”
54+
1. Open Terminal/Powershell and enter `kubectl config get-contexts`;
55+
2. If set up correctly, your output should show a list of each elements under “Namespace, Cluster and AuthInfo”, including but not limited to, “coreweave-admiral”, “tenant-tw-admiral” and "tenant-tensorworks-testing”
6256

6357
### Using Lens/OpenLens
64-
1. Open Lens and click on the catalog tab at the top left. You should see a variety of Kubernetes clusters available.
65-
1. Click on a cluster to connect. You should be presented with a variety of status categories, such as pods, deployments and storage.
58+
1. Open Lens and click on the catalog tab at the top left. You should see a variety of Kubernetes clusters available;
59+
2. Click on a cluster to connect. You should be presented with a variety of status categories, such as pods, deployments and storage.
6660

67-
This will be your go to for keep track of your pods and applications you have running on Coreweave.
61+
This will be your go-to for keeping track of your pods and applications you have running on CoreWeave.
6862

6963
For details on uploading and running your own applications, continue reading.
7064

@@ -74,12 +68,12 @@ Before doing the following, you'll need to set up a Pixel Streaming compatible p
7468

7569
### Uploading your Project Data
7670
1. Set up kube config files, making sure they're in the right place so that kubectl will find them. As long as kubectl knows where they are then Lens will too.
77-
1. Switch to the correct coreweave context
71+
2. Switch to the correct CoreWeave context:
7872
```sh
7973
kubectl config use-context coreweave
8074
```
81-
1. Get a copy of [this yaml file](/assets/plaintext/content/sps/coreweave/data-copy.yml)
82-
1. Copy the _stuff_ over using data, preferably an already packaged linux project.
75+
3. Get a copy of [this yaml file](/assets/plaintext/content/sps/coreweave/data-copy.yml)
76+
4. Copy the _stuff_ over using data, preferably an already packaged linux project.
8377
```sh
8478
kubectl cp ./Linux-LockFix data-copy:/data/
8579
```
@@ -100,45 +94,41 @@ Enter the external IP address from the output into a web browser and you'll conn
10094

10195
### Tips and Tricks
10296
* Don't forget that you need a second container for running the signalling server process. This is already included in the example file.
103-
* Once you have a pod running on CoreWeave, you can access its logs and get an SSH terminal to it using OpenLens. Just go to the list of pods on your current context and click the three dots on the far right of the pod you're interested in on the list to open up a live shell or view logs.
104-
* Keep in mind that logs are for the current running instance. If a pod fails and stops for any reason it will typically restart immediately. If you want to see a crash report or something in the log of a previously running instance, it will only have the most recent one before the current available when you click "Show previous terminated container" in the log window.
105-
106-
97+
* Once you have a pod running on CoreWeave, you can access its logs and get an SSH terminal to it using OpenLens. Just go to the list of pods on your current context and click the three dots on the far right of the pod you're interested in to open up a live shell or view logs.
98+
* Keep in mind that logs are for the current running instance. If a pod fails and stops for any reason it will typically restart immediately. If you want to see a crash report or something in the log of a previously running instance, you can click "Show previous terminated container" in the log window, however, it will only have the data for one previous instance.
10799

108100
## Debugging on CoreWeave with gdbserver
109101

110-
You'll need to make sure your project's yaml file is going to actually use `gdb` when launching the project instead of the project itself. It should be relatively easy to just [take this example](/assets/plaintext/content/sps/coreweave/third-person-ue51.gdb.yml) and modify it to suit. If making your own keep the following in mind:
111-
* Make sure the Docker image the pod is starting with installs `gdb` as part of its Dockerfile. `gdb` is not essential software for ubuntu-based images and will not be present if you don't install it explicitly. Dockerhub has an image `tensorworks/runtime-gdbserver` which is essentially equivalent to `ghcr.io/epicgames/unreal-engine:runtime-pixel-streaming` but with `gdb` installed.
112-
* You need to ensure the project container is running `gdbserver` instead of the project launch script
113-
* Additionally, `gdbserver` itself needs to be passed the path to the actual binary. Unlike `gdb` proper, `gdbserver` will try to debug the shell running the launch script which put you in forking hell as you try to figure out which forked process is the one actually running the project.
102+
You'll need to make sure your project's yaml file is going to actually use `gdb` when launching the project instead of the project itself. It should be relatively easy to just [take this example](/assets/plaintext/content/sps/coreweave/third-person-ue51.gdb.yml) and modify it to suit. If making your own, keep the following in mind:
103+
* Make sure the Docker image the pod is starting with installs `gdb` as part of its Dockerfile. `gdb` is not essential software for Ubuntu-based images and will not be present if you don't install it explicitly. Dockerhub has an image `tensorworks/runtime-gdbserver`, which is essentially equivalent to `ghcr.io/epicgames/unreal-engine:runtime-pixel-streaming` but with `gdb` installed.
104+
* You need to ensure the project container is running `gdbserver` instead of the project launch script.
105+
* Additionally, `gdbserver` itself needs to be passed the path to the actual binary. Unlike `gdb` proper, `gdbserver` will try to debug the shell running the launch script, which will put you in a forking hell as you try to figure out which forked process is the one actually running the project.
114106

115-
Once the debugging yaml file is ready to go, upload it to coreweave:
107+
Once the debugging yaml file is ready to go, upload it to CoreWeave:
116108
```sh
117109
kubectl apply -f third-person-ue51.gdb.yml
118110
```
119111

120112
You're now ready to connect a debugger and get cracking.
121113

122-
123-
124114
### Using GDB directly from the Terminal
125-
Command-line debugging is something of an acquired taste, but if you're comfortable with your terminal emulator you can cut out the middleman and use GDB directly. The big benefit is that you can interrupt whatever `gdb` is doing and issue commands straight to it to do things like loading symbols from local files and printing arbitrary expressions to get their result when evaluated at the current line.
115+
Command-line debugging is something of an acquired taste, but if you're comfortable with your terminal emulator, you can cut out the intermediary and use GDB directly. The big benefit is that you can interrupt whatever `gdb` is doing and issue commands straight to it to do things like loading symbols from local files and printing arbitrary expressions to get their result when evaluated at the current line.
126116

127117
Ensure you're running `gdb` from the root folder of the packaged project. It should be the same as what you uploaded to `/home/ue4/project` with the data-copy pod before.
128118

129-
Before you actually connect to the remote server, run the following to load debugging symbols from your local project
119+
Before you actually connect to the remote server, run the following to load debugging symbols from your local project:
130120
```gdb
131121
file ProjectName/Binaries/Linux/ProjectName
132122
file ProjectName/Binaries/Linux/ProjectName.debug
133123
```
134-
Doing the first will sometimes trigger the second automatically. You _can_ wait for gdb to get symbols remotely over TCP and it will do so for any new libs encountered, but it takes **forever** with UE in particular because a typical packaged project will have some 2.3 GiB of symbols to load.
124+
Doing the first will sometimes trigger the second automatically. You _can_ wait for `gdb` to get symbols remotely over TCP and it will do so for any new libs encountered, but it takes **forever** with UE in particular because a typical packaged project will have some 2.3 GB of symbols to load.
135125

136-
You can also try to get engine symbols as well, though make sure the engine build you're loading here is the same as that used to package your project.
126+
You can also try to get engine symbols as well, though make sure the engine build you're loading here is the same as the one you used to package your project:
137127
```gdb
138128
file /absolute/path/to/UnrealEngine/Engine/Binaries/Linux/UnrealEditor
139129
```
140130

141-
Enter the following (replacing IP and Port as necessary) to connect your local `gdb` to the pod's running instance.
131+
Enter the following (replacing IP and Port as necessary) to connect your local `gdb` to the pod's running instance:
142132
```gdb
143133
(gdb) target remote 216.153.48.252:2345
144134
```
@@ -153,12 +143,10 @@ Now you're ready to get started. Enter `continue` (or just `c`) and `gdbserver`
153143
#### Tips & Tricks
154144

155145
* [Here is a cheat-sheet](https://www.utm.edu/staff/jguerin/resources/utilities/gdb.html) of the commands available. More information is available in the [full documentation](https://ftp.gnu.org/old-gnu/Manuals/gdb/html_node/gdb_toc.html). The documentation is usually locally viewable with `info gdb`, though the versions hosted online are much more usable.
156-
* You can put all your `(gdb)` commands in a `.gdbinit` on your local project root as well. When you launch `gdb` from that directory it will run everything in that file automatically as if you typed it into the prompt.
157-
* Remember you have to press Ctrl+C in the terminal if you want to pause. If you're trying to catch a lockup you have to make sure you do so before UE detects the freeze and kills the rendering thread. You have about 60 seconds but it does mean you can't just walk away and get a drink while you wait for your repro.
158-
* When first starting it can be hard to tell when it's actually started, as there's a bunch of other libs you have to load symbols for. When gdb stops notifying you of them for a good 15-20 seconds, you're probably good to go.
159-
* If it looks like it just won't stop loading symbols (or if you start seeing a library loaded multiple times) interrupt with ^C and run `(gdb) set auto-solib-add off` to just stop it loading library symbols in general
160-
161-
146+
* You can put all your `(gdb)` commands in a `.gdbinit` into your local project root as well. When you launch `gdb` from that directory, it will run everything in that file automatically as if you typed it into the prompt.
147+
* Remember that you have to press Ctrl+C in the terminal if you want to pause. If you're trying to catch a lockup, you have to make sure you do so before UE detects the freeze and kills the rendering thread. You have about 60 seconds but it does mean you can't just walk away and get a coffee while you wait for your repro.
148+
* When first starting, it can be hard to tell when it's actually started, as there's a bunch of other libs you have to load symbols for. When `gdb` stops notifying you of them for a good 15-20 seconds, you're probably good to go.
149+
* If it looks like it just won't stop loading symbols (or if you start seeing a library loaded multiple times) interrupt with ^C and run `(gdb) set auto-solib-add off` to just stop it loading library symbols in general.
162150

163151
### Using VSCode for remote debugging
164152
You can create a launch.json entry like this to perform remote debugging:
@@ -174,5 +162,3 @@ You can create a launch.json entry like this to perform remote debugging:
174162
"stopAtEntry": false
175163
}
176164
```
177-
178-
test

0 commit comments

Comments
 (0)