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
Server Log show
provisionerd-vscode-server-1.runner: parse dry-run provision successful job_id=b1585d39-3b43-44a5-8f2a-a343299ced8e resource_count=6
it success on dry run
but it error on the end
provisionerd-vscode-server-1.runner: sending CompletedJob failed job_id=b1585d39-3b43-44a5-8f2a-a343299ced8e ...Feb 22 02:34:34 vscode-server coder[273433]: error= insert resource: duplicate app slug, must be unique per template: "code-server-backend"log on coder client === β Detecting ephemeral resources [1341ms]==> β§ Cleaning Up=== β Cleaning Up [5416ms]=== β Cleaning Up [5511ms]Encountered an error running "coder templates push"internal provisionerserver error
here template config on agent and app
resource"coder_agent""backend" {
arch=data.coder_provisioner.me.archos="linux"startup_script=<<-EOT set -e # install and start code-server curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server --version 4.19.1 /tmp/code-server/bin/code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 & EOTenv={
GIT_AUTHOR_NAME =coalesce(data.coder_workspace.me.owner_name, data.coder_workspace.me.owner)
GIT_AUTHOR_EMAIL ="${data.coder_workspace.me.owner_email}"
GIT_COMMITTER_NAME =coalesce(data.coder_workspace.me.owner_name, data.coder_workspace.me.owner)
GIT_COMMITTER_EMAIL ="${data.coder_workspace.me.owner_email}"
}
metadata {
display_name="CPU Usage"key="0_cpu_usage"script="coder stat cpu"interval=10timeout=1
}
metadata {
display_name="RAM Usage"key="1_ram_usage"script="coder stat mem"interval=10timeout=1
}
metadata {
display_name="Home Disk"key="3_home_disk"script="coder stat disk --path $${HOME}"interval=60timeout=1
}
metadata {
display_name="CPU Usage (Host)"key="4_cpu_usage_host"script="coder stat cpu --host"interval=10timeout=1
}
metadata {
display_name="Memory Usage (Host)"key="5_mem_usage_host"script="coder stat mem --host"interval=10timeout=1
}
metadata {
display_name="Load Average (Host)"key="6_load_host"# get load avg scaled by number of coresscript=<<EOT echo "`cat /proc/loadavg | awk '{ print $1 }'` `nproc`" | awk '{ printf "%0.2f", $1/$2 }' EOTinterval=60timeout=1
}
metadata {
display_name="Swap Usage (Host)"key="7_swap_host"script=<<EOT free -b | awk '/^Swap/ { printf("%.1f/%.1f", $3/1024.0/1024.0/1024.0, $2/1024.0/1024.0/1024.0) }' EOTinterval=10timeout=1
}
}
# I commented out add coder_app it can push# resource "coder_app" "code-server-backend" {# agent_id = coder_agent.backend.id# slug = "code-server-${coder_agent.backend.id}"# display_name = "code-server"# url = "http://localhost:13337/?folder=/home/${local.username}"# icon = "/icon/code.svg"# subdomain = false# share = "owner"# healthcheck {# url = "http://localhost:13337/healthz"# interval = 5# threshold = 6# }# }`
Other agent
`resource"coder_agent""frontend" {
arch=data.coder_provisioner.me.archos="linux"startup_script=<<-EOT set -e # install and start code-server curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server --version 4.19.1 /tmp/code-server/bin/code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 & EOTenv={
GIT_AUTHOR_NAME =coalesce(data.coder_workspace.me.owner_name, data.coder_workspace.me.owner)
GIT_AUTHOR_EMAIL ="${data.coder_workspace.me.owner_email}"
GIT_COMMITTER_NAME =coalesce(data.coder_workspace.me.owner_name, data.coder_workspace.me.owner)
GIT_COMMITTER_EMAIL ="${data.coder_workspace.me.owner_email}"
}
metadata {
display_name="CPU Usage"key="0_cpu_usage"script="coder stat cpu"interval=10timeout=1
}
metadata {
display_name="RAM Usage"key="1_ram_usage"script="coder stat mem"interval=10timeout=1
}
metadata {
display_name="Home Disk"key="3_home_disk"script="coder stat disk --path $${HOME}"interval=60timeout=1
}
metadata {
display_name="CPU Usage (Host)"key="4_cpu_usage_host"script="coder stat cpu --host"interval=10timeout=1
}
metadata {
display_name="Memory Usage (Host)"key="5_mem_usage_host"script="coder stat mem --host"interval=10timeout=1
}
metadata {
display_name="Load Average (Host)"key="6_load_host"# get load avg scaled by number of coresscript=<<EOT echo "`cat /proc/loadavg | awk '{ print $1 }'` `nproc`" | awk '{ printf "%0.2f", $1/$2 }' EOTinterval=60timeout=1
}
metadata {
display_name="Swap Usage (Host)"key="7_swap_host"script=<<EOT free -b | awk '/^Swap/ { printf("%.1f/%.1f", $3/1024.0/1024.0/1024.0, $2/1024.0/1024.0/1024.0) }' EOTinterval=10timeout=1
}
}
# resource "coder_app" "code-server-frontend" {# agent_id = coder_agent.frontend.id# slug = "code-server-${coder_agent.frontend.id}"# display_name = "code-server"# url = "http://localhost:13337/?folder=/home/${local.username}"# icon = "/icon/code.svg"# subdomain = false# share = "owner"# healthcheck {# url = "http://localhost:13337/healthz"# interval = 5# threshold = 6# }# }
I try to run multi docker_container and attachment multiple agent to container
If I comment all coder_app out it can create template and start workspace on this template and access it by ssh
but it cannot open code-server web ide
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Server Log show
provisionerd-vscode-server-1.runner: parse dry-run provision successful job_id=b1585d39-3b43-44a5-8f2a-a343299ced8e resource_count=6
it success on dry run
but it error on the end
here template config on agent and app
I try to run multi docker_container and attachment multiple agent to container
If I comment all coder_app out it can create template and start workspace on this template and access it by ssh
but it cannot open code-server web ide
how can I fix this
please help
Beta Was this translation helpful? Give feedback.
All reactions