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

Resolves #3143
This commit is contained in:
Ammar Bandukwala 2022-07-23 15:26:56 -05:00 committed by GitHub
parent 257e52e014
commit f28d14197a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 23 additions and 31 deletions

View File

@ -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
}
@ -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"
}

View File

@ -38,7 +38,7 @@ vim main.tf
```
```hcl
resource "coder_agent" "dev" {
resource "coder_agent" "main" {
arch = "amd64"
os = "linux"
startup_script = <<EOF
@ -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)
@ -116,7 +115,6 @@ Workspace requirements:
- JetBrains projector CLI
- At least 4 CPU cores and 4 GB RAM
- CLion
- pyCharm
- DataGrip
@ -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.
@ -205,7 +200,6 @@ resource "coder_app" "intellij" {
}
```
**Pre-built templates:**
You can also reference/use to these pre-built templates with JetBrains projector:
@ -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:

View File

@ -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

View File

@ -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}"

View File

@ -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

View File

@ -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"

View File

@ -69,7 +69,7 @@ data "aws_ami" "windows" {
}
}
resource "coder_agent" "dev" {
resource "coder_agent" "main" {
arch = "amd64"
auth = "aws-instance-identity"
os = "windows"

View File

@ -93,7 +93,7 @@ provider "digitalocean" {
data "coder_workspace" "me" {}
resource "coder_agent" "dev" {
resource "coder_agent" "main" {
os = "linux"
arch = "amd64"
}

View File

@ -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"

View File

@ -60,7 +60,7 @@ provider "coder" {
data "coder_workspace" "me" {
}
resource "coder_agent" "dev" {
resource "coder_agent" "main" {
arch = var.step2_arch
os = "linux"
}

View File

@ -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]
---
@ -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
@ -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
}

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -7,7 +7,7 @@ terraform {
}
}
resource "coder_agent" "dev" {
resource "coder_agent" "main" {
os = "linux"
arch = "amd64"
}

View File

@ -7,7 +7,7 @@ terraform {
}
}
resource "coder_agent" "dev" {
resource "coder_agent" "main" {
os = "linux"
arch = "amd64"
}

View File

@ -7,7 +7,7 @@ terraform {
}
}
resource "coder_agent" "dev" {
resource "coder_agent" "main" {
os = "linux"
arch = "amd64"
}

View File

@ -7,7 +7,7 @@ terraform {
}
}
resource "coder_agent" "dev" {
resource "coder_agent" "main" {
os = "linux"
arch = "amd64"
auth = "google-instance-identity"