docs: Change console to shell and remove unused elements (#5960)

This commit is contained in:
Bruno Quaresma
2023-02-01 18:27:11 +00:00
committed by GitHub
parent e6f5623627
commit 61dcf643e8
32 changed files with 129 additions and 131 deletions
+12 -12
View File
@@ -21,7 +21,7 @@ values in the next step.
Navigate to your Coder host and run the following command to start up the Coder
server:
```console
```shell
coder server --oauth2-github-allow-signups=true --oauth2-github-allowed-orgs="your-org" --oauth2-github-client-id="8d1...e05" --oauth2-github-client-secret="57ebc9...02c24c"
```
@@ -31,7 +31,7 @@ Alternatively, if you are running Coder as a system service, you can achieve the
same result as the command above by adding the following environment variables
to the `/etc/coder.d/coder.env` file:
```console
```shell
CODER_OAUTH2_GITHUB_ALLOW_SIGNUPS=true
CODER_OAUTH2_GITHUB_ALLOWED_ORGS="your-org"
CODER_OAUTH2_GITHUB_CLIENT_ID="8d1...e05"
@@ -40,7 +40,7 @@ CODER_OAUTH2_GITHUB_CLIENT_SECRET="57ebc9...02c24c"
**Note:** To allow everyone to signup using GitHub, set:
```console
```shell
CODER_OAUTH2_GITHUB_ALLOW_EVERYONE=true
```
@@ -59,7 +59,7 @@ First, [register a GitLab OAuth application](https://docs.gitlab.com/ee/integrat
Navigate to your Coder host and run the following command to start up the Coder
server:
```console
```shell
coder server --oidc-issuer-url="https://gitlab.com" --oidc-email-domain="your-domain-1,your-domain-2" --oidc-client-id="533...des" --oidc-client-secret="G0CSP...7qSM"
```
@@ -67,7 +67,7 @@ Alternatively, if you are running Coder as a system service, you can achieve the
same result as the command above by adding the following environment variables
to the `/etc/coder.d/coder.env` file:
```console
```shell
CODER_OIDC_ISSUER_URL="https://gitlab.com"
CODER_OIDC_EMAIL_DOMAIN="your-domain-1,your-domain-2"
CODER_OIDC_CLIENT_ID="533...des"
@@ -80,7 +80,7 @@ Once complete, run `sudo service coder restart` to reboot Coder.
GitLab maintains configuration settings for OIDC applications at the following URL:
```console
```shell
https://gitlab.com/.well-known/openid-configuration
```
@@ -101,7 +101,7 @@ First, [register a Google OAuth application](https://support.google.com/cloud/an
Navigate to your Coder host and run the following command to start up the Coder
server:
```console
```shell
coder server --oidc-issuer-url="https://accounts.google.com" --oidc-email-domain="your-domain-1,your-domain-2" --oidc-client-id="533...ent.com" --oidc-client-secret="G0CSP...7qSM"
```
@@ -109,7 +109,7 @@ Alternatively, if you are running Coder as a system service, you can achieve the
same result as the command above by adding the following environment variables
to the `/etc/coder.d/coder.env` file:
```console
```shell
CODER_OIDC_ISSUER_URL="https://accounts.google.com"
CODER_OIDC_EMAIL_DOMAIN="your-domain-1,your-domain-2"
CODER_OIDC_CLIENT_ID="533...ent.com"
@@ -123,7 +123,7 @@ Once complete, run `sudo service coder restart` to reboot Coder.
Coder requires all OIDC email addresses to be verified by default. If the `email_verified` claim is present in the token response from the identity provider, Coder will validate that its value is `true`.
If needed, you can disable this behavior with the following setting:
```console
```shell
CODER_OIDC_IGNORE_EMAIL_VERIFIED=true
```
@@ -133,7 +133,7 @@ When a new user is created, the `preferred_username` claim becomes the username.
If you'd like to change the OpenID Connect button text and/or icon, you can configure them like so:
```console
```shell
CODER_OIDC_SIGN_IN_TEXT="Sign in with Gitea"
CODER_OIDC_ICON_URL=https://gitea.io/images/gitea.png
```
@@ -145,7 +145,7 @@ authentication. Upon deactivation, users are [suspended](./users.md#suspend-a-us
and are not deleted. [Configure](./configure.md) your SCIM application with an
auth key and supply it the Coder server.
```console
```shell
CODER_SCIM_API_KEY="your-api-key"
```
@@ -153,7 +153,7 @@ CODER_SCIM_API_KEY="your-api-key"
If your OpenID Connect provider requires client TLS certificates for authentication, you can configure them like so:
```console
```shell
CODER_TLS_CLIENT_CERT_FILE=/path/to/cert.pem
CODER_TLS_CLIENT_KEY_FILE=/path/to/key.pem
```
+2 -2
View File
@@ -11,7 +11,7 @@ Coder uses authentication tokens to grant machine users access to the REST API.
You can use tokens with the CLI by setting the `--token` CLI flag or the `CODER_SESSION_TOKEN`
environment variable.
```console
```shell
export CODER_URL=https://coder.example.com
export CODER_SESSION_TOKEN=*****
coder workspaces ls
@@ -21,7 +21,7 @@ coder workspaces ls
You can review the [API reference](../api/index.md) to find the necessary routes and payload. Alternatively, you can enable the [Swagger](https://swagger.io/) endpoint to read the documentation and do requests against the API:
```console
```shell
coder server --swagger-enable
```
+4 -4
View File
@@ -59,7 +59,7 @@ downloaded from Maven (https://repo1.maven.org/maven2) and store all data in the
If you are using the built-in PostgreSQL deployment and need to use `psql` (aka
the PostgreSQL interactive terminal), output the connection URL with the following command:
```console
```shell
$ coder server postgres-builtin-url
$ psql "postgres://coder@localhost:49627/coder?sslmode=disable&password=feU...yI1"
```
@@ -69,7 +69,7 @@ $ psql "postgres://coder@localhost:49627/coder?sslmode=disable&password=feU...yI
If you've installed Coder via a [system package](../install/packages.md) Coder, you can
configure the server by setting the following variables in `/etc/coder.d/coder.env`:
```console
```shell
# String. Specifies the external URL (HTTP/S) to access Coder.
CODER_ACCESS_URL=https://coder.example.com
@@ -97,7 +97,7 @@ CODER_TLS_KEY_FILE=
To run Coder as a system service on the host:
```console
```shell
# Use systemd to start Coder now and on reboot
sudo systemctl enable --now coder
@@ -107,7 +107,7 @@ journalctl -u coder.service -b
To restart Coder after applying system changes:
```console
```shell
sudo systemctl restart coder
```
+5 -5
View File
@@ -24,7 +24,7 @@ Example callback URL: `https://coder.example.com/gitauth/primary-github/callback
Set the following environment variables to [configure the Coder server](./configure.md):
```console
```shell
CODER_GITAUTH_0_ID="primary-github"
CODER_GITAUTH_0_TYPE=github|gitlab|azure-devops|bitbucket
CODER_GITAUTH_0_CLIENT_ID=xxxxxx
@@ -36,7 +36,7 @@ CODER_GITAUTH_0_CLIENT_SECRET=xxxxxxx
Custom authentication and token URLs should be
used for self-managed Git provider deployments.
```console
```shell
CODER_GITAUTH_0_AUTH_URL="https://github.example.com/oauth/authorize"
CODER_GITAUTH_0_TOKEN_URL="https://github.example.com/oauth/token"
CODER_GITAUTH_0_VALIDATE_URL="https://your-domain.com/oauth/token/info"
@@ -46,7 +46,7 @@ CODER_GITAUTH_0_VALIDATE_URL="https://your-domain.com/oauth/token/info"
Optionally, you can request custom scopes:
```console
```shell
CODER_GITAUTH_0_SCOPES="repo:read repo:write write:gpg_key"
```
@@ -56,7 +56,7 @@ Multiple providers are an Enterprise feature. [Learn more](../enterprise.md).
A custom regex can be used to match a specific repository or organization to limit auth scope. Here's a sample config:
```console
```shell
# Provider 1) github.com
CODER_GITAUTH_0_ID=primary-github
CODER_GITAUTH_0_TYPE=github
@@ -76,6 +76,6 @@ CODER_GITAUTH_1_TOKEN_URL="https://github.example.com/oauth/token"
To support regex matching for paths (e.g. github.com/orgname), youll need to add this to the [Coder agent startup script](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/agent#startup_script):
```console
```shell
git config --global credential.useHttpPath true
```
+1 -1
View File
@@ -12,7 +12,7 @@ The Prometheus endpoint address is `http://localhost:2112/` by default. You can
If `coder server --prometheus-enable` is started locally, you can preview the metrics endpoint in your browser or by using curl: <!-- markdown-link-check-disable -->http://localhost:2112/<!-- markdown-link-check-enable -->.
```console
```shell
$ curl http://localhost:2112/
# HELP coderd_api_active_users_duration_hour The number of users that have been active within the last hour.
# TYPE coderd_api_active_users_duration_hour gauge
+3 -3
View File
@@ -17,7 +17,7 @@ of [install](../install).
If you installed Coder using the `install.sh` script, re-run the below
command on the host:
```console
```shell
curl -L https://coder.com/install.sh | sh
```
@@ -25,7 +25,7 @@ The script will unpack the new `coder` binary version over the one currently ins
Next, you can restart Coder with the following commands (if running it as a system
service):
```console
```shell
systemctl daemon-reload
systemctl restart coder
```
@@ -35,7 +35,7 @@ systemctl restart coder
If you installed using `docker-compose`, run the below command to upgrade the
Coder container:
```console
```shell
docker-compose pull coder && docker-compose up coder -d
```
+5 -5
View File
@@ -35,7 +35,7 @@ The new user will appear in the **Users** list. Use the toggle to change their
To create a user via the Coder CLI, run:
```console
```shell
coder users create
```
@@ -44,7 +44,7 @@ When prompted, provide the **username** and **email** for the new user.
You'll receive a response that includes the following; share the instructions
with the user so that they can log into Coder:
```console
```shell
Download the Coder command line for your operating system:
https://github.com/coder/coder/releases
@@ -69,7 +69,7 @@ To suspend a user via the web UI:
To suspend a user via the CLI, run:
```console
```shell
coder users suspend <username|user_id>
```
@@ -88,7 +88,7 @@ To activate a user via the web UI:
To activate a user via the CLI, run:
```console
```shell
coder users activate <username|user_id>
```
@@ -108,7 +108,7 @@ Coder will prompt the user to change their temporary password immediately after
You can also reset a password via the CLI:
```console
```shell
# run `coder reset-password <username> --help` for usage instructions
coder reset-password <username>
```