Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb4fd25d

Browse files
Katie Hornekylecarbs
Katie Horne
authored andcommitted
expand README files for examples (#1946)
1 parent08cf79d commitb4fd25d

File tree

9 files changed

+148
-71
lines changed

9 files changed

+148
-71
lines changed

‎examples/templates/aws-linux/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ tags: [cloud, aws]
66

77
#aws-linux
88

9-
##Getting started
10-
11-
Pick this template in`coder templates init` and follow instructions.
9+
To get started, run`coder templates init`. When prompted, select this template.
10+
Follow the on-screen instructions to proceed.
1211

1312
##Authentication
1413

@@ -19,7 +18,8 @@ Terraform docs](https://registry.terraform.io/providers/hashicorp/aws/latest/doc
1918

2019
##Required permissions / policy
2120

22-
This example policy allows Coder to create EC2 instances and modify instances provisioned by Coder.
21+
The following sample policy allows Coder to create EC2 instances and modify
22+
instances provisioned by Coder:
2323

2424
```json
2525
{
@@ -68,4 +68,3 @@ This example policy allows Coder to create EC2 instances and modify instances pr
6868
]
6969
}
7070
```
71-

‎examples/templates/aws-windows/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ tags: [cloud, aws]
88

99
##Getting started
1010

11-
Pick this template in`coder templates init` and follow instructions.
11+
To get started, run`coder templates init`. When prompted, select this template.
12+
Follow the on-screen instructions to proceed.
1213

1314
##Authentication
1415

@@ -19,7 +20,8 @@ Terraform docs](https://registry.terraform.io/providers/hashicorp/aws/latest/doc
1920

2021
##Required permissions / policy
2122

22-
This example policy allows Coder to create EC2 instances and modify instances provisioned by Coder.
23+
The following sample policy allows Coder to create EC2 instances and modify
24+
instances provisioned by Coder:
2325

2426
```json
2527
{
@@ -68,4 +70,3 @@ This example policy allows Coder to create EC2 instances and modify instances pr
6870
]
6971
}
7072
```
71-

‎examples/templates/do-linux/README.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,30 @@ tags: [cloud, digitalocean]
66

77
#do-linux
88

9-
This is an example for deployingworkspaces asDigital OceanDroplets.
9+
To deployworkspaces asDigitalOceanDroplets, you'll need:
1010

11-
##Requirements
11+
- DigitalOcean[personal access token
12+
(PAT)](https://docs.digitalocean.com/reference/api/create-personal-access-token/)
1213

13-
- Digital Ocean Project ID (e.g.`doctl projects list`)
14-
- Remove`variable "step2_do_project_id"` and`resource "digitalocean_project_resources" "project"` if you don't want project association.
15-
- (Optional) Digital Ocean SSH key ID (e.g.`doctl compute ssh-key list`)
16-
- Only required for Fedora images to work.
14+
- DigitalOcean project ID (you can get your project information via the`doctl`
15+
CLI by running`doctl projects list`)
16+
17+
- Remove the following sections from the`main.tf` file if you don't want to
18+
associate your workspaces with a project:
19+
20+
-`variable "step2_do_project_id"`
21+
-`resource "digitalocean_project_resources" "project"`
22+
23+
-**Optional:** DigitalOcean SSH key ID (obtain via the`doctl` CLI by running
24+
`doctl compute ssh-key list`)
25+
26+
- Note that this is only required for Fedora images to work.
1727

1828
##Authentication
1929

2030
This template assumes that coderd is run in an environment that is authenticated
21-
with Digital Ocean. Obtain a
22-
[Digital Ocean Personal AccessToken](https://cloud.digitalocean.com/account/api/tokens) and set
23-
theenvironment variable`DIGITALOCEAN_TOKEN` to the access token before starting coderd. For
24-
other ways to authenticate
25-
[consult the Terraformdocs](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs).
31+
with Digital Ocean. Obtain a[Digital Ocean Personal Access
32+
Token](https://cloud.digitalocean.com/account/api/tokens) and set the
33+
environment variable`DIGITALOCEAN_TOKEN` to the access token before starting
34+
coderd. Forother ways to authenticate[consult the Terraform
35+
docs](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs).

‎examples/templates/docker-image-builds/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ For large use cases, we recommend building images using CI/CD pipelines and regi
1212

1313
##Getting started
1414

15-
Run`coder templates init` and select this template. Follow the instructions that appear.
15+
Run`coder templates init`. When prompted, select this template, and follow the
16+
on-screen instructions to proceed.
1617

1718
##Adding images
1819

‎examples/templates/docker/README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,22 @@ tags: [local, docker]
66

77
#docker
88

9-
##Getting started
10-
11-
Run`coder templates init` and select this template. Follow the instructions that appear.
9+
To get started, run`coder templates init`. When prompted, select this template.
10+
Follow the on-screen instructions to proceed.
1211

1312
##Adding/removing images
1413

15-
After building and pushing an image to an image registry (e.g., DockerHub), you can edit the template to make the image available to users.
16-
17-
Edit the template:
14+
After building and pushing an image to an image registry (e.g., DockerHub), edit
15+
the template to make the image available to users:
1816

1917
```sh
18+
# Open the template
2019
vim main.tf
2120
```
21+
22+
Modify your file to match the following:
23+
24+
```hcl
2225
variable "docker_image" {
2326
description = "What Docker image would you like to use for your workspace?"
2427
default = "codercom/enterprise-base:ubuntu"
@@ -77,4 +80,3 @@ add the following features to your Coder template:
7780
- More
7881

7982
We also welcome contributions!
80-

‎examples/templates/gcp-linux/README.md

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,40 @@ tags: [cloud, google]
66

77
#gcp-linux
88

9-
##Getting started
10-
11-
Pick this template in`coder templates init` and follow instructions.
9+
To get started, run`coder templates init`. When prompted, select this template,
10+
and follow the on-screen instructions to proceed.
1211

1312
##Authentication
1413

1514
This template assumes that coderd is run in an environment that is authenticated
16-
with Google Cloud. For example, run`gcloud auth application-default login` to import
17-
credentials on the system and user running coderd. For other ways to authenticate
18-
[consult the Terraform docs](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/getting_started#adding-credentials).
15+
with Google Cloud. For example, run`gcloud auth application-default login` to
16+
import credentials on the system and user running coderd. For other ways to
17+
authenticate[consult the Terraform
18+
docs](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/getting_started#adding-credentials).
19+
20+
##Service account
21+
22+
Coder requires a Google Cloud Service Account to provision workspaces. To create
23+
a service account:
24+
25+
1. Navigate to the[CGP
26+
console](https://console.cloud.google.com/projectselector/iam-admin/serviceaccounts/create),
27+
and select your Cloud project (if you have more than one project associated
28+
with your account)
29+
30+
1. Provide a service account name (this name is used to generate the service
31+
account ID)
32+
33+
1. Click**Create and continue**, and choose the following IAM roles to grant to
34+
the service account:
35+
- Compute Admin
36+
- Service Account User
37+
38+
Click**Continue**.
1939

20-
##Required permissions / policy
40+
1. Click on the created key, and navigate to the**Keys** tab.
2141

22-
The user or service account used by the Terraform provisioner should have the following roles
42+
1. Click**Add key** >**Create new key**.
2343

24-
- Compute Admin
44+
1. Generate a**JSON private key**, which will be what you provide to Coder
45+
during the setup process.

‎examples/templates/gcp-vm-container/README.md

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,40 @@ tags: [cloud, google, container]
66

77
#gcp-vm-container
88

9-
##Getting started
10-
11-
Pick this template in`coder templates init` and follow instructions.
9+
To get started, run`coder templates init`. When prompted, select this template,
10+
and follow the on-screen instructions to proceed.
1211

1312
##Authentication
1413

1514
This template assumes that coderd is run in an environment that is authenticated
16-
with Google Cloud. For example, run`gcloud auth application-default login` to import
17-
credentials on the system and user running coderd. For other ways to authenticate
18-
[consult the Terraform docs](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/getting_started#adding-credentials).
15+
with Google Cloud. For example, run`gcloud auth application-default login` to
16+
import credentials on the system and user running coderd. For other ways to
17+
authenticate[consult the Terraform
18+
docs](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/getting_started#adding-credentials).
19+
20+
##Service account
21+
22+
Coder requires a Google Cloud Service Account to provision workspaces. To create
23+
a service account:
24+
25+
1. Navigate to the[CGP
26+
console](https://console.cloud.google.com/projectselector/iam-admin/serviceaccounts/create),
27+
and select your Cloud project (if you have more than one project associated
28+
with your account)
29+
30+
1. Provide a service account name (this name is used to generate the service
31+
account ID)
32+
33+
1. Click**Create and continue**, and choose the following IAM roles to grant to
34+
the service account:
35+
- Compute Admin
36+
- Service Account User
37+
38+
Click**Continue**.
1939

20-
##Required permissions / policy
40+
1. Click on the created key, and navigate to the**Keys** tab.
2141

22-
The user or service account used by the Terraform provisioner should have the following roles
42+
1. Click**Add key** >**Create new key**.
2343

24-
- Compute Admin
44+
1. Generate a**JSON private key**, which will be what you provide to Coder
45+
during the setup process.

‎examples/templates/gcp-windows/README.md

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,40 @@ tags: [cloud, google]
66

77
#gcp-windows
88

9-
##Getting started
10-
11-
Pick this template in`coder templates init` and follow instructions.
9+
To get started, run`coder templates init`. When prompted, select this template,
10+
and follow the on-screen instructions to proceed.
1211

1312
##Authentication
1413

1514
This template assumes that coderd is run in an environment that is authenticated
16-
with Google Cloud. For example, run`gcloud auth application-default login` to import
17-
credentials on the system and user running coderd. For other ways to authenticate
18-
[consult the Terraform docs](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/getting_started#adding-credentials).
15+
with Google Cloud. For example, run`gcloud auth application-default login` to
16+
import credentials on the system and user running coderd. For other ways to
17+
authenticate[consult the Terraform
18+
docs](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/getting_started#adding-credentials).
19+
20+
##Service account
21+
22+
Coder requires a Google Cloud Service Account to provision workspaces. To create
23+
a service account:
24+
25+
1. Navigate to the[CGP
26+
console](https://console.cloud.google.com/projectselector/iam-admin/serviceaccounts/create),
27+
and select your Cloud project (if you have more than one project associated
28+
with your account)
29+
30+
1. Provide a service account name (this name is used to generate the service
31+
account ID)
32+
33+
1. Click**Create and continue**, and choose the following IAM roles to grant to
34+
the service account:
35+
- Compute Admin
36+
- Service Account User
37+
38+
Click**Continue**.
1939

20-
##Required permissions / policy
40+
1. Click on the created key, and navigate to the**Keys** tab.
2141

22-
The user or service account used by the Terraform provisioner should have the following roles
42+
1. Click**Add key** >**Create new key**.
2343

24-
- Compute Admin
44+
1. Generate a**JSON private key**, which will be what you provide to Coder
45+
during the setup process.

‎examples/templates/kubernetes-multi-service/README.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ tags: [cloud, kubernetes]
66

77
#Authentication
88

9-
This templatehas several ways to authenticate to a Kubernetes cluster.
9+
This templatefeatures two ways to authenticate to a Kubernetes cluster.
1010

1111
##kubeconfig (Coder host)
1212

13-
If the Coder host has a local`~/.kube/config`, this can be used to authenticate with Coder. Make sure this is on the same user running the`coder` service.
13+
If the Coder host has a local`~/.kube/config`, you can use this to authenticate
14+
with Coder. Make sure this is done with same user that's running the`coder` service.
1415

1516
##ServiceAccount
1617

@@ -52,26 +53,26 @@ Create a ServiceAccount and role on your cluster to authenticate your template w
5253
EOF
5354
```
5455
55-
1. Use the following commands to fetch the values:
56+
1. Use the following commands to fetch the values:
5657
57-
**Cluster IP:**
58+
**Cluster IP:**
5859
59-
```sh
60-
kubectl cluster-info | grep "control plane"
61-
```
60+
```sh
61+
kubectl cluster-info | grep "control plane"
62+
```
6263
63-
**CA certificate**
64+
**CA certificate**
6465
65-
```sh
66-
kubectl get secrets -n$CODER_NAMESPACE -o jsonpath="{.items[?(@.metadata.annotations['kubernetes\.io/service-account\.name']=='coder')].data['ca\.crt']}{'\n'}"
67-
```
66+
```sh
67+
kubectl get secrets -n$CODER_NAMESPACE -o jsonpath="{.items[?(@.metadata.annotations['kubernetes\.io/service-account\.name']=='coder')].data['ca\.crt']}{'\n'}"
68+
```
6869
69-
**Token**
70+
**Token**
7071
71-
```sh
72-
kubectl get secrets -n$CODER_NAMESPACE -o jsonpath="{.items[?(@.metadata.annotations['kubernetes\.io/service-account\.name']=='coder')].data['token']}{'\n'}"
73-
```
72+
```sh
73+
kubectl get secrets -n$CODER_NAMESPACE -o jsonpath="{.items[?(@.metadata.annotations['kubernetes\.io/service-account\.name']=='coder')].data['token']}{'\n'}"
74+
```
7475
75-
**Namespace**
76+
**Namespace**
7677
77-
This should be the same as`$CODER_NAMESPACE`,setin step 1.
78+
This should be the same as`$CODER_NAMESPACE`,setin step 1.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp