[RESOLVED] Having issues getting coder_apps to appear in my Workspace
Hello, I have been familiarizing myself with Coder the past few days, and it is fantastic. I just have one thing that I'm getting pretty stuck on and I'm hoping that I can get some help. I am using the guacamole terraform provider by techBeck03, and it creates a guacamole connection that I can connect to at
https://guac.example.com/#/client/abcxyz
. I am trying to get that URL as a clickable link on my Coder Workspace, but I can't seem to figure out how to get it to appear. It seems logical that I could create a coder_app
resource with the url set to the desired URL and external=true
. While building the template doesn't give me issues, it doesn't actually display it anywhere.
This is the primary reference material I am looking at:
https://coder.com/docs/v2/latest/ides/web-ides
I believe that the major disconnect is coming from how my resource is displayed in the Workspace, as I'm not using (what appears to be Kubernetes) in my workspace, I am using libvirt via dmacvicar's libvirt terraform provider.
EDIT: It turns out that functionality of ALL coder_app's is dependent on the coder-agent being present on the terraform resources VMs, containers, etc. This apparently includes external apps.Web IDEs - Coder v2 Docs
Learn how to configure web IDEs in your templates
24 Replies
<#1178416549820895282>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
Can you share the template?
Discord won't let me send it as one message, so I'm going to have to split it across a few...
...snip...
...snip...
In the above example, I would like resource.coder_app.guacamole to appear anywhere on the workspace, and it seems like it would appear near the resource.coder_agent.main, but it doesn't appear anywhere.
I was looking at it again, and there were quite a few irrelevant lines in there. I condensed it down to show a more direct example.
If you open
https://guacamole.example.com/#/"
in your browser can you accesss the rdp desktop?Not quite, but it would achieve the same functionality. That url is just a url. It doesn't matter if it's guacamole, Google, whatever, just trying to get a button with a link to appear. The garbage up in coder_metadata.deployment is the actual code that generates the actual URL needed to drop right into RDP. It works as a stop gap because I can just click that metadata item to copy it, open a new tab, and paste it in the address bar.
hey @bamhm182 (BytePen) you could post the template as a file otherwise
i'm looking into your issue on my end, it seems that there's no issue with your template
I have a bunch of stuff that isn't relevant. I will get a simple example together and upload a file with screenshots.
yeah, the only relevant part should be
it's just that having the entire template is almost always better to help not missing out on stuff :-)
For sure. I appreciate it. I'm going to generate a template with digital ocean, since that should be easy to wholly recreate on your end.
honestly don't bother, it should definitely show up with any provider
do you have multiple
coder_agent
s declared by any chance ?Yeah, that's why I figured I'd create a simple one that you'd be able to replicate without having to have a libvirt host.
what coder version are you running ?
v2.4.0+d19a762
I just have a single coder_agent
I bailed on creating a new DO template and just uploaded the libvirt one I'm using. Then I had the idea to modify my existing one to include the exact same discord coder_app (copy-pasted) that I have in my libvirt template. For some reason it works there...
Actually, I'm having some issues with DO as well... Let me track down some issues that may or may not be related and follow up in a minute.
hey, I do get the guacamole app to show up when using the exact same app definition
@bamhm182 (BytePen)
Okay... There must be something weird going on with my setup, then...
I think that rather than blindly displaying the links, Coder does some sort of check, and if it fails, it doesn't display the link. I say this because my DO template has issues displaying the CPU/Disk/RAM metadata, and the Discord button appears to try and load as part of the same logic.
is the web terminal accessible ?
if it isn't then your issue would make sense
oh yeah, i just looked at your template
the coder agent has to run within the container/vm for anything to work properly
otherwise it's just gonna load indefinitely
That makes sense. I wasn't tracking there was a coder agent until right now. The external coder_app's require that coder-agent as well?
It would appear that the other part of my problems exist due to flaky networking. I thought I had my podman networking figured out, but it looks like it's still not quite there.
i'm not sure if you can do so using a vm, but you have to somehow get the script running
wrong reply sorry
but yes they do, because the web page's logic is to only show this part of the ui when the agent is reachable
in your case, the script is accessible in the
coder_agent.main.init_script
That's kind of annoying, but also makes a lot of sense...
Also, that explains why I can't get DO to work. Looking at the init script, it calls back to your coder instance to set up the service. Considering DO can't resolve my domain, it isn't able to set it up.
indeed!
I appreciate all of your help! I think I'm going to just stick with the currently implemented functionality to create the URL I can copy paste into a new tab for now
@Phorcys closed the thread.