From 730219b8618829b51543639d4caf508607c56676 Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 3 Nov 2022 17:44:36 +0000 Subject: [PATCH 1/4] docs: consolidate docker quickstarts --- docs/manifest.json | 6 ++-- docs/quickstart.md | 69 +++------------------------------------ docs/quickstart/docker.md | 35 ++++++++++++-------- 3 files changed, 29 insertions(+), 81 deletions(-) diff --git a/docs/manifest.json b/docs/manifest.json index 38105a2791f1e..40d03779a0a45 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -76,19 +76,19 @@ }, { "title": "Google Cloud Platform", - "description": "Setup Coder with Google Cloud Platform", + "description": "Setup Coder on a GCP Compute Engine VM", "icon_path": "./images/google-cloud.svg", "path": "./quickstart/google-cloud-platform.md" }, { "title": "AWS", - "description": "Setup Coder with AWS", + "description": "Setup Coder on an AWS EC2 VM", "icon_path": "./images/aws.svg", "path": "./quickstart/aws.md" }, { "title": "Azure", - "description": "Setup Coder with Azure", + "description": "Setup Coder on an Azure VM", "icon_path": "./images/azure.svg", "path": "./quickstart/azure.md" } diff --git a/docs/quickstart.md b/docs/quickstart.md index 68310a99509a3..6b1582da4b9be 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -1,68 +1,9 @@ # Quickstart -See our [Docker quickstart](./quickstart/docker.md) for the easiest -possible way to use Coder. +Quickstarts are the fastest way to try Coder. We'll walk you through installation and adding your first template and workspace. -## Generic Quickstart +First, pick a platform: -Please [install Coder](./install/index.md) before proceeding with the steps below. - -## First time owner user setup - -1. Run `coder login ` in a new terminal and follow the - interactive instructions to create your owner user and password. - -## Templates - -To get started using templates, run the following command to generate a sample template: - -```bash -coder templates init -``` - -Follow the CLI instructions to select an example that you can modify for your -specific usage (e.g., a template to **Develop code-server in Docker**): - -1. Navigate into your new templates folder and create your first template using - the provided command (e.g., `cd ./docker-code-server && coder templates create`) - -1. Answer the CLI prompts; when done, confirm that you want to create your template. - -## Create a workspace - -Now, create a workspace using your template: - -```bash -coder create --template="yourTemplate" -``` - -Connect to your workspace via SSH: - -```bash -coder ssh -``` - -To access your workspace in the Coder dashboard, navigate to the [configured access URL](./admin/configure.md#access-url), -and log in with the owner credentials provided to you by Coder. - -![Coder Web UI with code-server](./images/code-server.png) - -You can also create workspaces using the access URL and the Templates UI. - -![Templates UI to create a -workspace](./images/create-workspace-from-templates-ui.png) - -## Modifying templates - -You can edit the Terraform template as follows: - -```sh -coder templates init -cd gcp-linux # modify this line as needed to access the template -vim main.tf -coder templates push gcp-linux # updates the template -``` - -## Up Next - -Learn about [templates](./templates.md). + + This page is rendered on https://coder.com/docs/coder-oss/latest/quickstart. Refer to the other documents in the `install/` directory for per-platform instructions. + diff --git a/docs/quickstart/docker.md b/docs/quickstart/docker.md index eb3d9bc858cea..432bcf09a80d8 100644 --- a/docs/quickstart/docker.md +++ b/docs/quickstart/docker.md @@ -13,34 +13,41 @@ Coder with Docker has the following advantages: ## Instructions -1. [Install and launch Coder](../install) - - The Coder server binds to port 3000 by default. Use `--address :` to customize it! - - Use the [Coder tunnel](../admin/configure.md#tunnel) for a public URL: - - ```bash - coder server +1. Run Coder with Docker. + + ```sh + export CODER_DATA=$HOME/.config/coderv2-docker + export DOCKER_GROUP=$(getent group docker | cut -d: -f3) + mkdir -p $CODER_DATA + docker run --rm -it \ + -v $CODER_DATA:/home/coder/.config \ + -v /var/run/docker.sock:/var/run/docker.sock \ + --group-add $DOCKER_GROUP \ + ghcr.io/coder/coder:latest ``` + + > This will use Coder's tunnel and built-in database. See our [Docker documentation](../install/docker.md) for other configuration options such as running on localhost, using docker-compose, and external PostgreSQL. - Or set an [access URL](../admin/configure.md#access-url) to run entirely locally: - ```bash - coder server --access-url=http://localhost:3000 --address=:3000 +1. In new terminal, [install Coder](../install/) in order to connect to your deployment through the CLI. + + ```sh + curl -L https://coder.com/install.sh | sh ``` -1. Run `coder login ` in a new terminal and follow the +1. Run `coder login ` and follow the interactive instructions to create your user. 1. Pull the "Docker" example template using the interactive `coder templates init`: - ```bash + ```sh coder templates init cd docker ``` 1. Push up the template with `coder templates create` -1. Open the dashboard in your browser (http://localhost:3000) to create your + +1. Open the dashboard in your browser to create your first workspace: From adb842f2492108e9b121c48b88aefd7af66c277d Mon Sep 17 00:00:00 2001 From: Geoffrey Huntley Date: Fri, 4 Nov 2022 03:49:11 +1000 Subject: [PATCH 2/4] Update docs/quickstart/docker.md --- docs/quickstart/docker.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/quickstart/docker.md b/docs/quickstart/docker.md index 432bcf09a80d8..dcbf7f5397524 100644 --- a/docs/quickstart/docker.md +++ b/docs/quickstart/docker.md @@ -31,7 +31,7 @@ Coder with Docker has the following advantages: 1. In new terminal, [install Coder](../install/) in order to connect to your deployment through the CLI. - ```sh + ```shell curl -L https://coder.com/install.sh | sh ``` From 2dd1f619acb142b0d7a521c3fce0d9d6a212a631 Mon Sep 17 00:00:00 2001 From: Geoffrey Huntley Date: Fri, 4 Nov 2022 03:49:35 +1000 Subject: [PATCH 3/4] Update docs/quickstart/docker.md --- docs/quickstart/docker.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/quickstart/docker.md b/docs/quickstart/docker.md index dcbf7f5397524..660d62dab546e 100644 --- a/docs/quickstart/docker.md +++ b/docs/quickstart/docker.md @@ -15,7 +15,7 @@ Coder with Docker has the following advantages: 1. Run Coder with Docker. - ```sh + ```shell export CODER_DATA=$HOME/.config/coderv2-docker export DOCKER_GROUP=$(getent group docker | cut -d: -f3) mkdir -p $CODER_DATA From 67d10ffdb1fb24a73cc961107149a49c5da687a1 Mon Sep 17 00:00:00 2001 From: Geoffrey Huntley Date: Fri, 4 Nov 2022 03:49:54 +1000 Subject: [PATCH 4/4] Update docs/quickstart/docker.md --- docs/quickstart/docker.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/quickstart/docker.md b/docs/quickstart/docker.md index 660d62dab546e..edcde4224de2b 100644 --- a/docs/quickstart/docker.md +++ b/docs/quickstart/docker.md @@ -40,7 +40,7 @@ Coder with Docker has the following advantages: 1. Pull the "Docker" example template using the interactive `coder templates init`: - ```sh + ```shell coder templates init cd docker ```