TestAgent/StartupScript (#1726)
```
$ go test ./agent/ -v -run TestAgent/StartupScript -count 1
=== RUN TestAgent
=== PAUSE TestAgent
=== CONT TestAgent
=== RUN TestAgent/StartupScript
=== PAUSE TestAgent/StartupScript
=== CONT TestAgent/StartupScript
t.go:56: 2022-05-24 20:22:39.648 [INFO] <agent.go:112> connected
--- PASS: TestAgent (0.00s)
--- PASS: TestAgent/StartupScript (0.17s)
PASS
panic: Log in goroutine after TestAgent/StartupScript has completed: 2022-05-24 20:22:39.651 [WARN] <agent.go:130> agent script failed ...
"error": run:
github.com/coder/coder/agent.(*agent).runStartupScript
/home/colin/Projects/coder/coder/agent/agent.go:183
- signal: killed
```
Coder
Team-wide CLI for spawning up dev servers on demand, powered by Terraform.
Highlights
Workspaces:
- Code on powerful servers: leverage cloud GPU, GPU, and network speeds
- Use the
coderCLI: connect via SSH, VS Code, and JetBrains - Self-serve workspaces: start from team-wide templates (see below)
Templates:
- Manage the infrastructure behind workspaces with standard Terraform (
.hclfiles) - Use any OS and architecture: Mac, Windows, Linux, VM, Kubernetes, ARM, etc
- Auto-shutdown or update workspaces when they're not in use!
Installing Coder
We recommend installing the latest release on a system with at least 1 CPU core and 2 GB RAM:
- Download the release appropriate for your operating system
- Unzip the folder you just downloaded, and move the
coderexecutable to a location that's on yourPATH
Make sure you have the appropriate credentials for your cloud provider (e.g., access key ID and secret access key for AWS).
You can set up a temporary deployment, a production deployment, or a system service:
-
To set up a temporary deployment, start with dev mode (all data is in-memory and is destroyed on exit):
coder server --dev -
To run a production deployment with PostgreSQL:
CODER_PG_CONNECTION_URL="postgres://<username>@<host>/<database>?password=<password>" \ coder server -
To run as a system service, install with
.deb(Debian, Ubuntu) or.rpm(Fedora, CentOS, RHEL, SUSE):# Edit the configuration! sudo vim /etc/coder.d/coder.env sudo service coder restart
Use
coder --helpto get a complete list of flags and environment variables.
See the installation guide for additional ways to deploy Coder.
Creating your first template and workspace
In a new terminal window, run the following to copy a sample template:
coder templates init
Follow the CLI instructions to modify and create the template specific for your usage (e.g., a template to Develop in Linux on Google Cloud).
Create a workspace using your template:
coder create --template="yourTemplate" <workspaceName>
Connect to your workspace via SSH:
coder ssh <workspaceName>
Modifying templates
You can edit the Terraform template using a sample template:
coder templates init
cd gcp-linux/
vim main.tf
coder templates update gcp-linux
Documentation
Contributing
Read the contributing docs.
Contributors
Find our list of contributors here.
