Skip to content

Commit ea10443

Browse files
committed
aws start
1 parent 02a4282 commit ea10443

File tree

6 files changed

+21
-3
lines changed

6 files changed

+21
-3
lines changed
208 KB
Loading

examples/templates/aws-linux/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,13 @@ instances provisioned by Coder:
7474
`code-server` is installed via the `startup_script` argument in the `coder_agent`
7575
resource block. The `coder_app` resource is defined to access `code-server` through
7676
the dashboard UI over `localhost:13337`.
77+
78+
### Agent is stuck "connecting" or "disconnected"
79+
80+
This often occurs when the EC2 instance cannot reach your Coder access URL. If you are not using Coder's [public tunnel](https://coder.com/docs/coder-oss/latest/admin/configure#tunnel), you must [configure your access URL](https://coder.com/docs/coder-oss/latest/admin/configure#access-url) as a public address or one within the same VPC as workspaces.
81+
82+
You can also troubleshoot by connecting directly into the instance and checking the agent logs. First, log in to the [AWS Console](https://console.aws.amazon.com) and create a security group that permits inbound SSH.
83+
84+
```sh
85+
cat /tmp/coder-agent.log
86+
```

examples/templates/aws-linux/main.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ users:
124124
- name: ${local.linux_user}
125125
sudo: ALL=(ALL) NOPASSWD:ALL
126126
shell: /bin/bash
127+
# Uncomment to add SSH public key for debugging
128+
# ssh-authorized-keys:
129+
# - ssh-rsa ...
127130
128131
--//
129132
Content-Type: text/x-shellscript; charset="us-ascii"
@@ -176,6 +179,8 @@ resource "aws_instance" "dev" {
176179
# Required if you are using our example policy, see template README
177180
Coder_Provisioned = "true"
178181
}
182+
# Uncomment to enable SSH access for debugging
183+
# security_groups = ["coder_debug"]
179184
}
180185

181186
resource "coder_metadata" "workspace_info" {

examples/templates/docker/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ add the following features to your Coder template:
5454

5555
### Agent is stuck "connecting" or "disconnected"
5656

57-
This often occurs because the container cannot reach your [access URL](https://coder.com/docs/coder-oss/latest/admin/configure#access-url). The container may also be missing `curl` which is required to download the agent.
57+
This often occurs when the container cannot reach your [access URL](https://coder.com/docs/coder-oss/latest/admin/configure#access-url). The container may also be missing `curl` which is required to download the agent.
5858

5959
First, check the logs of the container:
6060

examples/templates/gcp-linux/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ the dashboard UI over `localhost:13337`.
5454

5555
### Agent is stuck "connecting" or "disconnected"
5656

57-
This often occurs because the virtual machine cannot reach your Coder access URL. If you are not using Coder's [public tunnel](https://coder.com/docs/coder-oss/latest/admin/configure#tunnel), you must [configure your access URL](https://coder.com/docs/coder-oss/latest/admin/configure#access-url) as a public address or one within the same VPC as workspaces.
57+
This often occurs when the virtual machine cannot reach your Coder access URL. If you are not using Coder's [public tunnel](https://coder.com/docs/coder-oss/latest/admin/configure#tunnel), you must [configure your access URL](https://coder.com/docs/coder-oss/latest/admin/configure#access-url) as a public address or one within the same VPC as workspaces.
5858

5959
You can also use the SSH console to log into the VM and check the agent logs.
6060

examples/templates/gcp-linux/main.tf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
coder = {
44
source = "coder/coder"
5-
version = "0.6.0"
5+
version = "0.6.3"
66
}
77
google = {
88
source = "hashicorp/google"
@@ -56,6 +56,9 @@ resource "coder_agent" "main" {
5656
curl -fsSL https://code-server.dev/install.sh | sh | tee code-server-install.log
5757
code-server --auth none --port 13337 | tee code-server-install.log &
5858
EOT
59+
60+
connection_timeout = 20
61+
troubleshooting_url = "https://github.com/coder/coder/tree/main/examples/templates/gcp-linux#troubleshooting"
5962
}
6063

6164
# code-server

0 commit comments

Comments
 (0)