Workspace not loading properly

Tried installing both stable and mainline but no change, reinstalling everything, i first thought it was my tunnel over cloudflare, so i disabled it and tried using the tunnel generated by the application, but no success
No description
26 Replies
Thomas Vaz
Thomas VazOP2w ago
Im using the scratch template with no changes. Tried installing both stable and mainline but no change, reinstalling everything, i first thought it was my tunnel over cloudflare, so i disabled it and tried using the tunnel generated by the application, but no success
Codercord
Codercord2w ago
Codercord
Codercord2w ago
<#1406044061214707822>
Category
Help needed
Product
Coder (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
Ethan
Ethan2w ago
The scratch template is meant as a starting point, so it doesn't actually do anything, in terms of provisioning compute, by itself Maybe the docker template is what you're looking for?
Thomas Vaz
Thomas VazOP2w ago
So the scratch template does not generate not even a terminal or a vscode web instance?
Thomas Vaz
Thomas VazOP2w ago
Even when i add Jetbrains to the template it does not shows up at the workspace menu
No description
Thomas Vaz
Thomas VazOP2w ago
It stays like that
No description
Thomas Vaz
Thomas VazOP2w ago
terraform { required_providers { coder = { source = "coder/coder" } } } data "coder_provisioner" "me" {} data "coder_workspace" "me" {} resource "coder_agent" "main" { arch = data.coder_provisioner.me.arch os = data.coder_provisioner.me.os metadata { display_name = "CPU Usage" key = "0_cpu_usage" script = "coder stat cpu" interval = 10 timeout = 1 } metadata { display_name = "RAM Usage" key = "1_ram_usage" script = "coder stat mem" interval = 10 timeout = 1 } } Use this to set environment variables in your workspace details: https://registry.terraform.io/providers/coder/coder/latest/docs/resources/env resource "coder_env" "welcome_message" { agent_id = coder_agent.main.id name = "WELCOME_MESSAGE" value = "Welcome to your Coder workspace!" } Adds code-server See all available modules at https://registry.coder.com/modules module "code-server" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/code-server/coder" # This ensures that the latest non-breaking version of the module gets downloaded, you can also pin the module version to prevent breaking changes in production. version = "~> 1.0" agent_id = coder_agent.main.id } module "jetbrains_gateway" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/jetbrains-gateway/coder" version = "1.2.2" agent_id = coder_agent.main.id folder = "/home/coder/jetbrain" jetbrains_ides = ["CL", "GO", "IU", "PY", "WS"] default = "IU" } Runs a script at workspace start/stop or on a cron schedule details: https://registry.terraform.io/providers/coder/coder/latest/docs/resources/script resource "coder_script" "startup_script" { agent_id = coder_agent.main.id display_name = "Startup Script" script = <<-EOF #!/bin/sh set -e # Run programs at workspace startup EOF run_on_start = true start_blocks_login = true }
Ethan
Ethan2w ago
you haven't specified where that compute should exist, i.e. an AWS VM, a Docker container, etc
Thomas Vaz
Thomas VazOP2w ago
more specifically, im trying to run coder on a proxmox LXC, no other services included I thought coder would create an inviroment that i can develop inside Like a small project not obligatory on a docker
Ethan
Ethan2w ago
Coder workspaces create only what you declare in the Terraform template I'm not really familiar with proxmox LXC, but it looks like there's a Terraform provider for it
Thomas Vaz
Thomas VazOP2w ago
do you think its easier to work with docker insted?
Ethan
Ethan2w ago
We definitely have lots of documentation for creating Docker workspaces on Coder
Thomas Vaz
Thomas VazOP2w ago
prolly more than on LXC
Ethan
Ethan2w ago
but the idea is Coder lets you provision workspaces using any compute you can define in Terraform
Thomas Vaz
Thomas VazOP2w ago
I will try, its the first time im using Terraform the idea is to create a workspace to each of my uni Projects
Ethan
Ethan2w ago
This is likely super outdated, but I found a template online for provisioning proxmox VMs https://github.com/bpmct/coder-templates/tree/main/proxmox-vm
Thomas Vaz
Thomas VazOP2w ago
and to be able to remotely code on a code-server, but i need that each workspace should not see each others files
Ethan
Ethan2w ago
It sounds like that's seperate from what you're using though?
Thomas Vaz
Thomas VazOP2w ago
ohh thankss Sry, i didnt understant
Ethan
Ethan2w ago
My advice would be to try and adapt this guide to use a LXC resource instead of a Docker container: https://registry.terraform.io/providers/Terraform-for-Proxmox/proxmox/latest/docs/resources/lxc
Ethan
Ethan2w ago
It will require a bit of work on your part to understand the Terraform, sorry we don't have any documentation/guides/existing templates for proxmox LXC
Thomas Vaz
Thomas VazOP2w ago
it seems like its trying to create a new LXC to each wokspace
Ethan
Ethan2w ago
yeah Coder doesn't have like, a built-in way to containerize workspaces
Thomas Vaz
Thomas VazOP2w ago
yeah that's not really my objective with coder because the machine that i use does not have that much RAM, but ill try with the docker part yeah, its what i thought that Coder did on the first place No problem, its not a really used OS outside of homelab stuff but thanks for the help Ethan, ill try using the docker part, if it does not work seems like Coder just isnt my thing

Did you find this page helpful?