From ed4a1cea27d9eed6f3b4ad0c2f74b6ae95d74969 Mon Sep 17 00:00:00 2001 From: Katie Horne Date: Thu, 19 May 2022 12:17:03 -0500 Subject: [PATCH 1/7] chore: add instructions for deploying with Docker Compose --- docs/README.md | 2 ++ docs/install.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 docs/install.md diff --git a/docs/README.md b/docs/README.md index 8cabf3cb38c65..f3865b6c115da 100644 --- a/docs/README.md +++ b/docs/README.md @@ -59,6 +59,8 @@ destroyed on exit): > Use `coder --help` to get a complete list of flags and environment variables. +See the [installation guide](install.md) 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: diff --git a/docs/install.md b/docs/install.md new file mode 100644 index 0000000000000..d05ac13c179e0 --- /dev/null +++ b/docs/install.md @@ -0,0 +1,42 @@ +# Install + +This article walks you through the various ways of installing and deploying Coder. + +## Docker Compose + +Before proceeding, please ensure that you have Docker installed. + +1. Clone the `coder` repository: + + ```console + git clone git@github.com:coder/coder.git + ``` + +1. Navigate into the `coder` folder. Coder requires a non-`localhost` access URL + for non-Docker-based examples; if you have a public IP or a domain/reverse + proxy, you can provide this value prior to running `docker-compose up` to + start the service: + + ```console + cd coder + CODER_ACCESS_URL=https://coder.mydomain.com + docker-compose up + ``` + + Otherwise, you can simply start the service: + + ```console + cd coder + docker-compose up + ``` + + Alternatively, if you would like to start a **temporary deployment**: + + ```console + docker run --rm -it \ + -e CODER_DEV_MODE=true \ + -v /var/run/docker.sock:/var/run/docker.sock \ + ghcr.io/coder/coder:v0.5.10 + ``` + +1. Follow the on-screen prompts to create your first user and workspace. From ba19efbe17e00f6bd144d42b0831ead3959d2054 Mon Sep 17 00:00:00 2001 From: Katie Horne Date: Thu, 19 May 2022 14:19:26 -0500 Subject: [PATCH 2/7] chore: add add'l usage instructions --- docs/install.md | 60 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 57 insertions(+), 3 deletions(-) diff --git a/docs/install.md b/docs/install.md index d05ac13c179e0..545e20eded096 100644 --- a/docs/install.md +++ b/docs/install.md @@ -14,7 +14,7 @@ Before proceeding, please ensure that you have Docker installed. 1. Navigate into the `coder` folder. Coder requires a non-`localhost` access URL for non-Docker-based examples; if you have a public IP or a domain/reverse - proxy, you can provide this value prior to running `docker-compose up` to + proxy, you can provide this value before running `docker-compose up` to start the service: ```console @@ -23,7 +23,7 @@ Before proceeding, please ensure that you have Docker installed. docker-compose up ``` - Otherwise, you can simply start the service: + Otherwise, you can start the service: ```console cd coder @@ -39,4 +39,58 @@ Before proceeding, please ensure that you have Docker installed. ghcr.io/coder/coder:v0.5.10 ``` -1. Follow the on-screen prompts to create your first user and workspace. +1. Open a new terminal window, and run `coder login ` to create + your first user (once you've done so, you can navigate to `yourAccessURL` and + log in with these credentials). + +1. Next, copy a sample template into a new directory so that you can create a custom template in a + subsequent step (be sure that you're working in the directory where you want + your templates stored): + + ```console + coder templates init + ``` + +1. Navigate into the new directory and create a new template: + + ```console + cd ./docker-local && coder templates create + ``` + + Follow the prompts displayed to proceed. When done, you'll see the following + message: + + ```console + The docker-local template has been created! Developers can + provision a workspace with this template using: + + coder create --template="docker-local" [workspace name] + ``` + +1. At this point, you're ready to provision your first workspace: + + ```console + coder create --template="docker-local" + ``` + + Follow the on-screen prompts to set the parameters for your workspace. If + the process is successful, you'll get information regarding your workspace: + + ```console + ┌─────────────────────────────────────────────────────────────────┐ + │ RESOURCE STATUS ACCESS │ + ├─────────────────────────────────────────────────────────────────┤ + │ docker_container.workspace ephemeral │ + │ └─ dev (linux, amd64) ⦾ connecting [0s] coder ssh main │ + ├─────────────────────────────────────────────────────────────────┤ + │ docker_volume.coder_volume ephemeral │ + └─────────────────────────────────────────────────────────────────┘ + The main workspace has been created! + ``` + +You can now access your workspace via your web browser by navigating to your +access URL, or you can connect to it via ssh by running: + +```console +coder ssh main +``` From e7b0b86dd409b7b4670386a5c4929a03830a2dbb Mon Sep 17 00:00:00 2001 From: Katie Horne Date: Thu, 19 May 2022 15:21:48 -0500 Subject: [PATCH 3/7] Apply suggestions from review Co-authored-by: Ben Potter --- docs/install.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/install.md b/docs/install.md index 545e20eded096..2c4a64d5c90bc 100644 --- a/docs/install.md +++ b/docs/install.md @@ -2,7 +2,7 @@ This article walks you through the various ways of installing and deploying Coder. -## Docker Compose +## docker-compose Before proceeding, please ensure that you have Docker installed. @@ -70,7 +70,7 @@ Before proceeding, please ensure that you have Docker installed. 1. At this point, you're ready to provision your first workspace: ```console - coder create --template="docker-local" + coder create --template="docker-local" [workspace name] ``` Follow the on-screen prompts to set the parameters for your workspace. If @@ -92,5 +92,5 @@ You can now access your workspace via your web browser by navigating to your access URL, or you can connect to it via ssh by running: ```console -coder ssh main +coder ssh ``` From 89bd49bca622e54d182344a0cf3a0894ede5ed70 Mon Sep 17 00:00:00 2001 From: Katie Horne Date: Fri, 20 May 2022 10:26:22 -0500 Subject: [PATCH 4/7] chore: edit commands --- docs/install.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/install.md b/docs/install.md index 545e20eded096..812ee503a6cf9 100644 --- a/docs/install.md +++ b/docs/install.md @@ -54,17 +54,18 @@ Before proceeding, please ensure that you have Docker installed. 1. Navigate into the new directory and create a new template: ```console - cd ./docker-local && coder templates create + cd examples/docker + coder templates create ``` Follow the prompts displayed to proceed. When done, you'll see the following message: ```console - The docker-local template has been created! Developers can - provision a workspace with this template using: + The docker template has been created! Developers can + provision a workspace with this template using: - coder create --template="docker-local" [workspace name] + coder create --template="docker" [workspace name] ``` 1. At this point, you're ready to provision your first workspace: @@ -89,7 +90,7 @@ Before proceeding, please ensure that you have Docker installed. ``` You can now access your workspace via your web browser by navigating to your -access URL, or you can connect to it via ssh by running: +access URL, or you can connect to it via SSH by running: ```console coder ssh main From 7843c93adae4e600151171b461630fbf36449993 Mon Sep 17 00:00:00 2001 From: Katie Horne Date: Fri, 20 May 2022 10:27:49 -0500 Subject: [PATCH 5/7] chore: standardize formatting --- docs/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/install.md b/docs/install.md index 57f20cffbe63d..331e1d6d232d6 100644 --- a/docs/install.md +++ b/docs/install.md @@ -93,5 +93,5 @@ You can now access your workspace via your web browser by navigating to your access URL, or you can connect to it via SSH by running: ```console -coder ssh +coder ssh [workspace name] ``` From df7b10eee4740178dacadece46c4b125c4e574be Mon Sep 17 00:00:00 2001 From: Katie Horne Date: Mon, 23 May 2022 14:12:07 -0500 Subject: [PATCH 6/7] Update docs/install.md Co-authored-by: Ben Potter --- docs/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/install.md b/docs/install.md index 331e1d6d232d6..3671523389f0c 100644 --- a/docs/install.md +++ b/docs/install.md @@ -71,7 +71,7 @@ Before proceeding, please ensure that you have Docker installed. 1. At this point, you're ready to provision your first workspace: ```console - coder create --template="docker-local" [workspace name] + coder create --template="docker" [workspace name] ``` Follow the on-screen prompts to set the parameters for your workspace. If From a0ae4d0fd5ed2c79d8deaf884b1afbbd9e00a8c1 Mon Sep 17 00:00:00 2001 From: Katie Horne Date: Mon, 23 May 2022 14:21:22 -0500 Subject: [PATCH 7/7] chore: update requirements --- docs/install.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/install.md b/docs/install.md index 3671523389f0c..f2c08667b3935 100644 --- a/docs/install.md +++ b/docs/install.md @@ -4,7 +4,8 @@ This article walks you through the various ways of installing and deploying Code ## docker-compose -Before proceeding, please ensure that you have Docker installed. +Before proceeding, please ensure that you have both Docker and the [latest version of +Coder](https://github.com/coder/coder/releases) installed. 1. Clone the `coder` repository: