You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
9
4
10
5
## Clients
11
6
12
7
### Lens vs OpenLens
13
8
14
-
Currently, there are 2 goto 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.
15
10
16
11
Both are great options, but have variances between them that are worth noting:
17
12
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.
19
14
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).
21
16
22
17
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.
23
18
24
19
### OpenLens
25
20
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.
27
22
2. Head to the [OpenLens Github](https://github.com/MuhammedKalkan/OpenLens) and follow the provided steps to install on your OS.
28
23
29
24
**Important note!** There is currently an issue on Windows with OpenLens 6.3.0 that prevents you from seeing your connected cluster details.
30
25
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.
31
26
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/).
34
28
35
29
### Set up Config
36
30
37
31
Now that we have Lens and Kubectl set up, we need to set up our config file to use our clusters.
38
32
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.
40
34
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:
2.[Organise Cluster Access using Config Files](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/)
45
39
3.[Setting up Config for Multiple Clusters](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)
46
40
47
-
Once you've read up you'll need to:
41
+
Once you've read the guides, you'll need to:
48
42
49
-
1. On Windows, navigate to `C:\Users\user\.kube`
43
+
1. On Windows, navigate to `C:\Users\user\.kube`;
50
44
51
-
2. On Linux navigate to `/home/user/.config/OpenLens/kubeconfigs/`
45
+
2. On Linux navigate to `/home/user/.config/OpenLens/kubeconfigs/`;
52
46
53
-
3. Grab the pre-configured config file
47
+
3. Grab the pre-configured config file;
54
48
55
49
4. Overwrite the default config file with the new one.
56
50
57
51
Once done with the above steps, it may be worth restarting your system.
58
52
59
53
### 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”
62
56
63
57
### 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.
66
60
67
-
This will be your goto 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.
68
62
69
63
For details on uploading and running your own applications, continue reading.
70
64
@@ -74,12 +68,12 @@ Before doing the following, you'll need to set up a Pixel Streaming compatible p
74
68
75
69
### Uploading your Project Data
76
70
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:
78
72
```sh
79
73
kubectl config use-context coreweave
80
74
```
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.
83
77
```sh
84
78
kubectl cp ./Linux-LockFix data-copy:/data/
85
79
```
@@ -100,45 +94,41 @@ Enter the external IP address from the output into a web browser and you'll conn
100
94
101
95
### Tips and Tricks
102
96
* 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.
107
99
108
100
## Debugging on CoreWeave with gdbserver
109
101
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.
114
106
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:
116
108
```sh
117
109
kubectl apply -f third-person-ue51.gdb.yml
118
110
```
119
111
120
112
You're now ready to connect a debugger and get cracking.
121
113
122
-
123
-
124
114
### 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.
126
116
127
117
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.
128
118
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:
130
120
```gdb
131
121
file ProjectName/Binaries/Linux/ProjectName
132
122
file ProjectName/Binaries/Linux/ProjectName.debug
133
123
```
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.
135
125
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:
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:
142
132
```gdb
143
133
(gdb) target remote 216.153.48.252:2345
144
134
```
@@ -153,12 +143,10 @@ Now you're ready to get started. Enter `continue` (or just `c`) and `gdbserver`
153
143
#### Tips & Tricks
154
144
155
145
*[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.
162
150
163
151
### Using VSCode for remote debugging
164
152
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:
0 commit comments