coder / modules

A collection of Terraform Modules to extend Coder templates.
https://registry.coder.com
Apache License 2.0
33 stars 33 forks source link

kasm VNC #250

Closed matifali closed 1 month ago

matifali commented 6 months ago

closes #1

For testing,

module "kasmvnc" {
  source   = "git::https://github.com/coder/modules.git//kasmvnc?ref=kasmVNC"
  agent_id = coder_agent.dev.id
}

image

matifali commented 6 months ago

@johnstcn, should we publish an image codercom/enterprise-desktop with lxde pre-installed so that users can base their images on codercom/enterprise-desktop. What do you think?

matifali commented 6 months ago

kasmVNC has multi virtual monitor support

https://github.com/coder/modules/assets/10648092/6a21cfa2-57a7-4b09-9563-fc511faa084f

matifali commented 6 months ago

@code-asher, could you check why these unrelated tests are failing?

code-asher commented 6 months ago

Could be this maybe, it came out in the release 5 days ago and seems related: https://github.com/coder/terraform-provider-coder/commit/8c5e8ff9579d1d766d5317422bf3c1988b710434

One test, for example, expects there to be no committer email, but there is one which is default@example.com.

So I suppose how we fix depends on whether we want these to be empty or if we should be expecting defaults.

michaelbrewer commented 5 months ago

@matifali come comments for how this could be enterprise friendly.

matifali commented 5 months ago

@michaelbrewer Thanks for the review

It might be simpler / faster to leave the installation part to the base image (or VM), and let the script just verify the presence.

Thats the plan.

The signaling when ready pattern ie: /tmp/.coder-${WAIT_FOR_SCRIPT}.done, could be done more generically across modules, ie: git-clone waiting on git-config, jetbrains waiting on git-clone etc..

It was only done for testing purposes with our dogfood template.

I plan to come to this once I find some time. The idea is to leave the DE installation to image and only check for compatible ones. Also, I will make the script general enough to be installable on all enterprise-friendly distros.

phorcys420 commented 1 month ago

@matifali

Here's what happens when I install the KasmVNC module in my uwu/basic-env template. I think it's due to the fact that Kasm thinks vncserver being installed means KasmVNC is.

Detected Distribution: ubuntu
Detected Version: 24.04
Detected Architecture: x86_64
vncserver is already installed.
vncserver already installed. Skipping installation.
bash: line 1: /etc/kasmvnc/kasmvnc.yaml: No such file or directory
🚀 Starting KasmVNC server...
Usage: vncpasswd [FILE]
       vncpasswd -t

I will retry with a template that doesn't have VNC but it looks good to me other than that.

matifali commented 1 month ago

Yes. The command that gets installed by kasmVNC is also vncserver.

matifali commented 1 month ago

I still need to update the READEME to mention our desktop image. Then I will merge.