Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1344df1

Browse files
committed
Merge branch 'restructure-new' of https://github.com/coder/coder into restructure-new
2 parents bb5ae21 + ab80c9c commit 1344df1

File tree

9 files changed

+28
-19
lines changed

9 files changed

+28
-19
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ gen: \
496496
codersdk/rbacresources_gen.go \
497497
site/src/api/rbacresourcesGenerated.ts \
498498
docs/admin/integrations/prometheus.md \
499-
docs/reference/cli/README.md \
499+
docs/reference/cli/index.md \
500500
docs/admin/security/audit-logs.md \
501501
coderd/apidoc/swagger.json \
502502
.prettierignore.include \
@@ -526,7 +526,7 @@ gen/mark-fresh:
526526
codersdk/rbacresources_gen.go \
527527
site/src/api/rbacresourcesGenerated.ts \
528528
docs/admin/integrations/prometheus.md \
529-
docs/reference/cli/README.md \
529+
docs/reference/cli/index.md \
530530
docs/admin/security/audit-logs.md \
531531
coderd/apidoc/swagger.json \
532532
.prettierignore.include \
@@ -639,10 +639,10 @@ docs/admin/integrations/prometheus.md: scripts/metricsdocgen/main.go scripts/met
639639
./scripts/pnpm_install.sh
640640
pnpm exec prettier --write ./docs/admin/integrations/prometheus.md
641641

642-
docs/reference/cli/README.md: scripts/clidocgen/main.go examples/examples.gen.json $(GO_SRC_FILES)
642+
docs/reference/cli/index.md: scripts/clidocgen/main.go examples/examples.gen.json $(GO_SRC_FILES)
643643
CI=true BASE_PATH="." go run ./scripts/clidocgen
644644
./scripts/pnpm_install.sh
645-
pnpm exec prettier --write ./docs/reference/cli/README.md ./docs/reference/cli/*.md ./docs/manifest.json
645+
pnpm exec prettier --write ./docs/reference/cli/index.md ./docs/reference/cli/*.md ./docs/manifest.json
646646

647647
docs/admin/security/audit-logs.md: coderd/database/querier.go scripts/auditdocgen/main.go enterprise/audit/table.go coderd/rbac/object_gen.go
648648
go run scripts/auditdocgen/main.go

docs/admin/external-auth.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,9 @@ CODER_EXTERNAL_AUTH_0_SCOPES="repo:read repo:write write:gpg_key"
181181

182182
## Multiple External Providers (enterprise) (premium)
183183

184-
Multiple providers are an Enterprise feature. [Learn more](https://coder.com/pricing#compare-plans).
185-
Below is an example configuration with multiple providers.
184+
Multiple providers are an Enterprise feature.
185+
[Learn more](https://coder.com/pricing#compare-plans). Below is an example
186+
configuration with multiple providers.
186187

187188
```env
188189
# Provider 1) github.com

docs/admin/users/idp-sync.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ the OIDC provider. See
3434
> ones include `groups`, `memberOf`, and `roles`.
3535
3636
Next configure the Coder server to read groups from the claim name with the
37-
[OIDC group field](../../reference/cli/server.md#--oidc-group-field) server flag:
37+
[OIDC group field](../../reference/cli/server.md#--oidc-group-field) server
38+
flag:
3839

3940
```sh
4041
# as an environment variable
@@ -365,8 +366,8 @@ Some common issues when enabling group/role sync.
365366

366367
If you are running into issues with group/role sync, is best to view your Coder
367368
server logs and enable
368-
[verbose mode](../../reference/cli/index.md#-v---verbose). To reduce
369-
noise, you can filter for only logs related to group/role sync:
369+
[verbose mode](../../reference/cli/index.md#-v---verbose). To reduce noise, you
370+
can filter for only logs related to group/role sync:
370371

371372
```sh
372373
CODER_VERBOSE=true

docs/manifest.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,11 @@
618618
"description": "Learn how to author Coder templates",
619619
"path": "./tutorials/template-from-scratch.md"
620620
},
621+
{
622+
"title": "Using an External Database",
623+
"description": "Use Coder with an external database",
624+
"path": "./tutorials/external-database.md"
625+
},
621626
{
622627
"title": "Image Management",
623628
"description": "Learn about image management with Coder",
@@ -838,6 +843,11 @@
838843
"title": "features list",
839844
"path": "reference/cli/features_list.md"
840845
},
846+
{
847+
"title": "groups",
848+
"description": "Manage groups",
849+
"path": "reference/cli/groups.md"
850+
},
841851
{
842852
"title": "groups create",
843853
"description": "Create a user group",

docs/reference/api/index.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/install/database.md renamed to docs/tutorials/external-database.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Using Coder with an external database
2+
13
## Recommendation
24

35
For production deployments, we recommend using an external
@@ -88,8 +90,3 @@ it. The schema should be present on this listing:
8890
```shell
8991
psql -U coder -c '\dn'
9092
```
91-
92-
## Next steps
93-
94-
- [Configuring Coder](../admin/setup/index.md)
95-
- [Templates](../admin/templates/index.md)

examples/examples.gen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"aws",
2828
"persistent-vm"
2929
],
30-
"markdown": "\n# Remote Development on AWS EC2 VMs (Linux)\n\nProvision AWS EC2 VMs as [Coder workspaces](https://coder.com/docs/workspaces) with this example template.\n\n\u003c!-- TODO: Add screenshot --\u003e\n\n## Prerequisites\n\n### Authentication\n\nBy default, this template authenticates to AWS using the provider's default [authentication methods](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#authentication-and-configuration).\n\nThe simplest way (without making changes to the template) is via environment variables (e.g. `AWS_ACCESS_KEY_ID`) or a [credentials file](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#cli-configure-files-format). If you are running Coder on a VM, this file must be in `/home/coder/aws/credentials`.\n\nTo use another [authentication method](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#authentication), edit the template.\n\n## Required permissions / policy\n\nThe following sample policy allows Coder to create EC2 instances and modify\ninstances provisioned by Coder:\n\n```json\n{\n\t\"Version\": \"2012-10-17\",\n\t\"Statement\": [\n\t\t{\n\t\t\t\"Sid\": \"VisualEditor0\",\n\t\t\t\"Effect\": \"Allow\",\n\t\t\t\"Action\": [\n\t\t\t\t\"ec2:GetDefaultCreditSpecification\",\n\t\t\t\t\"ec2:DescribeIamInstanceProfileAssociations\",\n\t\t\t\t\"ec2:DescribeTags\",\n\t\t\t\t\"ec2:DescribeInstances\",\n\t\t\t\t\"ec2:DescribeInstanceTypes\",\n\t\t\t\t\"ec2:CreateTags\",\n\t\t\t\t\"ec2:RunInstances\",\n\t\t\t\t\"ec2:DescribeInstanceCreditSpecifications\",\n\t\t\t\t\"ec2:DescribeImages\",\n\t\t\t\t\"ec2:ModifyDefaultCreditSpecification\",\n\t\t\t\t\"ec2:DescribeVolumes\"\n\t\t\t],\n\t\t\t\"Resource\": \"*\"\n\t\t},\n\t\t{\n\t\t\t\"Sid\": \"CoderResources\",\n\t\t\t\"Effect\": \"Allow\",\n\t\t\t\"Action\": [\n\t\t\t\t\"ec2:DescribeInstanceAttribute\",\n\t\t\t\t\"ec2:UnmonitorInstances\",\n\t\t\t\t\"ec2:TerminateInstances\",\n\t\t\t\t\"ec2:StartInstances\",\n\t\t\t\t\"ec2:StopInstances\",\n\t\t\t\t\"ec2:DeleteTags\",\n\t\t\t\t\"ec2:MonitorInstances\",\n\t\t\t\t\"ec2:CreateTags\",\n\t\t\t\t\"ec2:RunInstances\",\n\t\t\t\t\"ec2:ModifyInstanceAttribute\",\n\t\t\t\t\"ec2:ModifyInstanceCreditSpecification\"\n\t\t\t],\n\t\t\t\"Resource\": \"arn:aws:ec2:*:*:instance/*\",\n\t\t\t\"Condition\": {\n\t\t\t\t\"StringEquals\": {\n\t\t\t\t\t\"aws:ResourceTag/Coder_Provisioned\": \"true\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t]\n}\n```\n\n## Architecture\n\nThis template provisions the following resources:\n\n- AWS Instance\n\nCoder uses `aws_ec2_instance_state` to start and stop the VM. This example template is fully persistent, meaning the full filesystem is preserved when the workspace restarts. See this [community example](https://github.com/bpmct/coder-templates/tree/main/aws-linux-ephemeral) of an ephemeral AWS instance.\n\n\u003e **Note**\n\u003e This template is designed to be a starting point! Edit the Terraform to extend the template to support your use case.\n\n## code-server\n\n`code-server` is installed via the `startup_script` argument in the `coder_agent`\nresource block. The `coder_app` resource is defined to access `code-server` through\nthe dashboard UI over `localhost:13337`.\n"
30+
"markdown": "\n# Remote Development on AWS EC2 VMs (Linux)\n\nProvision AWS EC2 VMs as [Coder workspaces](https://coder.com/docs/workspaces) with this example template.\n\n## Prerequisites\n\n### Authentication\n\nBy default, this template authenticates to AWS using the provider's default [authentication methods](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#authentication-and-configuration).\n\nThe simplest way (without making changes to the template) is via environment variables (e.g. `AWS_ACCESS_KEY_ID`) or a [credentials file](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#cli-configure-files-format). If you are running Coder on a VM, this file must be in `/home/coder/aws/credentials`.\n\nTo use another [authentication method](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#authentication), edit the template.\n\n## Required permissions / policy\n\nThe following sample policy allows Coder to create EC2 instances and modify\ninstances provisioned by Coder:\n\n```json\n{\n\t\"Version\": \"2012-10-17\",\n\t\"Statement\": [\n\t\t{\n\t\t\t\"Sid\": \"VisualEditor0\",\n\t\t\t\"Effect\": \"Allow\",\n\t\t\t\"Action\": [\n\t\t\t\t\"ec2:GetDefaultCreditSpecification\",\n\t\t\t\t\"ec2:DescribeIamInstanceProfileAssociations\",\n\t\t\t\t\"ec2:DescribeTags\",\n\t\t\t\t\"ec2:DescribeInstances\",\n\t\t\t\t\"ec2:DescribeInstanceTypes\",\n\t\t\t\t\"ec2:CreateTags\",\n\t\t\t\t\"ec2:RunInstances\",\n\t\t\t\t\"ec2:DescribeInstanceCreditSpecifications\",\n\t\t\t\t\"ec2:DescribeImages\",\n\t\t\t\t\"ec2:ModifyDefaultCreditSpecification\",\n\t\t\t\t\"ec2:DescribeVolumes\"\n\t\t\t],\n\t\t\t\"Resource\": \"*\"\n\t\t},\n\t\t{\n\t\t\t\"Sid\": \"CoderResources\",\n\t\t\t\"Effect\": \"Allow\",\n\t\t\t\"Action\": [\n\t\t\t\t\"ec2:DescribeInstanceAttribute\",\n\t\t\t\t\"ec2:UnmonitorInstances\",\n\t\t\t\t\"ec2:TerminateInstances\",\n\t\t\t\t\"ec2:StartInstances\",\n\t\t\t\t\"ec2:StopInstances\",\n\t\t\t\t\"ec2:DeleteTags\",\n\t\t\t\t\"ec2:MonitorInstances\",\n\t\t\t\t\"ec2:CreateTags\",\n\t\t\t\t\"ec2:RunInstances\",\n\t\t\t\t\"ec2:ModifyInstanceAttribute\",\n\t\t\t\t\"ec2:ModifyInstanceCreditSpecification\"\n\t\t\t],\n\t\t\t\"Resource\": \"arn:aws:ec2:*:*:instance/*\",\n\t\t\t\"Condition\": {\n\t\t\t\t\"StringEquals\": {\n\t\t\t\t\t\"aws:ResourceTag/Coder_Provisioned\": \"true\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t]\n}\n```\n\n## Architecture\n\nThis template provisions the following resources:\n\n- AWS Instance\n\nCoder uses `aws_ec2_instance_state` to start and stop the VM. This example template is fully persistent, meaning the full filesystem is preserved when the workspace restarts. See this [community example](https://github.com/bpmct/coder-templates/tree/main/aws-linux-ephemeral) of an ephemeral AWS instance.\n\n\u003e **Note**\n\u003e This template is designed to be a starting point! Edit the Terraform to extend the template to support your use case.\n\n## code-server\n\n`code-server` is installed via the `startup_script` argument in the `coder_agent`\nresource block. The `coder_app` resource is defined to access `code-server` through\nthe dashboard UI over `localhost:13337`.\n"
3131
},
3232
{
3333
"id": "aws-windows",

scripts/apidocgen/postprocess/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717

1818
const (
1919
apiSubdir = "reference/api"
20-
apiIndexFile = "README.md"
20+
apiIndexFile = "index.md"
2121
apiIndexContent = `Get started with the Coder API:
2222
2323
## Quickstart
@@ -38,7 +38,7 @@ curl https://coder.example.com/api/v2/workspaces?q=owner:me \
3838
3939
## Use cases
4040
41-
See some common [use cases](../../reference/README.md#use-cases) for the REST API.
41+
See some common [use cases](../../reference/index.md#use-cases) for the REST API.
4242
4343
## Sections
4444

scripts/clidocgen/gen.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func fullName(cmd *serpent.Command) string {
8787
func fmtDocFilename(cmd *serpent.Command) string {
8888
if cmd.FullName() == "coder" {
8989
// Special case for index.
90-
return "./README.md"
90+
return "./index.md"
9191
}
9292
name := strings.ReplaceAll(fullName(cmd), " ", "_")
9393
return fmt.Sprintf("%s.md", name)

0 commit comments

Comments
 (0)