Skip to content

Commit 4dce655

Browse files
authored
Merge pull request #498 from snyk/chore/tilt-debugging-readme
chore: add instructions for debugging with Tilt
2 parents b50f4fb + e788251 commit 4dce655

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

test/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,29 @@ Run with:
9393
* `npm run test:integration:apk`
9494
* `npm run test:integration:apt`
9595
* `npm run test:integration:rpm`
96+
97+
## Debugging with Tilt ##
98+
99+
Tilt allows you to run and debug the snyk-monitor while it is running in a container. Tilt deploys the snyk-monitor using the same Helm chart that we publish to users.
100+
101+
You can download Tilt from the [Tilt GitHub repository](https://github.com/tilt-dev/tilt#install-tilt).
102+
103+
### Start a debugging session ###
104+
105+
First, ensure you have the snyk-monitor namespace set up and the snyk-monitor Secret with your integration ID and dockercfg (as per the prerequisites for installing snyk-monitor).
106+
107+
Finally, put breakpoints in the code and run `tilt up`.
108+
109+
### Errors with read-only file system ###
110+
111+
If you see an error like the following...
112+
113+
```shell
114+
Error: EROFS: read-only file system, mkdir '/srv/app/.npm/_npx'
115+
```
116+
117+
... it means that the `readOnlyRootFilesystem` protection on the snyk-monitor Helm Deployment causes issues with Tilt. This can be fixed by removing the `readOnlyRootFilesystem: true` value from the Helm chart located in `snyk-monitor/templates/deployment.yaml`.
118+
119+
### Cleaning up ###
120+
121+
Run `tilt down` to tear down the debugging session.

0 commit comments

Comments
 (0)