Skip to content

Rename default agent to "main" instead of "dev" #3150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/dotfiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ variable "dotfiles_uri" {
default = ""
}

resource "coder_agent" "dev" {
resource "coder_agent" "main" {
...
startup_script = var.dotfiles_uri != "" ? "coder dotfiles -y ${var.dotfiles_uri}" : null
}
Expand All @@ -41,7 +41,7 @@ In such cases:
- Set the `startup_script` to call a `~/personalize` script that the user can edit

```hcl
resource "coder_agent" "dev" {
resource "coder_agent" "main" {
...
startup_script = "/home/coder/personalize"
}
Expand Down
10 changes: 1 addition & 9 deletions docs/ides/configuring-web-ides.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ vim main.tf
```

```hcl
resource "coder_agent" "dev" {
resource "coder_agent" "main" {
arch = "amd64"
os = "linux"
startup_script = <<EOF
Expand Down Expand Up @@ -80,7 +80,6 @@ resource "coder_app" "code-server" {
If the code-server integrated terminal fails to load, (i.e., xterm fails to load), go to DevTools to ensure xterm is loaded, clear your browser cache and refresh.
</blockquote>


## VNC Desktop

![VNC Desktop in Coder](../images/vnc-desktop.png)
Expand Down Expand Up @@ -116,7 +115,6 @@ Workspace requirements:
- JetBrains projector CLI
- At least 4 CPU cores and 4 GB RAM


- CLion
- pyCharm
- DataGrip
Expand All @@ -130,13 +128,10 @@ Workspace requirements:
- WebStorm
- ➕ code-server (just in case!)


For advanced users who want to make a custom image, you can install the Projector CLI in the `startup_script` of the `coder_agent` resource in a Coder template. Using the Projector CLI, you can use `projector ide autoinstall` and `projector run` to download and start a JetBrains IDE in your workspace.


![IntelliJ in Coder](../images/projector-intellij.png)


In this example, the version of JetBrains IntelliJ IDE is passed in from a Terraform input variable. You create a JetBrains icon in the workspace using a `coder_app` resource.

> There is a known issue passing query string parameters when opening a JetBrains IDE from an icon in your workspace ([#2669](https://github.com/coder/coder/issues/2669)). Note the `grep` statement to remove an optional password token from the configuration so a query string parameter is not passed.
Expand Down Expand Up @@ -205,7 +200,6 @@ resource "coder_app" "intellij" {
}
```


**Pre-built templates:**

You can also reference/use to these pre-built templates with JetBrains projector:
Expand All @@ -224,8 +218,6 @@ You can also reference/use to these pre-built templates with JetBrains projector

> Coder OSS currently does not perform a health check([#2662](https://github.com/coder/coder/issues/2662)) that any IDE or commands in the `startup_script` have completed, so wait a minute or so before opening the JetBrains or code-server icons. As a precaution, you can open Terminal and run `htop` to see if the processes have completed.



## JupyterLab

Configure your agent and `coder_app` like so to use Jupyter:
Expand Down
2 changes: 1 addition & 1 deletion docs/secrets.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ resource "twilio_iam_api_key" "api_key" {
friendly_name = "Test API Key"
}

resource "coder_agent" "dev" {
resource "coder_agent" "main" {
# ...
env = {
# Let users access the secret via $TWILIO_API_SECRET
Expand Down
2 changes: 1 addition & 1 deletion docs/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ sets a few environment variables based on the username and email address of the
that you can make Git commits immediately without any manual configuration:

```tf
resource "coder_agent" "dev" {
resource "coder_agent" "main" {
# ...
env = {
GIT_AUTHOR_NAME = "${data.coder_workspace.me.owner}"
Expand Down
2 changes: 1 addition & 1 deletion dogfood/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ provider "coder" {
data "coder_workspace" "me" {
}

resource "coder_agent" "dev" {
resource "coder_agent" "main" {
arch = "amd64"
os = "linux"
startup_script = <<EOF
Expand Down
2 changes: 1 addition & 1 deletion examples/templates/aws-linux/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ data "aws_ami" "ubuntu" {
owners = ["099720109477"] # Canonical
}

resource "coder_agent" "dev" {
resource "coder_agent" "main" {
arch = "amd64"
auth = "aws-instance-identity"
os = "linux"
Expand Down
2 changes: 1 addition & 1 deletion examples/templates/aws-windows/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ data "aws_ami" "windows" {
}
}

resource "coder_agent" "dev" {
resource "coder_agent" "main" {
arch = "amd64"
auth = "aws-instance-identity"
os = "windows"
Expand Down
2 changes: 1 addition & 1 deletion examples/templates/do-linux/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ provider "digitalocean" {

data "coder_workspace" "me" {}

resource "coder_agent" "dev" {
resource "coder_agent" "main" {
os = "linux"
arch = "amd64"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/templates/docker-code-server/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ provider "docker" {
data "coder_workspace" "me" {
}

resource "coder_agent" "dev" {
resource "coder_agent" "main" {
arch = var.docker_arch
os = "linux"
startup_script = "code-server --auth none"
Expand Down
2 changes: 1 addition & 1 deletion examples/templates/docker-image-builds/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ provider "coder" {
data "coder_workspace" "me" {
}

resource "coder_agent" "dev" {
resource "coder_agent" "main" {
arch = var.step2_arch
os = "linux"
}
Expand Down
6 changes: 3 additions & 3 deletions examples/templates/docker-with-dotfiles/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Develop in Docker with a dotfiles URL
description: Run workspaces on a Docker host using registry images
description: Run workspaces on a Docker host using registry images
tags: [local, docker]
---

Expand All @@ -10,7 +10,7 @@ This is an example for deploying workspaces with a prompt for the users' dotfile

## Getting started

Run `coder templates init` and select this template. Follow the instructions that appear.
Run `coder templates init` and select this template. Follow the instructions that appear.

## How it works

Expand All @@ -27,7 +27,7 @@ variable "dotfiles_uri" {
default = ""
}

resource "coder_agent" "dev" {
resource "coder_agent" "main" {
...
startup_script = var.dotfiles_uri != "" ? "/tmp/tmp.coder*/coder dotfiles -y ${var.dotfiles_uri}" : null
}
Expand Down
2 changes: 1 addition & 1 deletion examples/templates/docker-with-dotfiles/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ variable "dotfiles_uri" {
default = ""
}

resource "coder_agent" "dev" {
resource "coder_agent" "main" {
arch = "amd64"
os = "linux"
startup_script = var.dotfiles_uri != "" ? "coder dotfiles -y ${var.dotfiles_uri}" : null
Expand Down
2 changes: 1 addition & 1 deletion examples/templates/docker/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ provider "coder" {
data "coder_workspace" "me" {
}

resource "coder_agent" "dev" {
resource "coder_agent" "main" {
arch = var.step2_arch
os = "linux"
startup_script = <<EOF
Expand Down
2 changes: 1 addition & 1 deletion examples/templates/gcp-linux/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ resource "google_compute_disk" "root" {
}
}

resource "coder_agent" "dev" {
resource "coder_agent" "main" {
auth = "google-instance-identity"
arch = "amd64"
os = "linux"
Expand Down
2 changes: 1 addition & 1 deletion examples/templates/gcp-vm-container/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ data "google_compute_default_service_account" "default" {
data "coder_workspace" "me" {
}

resource "coder_agent" "dev" {
resource "coder_agent" "main" {
auth = "google-instance-identity"
arch = "amd64"
os = "linux"
Expand Down
2 changes: 1 addition & 1 deletion examples/templates/gcp-windows/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ resource "google_compute_disk" "root" {
}
}

resource "coder_agent" "dev" {
resource "coder_agent" "main" {
auth = "google-instance-identity"
arch = "amd64"
os = "windows"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ terraform {
}
}

resource "coder_agent" "dev" {
resource "coder_agent" "main" {
os = "linux"
arch = "amd64"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ terraform {
}
}

resource "coder_agent" "dev" {
resource "coder_agent" "main" {
os = "linux"
arch = "amd64"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ terraform {
}
}

resource "coder_agent" "dev" {
resource "coder_agent" "main" {
os = "linux"
arch = "amd64"
}
Expand Down
2 changes: 1 addition & 1 deletion provisioner/terraform/testdata/instance-id/instance-id.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ terraform {
}
}

resource "coder_agent" "dev" {
resource "coder_agent" "main" {
os = "linux"
arch = "amd64"
auth = "google-instance-identity"
Expand Down