mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
docs: restructure docs (#14421)
Closes #13434 Supersedes #14182 --------- Co-authored-by: Ethan <39577870+ethanndickson@users.noreply.github.com> Co-authored-by: Ethan Dickson <ethan@coder.com> Co-authored-by: Ben Potter <ben@coder.com> Co-authored-by: Stephen Kirby <58410745+stirby@users.noreply.github.com> Co-authored-by: Stephen Kirby <me@skirby.dev> Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com> Co-authored-by: Edward Angert <EdwardAngert@users.noreply.github.com>
This commit is contained in:
co-authored by
Ethan
Ethan Dickson
Ben Potter
Stephen Kirby
Stephen Kirby
EdwardAngert
Edward Angert
parent
288df75686
commit
419eba5fb6
@@ -0,0 +1,135 @@
|
||||
# Microsoft Azure
|
||||
|
||||
This guide shows you how to set up the Coder server on Azure which will
|
||||
provision Azure-hosted Linux workspaces.
|
||||
|
||||
## Requirements
|
||||
|
||||
This guide assumes you have full administrator privileges on Azure.
|
||||
|
||||
## Create An Azure VM
|
||||
|
||||
From the Azure Portal, navigate to the Virtual Machines Dashboard. Click Create,
|
||||
and select creating a new Azure Virtual machine .
|
||||
|
||||
<img src="../../images/platforms/azure/azure1.jpg">
|
||||
|
||||
This will bring you to the `Create a virtual machine` page. Select the
|
||||
subscription group of your choice, or create one if necessary.
|
||||
|
||||
Next, name the VM something relevant to this project using the naming convention
|
||||
of your choice. Change the region to something more appropriate for your current
|
||||
location. For this tutorial, we will use the base selection of the Ubuntu Gen2
|
||||
Image and keep the rest of the base settings for this image the same.
|
||||
|
||||
<img src="../../images/platforms/azure/azure2.png">
|
||||
|
||||
<img src="../../images/platforms/azure/azure3.png">
|
||||
|
||||
Up next, under `Inbound port rules` modify the Select `inbound ports` to also
|
||||
take in `HTTPS` and `HTTP`.
|
||||
|
||||
<img src="../../images/platforms/azure/azure4.png">
|
||||
|
||||
The set up for the image is complete at this stage. Click `Review and Create` -
|
||||
review the information and click `Create`. A popup will appear asking you to
|
||||
download the key pair for the server. Click
|
||||
`Download private key and create resource` and place it into a folder of your
|
||||
choice on your local system.
|
||||
|
||||
<img src="../../images/platforms/azure/azure5.png">
|
||||
|
||||
Click `Return to create a virtual machine`. Your VM will start up!
|
||||
|
||||
<img src="../../images/platforms/azure/azure6.png">
|
||||
|
||||
Click `Go to resource` in the virtual machine and copy the public IP address.
|
||||
You will need it to SSH into the virtual machine via your local machine.
|
||||
|
||||
Follow
|
||||
[these instructions](https://learn.microsoft.com/en-us/azure/virtual-machines/linux-vm-connect?tabs=Linux)
|
||||
to SSH into the virtual machine. Once on the VM, you can run and install Coder
|
||||
using your method of choice. For the fastest install, we recommend running Coder
|
||||
as a system service.
|
||||
|
||||
## Install Coder
|
||||
|
||||
For this instance, we will run Coder as a system service, however you can run
|
||||
Coder a multitude of different ways. You can learn more about those
|
||||
[here](https://coder.com/docs/coder-oss/latest/install).
|
||||
|
||||
In the Azure VM instance, run the following command to install Coder
|
||||
|
||||
```shell
|
||||
curl -fsSL https://coder.com/install.sh | sh
|
||||
```
|
||||
|
||||
## Run Coder
|
||||
|
||||
Run the following command to start Coder as a system level service:
|
||||
|
||||
```shell
|
||||
sudo systemctl enable --now coder
|
||||
```
|
||||
|
||||
The following command will get you information about the Coder launch service
|
||||
|
||||
```shell
|
||||
journalctl -u coder.service -b
|
||||
```
|
||||
|
||||
This will return a series of logs related to running Coder as a system service.
|
||||
Embedded in the logs is the Coder Access URL.
|
||||
|
||||
Copy the URL and run the following command to create the first user, either on
|
||||
your local machine or in the instance terminal.
|
||||
|
||||
```shell
|
||||
coder login <url***.try.coder.app>
|
||||
```
|
||||
|
||||
Fill out the prompts. Be sure to save use email and password as these are your
|
||||
admin username and password.
|
||||
|
||||
You can now access Coder on your local machine with the relevant
|
||||
`***.try.coder.app` URL and logging in with the username and password.
|
||||
|
||||
## Creating and Uploading Your First Template
|
||||
|
||||
First, run `coder template init` to create your first template. You’ll be given
|
||||
a list of possible templates to use. This tutorial will show you how to set up
|
||||
your Coder instance to create a Linux based machine on Azure.
|
||||
|
||||
<img src="../../images/platforms/azure/azure9.png">
|
||||
|
||||
Press `enter` to select `Develop in Linux on Azure` template. This will return
|
||||
the following:
|
||||
|
||||
<img src="../../images/platforms/azure/azure10.png">
|
||||
|
||||
To get started using the Azure template, install the Azure CLI by following the
|
||||
instructions
|
||||
[here](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt).
|
||||
Run `az login` and follow the instructions to configure the Azure command line.
|
||||
|
||||
Coder is running as a system service, which creates the system user `coder` for
|
||||
handling processes. The Coder user will require access to the Azure credentials
|
||||
to initialize the template.
|
||||
|
||||
Run the following commands to copy the Azure credentials and give the `coder`
|
||||
user access to them:
|
||||
|
||||
```shell
|
||||
sudo cp -r ~/.azure /home/coder/.azure
|
||||
sudo chown -R coder:coder /home/coder/.azure/
|
||||
```
|
||||
|
||||
Navigate to the `./azure-linux` folder where you created your template and run
|
||||
the following command to put the template on your Coder instance.
|
||||
|
||||
```shell
|
||||
coder templates push
|
||||
```
|
||||
|
||||
Congrats! You can now navigate to your Coder dashboard and use this Linux on
|
||||
Azure template to create a new workspace!
|
||||
@@ -0,0 +1,78 @@
|
||||
# Google Cloud Platform
|
||||
|
||||
In this guide, you will learn how to deploy the Coder control plane instance and
|
||||
your first template.
|
||||
|
||||
## Requirements
|
||||
|
||||
This guide assumes you have `roles/compute.instanceAdmin.v1` access to your
|
||||
Google Cloud Platform project.
|
||||
|
||||
## Launch a Coder instance from the Google Cloud Marketplace
|
||||
|
||||
We publish an Ubuntu 22.04 VM image with Coder and Docker pre-installed. Search
|
||||
for `Coder v2` in the GCP Marketplace or
|
||||
[use direct link](https://console.cloud.google.com/marketplace/product/coder-enterprise-market-public/coder-v2).
|
||||
|
||||

|
||||
|
||||
Be sure to keep the default firewall options checked so you can connect over
|
||||
HTTP, HTTPS, and SSH.
|
||||
|
||||
We recommend keeping the default instance type (`e2-standard-4`, 4 cores and 16
|
||||
GB memory) if you plan on provisioning Docker containers as workspaces on this
|
||||
VM instance. Keep in mind this platforms is intended for proof-of-concept
|
||||
deployments and you should adjust your infrastructure when preparing for
|
||||
production use. See: [Scaling Coder](../../admin/infrastructure/index.md)
|
||||
|
||||
<video autoplay playsinline loop>
|
||||
<source src="https://github.com/coder/coder/blob/main/docs/images/platforms/gcp/launch.mp4?raw=true" type="video/mp4">
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
|
||||
Be sure to add a keypair so that you can connect over SSH to further
|
||||
[configure Coder](../../admin/setup/index.md).
|
||||
|
||||
After launching the instance, wait 30 seconds and navigate to the public IPv4
|
||||
address. You should be redirected to a public tunnel URL.
|
||||
|
||||

|
||||
|
||||
That's all! Use the UI to create your first user, template, and workspace. We
|
||||
recommend starting with a Docker template since the instance has Docker
|
||||
pre-installed.
|
||||
|
||||

|
||||
|
||||
## Configuring Coder server
|
||||
|
||||
Coder is primarily configured by server-side flags and environment variables.
|
||||
Given you created or added key-pairs when launching the instance, you can
|
||||
[configure your Coder deployment](../../admin/setup/index.md) by logging in via
|
||||
SSH or using the console:
|
||||
|
||||
```shell
|
||||
ssh ubuntu@<gcp-public-IPv4>
|
||||
sudo vim /etc/coder.d/coder.env # edit config
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart coder # restart Coder
|
||||
```
|
||||
|
||||
## Give developers VM workspaces (optional)
|
||||
|
||||
Instead of running containers on the Coder instance, you can offer developers
|
||||
full VM instances with the
|
||||
[gcp-linux](https://github.com/coder/coder/tree/main/examples/templates/gcp-linux)
|
||||
template.
|
||||
|
||||
Before you can use this template, you must authorize Coder to create VM
|
||||
instances in your GCP project. Follow the instructions in the
|
||||
[gcp-linux template README](https://github.com/coder/coder/tree/main/examples/templates/gcp-linux#authentication)
|
||||
to set up authentication.
|
||||
|
||||
### Next Steps
|
||||
|
||||
- [Use your IDE with Coder](../../user-guides/workspace-access/index.md)
|
||||
- [Writing custom templates for Coder](../../admin/templates/index.md)
|
||||
- [Configure the Coder server](../../admin/setup/index.md)
|
||||
- [Use your own domain + TLS](../../admin/setup/index.md#tls--reverse-proxy)
|
||||
@@ -0,0 +1,90 @@
|
||||
# Amazon Web Services
|
||||
|
||||
This guide is designed to get you up and running with a Coder proof-of-concept
|
||||
VM on AWS EC2 using a [Coder-provided AMI](https://github.com/coder/packages).
|
||||
If you are familiar with EC2 however, you can use our
|
||||
[install script](../cli.md) to run Coder on any popular Linux distribution.
|
||||
|
||||
## Requirements
|
||||
|
||||
This guide assumes your AWS account has `AmazonEC2FullAccess` permissions.
|
||||
|
||||
## Launch a Coder instance from the from AWS Marketplace
|
||||
|
||||
We publish an Ubuntu 22.04 AMI with Coder and Docker pre-installed. Search for
|
||||
`Coder` in the EC2 "Launch an Instance" screen or
|
||||
[launch directly from the marketplace](https://aws.amazon.com/marketplace/pp/prodview-5gxjyur2vc7rg).
|
||||
|
||||

|
||||
|
||||
Be sure to keep the default firewall (SecurityGroup) options checked so you can
|
||||
connect over HTTP, HTTPS, and SSH.
|
||||
|
||||

|
||||
|
||||
We recommend keeping the default instance type (`t2.xlarge`, 4 cores and 16 GB
|
||||
memory) if you plan on provisioning Docker containers as workspaces on this EC2
|
||||
instance. Keep in mind this platforms is intended for proof-of-concept
|
||||
deployments and you should adjust your infrastructure when preparing for
|
||||
production use. See: [Scaling Coder](../../admin/infrastructure/index.md)
|
||||
|
||||
Be sure to add a keypair so that you can connect over SSH to further
|
||||
[configure Coder](../../admin/setup/index.md).
|
||||
|
||||
After launching the instance, wait 30 seconds and navigate to the public IPv4
|
||||
address. You should be redirected to a public tunnel URL.
|
||||
|
||||
<video autoplay playsinline loop>
|
||||
<source src="https://github.com/coder/coder/blob/main/docs/images/platforms/aws/launch.mp4?raw=true" type="video/mp4">
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
|
||||
That's all! Use the UI to create your first user, template, and workspace. We
|
||||
recommend starting with a Docker template since the instance has Docker
|
||||
pre-installed.
|
||||
|
||||

|
||||
|
||||
## Configuring Coder server
|
||||
|
||||
Coder is primarily configured by server-side flags and environment variables.
|
||||
Given you created or added key-pairs when launching the instance, you can
|
||||
[configure your Coder deployment](../../admin/setup/index.md) by logging in via
|
||||
SSH or using the console:
|
||||
|
||||
<!-- TOOD(@kylecarbs): fix this weird formatting (https://imgur.com/a/LAUY3cT) -->
|
||||
|
||||
```sh
|
||||
ssh ubuntu@<ec2-public-IPv4>
|
||||
sudo vim /etc/coder.d/coder.env # edit config
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart coder # restart Coder
|
||||
```
|
||||
|
||||
## Give developers EC2 workspaces (optional)
|
||||
|
||||
Instead of running containers on the Coder instance, you can offer developers
|
||||
full EC2 instances with the
|
||||
[aws-linux](https://github.com/coder/coder/tree/main/examples/templates/aws-linux)
|
||||
template.
|
||||
|
||||
Before you add the AWS template from the dashboard or CLI, you'll need to modify
|
||||
the instance IAM role.
|
||||
|
||||

|
||||
|
||||
You must create or select a role that has `EC2FullAccess` permissions or a
|
||||
limited
|
||||
[Coder-specific permissions policy](https://github.com/coder/coder/tree/main/examples/templates/aws-linux#required-permissions--policy).
|
||||
|
||||
From there, you can import the AWS starter template in the dashboard and begin
|
||||
creating VM-based workspaces.
|
||||
|
||||

|
||||
|
||||
## Next steps
|
||||
|
||||
- [IDEs with Coder](../../user-guides/workspace-access/index.md)
|
||||
- [Writing custom templates for Coder](../../admin/templates/index.md)
|
||||
- [Configure the Coder server](../../admin/setup/index.md)
|
||||
- [Use your own domain + TLS](../../admin/setup/index.md#tls--reverse-proxy)
|
||||
@@ -0,0 +1,44 @@
|
||||
# Cloud Platforms
|
||||
|
||||
We provide install guides and example templates for deploying Coder to your
|
||||
cloud of choice.
|
||||
|
||||
<div class="tabs">
|
||||
|
||||
## AWS
|
||||
|
||||
We publish an EC2 image with Coder pre-installed. Follow the tutorial here:
|
||||
|
||||
- [Install Coder on AWS EC2](./ec2.md)
|
||||
|
||||
Alternatively, install the [CLI binary](../cli.md) on any Linux machine or
|
||||
follow our [Kubernetes](../kubernetes.md) documentation to install Coder on an
|
||||
existing EKS cluster.
|
||||
|
||||
## GCP
|
||||
|
||||
We publish a GCP Marketplace listing with Coder pre-installed. Follow the
|
||||
tutorial here:
|
||||
|
||||
- [Install Coder on GCP Compute Engine](./compute-engine.md)
|
||||
|
||||
Alternatively, install the [CLI binary](../cli.md) on any Linux machine or
|
||||
follow our [Kubernetes](../kubernetes.md) documentation to install Coder on an
|
||||
existing GKE cluster.
|
||||
|
||||
## Azure
|
||||
|
||||
Use the following guide to run Coder on an Azure VM:
|
||||
|
||||
- [Install Coder on an Azure VM](./azure-vm.md)
|
||||
|
||||
Alternatively, install the [CLI binary](../cli.md) on any Linux machine or
|
||||
follow our [Kubernetes](../kubernetes.md) documentation to install Coder on an
|
||||
existing GKE cluster.
|
||||
|
||||
## Other
|
||||
|
||||
Is your cloud missing? Check [unofficial](../other/index.md) install methods or
|
||||
install the [standalone binary](../cli.md).
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user