Skip to content

Commit 2012b8c

Browse files
authored
fix: add terraform installation step to fix initial coder boot issue, fixes #81 (#82)
1 parent 0e11de7 commit 2012b8c

1 file changed

Lines changed: 36 additions & 6 deletions

File tree

docs/admin/server-setup.md

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ The full stack requires:
1010
3. Sysbox — for safe nested Docker inside workspaces
1111
4. PostgreSQL — for Coder's database (required for multi-server HA)
1212
5. TLS certificate — via Let's Encrypt DNS challenge
13-
6. Coder server — the control plane
14-
7. This template — deployed to Coder
13+
6. Terraform — required before installing Coder (workaround for a Coder install bug)
14+
7. Coder server — the control plane
15+
8. This template — deployed to Coder
1516

1617
---
1718

@@ -300,7 +301,36 @@ If you're migrating an existing DNS name (e.g., `coder.ddev.com`) from another s
300301

301302
---
302303

303-
## Step 6: Install Coder
304+
## Step 6: Install Terraform
305+
306+
Coder attempts to install Terraform automatically on first boot, but this fails due to a bug ([coder/coder#24578](https://github.com/coder/coder/issues/24578)). Install Terraform manually beforehand to work around it.
307+
308+
```bash
309+
# Install prerequisites
310+
sudo apt-get update && sudo apt-get install -y gnupg software-properties-common
311+
312+
# Add HashiCorp's GPG key
313+
wget -O- https://apt.releases.hashicorp.com/gpg | \
314+
gpg --dearmor | \
315+
sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg > /dev/null
316+
317+
# Add the official HashiCorp apt repository
318+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \
319+
https://apt.releases.hashicorp.com \
320+
$(grep -oP '(?<=UBUNTU_CODENAME=).*' /etc/os-release || lsb_release -cs) main" | \
321+
sudo tee /etc/apt/sources.list.d/hashicorp.list
322+
323+
# Install Terraform
324+
sudo apt-get update
325+
sudo apt-get install -y terraform
326+
327+
# Verify
328+
terraform --version
329+
```
330+
331+
---
332+
333+
## Step 7: Install Coder
304334

305335
### Install the binary
306336

@@ -439,7 +469,7 @@ There is also a toggle in the Coder admin UI at **Admin → Security** that can
439469
440470
---
441471
442-
## Step 7: Deploy the DDEV Template
472+
## Step 8: Deploy the DDEV Template
443473
444474
With Coder running and the CLI authenticated, follow the [Operations Guide](./operations-guide.md) to build the Docker image and push the template.
445475
@@ -456,7 +486,7 @@ make deploy-user-defined-web
456486
457487
---
458488
459-
## Step 8: Set Up the Drupal Core Seed Cache (optional, highly recommended)
489+
## Step 9: Set Up the Drupal Core Seed Cache (optional, highly recommended)
460490
461491
The `drupal-core` template can provision a fully configured Drupal core development environment on new workspaces using a **seed cache** on the host. Without the cache, first-time workspace setup downloads a full git clone and all composer dependencies (~10-13 minutes). With the cache, the install phase drops to ~15 seconds, and total workspace startup is about a minute.
462492
@@ -605,7 +635,7 @@ ddev logs # check container logs for errors
605635
606636
---
607637
608-
## Step 9: Set Up Discord Notifications
638+
## Step 10: Set Up Discord Notifications
609639
610640
Coder can send webhook notifications to Discord for events like new user signups, workspace creation/deletion, and workspace health alerts. This uses a small relay service that translates Coder's webhook format to Discord's.
611641

0 commit comments

Comments
 (0)