diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 2eed142bc843e..0000000000000 --- a/.dockerignore +++ /dev/null @@ -1,6 +0,0 @@ -# Ignore all files and folders -** - -# Include flake.nix and flake.lock -!flake.nix -!flake.lock diff --git a/.github/.linkspector.yml b/.github/.linkspector.yml index 1cdd35a21805e..3e19913c4b953 100644 --- a/.github/.linkspector.yml +++ b/.github/.linkspector.yml @@ -18,5 +18,7 @@ ignorePatterns: - pattern: "i.imgur.com" - pattern: "code.visualstudio.com" - pattern: "www.emacswiki.org" + - pattern: "linux.die.net/man" + - pattern: "www.gnu.org" aliveStatusCodes: - 200 diff --git a/.github/actions/setup-imdisk/action.yaml b/.github/actions/setup-imdisk/action.yaml new file mode 100644 index 0000000000000..52ef7eb08fd81 --- /dev/null +++ b/.github/actions/setup-imdisk/action.yaml @@ -0,0 +1,27 @@ +name: "Setup ImDisk" +if: runner.os == 'Windows' +description: | + Sets up the ImDisk toolkit for Windows and creates a RAM disk on drive R:. +runs: + using: "composite" + steps: + - name: Download ImDisk + if: runner.os == 'Windows' + shell: bash + run: | + mkdir imdisk + cd imdisk + curl -L -o files.cab https://github.com/coder/imdisk-artifacts/raw/92a17839ebc0ee3e69be019f66b3e9b5d2de4482/files.cab + curl -L -o install.bat https://github.com/coder/imdisk-artifacts/raw/92a17839ebc0ee3e69be019f66b3e9b5d2de4482/install.bat + cd .. + + - name: Install ImDisk + shell: cmd + run: | + cd imdisk + install.bat /silent + + - name: Create RAM Disk + shell: cmd + run: | + imdisk -a -s 4096M -m R: -p "/fs:ntfs /q /y" diff --git a/.github/actions/setup-sqlc/action.yaml b/.github/actions/setup-sqlc/action.yaml index d271789551f92..c123cb8cc3156 100644 --- a/.github/actions/setup-sqlc/action.yaml +++ b/.github/actions/setup-sqlc/action.yaml @@ -7,4 +7,4 @@ runs: - name: Setup sqlc uses: sqlc-dev/setup-sqlc@c0209b9199cd1cce6a14fc27cabcec491b651761 # v4.0.0 with: - sqlc-version: "1.25.0" + sqlc-version: "1.27.0" diff --git a/.github/cherry-pick-bot.yml b/.github/cherry-pick-bot.yml new file mode 100644 index 0000000000000..1f62315d79dca --- /dev/null +++ b/.github/cherry-pick-bot.yml @@ -0,0 +1,2 @@ +enabled: true +preservePullRequestTitle: true diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f11203d093e0d..a400913bc292c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -34,7 +34,7 @@ jobs: tailnet-integration: ${{ steps.filter.outputs.tailnet-integration }} steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -155,7 +155,7 @@ jobs: runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }} steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -188,7 +188,7 @@ jobs: # Check for any typos - name: Check for typos - uses: crate-ci/typos@b74202f74b4346efdbce7801d187ec57b266bac8 # v1.27.3 + uses: crate-ci/typos@685eb3d55be2f85191e8c84acb9f44d7756f84ab # v1.29.4 with: config: .github/workflows/typos.toml @@ -227,7 +227,7 @@ jobs: if: always() steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -251,16 +251,16 @@ jobs: - name: go install tools run: | go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.30 - go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.33 + go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.34 go install golang.org/x/tools/cmd/goimports@latest - go install github.com/mikefarah/yq/v4@v4.30.6 - go install go.uber.org/mock/mockgen@v0.4.0 + go install github.com/mikefarah/yq/v4@v4.44.3 + go install go.uber.org/mock/mockgen@v0.5.0 - name: Install Protoc run: | mkdir -p /tmp/proto pushd /tmp/proto - curl -L -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v23.3/protoc-23.3-linux-x86_64.zip + curl -L -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protoc-23.4-linux-x86_64.zip unzip protoc.zip cp -r ./bin/* /usr/local/bin cp -r ./include /usr/local/bin/include @@ -271,6 +271,15 @@ jobs: # coderd/rbac/object_gen.go:1:1: syntax error: package statement must be first run: "make --output-sync -B gen" + - name: make update-golden-files + run: | + make clean/golden-files + # Notifications require DB, we could start a DB instance here but + # let's just restore for now. + git checkout -- coderd/notifications/testdata/rendered-templates + # As above, skip `-j` flag. + make --output-sync -B update-golden-files + - name: Check for unstaged files run: ./scripts/check_unstaged.sh @@ -281,7 +290,7 @@ jobs: timeout-minutes: 7 steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -309,7 +318,7 @@ jobs: run: ./scripts/check_unstaged.sh test-go: - runs-on: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'depot-ubuntu-22.04-4' || matrix.os == 'macos-latest' && github.repository_owner == 'coder' && 'macos-latest-xlarge' || matrix.os == 'windows-2022' && github.repository_owner == 'coder' && 'windows-latest-16-cores' || matrix.os }} + runs-on: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'depot-ubuntu-22.04-4' || matrix.os == 'macos-latest' && github.repository_owner == 'coder' && 'depot-macos-latest' || matrix.os == 'windows-2022' && github.repository_owner == 'coder' && 'windows-latest-16-cores' || matrix.os }} needs: changes if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main' timeout-minutes: 20 @@ -322,7 +331,7 @@ jobs: - windows-2022 steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -369,19 +378,76 @@ jobs: with: api-key: ${{ secrets.DATADOG_API_KEY }} + # We don't run the full test-suite for Windows & MacOS, so we just run the CLI tests on every PR. + # We run the test suite in test-go-pg, including CLI. + test-cli: + runs-on: ${{ matrix.os == 'macos-latest' && github.repository_owner == 'coder' && 'depot-macos-latest' || matrix.os == 'windows-2022' && github.repository_owner == 'coder' && 'windows-latest-16-cores' || matrix.os }} + needs: changes + if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main' + strategy: + matrix: + os: + - macos-latest + - windows-2022 + steps: + - name: Harden Runner + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 + with: + egress-policy: audit + + - name: Checkout + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + with: + fetch-depth: 1 + + - name: Setup Go + uses: ./.github/actions/setup-go + + - name: Setup Terraform + uses: ./.github/actions/setup-tf + + # Sets up the ImDisk toolkit for Windows and creates a RAM disk on drive R:. + - name: Setup ImDisk + if: runner.os == 'Windows' + uses: ./.github/actions/setup-imdisk + + - name: Test CLI + env: + TS_DEBUG_DISCO: "true" + LC_CTYPE: "en_US.UTF-8" + LC_ALL: "en_US.UTF-8" + shell: bash + run: | + # By default Go will use the number of logical CPUs, which + # is a fine default. + PARALLEL_FLAG="" + + make test-cli + + - name: Upload test stats to Datadog + timeout-minutes: 1 + continue-on-error: true + uses: ./.github/actions/upload-datadog + if: success() || failure() + with: + api-key: ${{ secrets.DATADOG_API_KEY }} + test-go-pg: - runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }} - needs: - - changes + runs-on: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'depot-ubuntu-22.04-4' || matrix.os }} + needs: changes if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main' # This timeout must be greater than the timeout set by `go test` in # `make test-postgres` to ensure we receive a trace of running # goroutines. Setting this to the timeout +5m should work quite well # even if some of the preceding steps are slow. timeout-minutes: 25 + strategy: + matrix: + os: + - ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -396,11 +462,23 @@ jobs: - name: Setup Terraform uses: ./.github/actions/setup-tf + # Sets up the ImDisk toolkit for Windows and creates a RAM disk on drive R:. + - name: Setup ImDisk + if: runner.os == 'Windows' + uses: ./.github/actions/setup-imdisk + - name: Test with PostgreSQL Database env: POSTGRES_VERSION: "13" TS_DEBUG_DISCO: "true" + LC_CTYPE: "en_US.UTF-8" + LC_ALL: "en_US.UTF-8" + shell: bash run: | + # By default Go will use the number of logical CPUs, which + # is a fine default. + PARALLEL_FLAG="" + make test-postgres - name: Upload test stats to Datadog @@ -426,7 +504,7 @@ jobs: timeout-minutes: 25 steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -463,7 +541,7 @@ jobs: timeout-minutes: 25 steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -494,6 +572,47 @@ jobs: with: api-key: ${{ secrets.DATADOG_API_KEY }} + test-go-race-pg: + runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }} + needs: changes + if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main' + timeout-minutes: 25 + steps: + - name: Harden Runner + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 + with: + egress-policy: audit + + - name: Checkout + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + with: + fetch-depth: 1 + + - name: Setup Go + uses: ./.github/actions/setup-go + + - name: Setup Terraform + uses: ./.github/actions/setup-tf + + # We run race tests with reduced parallelism because they use more CPU and we were finding + # instances where tests appear to hang for multiple seconds, resulting in flaky tests when + # short timeouts are used. + # c.f. discussion on https://github.com/coder/coder/pull/15106 + - name: Run Tests + env: + POSTGRES_VERSION: "16" + run: | + make test-postgres-docker + DB=ci gotestsum --junitfile="gotests.xml" -- -race -parallel 4 -p 4 ./... + + - name: Upload test stats to Datadog + timeout-minutes: 1 + continue-on-error: true + uses: ./.github/actions/upload-datadog + if: always() + with: + api-key: ${{ secrets.DATADOG_API_KEY }} + # Tailnet integration tests only run when the `tailnet` directory or `go.sum` # and `go.mod` are changed. These tests are to ensure we don't add regressions # to tailnet, either due to our code or due to updating dependencies. @@ -508,7 +627,7 @@ jobs: timeout-minutes: 20 steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -534,7 +653,7 @@ jobs: timeout-minutes: 20 steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -550,11 +669,8 @@ jobs: working-directory: site test-e2e: - # test-e2e fails on 2-core 8GB runners, so we use the 4-core 16GB runner runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-4' || 'ubuntu-latest' }} needs: changes - if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ts == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main' - timeout-minutes: 20 strategy: fail-fast: false matrix: @@ -563,10 +679,13 @@ jobs: name: test-e2e - premium: true name: test-e2e-premium + # Skip test-e2e on forks as they don't have access to CI secrets + if: (needs.changes.outputs.go == 'true' || needs.changes.outputs.ts == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main') && !(github.event.pull_request.head.repo.fork) + timeout-minutes: 20 name: ${{ matrix.variant.name }} steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -585,7 +704,12 @@ jobs: - run: make gen/mark-fresh name: make gen + - run: make site/e2e/bin/coder + name: make coder + - run: pnpm build + env: + NODE_OPTIONS: ${{ github.repository_owner == 'coder' && '--max_old_space_size=8192' || '' }} working-directory: site - run: pnpm playwright:install @@ -630,7 +754,7 @@ jobs: if: needs.changes.outputs.ts == 'true' || needs.changes.outputs.ci == 'true' steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -667,7 +791,7 @@ jobs: # Prevent excessive build runs on minor version changes skip: "@(renovate/**|dependabot/**)" # Run TurboSnap to trace file dependencies to related stories - # and tell chromatic to only take snapshots of relevent stories + # and tell chromatic to only take snapshots of relevant stories onlyChanged: true # Avoid uploading single files, because that's very slow zip: true @@ -694,7 +818,7 @@ jobs: workingDir: "./site" storybookBaseDir: "./site" # Run TurboSnap to trace file dependencies to related stories - # and tell chromatic to only take snapshots of relevent stories + # and tell chromatic to only take snapshots of relevant stories onlyChanged: true # Avoid uploading single files, because that's very slow zip: true @@ -707,7 +831,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -726,7 +850,7 @@ jobs: run: | mkdir -p /tmp/proto pushd /tmp/proto - curl -L -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v23.3/protoc-23.3-linux-x86_64.zip + curl -L -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protoc-23.4-linux-x86_64.zip unzip protoc.zip cp -r ./bin/* /usr/local/bin cp -r ./include /usr/local/bin/include @@ -738,10 +862,10 @@ jobs: - name: Install go tools run: | go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.30 - go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.33 + go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.34 go install golang.org/x/tools/cmd/goimports@latest - go install github.com/mikefarah/yq/v4@v4.30.6 - go install go.uber.org/mock/mockgen@v0.4.0 + go install github.com/mikefarah/yq/v4@v4.44.3 + go install go.uber.org/mock/mockgen@v0.5.0 - name: Setup sqlc uses: ./.github/actions/setup-sqlc @@ -771,6 +895,7 @@ jobs: - test-go - test-go-pg - test-go-race + - test-go-race-pg - test-js - test-e2e - offlinedocs @@ -780,7 +905,7 @@ jobs: if: always() steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -793,6 +918,7 @@ jobs: echo "- test-go: ${{ needs.test-go.result }}" echo "- test-go-pg: ${{ needs.test-go-pg.result }}" echo "- test-go-race: ${{ needs.test-go-race.result }}" + echo "- test-go-race-pg: ${{ needs.test-go-race-pg.result }}" echo "- test-js: ${{ needs.test-js.result }}" echo "- test-e2e: ${{ needs.test-e2e.result }}" echo "- offlinedocs: ${{ needs.offlinedocs.result }}" @@ -811,11 +937,11 @@ jobs: needs: changes # We always build the dylibs on Go changes to verify we're not merging unbuildable code, # but they need only be signed and uploaded on coder/coder main. - if: needs.changes.outputs.docs-only == 'false' || github.ref == 'refs/heads/main' + if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main' runs-on: ${{ github.repository_owner == 'coder' && 'depot-macos-latest' || 'macos-latest' }} steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -892,7 +1018,7 @@ jobs: - changes - build-dylib if: github.ref == 'refs/heads/main' && needs.changes.outputs.docs-only == 'false' && !github.event.pull_request.head.repo.fork - runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }} + runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-22.04' }} permissions: packages: write # Needed to push images to ghcr.io env: @@ -901,7 +1027,7 @@ jobs: IMAGE: ghcr.io/coder/coder-preview:${{ steps.build-docker.outputs.tag }} steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -1037,7 +1163,7 @@ jobs: id-token: write steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -1062,7 +1188,7 @@ jobs: version: "2.2.1" - name: Get Cluster Credentials - uses: google-github-actions/get-gke-credentials@206d64b64b0eba0a6e2f25113d044c31776ca8d6 # v2.2.2 + uses: google-github-actions/get-gke-credentials@9025e8f90f2d8e0c3dafc3128cc705a26d992a6a # v2.3.0 with: cluster_name: dogfood-v2 location: us-central1-a @@ -1099,7 +1225,7 @@ jobs: if: github.ref == 'refs/heads/main' && !github.event.pull_request.head.repo.fork steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -1134,7 +1260,7 @@ jobs: if: needs.changes.outputs.db == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main' steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -1152,3 +1278,50 @@ jobs: - name: Setup and run sqlc vet run: | make sqlc-vet + + notify-slack-on-failure: + needs: + - required + runs-on: ubuntu-latest + if: failure() && github.ref == 'refs/heads/main' + + steps: + - name: Send Slack notification + run: | + curl -X POST -H 'Content-type: application/json' \ + --data '{ + "blocks": [ + { + "type": "header", + "text": { + "type": "plain_text", + "text": "❌ CI Failure in main", + "emoji": true + } + }, + { + "type": "section", + "fields": [ + { + "type": "mrkdwn", + "text": "*Workflow:*\n${{ github.workflow }}" + }, + { + "type": "mrkdwn", + "text": "*Committer:*\n${{ github.actor }}" + }, + { + "type": "mrkdwn", + "text": "*Commit:*\n${{ github.sha }}" + } + ] + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "*View failure:* <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Click here>" + } + } + ] + }' ${{ secrets.CI_FAILURE_SLACK_WEBHOOK }} diff --git a/.github/workflows/contrib.yaml b/.github/workflows/contrib.yaml index edb39dbfe9e64..f9ef209777aa8 100644 --- a/.github/workflows/contrib.yaml +++ b/.github/workflows/contrib.yaml @@ -3,7 +3,7 @@ name: contrib on: issue_comment: types: [created] - pull_request_target: + pull_request: types: - opened - closed @@ -24,36 +24,92 @@ concurrency: pr-${{ github.ref }} jobs: # Dependabot is annoying, but this makes it a bit less so. - auto-approve-dependabot: + dependabot-automerge: runs-on: ubuntu-latest - if: github.event_name == 'pull_request_target' + if: github.event_name == 'pull_request' && github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'coder/coder' permissions: pull-requests: write + contents: write steps: - - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@d7267f607e9d3fb96fc2fbe83e0af444713e90b7 # v2.3.0 with: - egress-policy: audit + github-token: "${{ secrets.GITHUB_TOKEN }}" - - name: auto-approve dependabot - uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0 - if: github.actor == 'dependabot[bot]' + - name: Approve the PR + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} - cla: + - name: Enable auto-merge for Dependabot PRs + run: gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + + dependabot-automerge-notify: + # Send a slack notification when a dependabot PR is merged. runs-on: ubuntu-latest + if: github.event_name == 'pull_request' && github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'coder/coder' && github.event.pull_request.merged steps: - - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 - with: - egress-policy: audit + - name: Send Slack notification + env: + PR_URL: ${{github.event.pull_request.html_url}} + PR_TITLE: ${{github.event.pull_request.title}} + PR_NUMBER: ${{github.event.pull_request.number}} + run: | + curl -X POST -H 'Content-type: application/json' \ + --data '{ + "username": "dependabot", + "icon_url": "https://avatars.githubusercontent.com/u/27347476", + "blocks": [ + { + "type": "header", + "text": { + "type": "plain_text", + "text": ":pr-merged: Auto merged Dependabot PR #${{ env.PR_NUMBER }}", + "emoji": true + } + }, + { + "type": "section", + "fields": [ + { + "type": "mrkdwn", + "text": "${{ env.PR_TITLE }}" + } + ] + }, + { + "type": "actions", + "elements": [ + { + "type": "button", + "text": { + "type": "plain_text", + "text": "View PR" + }, + "url": "${{ env.PR_URL }}" + } + ] + } + ] + }' ${{ secrets.DEPENDABOT_PRS_SLACK_WEBHOOK }} + cla: + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: - name: cla - if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target' + if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request' uses: contributor-assistant/github-action@ca4a40a7d1004f18d9960b404b97e5f30a505a08 # v2.6.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # the below token should have repo scope and must be manually added by you in the repository's secret - PERSONAL_ACCESS_TOKEN: ${{ secrets.CDRCOMMUNITY_GITHUB_TOKEN }} + PERSONAL_ACCESS_TOKEN: ${{ secrets.CDRCI2_GITHUB_TOKEN }} with: remote-organization-name: "coder" remote-repository-name: "cla" @@ -67,13 +123,8 @@ jobs: release-labels: runs-on: ubuntu-latest # Skip tagging for draft PRs. - if: ${{ github.event_name == 'pull_request_target' && !github.event.pull_request.draft }} + if: ${{ github.event_name == 'pull_request' && !github.event.pull_request.draft }} steps: - - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 - with: - egress-policy: audit - - name: release-labels uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 with: diff --git a/.github/workflows/docker-base.yaml b/.github/workflows/docker-base.yaml index 38a3808ea0c01..7a5135a4cb293 100644 --- a/.github/workflows/docker-base.yaml +++ b/.github/workflows/docker-base.yaml @@ -38,7 +38,7 @@ jobs: if: github.repository_owner == 'coder' steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit diff --git a/.github/workflows/docs-ci.yaml b/.github/workflows/docs-ci.yaml new file mode 100644 index 0000000000000..601f13e756830 --- /dev/null +++ b/.github/workflows/docs-ci.yaml @@ -0,0 +1,45 @@ +name: Docs CI + +on: + push: + branches: + - main + paths: + - "docs/**" + - "**.md" + - ".github/workflows/docs-ci.yaml" + + pull_request: + paths: + - "docs/**" + - "**.md" + - ".github/workflows/docs-ci.yaml" + +jobs: + docs: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + + - name: Setup Node + uses: ./.github/actions/setup-node + + - uses: tj-actions/changed-files@d6e91a2266cdb9d62096cebf1e8546899c6aa18f # v45.0.6 + id: changed-files + with: + files: | + docs/** + **.md + separator: "," + + - name: lint + if: steps.changed-files.outputs.any_changed == 'true' + run: | + pnpm exec markdownlint-cli2 ${{ steps.changed-files.outputs.all_changed_files }} + + - name: fmt + if: steps.changed-files.outputs.any_changed == 'true' + run: | + # markdown-table-formatter requires a space separated list of files + echo ${{ steps.changed-files.outputs.all_changed_files }} | tr ',' '\n' | pnpm exec markdown-table-formatter --check diff --git a/.github/workflows/dogfood.yaml b/.github/workflows/dogfood.yaml index 4378d4f6012a6..d0f912454211f 100644 --- a/.github/workflows/dogfood.yaml +++ b/.github/workflows/dogfood.yaml @@ -24,16 +24,22 @@ permissions: jobs: build_image: if: github.actor != 'dependabot[bot]' # Skip Dependabot PRs - runs-on: ubuntu-latest + runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-4' || 'ubuntu-latest' }} steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit - name: Checkout uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + - name: Setup Nix + uses: DeterminateSystems/nix-installer-action@e50d5f73bfe71c2dd0aa4218de8f4afa59f8f81d # v16 + + - name: Setup GHA Nix cache + uses: DeterminateSystems/magic-nix-cache-action@6221693898146dc97e38ad0e013488a16477a4c4 # v9 + - name: Get branch name id: branch-name uses: tj-actions/branch-names@6871f53176ad61624f978536bbf089c574dc19a2 # v8.0.1 @@ -50,7 +56,7 @@ jobs: uses: depot/setup-action@b0b1ea4f69e92ebf5dea3f8713a1b0c37b2126a5 # v1.6.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1 + uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0 - name: Login to DockerHub if: github.ref == 'refs/heads/main' @@ -71,25 +77,28 @@ jobs: push: ${{ github.ref == 'refs/heads/main' }} tags: "codercom/oss-dogfood:${{ steps.docker-tag-name.outputs.tag }},codercom/oss-dogfood:latest" - - name: Build and push Nix image - uses: depot/build-push-action@636daae76684e38c301daa0c5eca1c095b24e780 # v1.14.0 - with: - project: b4q6ltmpzh - token: ${{ secrets.DEPOT_TOKEN }} - buildx-fallback: true - context: "." - file: "dogfood/contents/Dockerfile.nix" - pull: true - save: true - push: ${{ github.ref == 'refs/heads/main' }} - tags: "codercom/oss-dogfood-nix:${{ steps.docker-tag-name.outputs.tag }},codercom/oss-dogfood-nix:latest" + - name: Build Nix image + run: nix build .#dev_image + + - name: Push Nix image + if: github.ref == 'refs/heads/main' + run: | + docker load -i result + + CURRENT_SYSTEM=$(nix eval --impure --raw --expr 'builtins.currentSystem') + + docker image tag codercom/oss-dogfood-nix:latest-$CURRENT_SYSTEM codercom/oss-dogfood-nix:${{ steps.docker-tag-name.outputs.tag }} + docker image push codercom/oss-dogfood-nix:${{ steps.docker-tag-name.outputs.tag }} + + docker image tag codercom/oss-dogfood-nix:latest-$CURRENT_SYSTEM codercom/oss-dogfood-nix:latest + docker image push codercom/oss-dogfood-nix:latest deploy_template: needs: build_image runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit diff --git a/.github/workflows/nightly-gauntlet.yaml b/.github/workflows/nightly-gauntlet.yaml index 8aa74f1825dd7..2aba755daa3f8 100644 --- a/.github/workflows/nightly-gauntlet.yaml +++ b/.github/workflows/nightly-gauntlet.yaml @@ -3,30 +3,37 @@ name: nightly-gauntlet on: schedule: - # Every day at midnight - - cron: "0 0 * * *" + # Every day at 4AM + - cron: "0 4 * * 1-5" workflow_dispatch: permissions: contents: read jobs: - go-race: - # While GitHub's toaster runners are likelier to flake, we want consistency - # between this environment and the regular test environment for DataDog - # statistics and to only show real workflow threats. - runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }} - # This runner costs 0.016 USD per minute, - # so 0.016 * 240 = 3.84 USD per run. - timeout-minutes: 240 + test-go-pg: + runs-on: ${{ matrix.os == 'macos-latest' && github.repository_owner == 'coder' && 'depot-macos-latest' || matrix.os == 'windows-2022' && github.repository_owner == 'coder' && 'windows-latest-16-cores' || matrix.os }} + if: github.ref == 'refs/heads/main' + # This timeout must be greater than the timeout set by `go test` in + # `make test-postgres` to ensure we receive a trace of running + # goroutines. Setting this to the timeout +5m should work quite well + # even if some of the preceding steps are slow. + timeout-minutes: 25 + strategy: + matrix: + os: + - macos-latest + - windows-2022 steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit - name: Checkout uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + with: + fetch-depth: 1 - name: Setup Go uses: ./.github/actions/setup-go @@ -34,41 +41,101 @@ jobs: - name: Setup Terraform uses: ./.github/actions/setup-tf - - name: Run Tests + # Sets up the ImDisk toolkit for Windows and creates a RAM disk on drive R:. + - name: Setup ImDisk + if: runner.os == 'Windows' + uses: ./.github/actions/setup-imdisk + + - name: Test with PostgreSQL Database + env: + POSTGRES_VERSION: "13" + TS_DEBUG_DISCO: "true" + LC_CTYPE: "en_US.UTF-8" + LC_ALL: "en_US.UTF-8" + shell: bash run: | - # -race is likeliest to catch flaky tests - # due to correctness detection and its performance - # impact. - gotestsum --junitfile="gotests.xml" -- -timeout=240m -count=10 -race ./... + # if macOS, install google-chrome for scaletests + # As another concern, should we really have this kind of external dependency + # requirement on standard CI? + if [ "${{ matrix.os }}" == "macos-latest" ]; then + brew install google-chrome + fi - - name: Upload test results to DataDog - uses: ./.github/actions/upload-datadog - if: always() - with: - api-key: ${{ secrets.DATADOG_API_KEY }} + # By default Go will use the number of logical CPUs, which + # is a fine default. + PARALLEL_FLAG="" - go-timing: - # We run these tests with p=1 so we don't need a lot of compute. - runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04' || 'ubuntu-latest' }} - timeout-minutes: 10 - steps: - - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 - with: - egress-policy: audit + # macOS will output "The default interactive shell is now zsh" + # intermittently in CI... + if [ "${{ matrix.os }}" == "macos-latest" ]; then + touch ~/.bash_profile && echo "export BASH_SILENCE_DEPRECATION_WARNING=1" >> ~/.bash_profile + fi - - name: Checkout - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + if [ "${{ runner.os }}" == "Windows" ]; then + # Create a temp dir on the R: ramdisk drive for Windows. The default + # C: drive is extremely slow: https://github.com/actions/runner-images/issues/8755 + mkdir -p "R:/temp/embedded-pg" + go run scripts/embedded-pg/main.go -path "R:/temp/embedded-pg" + else + go run scripts/embedded-pg/main.go + fi - - name: Setup Go - uses: ./.github/actions/setup-go - - - name: Run Tests - run: | - gotestsum --junitfile="gotests.xml" -- --tags="timing" -p=1 -run='_Timing/' ./... + # Reduce test parallelism, mirroring what we do for race tests. + # We'd been encountering issues with timing related flakes, and + # this seems to help. + DB=ci gotestsum --format standard-quiet -- -v -short -count=1 -parallel 4 -p 4 ./... - - name: Upload test results to DataDog + - name: Upload test stats to Datadog + timeout-minutes: 1 + continue-on-error: true uses: ./.github/actions/upload-datadog - if: always() + if: success() || failure() with: api-key: ${{ secrets.DATADOG_API_KEY }} + + notify-slack-on-failure: + needs: + - test-go-pg + runs-on: ubuntu-latest + if: failure() && github.ref == 'refs/heads/main' + + steps: + - name: Send Slack notification + run: | + curl -X POST -H 'Content-type: application/json' \ + --data '{ + "blocks": [ + { + "type": "header", + "text": { + "type": "plain_text", + "text": "❌ Nightly gauntlet failed", + "emoji": true + } + }, + { + "type": "section", + "fields": [ + { + "type": "mrkdwn", + "text": "*Workflow:*\n${{ github.workflow }}" + }, + { + "type": "mrkdwn", + "text": "*Committer:*\n${{ github.actor }}" + }, + { + "type": "mrkdwn", + "text": "*Commit:*\n${{ github.sha }}" + } + ] + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "*View failure:* <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Click here>" + } + } + ] + }' ${{ secrets.CI_FAILURE_SLACK_WEBHOOK }} diff --git a/.github/workflows/pr-auto-assign.yaml b/.github/workflows/pr-auto-assign.yaml index 312221a248b73..6157918a33f7d 100644 --- a/.github/workflows/pr-auto-assign.yaml +++ b/.github/workflows/pr-auto-assign.yaml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit diff --git a/.github/workflows/pr-cleanup.yaml b/.github/workflows/pr-cleanup.yaml index 8ffd996239dd7..845c16eeaecc2 100644 --- a/.github/workflows/pr-cleanup.yaml +++ b/.github/workflows/pr-cleanup.yaml @@ -19,7 +19,7 @@ jobs: packages: write steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit diff --git a/.github/workflows/pr-deploy.yaml b/.github/workflows/pr-deploy.yaml index 0adba2b7ce15d..89d19822227fa 100644 --- a/.github/workflows/pr-deploy.yaml +++ b/.github/workflows/pr-deploy.yaml @@ -7,6 +7,7 @@ on: push: branches-ignore: - main + - "temp-cherry-pick-*" workflow_dispatch: inputs: experiments: @@ -38,7 +39,7 @@ jobs: PR_OPEN: ${{ steps.check_pr.outputs.pr_open }} steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -73,7 +74,7 @@ jobs: runs-on: "ubuntu-latest" steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -173,7 +174,7 @@ jobs: pull-requests: write # needed for commenting on PRs steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -217,7 +218,7 @@ jobs: CODER_IMAGE_TAG: ${{ needs.get_info.outputs.CODER_IMAGE_TAG }} steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -275,7 +276,7 @@ jobs: PR_HOSTNAME: "pr${{ needs.get_info.outputs.PR_NUMBER }}.${{ secrets.PR_DEPLOYMENTS_DOMAIN }}" steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit diff --git a/.github/workflows/release-validation.yaml b/.github/workflows/release-validation.yaml index c78fb2ae59c02..d15eb1b7c0769 100644 --- a/.github/workflows/release-validation.yaml +++ b/.github/workflows/release-validation.yaml @@ -14,7 +14,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 74fd7353fddbc..e7dc9c1ce839f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -37,7 +37,7 @@ jobs: runs-on: ${{ github.repository_owner == 'coder' && 'depot-macos-latest' || 'macos-latest' }} steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -46,6 +46,14 @@ jobs: with: fetch-depth: 0 + # If the event that triggered the build was an annotated tag (which our + # tags are supposed to be), actions/checkout has a bug where the tag in + # question is only a lightweight tag and not a full annotated tag. This + # command seems to fix it. + # https://github.com/actions/checkout/issues/290 + - name: Fetch git tags + run: git fetch --tags --force + - name: Setup build tools run: | brew install bash gnu-getopt make @@ -121,7 +129,7 @@ jobs: version: ${{ steps.version.outputs.version }} steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -508,7 +516,7 @@ jobs: # TODO: skip this if it's not a new release (i.e. a backport). This is # fine right now because it just makes a PR that we can close. - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -584,7 +592,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -674,7 +682,7 @@ jobs: if: ${{ !inputs.dry_run }} steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 914d61fb1b452..cf089f59257fe 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -47,6 +47,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5 + uses: github/codeql-action/upload-sarif@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3.28.5 with: sarif_file: results.sarif diff --git a/.github/workflows/security.yaml b/.github/workflows/security.yaml index 030b1ab6ba5f1..ebf574d33ac86 100644 --- a/.github/workflows/security.yaml +++ b/.github/workflows/security.yaml @@ -27,7 +27,7 @@ jobs: runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }} steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -38,7 +38,7 @@ jobs: uses: ./.github/actions/setup-go - name: Initialize CodeQL - uses: github/codeql-action/init@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5 + uses: github/codeql-action/init@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3.28.5 with: languages: go, javascript @@ -48,7 +48,7 @@ jobs: rm Makefile - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5 + uses: github/codeql-action/analyze@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3.28.5 - name: Send Slack notification on failure if: ${{ failure() }} @@ -67,7 +67,7 @@ jobs: runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }} steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -86,13 +86,13 @@ jobs: uses: ./.github/actions/setup-sqlc - name: Install yq - run: go run github.com/mikefarah/yq/v4@v4.30.6 + run: go run github.com/mikefarah/yq/v4@v4.44.3 - name: Install mockgen - run: go install go.uber.org/mock/mockgen@v0.4.0 + run: go install go.uber.org/mock/mockgen@v0.5.0 - name: Install protoc-gen-go run: go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.30 - name: Install protoc-gen-go-drpc - run: go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.33 + run: go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.34 - name: Install Protoc run: | # protoc must be in lockstep with our dogfood Dockerfile or the @@ -144,7 +144,7 @@ jobs: severity: "CRITICAL,HIGH" - name: Upload Trivy scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5 + uses: github/codeql-action/upload-sarif@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3.28.5 with: sarif_file: trivy-results.sarif category: "Trivy" diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml index 3d078a030ba83..c96028b8a6ea3 100644 --- a/.github/workflows/stale.yaml +++ b/.github/workflows/stale.yaml @@ -18,7 +18,7 @@ jobs: pull-requests: write steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -96,7 +96,7 @@ jobs: contents: write steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -118,7 +118,7 @@ jobs: actions: write steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit diff --git a/.github/workflows/typos.toml b/.github/workflows/typos.toml index e388502a0c0d9..7be99fd037d88 100644 --- a/.github/workflows/typos.toml +++ b/.github/workflows/typos.toml @@ -35,7 +35,6 @@ extend-exclude = [ # These files contain base64 strings that confuse the detector "**XService**.ts", "**identity.go", - "scripts/ci-report/testdata/**", "**/*_test.go", "**/*.test.tsx", "**/pnpm-lock.yaml", diff --git a/.github/workflows/weekly-docs.yaml b/.github/workflows/weekly-docs.yaml index a333a70396460..581b0126f1719 100644 --- a/.github/workflows/weekly-docs.yaml +++ b/.github/workflows/weekly-docs.yaml @@ -15,12 +15,13 @@ permissions: jobs: check-docs: - runs-on: ubuntu-latest + # later versions of Ubuntu have disabled unprivileged user namespaces, which are required by the action + runs-on: ubuntu-22.04 permissions: pull-requests: write # required to post PR review comments by the action steps: - name: Harden Runner - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit @@ -28,7 +29,7 @@ jobs: uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Check Markdown links - uses: umbrelladocs/action-linkspector@fc382e19892aca958e189954912fe379a8df270c # v1.2.4 + uses: umbrelladocs/action-linkspector@de84085e0f51452a470558693d7d308fbb2fa261 # v1.2.5 id: markdown-link-check # checks all markdown files from /docs including all subfolders with: diff --git a/.gitignore b/.gitignore index 16607eacaa35e..f98101cd7f920 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,7 @@ site/.swc .gen-golden # Build +bin/ build/ dist/ out/ @@ -54,6 +55,7 @@ site/stats/ # direnv .envrc +.direnv *.test # Loadtesting diff --git a/.golangci.yaml b/.golangci.yaml index fd8946319ca1d..aee26ad272f16 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -175,8 +175,6 @@ linters-settings: - name: modifies-value-receiver - name: package-comments - name: range - - name: range-val-address - - name: range-val-in-closure - name: receiver-naming - name: redefines-builtin-id - name: string-of-int @@ -199,6 +197,10 @@ linters-settings: govet: disable: - loopclosure + gosec: + excludes: + # Implicit memory aliasing of items from a range statement (irrelevant as of Go v1.22) + - G601 issues: # Rules listed here: https://github.com/securego/gosec#available-rules @@ -238,7 +240,6 @@ linters: - errname - errorlint - exhaustruct - - exportloopref - forcetypeassert - gocritic # gocyclo is may be useful in the future when we start caring diff --git a/.markdownlint.jsonc b/.markdownlint.jsonc new file mode 100644 index 0000000000000..55221796ce04e --- /dev/null +++ b/.markdownlint.jsonc @@ -0,0 +1,31 @@ +// Example markdownlint configuration with all properties set to their default value +{ + "MD010": { "spaces_per_tab": 4}, // No hard tabs: we use 4 spaces per tab + + "MD013": false, // Line length: we are not following a strict line lnegth in markdown files + + "MD024": { "siblings_only": true }, // Multiple headings with the same content: + + "MD033": false, // Inline HTML: we use it in some places + + "MD034": false, // Bare URL: we use it in some places in generated docs e.g. + // codersdk/deployment.go L597, L1177, L2287, L2495, L2533 + // codersdk/workspaceproxy.go L196, L200-L201 + // coderd/tracing/exporter.go L26 + // cli/exp_scaletest.go L-9 + + "MD041": false, // First line in file should be a top level heading: All of our changelogs do not start with a top level heading + // TODO: We need to update /home/coder/repos/coder/coder/scripts/release/generate_release_notes.sh to generate changelogs that follow this rule + + "MD052": false, // Image reference: Not a valid reference in generated docs + // docs/reference/cli/server.md L628 + + "MD055": false, // Table pipe style: Some of the generated tables do not have ending pipes + // docs/reference/api/schema.md + // docs/reference/api/templates.md + // docs/reference/cli/server.md + + "MD056": false // Table column count: Some of the auto-generated tables have issues. TODO: This is probably because of splitting cell content to multiple lines. + // docs/reference/api/schema.md + // docs/reference/api/templates.md +} diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 8b84ba3315e25..0000000000000 --- a/.prettierignore +++ /dev/null @@ -1,96 +0,0 @@ -# Code generated by Makefile (.gitignore .prettierignore.include). DO NOT EDIT. - -# .gitignore: -# Common ignore patterns, these rules applies in both root and subdirectories. -.DS_Store -.eslintcache -.gitpod.yml -.idea -**/*.swp -gotests.coverage -gotests.xml -gotests_stats.json -gotests.json -node_modules/ -vendor/ -yarn-error.log - -# VSCode settings. -**/.vscode/* -# Allow VSCode recommendations and default settings in project root. -!/.vscode/extensions.json -!/.vscode/settings.json -# Allow code snippets -!/.vscode/*.code-snippets - -# Front-end ignore patterns. -.next/ -site/build-storybook.log -site/coverage/ -site/storybook-static/ -site/test-results/* -site/e2e/test-results/* -site/e2e/states/*.json -site/e2e/.auth.json -site/playwright-report/* -site/.swc - -# Make target for updating golden files (any dir). -.gen-golden - -# Build -build/ -dist/ -out/ - -# Bundle analysis -site/stats/ - -*.tfstate -*.tfstate.backup -*.tfplan -*.lock.hcl -.terraform/ - -**/.coderv2/* -**/__debug_bin - -# direnv -.envrc -*.test - -# Loadtesting -./scaletest/terraform/.terraform -./scaletest/terraform/.terraform.lock.hcl -scaletest/terraform/secrets.tfvars -.terraform.tfstate.* - -# Nix -result - -# Data dumps from unit tests -**/*.test.sql - -# Filebrowser.db -**/filebrowser.db - -# pnpm -.pnpm-store/ - -# Zed -.zed_server -# .prettierignore.include: -# Helm templates contain variables that are invalid YAML and can't be formatted -# by Prettier. -helm/**/templates/*.yaml - -# Testdata shouldn't be formatted. -testdata/ - -# Ignore generated files -**/pnpm-lock.yaml -**/*.gen.json - -# Everything in site/ is formatted by Biome. For the rest of the repo though, we -# need broader language support. -site/ diff --git a/.prettierignore.include b/.prettierignore.include deleted file mode 100644 index b791f93042e9f..0000000000000 --- a/.prettierignore.include +++ /dev/null @@ -1,14 +0,0 @@ -# Helm templates contain variables that are invalid YAML and can't be formatted -# by Prettier. -helm/**/templates/*.yaml - -# Testdata shouldn't be formatted. -testdata/ - -# Ignore generated files -**/pnpm-lock.yaml -**/*.gen.json - -# Everything in site/ is formatted by Biome. For the rest of the repo though, we -# need broader language support. -site/ diff --git a/.vscode/extensions.json b/.vscode/extensions.json index bf33cb08c3196..e2d5e0464f5d2 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,16 +1,16 @@ { "recommendations": [ + "biomejs.biome", + "bradlc.vscode-tailwindcss", + "DavidAnson.vscode-markdownlint", + "EditorConfig.EditorConfig", + "emeraldwalk.runonsave", + "foxundermoon.shell-format", "github.vscode-codeql", "golang.go", "hashicorp.terraform", - "esbenp.prettier-vscode", - "foxundermoon.shell-format", - "emeraldwalk.runonsave", - "zxh404.vscode-proto3", "redhat.vscode-yaml", "tekumara.typos-vscode", - "EditorConfig.EditorConfig", - "biomejs.biome", - "bradlc.vscode-tailwindcss" + "zxh404.vscode-proto3" ] } diff --git a/.vscode/markdown.code-snippets b/.vscode/markdown.code-snippets index 0d1fcf3402223..bdd3463b48836 100644 --- a/.vscode/markdown.code-snippets +++ b/.vscode/markdown.code-snippets @@ -20,6 +20,14 @@ "body": "$0", "description": "image" }, + "premium-feature": { + "prefix": "#premium-feature", + "body": [ + "
\n", + "${1:feature} ${2|is,are|} an Enterprise and Premium feature. [Learn more](https://coder.com/pricing#compare-plans).\n", + "" + ] + }, "tabs": { "prefix": "#tabs", "body": [ diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index c1fd547fddcf4..37dadd19667d4 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1 +1,2 @@ -[https://coder.com/docs/coder-oss/latest/contributing/CODE_OF_CONDUCT](https://coder.com/docs/contributing/CODE_OF_CONDUCT) + +[https://coder.com/docs/contributing/CODE_OF_CONDUCT](https://coder.com/docs/contributing/CODE_OF_CONDUCT) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000000..3c2ee6b88df58 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,2 @@ + +[https://coder.com/docs/CONTRIBUTING](https://coder.com/docs/CONTRIBUTING) diff --git a/Makefile b/Makefile index 7a91b70d768bb..d71b1173f36b7 100644 --- a/Makefile +++ b/Makefile @@ -260,6 +260,7 @@ $(CODER_DYLIBS): go.mod go.sum $(GO_SRC_FILES) # This task builds both dylibs build/coder-dylib: $(CODER_DYLIBS) +.PHONY: build/coder-dylib # This task builds all archives. It parses the target name to get the metadata # for the build, so it must be specified in this format: @@ -387,15 +388,35 @@ $(foreach chart,$(charts),build/$(chart)_helm_$(VERSION).tgz): build/%_helm_$(VE --chart $* \ --output "$@" -site/out/index.html: site/package.json $(shell find ./site $(FIND_EXCLUSIONS) -type f \( -name '*.ts' -o -name '*.tsx' \)) - cd site +node_modules/.installed: package.json + ./scripts/pnpm_install.sh + +offlinedocs/node_modules/.installed: offlinedocs/package.json + cd offlinedocs/ + ../scripts/pnpm_install.sh + +site/node_modules/.installed: site/package.json + cd site/ + ../scripts/pnpm_install.sh + +SITE_GEN_FILES := \ + site/src/api/typesGenerated.ts \ + site/src/api/rbacresourcesGenerated.ts \ + site/src/api/countriesGenerated.ts \ + site/src/theme/icons.json + +site/out/index.html: \ + site/node_modules/.installed \ + site/static/install.sh \ + $(SITE_GEN_FILES) \ + $(shell find ./site $(FIND_EXCLUSIONS) -type f \( -name '*.ts' -o -name '*.tsx' \)) + cd site/ # prevents this directory from getting to big, and causing "too much data" errors rm -rf out/assets/ - ../scripts/pnpm_install.sh pnpm build -offlinedocs/out/index.html: $(shell find ./offlinedocs $(FIND_EXCLUSIONS) -type f) $(shell find ./docs $(FIND_EXCLUSIONS) -type f | sed 's: :\\ :g') - cd offlinedocs +offlinedocs/out/index.html: offlinedocs/node_modules/.installed $(shell find ./offlinedocs $(FIND_EXCLUSIONS) -type f) $(shell find ./docs $(FIND_EXCLUSIONS) -type f | sed 's: :\\ :g') + cd offlinedocs/ ../scripts/pnpm_install.sh pnpm export @@ -414,7 +435,7 @@ BOLD := $(shell tput bold 2>/dev/null) GREEN := $(shell tput setaf 2 2>/dev/null) RESET := $(shell tput sgr0 2>/dev/null) -fmt: fmt/ts fmt/go fmt/terraform fmt/shfmt fmt/prettier +fmt: fmt/ts fmt/go fmt/terraform fmt/shfmt fmt/biome fmt/markdown .PHONY: fmt fmt/go: @@ -422,10 +443,12 @@ fmt/go: echo "$(GREEN)==>$(RESET) $(BOLD)fmt/go$(RESET)" # VS Code users should check out # https://github.com/mvdan/gofumpt#visual-studio-code - go run mvdan.cc/gofumpt@v0.4.0 -w -l . + find . $(FIND_EXCLUSIONS) -type f -name '*.go' -print0 | \ + xargs -0 grep --null -L "DO NOT EDIT" | \ + xargs -0 go run mvdan.cc/gofumpt@v0.4.0 -w -l .PHONY: fmt/go -fmt/ts: +fmt/ts: site/node_modules/.installed echo "$(GREEN)==>$(RESET) $(BOLD)fmt/ts$(RESET)" cd site # Avoid writing files in CI to reduce file write activity @@ -436,15 +459,16 @@ else endif .PHONY: fmt/ts -fmt/prettier: .prettierignore - echo "$(GREEN)==>$(RESET) $(BOLD)fmt/prettier$(RESET)" +fmt/biome: site/node_modules/.installed + echo "$(GREEN)==>$(RESET) $(BOLD)fmt/biome$(RESET)" + cd site/ # Avoid writing files in CI to reduce file write activity ifdef CI pnpm run format:check else pnpm run format endif -.PHONY: fmt/prettier +.PHONY: fmt/biome fmt/terraform: $(wildcard *.tf) echo "$(GREEN)==>$(RESET) $(BOLD)fmt/terraform$(RESET)" @@ -461,15 +485,20 @@ else endif .PHONY: fmt/shfmt -lint: lint/shellcheck lint/go lint/ts lint/examples lint/helm lint/site-icons +fmt/markdown: node_modules/.installed + echo "$(GREEN)==>$(RESET) $(BOLD)fmt/markdown$(RESET)" + pnpm format-docs +.PHONY: fmt/markdown + +lint: lint/shellcheck lint/go lint/ts lint/examples lint/helm lint/site-icons lint/markdown .PHONY: lint lint/site-icons: ./scripts/check_site_icons.sh .PHONY: lint/site-icons -lint/ts: - cd site +lint/ts: site/node_modules/.installed + cd site/ pnpm lint .PHONY: lint/ts @@ -491,13 +520,18 @@ lint/shellcheck: $(SHELL_SRC_FILES) .PHONY: lint/shellcheck lint/helm: - cd helm + cd helm/ make lint .PHONY: lint/helm +lint/markdown: node_modules/.installed + pnpm lint-docs +.PHONY: lint/markdown + # All files generated by the database should be added here, and this can be used # as a target for jobs that need to run after the database is generated. DB_GEN_FILES := \ + coderd/database/dump.sql \ coderd/database/querier.go \ coderd/database/unique_constraint.go \ coderd/database/dbmem/dbmem.go \ @@ -511,35 +545,34 @@ TAILNETTEST_MOCKS := \ tailnet/tailnettest/workspaceupdatesprovidermock.go \ tailnet/tailnettest/subscriptionmock.go - -# all gen targets should be added here and to gen/mark-fresh -gen: \ +GEN_FILES := \ tailnet/proto/tailnet.pb.go \ agent/proto/agent.pb.go \ provisionersdk/proto/provisioner.pb.go \ provisionerd/proto/provisionerd.pb.go \ vpn/vpn.pb.go \ - coderd/database/dump.sql \ $(DB_GEN_FILES) \ - site/src/api/typesGenerated.ts \ + $(SITE_GEN_FILES) \ coderd/rbac/object_gen.go \ codersdk/rbacresources_gen.go \ - site/src/api/rbacresourcesGenerated.ts \ - site/src/api/countriesGenerated.ts \ docs/admin/integrations/prometheus.md \ docs/reference/cli/index.md \ docs/admin/security/audit-logs.md \ coderd/apidoc/swagger.json \ - .prettierignore.include \ - .prettierignore \ provisioner/terraform/testdata/version \ site/e2e/provisionerGenerated.ts \ - site/src/theme/icons.json \ examples/examples.gen.json \ $(TAILNETTEST_MOCKS) \ coderd/database/pubsub/psmock/psmock.go + + +# all gen targets should be added here and to gen/mark-fresh +gen: gen/db $(GEN_FILES) .PHONY: gen +gen/db: $(DB_GEN_FILES) +.PHONY: gen/db + # Mark all generated files as fresh so make thinks they're up-to-date. This is # used during releases so we don't run generation scripts. gen/mark-fresh: @@ -560,8 +593,6 @@ gen/mark-fresh: docs/reference/cli/index.md \ docs/admin/security/audit-logs.md \ coderd/apidoc/swagger.json \ - .prettierignore.include \ - .prettierignore \ site/e2e/provisionerGenerated.ts \ site/src/theme/icons.json \ examples/examples.gen.json \ @@ -577,7 +608,7 @@ gen/mark-fresh: fi # touch sets the mtime of the file to the current time - touch $$file + touch "$$file" done .PHONY: gen/mark-fresh @@ -639,25 +670,29 @@ vpn/vpn.pb.go: vpn/vpn.proto --go_opt=paths=source_relative \ ./vpn/vpn.proto -site/src/api/typesGenerated.ts: $(wildcard scripts/apitypings/*) $(shell find ./codersdk $(FIND_EXCLUSIONS) -type f -name '*.go') - go run ./scripts/apitypings/ > $@ - ./scripts/pnpm_install.sh +site/src/api/typesGenerated.ts: site/node_modules/.installed $(wildcard scripts/apitypings/*) $(shell find ./codersdk $(FIND_EXCLUSIONS) -type f -name '*.go') + # -C sets the directory for the go run command + go run -C ./scripts/apitypings main.go > $@ + cd site/ + pnpm exec biome format --write src/api/typesGenerated.ts -site/e2e/provisionerGenerated.ts: provisionerd/proto/provisionerd.pb.go provisionersdk/proto/provisioner.pb.go - cd site - ../scripts/pnpm_install.sh +site/e2e/provisionerGenerated.ts: site/node_modules/.installed provisionerd/proto/provisionerd.pb.go provisionersdk/proto/provisioner.pb.go + cd site/ pnpm run gen:provisioner -site/src/theme/icons.json: $(wildcard scripts/gensite/*) $(wildcard site/static/icon/*) +site/src/theme/icons.json: site/node_modules/.installed $(wildcard scripts/gensite/*) $(wildcard site/static/icon/*) go run ./scripts/gensite/ -icons "$@" - ./scripts/pnpm_install.sh - pnpm -C site/ exec biome format --write src/theme/icons.json + cd site/ + pnpm exec biome format --write src/theme/icons.json examples/examples.gen.json: scripts/examplegen/main.go examples/examples.go $(shell find ./examples/templates) go run ./scripts/examplegen/main.go > examples/examples.gen.json coderd/rbac/object_gen.go: scripts/typegen/rbacobject.gotmpl scripts/typegen/main.go coderd/rbac/object.go coderd/rbac/policy/policy.go - go run scripts/typegen/main.go rbac object > coderd/rbac/object_gen.go + tempdir=$(shell mktemp -d /tmp/typegen_rbac_object.XXXXXX) + go run ./scripts/typegen/main.go rbac object > "$$tempdir/object_gen.go" + mv -v "$$tempdir/object_gen.go" coderd/rbac/object_gen.go + rmdir -v "$$tempdir" codersdk/rbacresources_gen.go: scripts/typegen/codersdk.gotmpl scripts/typegen/main.go coderd/rbac/object.go coderd/rbac/policy/policy.go # Do no overwrite codersdk/rbacresources_gen.go directly, as it would make the file empty, breaking @@ -665,47 +700,69 @@ codersdk/rbacresources_gen.go: scripts/typegen/codersdk.gotmpl scripts/typegen/m go run scripts/typegen/main.go rbac codersdk > /tmp/rbacresources_gen.go mv /tmp/rbacresources_gen.go codersdk/rbacresources_gen.go -site/src/api/rbacresourcesGenerated.ts: scripts/typegen/codersdk.gotmpl scripts/typegen/main.go coderd/rbac/object.go coderd/rbac/policy/policy.go +site/src/api/rbacresourcesGenerated.ts: site/node_modules/.installed scripts/typegen/codersdk.gotmpl scripts/typegen/main.go coderd/rbac/object.go coderd/rbac/policy/policy.go go run scripts/typegen/main.go rbac typescript > "$@" + cd site/ + pnpm exec biome format --write src/api/rbacresourcesGenerated.ts -site/src/api/countriesGenerated.ts: scripts/typegen/countries.tstmpl scripts/typegen/main.go codersdk/countries.go +site/src/api/countriesGenerated.ts: site/node_modules/.installed scripts/typegen/countries.tstmpl scripts/typegen/main.go codersdk/countries.go go run scripts/typegen/main.go countries > "$@" + cd site/ + pnpm exec biome format --write src/api/countriesGenerated.ts -docs/admin/integrations/prometheus.md: scripts/metricsdocgen/main.go scripts/metricsdocgen/metrics +docs/admin/integrations/prometheus.md: node_modules/.installed scripts/metricsdocgen/main.go scripts/metricsdocgen/metrics go run scripts/metricsdocgen/main.go - ./scripts/pnpm_install.sh - pnpm exec prettier --write ./docs/admin/integrations/prometheus.md + pnpm exec markdownlint-cli2 --fix ./docs/admin/integrations/prometheus.md + pnpm exec markdown-table-formatter ./docs/admin/integrations/prometheus.md -docs/reference/cli/index.md: scripts/clidocgen/main.go examples/examples.gen.json $(GO_SRC_FILES) +docs/reference/cli/index.md: node_modules/.installed site/node_modules/.installed scripts/clidocgen/main.go examples/examples.gen.json $(GO_SRC_FILES) CI=true BASE_PATH="." go run ./scripts/clidocgen - ./scripts/pnpm_install.sh - pnpm exec prettier --write ./docs/reference/cli/index.md ./docs/reference/cli/*.md ./docs/manifest.json + pnpm exec markdownlint-cli2 --fix ./docs/reference/cli/*.md + pnpm exec markdown-table-formatter ./docs/reference/cli/*.md + cd site/ + pnpm exec biome format --write ../docs/manifest.json -docs/admin/security/audit-logs.md: coderd/database/querier.go scripts/auditdocgen/main.go enterprise/audit/table.go coderd/rbac/object_gen.go +docs/admin/security/audit-logs.md: node_modules/.installed coderd/database/querier.go scripts/auditdocgen/main.go enterprise/audit/table.go coderd/rbac/object_gen.go go run scripts/auditdocgen/main.go - ./scripts/pnpm_install.sh - pnpm exec prettier --write ./docs/admin/security/audit-logs.md + pnpm exec markdownlint-cli2 --fix ./docs/admin/security/audit-logs.md + pnpm exec markdown-table-formatter ./docs/admin/security/audit-logs.md -coderd/apidoc/swagger.json: $(shell find ./scripts/apidocgen $(FIND_EXCLUSIONS) -type f) $(wildcard coderd/*.go) $(wildcard enterprise/coderd/*.go) $(wildcard codersdk/*.go) $(wildcard enterprise/wsproxy/wsproxysdk/*.go) $(DB_GEN_FILES) .swaggo docs/manifest.json coderd/rbac/object_gen.go +coderd/apidoc/swagger.json: node_modules/.installed site/node_modules/.installed $(shell find ./scripts/apidocgen $(FIND_EXCLUSIONS) -type f) $(wildcard coderd/*.go) $(wildcard enterprise/coderd/*.go) $(wildcard codersdk/*.go) $(wildcard enterprise/wsproxy/wsproxysdk/*.go) $(DB_GEN_FILES) .swaggo docs/manifest.json coderd/rbac/object_gen.go ./scripts/apidocgen/generate.sh - ./scripts/pnpm_install.sh - pnpm exec prettier --write ./docs/reference/api ./docs/manifest.json ./coderd/apidoc/swagger.json + pnpm exec markdownlint-cli2 --fix ./docs/reference/api/*.md + pnpm exec markdown-table-formatter ./docs/reference/api/*.md + cd site/ + pnpm exec biome format --write ../docs/manifest.json ../coderd/apidoc/swagger.json update-golden-files: \ cli/testdata/.gen-golden \ - helm/coder/tests/testdata/.gen-golden \ - helm/provisioner/tests/testdata/.gen-golden \ - scripts/ci-report/testdata/.gen-golden \ - enterprise/cli/testdata/.gen-golden \ - enterprise/tailnet/testdata/.gen-golden \ - tailnet/testdata/.gen-golden \ coderd/.gen-golden \ coderd/notifications/.gen-golden \ - provisioner/terraform/testdata/.gen-golden + enterprise/cli/testdata/.gen-golden \ + enterprise/tailnet/testdata/.gen-golden \ + helm/coder/tests/testdata/.gen-golden \ + helm/provisioner/tests/testdata/.gen-golden \ + provisioner/terraform/testdata/.gen-golden \ + tailnet/testdata/.gen-golden .PHONY: update-golden-files +clean/golden-files: + find . -type f -name '.gen-golden' -delete + find \ + cli/testdata \ + coderd/notifications/testdata \ + coderd/testdata \ + enterprise/cli/testdata \ + enterprise/tailnet/testdata \ + helm/coder/tests/testdata \ + helm/provisioner/tests/testdata \ + provisioner/terraform/testdata \ + tailnet/testdata \ + -type f -name '*.golden' -delete +.PHONY: clean/golden-files + cli/testdata/.gen-golden: $(wildcard cli/testdata/*.golden) $(wildcard cli/*.tpl) $(GO_SRC_FILES) $(wildcard cli/*_test.go) - go test ./cli -run="Test(CommandHelp|ServerYAML|ErrorExamples)" -update + go test ./cli -run="Test(CommandHelp|ServerYAML|ErrorExamples|.*Golden)" -update touch "$@" enterprise/cli/testdata/.gen-golden: $(wildcard enterprise/cli/testdata/*.golden) $(wildcard cli/*.tpl) $(GO_SRC_FILES) $(wildcard enterprise/cli/*_test.go) @@ -746,23 +803,14 @@ provisioner/terraform/testdata/version: fi .PHONY: provisioner/terraform/testdata/version -scripts/ci-report/testdata/.gen-golden: $(wildcard scripts/ci-report/testdata/*) $(wildcard scripts/ci-report/*.go) - go test ./scripts/ci-report -run=TestOutputMatchesGoldenFile -update - touch "$@" - -# Combine .gitignore with .prettierignore.include to generate .prettierignore. -.prettierignore: .gitignore .prettierignore.include - echo "# Code generated by Makefile ($^). DO NOT EDIT." > "$@" - echo "" >> "$@" - for f in $^; do - echo "# $${f}:" >> "$@" - cat "$$f" >> "$@" - done - test: $(GIT_FLAGS) gotestsum --format standard-quiet -- -v -short -count=1 ./... .PHONY: test +test-cli: + $(GIT_FLAGS) gotestsum --format standard-quiet -- -v -short -count=1 ./cli/... +.PHONY: test-cli + # sqlc-cloud-is-setup will fail if no SQLc auth token is set. Use this as a # dependency for any sqlc-cloud related targets. sqlc-cloud-is-setup: @@ -815,10 +863,35 @@ test-migrations: test-postgres-docker if [[ "$${COMMIT_FROM}" == "$${COMMIT_TO}" ]]; then echo "Nothing to do!"; exit 0; fi echo "DROP DATABASE IF EXISTS migrate_test_$${COMMIT_FROM}; CREATE DATABASE migrate_test_$${COMMIT_FROM};" | psql 'postgresql://postgres:postgres@localhost:5432/postgres?sslmode=disable' go run ./scripts/migrate-test/main.go --from="$$COMMIT_FROM" --to="$$COMMIT_TO" --postgres-url="postgresql://postgres:postgres@localhost:5432/migrate_test_$${COMMIT_FROM}?sslmode=disable" +.PHONY: test-migrations # NOTE: we set --memory to the same size as a GitHub runner. test-postgres-docker: docker rm -f test-postgres-docker-${POSTGRES_VERSION} || true + + # Try pulling up to three times to avoid CI flakes. + docker pull gcr.io/coder-dev-1/postgres:${POSTGRES_VERSION} || { + retries=2 + for try in $(seq 1 ${retries}); do + echo "Failed to pull image, retrying (${try}/${retries})..." + sleep 1 + if docker pull gcr.io/coder-dev-1/postgres:${POSTGRES_VERSION}; then + break + fi + done + } + + # Make sure to not overallocate work_mem and max_connections as each + # connection will be allowed to use this much memory. Try adjusting + # shared_buffers instead, if needed. + # + # - work_mem=8MB * max_connections=1000 = 8GB + # - shared_buffers=2GB + effective_cache_size=1GB = 3GB + # + # This leaves 5GB for the rest of the system _and_ storing the + # database in memory (--tmpfs). + # + # https://www.postgresql.org/docs/current/runtime-config-resource.html#GUC-WORK-MEM docker run \ --env POSTGRES_PASSWORD=postgres \ --env POSTGRES_USER=postgres \ @@ -831,9 +904,9 @@ test-postgres-docker: --detach \ --memory 16GB \ gcr.io/coder-dev-1/postgres:${POSTGRES_VERSION} \ - -c shared_buffers=1GB \ - -c work_mem=1GB \ + -c shared_buffers=2GB \ -c effective_cache_size=1GB \ + -c work_mem=8MB \ -c max_connections=1000 \ -c fsync=off \ -c synchronous_commit=off \ @@ -862,6 +935,7 @@ test-tailnet-integration: -timeout=5m \ -count=1 \ ./tailnet/test/integration +.PHONY: test-tailnet-integration # Note: we used to add this to the test target, but it's not necessary and we can # achieve the desired result by specifying -count=1 in the go test invocation @@ -870,6 +944,19 @@ test-clean: go clean -testcache .PHONY: test-clean +site/e2e/bin/coder: go.mod go.sum $(GO_SRC_FILES) + go build -o $@ \ + -tags ts_omit_aws,ts_omit_bird,ts_omit_tap,ts_omit_kube \ + ./enterprise/cmd/coder + +test-e2e: site/e2e/bin/coder site/node_modules/.installed site/out/index.html + cd site/ +ifdef CI + DEBUG=pw:api pnpm playwright:test --forbid-only --workers 1 +else + pnpm playwright:test +endif .PHONY: test-e2e -test-e2e: - cd ./site && DEBUG=pw:api pnpm playwright:test --forbid-only --workers 1 + +dogfood/contents/nix.hash: flake.nix flake.lock + sha256sum flake.nix flake.lock >./dogfood/contents/nix.hash diff --git a/README.md b/README.md index 2048f6ba1fd83..f0c939bee6b9d 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ +
-
+
Hello Bobby,
+ +The workspace bobby-workspace has been created from the= + template bobby-template using version alpha.
+© 2024 Coder. All rights reserved - h= +ttp://test.com
+ + +Hello Bobby,
+ +A new workspace build has been manually created for your workspace
© 2024 Coder. All rights reserved - h= +ttp://test.com
+ + ++ +If you don't require fine-grained access control, it's easier to [configure a GitHub OAuth app](#configure-a-github-oauth-app). + +```env -CODER_EXTERNAL_AUTH_0_ID="primary-azure-devops" -CODER_EXTERNAL_AUTH_0_TYPE=azure-devops +CODER_EXTERNAL_AUTH_0_ID="USER_DEFINED_ID" +CODER_EXTERNAL_AUTH_0_TYPE=github CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx -# Ensure this value is your "Client Secret", not "App Secret" CODER_EXTERNAL_AUTH_0_CLIENT_SECRET=xxxxxxx -CODER_EXTERNAL_AUTH_0_AUTH_URL="https://app.vssps.visualstudio.com/oauth2/authorize" -CODER_EXTERNAL_AUTH_0_TOKEN_URL="https://app.vssps.visualstudio.com/oauth2/token" ``` -## Azure DevOps (via Entra ID) +### GitHub Enterprise -Azure DevOps (via Entra ID) requires the following environment variables: +GitHub Enterprise requires the following environment variables: ```env -CODER_EXTERNAL_AUTH_0_ID="primary-azure-devops" -CODER_EXTERNAL_AUTH_0_TYPE=azure-devops-entra +CODER_EXTERNAL_AUTH_0_ID="primary-github" +CODER_EXTERNAL_AUTH_0_TYPE=github CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx CODER_EXTERNAL_AUTH_0_CLIENT_SECRET=xxxxxxx -CODER_EXTERNAL_AUTH_0_AUTH_URL="https://login.microsoftonline.com/
+ +Multiple providers is an Enterprise and Premium feature. +[Learn more](https://coder.com/pricing#compare-plans). + ++ +Below is an example configuration with multiple providers: + +
+ +**Note:** To support regex matching for paths like `github\.com/org`, add the following `git config` line to the [Coder agent startup script](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/agent#startup_script): + +```shell +git config --global credential.useHttpPath true +``` + +```env # Provider 1) github.com @@ -203,11 +261,3 @@ CODER_EXTERNAL_AUTH_1_AUTH_URL="https://github.example.com/login/oauth/authorize CODER_EXTERNAL_AUTH_1_TOKEN_URL="https://github.example.com/login/oauth/access_token" CODER_EXTERNAL_AUTH_1_VALIDATE_URL="https://github.example.com/api/v3/user" ``` - -To support regex matching for paths (e.g. github\.com/org), you'll need to add -this to the -[Coder agent startup script](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/agent#startup_script): - -```shell -git config --global credential.useHttpPath true -``` diff --git a/docs/admin/index.md b/docs/admin/index.md index 6ef0e6fb6541a..7dcdbc3ce91df 100644 --- a/docs/admin/index.md +++ b/docs/admin/index.md @@ -15,4 +15,56 @@ and [API](../reference/api/index.md) docs. For any information not strictly contained in these sections, check out our [Tutorials](../tutorials/index.md) and [FAQs](../tutorials/faqs.md). +## What is an image, template, dev container, or workspace + +### Image + +- A [base image](./templates/managing-templates/image-management.md) contains + OS-level packages and utilities that the Coder workspace is built on. It can + be an [example image](https://github.com/coder/images), custom image in your + registry, or one from [Docker Hub](https://hub.docker.com/search). It is + defined in each template. +- Managed by: Externally to Coder. + +### Template + +- [Templates](./templates/index.md) include infrastructure-level dependencies + for the workspace. For example, a template can include Kubernetes + PersistentVolumeClaims, Docker containers, or EC2 VMs. +- Managed by: Template administrators from within the Coder deployment. + +### Startup scripts + +- Agent startup scripts apply to all users of a template. This is an + intentionally flexible area that template authors have at their disposal to + manage the "last mile" of workspace creation. +- Managed by: Coder template administrators. + +### Workspace + +- A [workspace](../user-guides/workspace-management.md) is the environment that + a developer works in. Developers on a team each work from their own workspace + and can use [multiple IDEs](../user-guides/workspace-access/index.md). +- Managed by: Developers + +### Development containers (dev containers) + +- A + [Development Container](./templates/managing-templates/devcontainers/index.md) + is an open-source specification for defining development environments (called + dev containers). It is generally stored in VCS alongside associated source + code. It can reference an existing base image, or a custom Dockerfile that + will be built on-demand. +- Managed by: Dev Teams + +### Dotfiles / personalization + +- Users may have their own specific preferences relating to shell prompt, custom + keybindings, color schemes, and more. Users can leverage Coder's + [dotfiles support](../user-guides/workspace-dotfiles.md) or create their own + script to personalize their workspace. Be aware that users with root + permissions in their workspace can override almost all of the previous + configuration. +- Managed by: Individual Users +
+ +This utility is experimental. + +It is not subject to any compatibility guarantees and may cause interruptions +for your users. +To avoid potential outages and orphaned resources, we recommend that you run +scale tests on a secondary "staging" environment or a dedicated +[Kubernetes playground cluster](https://github.com/coder/coder/tree/main/scaletest/terraform). + +Run it against a production environment at your own risk. + +### Create workspaces The following command will provision a number of Coder workspaces using the -specified template and extra parameters. +specified template and extra parameters: ```shell coder exp scaletest create-workspaces \ - --retry 5 \ - --count "${SCALETEST_PARAM_NUM_WORKSPACES}" \ - --template "${SCALETEST_PARAM_TEMPLATE}" \ - --concurrency "${SCALETEST_PARAM_CREATE_CONCURRENCY}" \ - --timeout 5h \ - --job-timeout 5h \ - --no-cleanup \ - --output json:"${SCALETEST_RESULTS_DIR}/create-workspaces.json" - -# Run `coder exp scaletest create-workspaces --help` for all usage + --retry 5 \ + --count "${SCALETEST_PARAM_NUM_WORKSPACES}" \ + --template "${SCALETEST_PARAM_TEMPLATE}" \ + --concurrency "${SCALETEST_PARAM_CREATE_CONCURRENCY}" \ + --timeout 5h \ + --job-timeout 5h \ + --no-cleanup \ + --output json:"${SCALETEST_RESULTS_DIR}/create-workspaces.json" ``` The command does the following: @@ -70,6 +77,12 @@ The command does the following: 1. If you don't want the creation process to be interrupted by any errors, use the `--retry 5` flag. +For more built-in `scaletest` options, use the `--help` flag: + +```shell +coder exp scaletest create-workspaces --help +``` + ### Traffic Generation Given an existing set of workspaces created previously with `create-workspaces`, @@ -79,14 +92,14 @@ Terminal against those workspaces. ```shell # Produce load at about 1000MB/s (25MB/40ms). coder exp scaletest workspace-traffic \ - --template "${SCALETEST_PARAM_GREEDY_AGENT_TEMPLATE}" \ - --bytes-per-tick $((1024 * 1024 * 25)) \ - --tick-interval 40ms \ - --timeout "$((delay))s" \ - --job-timeout "$((delay))s" \ - --scaletest-prometheus-address 0.0.0.0:21113 \ - --target-workspaces "0:100" \ - --trace=false \ + --template "${SCALETEST_PARAM_GREEDY_AGENT_TEMPLATE}" \ + --bytes-per-tick $((1024 * 1024 * 25)) \ + --tick-interval 40ms \ + --timeout "$((delay))s" \ + --job-timeout "$((delay))s" \ + --scaletest-prometheus-address 0.0.0.0:21113 \ + --target-workspaces "0:100" \ + --trace=false \ --output json:"${SCALETEST_RESULTS_DIR}/traffic-${type}-greedy-agent.json" ``` @@ -105,7 +118,11 @@ The `workspace-traffic` supports also other modes - SSH traffic, workspace app: 1. For SSH traffic: Use `--ssh` flag to generate SSH traffic instead of Web Terminal. 1. For workspace app traffic: Use `--app [wsdi|wsec|wsra]` flag to select app - behavior. (modes: _WebSocket discard_, _WebSocket echo_, _WebSocket read_). + behavior. + + - `wsdi`: WebSocket discard + - `wsec`: WebSocket echo + - `wsra`: WebSocket read ### Cleanup @@ -114,8 +131,8 @@ wish to clean up all workspaces, you can run the following command: ```shell coder exp scaletest cleanup \ - --cleanup-job-timeout 2h \ - --cleanup-timeout 15min + --cleanup-job-timeout 2h \ + --cleanup-timeout 15min ``` This will delete all workspaces and users with the prefix `scaletest-`. @@ -168,7 +185,7 @@ that operators can deploy depending on the traffic projections. There are a few cluster options available: | Workspace size | vCPU | Memory | Persisted storage | Details | -| -------------- | ---- | ------ | ----------------- | ----------------------------------------------------- | +|----------------|------|--------|-------------------|-------------------------------------------------------| | minimal | 1 | 2 Gi | None | | | small | 1 | 1 Gi | None | | | medium | 2 | 2 Gi | None | Medium-sized cluster offers the greedy agent variant. | diff --git a/docs/admin/infrastructure/validated-architectures/1k-users.md b/docs/admin/infrastructure/validated-architectures/1k-users.md index 158eb10392e79..3cb115db58702 100644 --- a/docs/admin/infrastructure/validated-architectures/1k-users.md +++ b/docs/admin/infrastructure/validated-architectures/1k-users.md @@ -12,9 +12,9 @@ tech startups, educational units, or small to mid-sized enterprises. ### Coderd nodes -| Users | Node capacity | Replicas | GCP | AWS | Azure | -| ----------- | ------------------- | ------------------- | --------------- | ---------- | ----------------- | -| Up to 1,000 | 2 vCPU, 8 GB memory | 1-2 / 1 coderd each | `n1-standard-2` | `t3.large` | `Standard_D2s_v3` | +| Users | Node capacity | Replicas | GCP | AWS | Azure | +|-------------|---------------------|--------------------------|-----------------|------------|-------------------| +| Up to 1,000 | 2 vCPU, 8 GB memory | 1-2 nodes, 1 coderd each | `n1-standard-2` | `t3.large` | `Standard_D2s_v3` | **Footnotes**: @@ -23,9 +23,9 @@ tech startups, educational units, or small to mid-sized enterprises. ### Provisioner nodes -| Users | Node capacity | Replicas | GCP | AWS | Azure | -| ----------- | -------------------- | ------------------------------ | ---------------- | ------------ | ----------------- | -| Up to 1,000 | 8 vCPU, 32 GB memory | 2 nodes / 30 provisioners each | `t2d-standard-8` | `t3.2xlarge` | `Standard_D8s_v3` | +| Users | Node capacity | Replicas | GCP | AWS | Azure | +|-------------|----------------------|-------------------------------|------------------|--------------|-------------------| +| Up to 1,000 | 8 vCPU, 32 GB memory | 2 nodes, 30 provisioners each | `t2d-standard-8` | `t3.2xlarge` | `Standard_D8s_v3` | **Footnotes**: @@ -33,9 +33,9 @@ tech startups, educational units, or small to mid-sized enterprises. ### Workspace nodes -| Users | Node capacity | Replicas | GCP | AWS | Azure | -| ----------- | -------------------- | ----------------------- | ---------------- | ------------ | ----------------- | -| Up to 1,000 | 8 vCPU, 32 GB memory | 64 / 16 workspaces each | `t2d-standard-8` | `t3.2xlarge` | `Standard_D8s_v3` | +| Users | Node capacity | Replicas | GCP | AWS | Azure | +|-------------|----------------------|------------------------------|------------------|--------------|-------------------| +| Up to 1,000 | 8 vCPU, 32 GB memory | 64 nodes, 16 workspaces each | `t2d-standard-8` | `t3.2xlarge` | `Standard_D8s_v3` | **Footnotes**: @@ -47,5 +47,5 @@ tech startups, educational units, or small to mid-sized enterprises. ### Database nodes | Users | Node capacity | Replicas | Storage | GCP | AWS | Azure | -| ----------- | ------------------- | -------- | ------- | ------------------ | ------------- | ----------------- | -| Up to 1,000 | 2 vCPU, 8 GB memory | 1 | 512 GB | `db-custom-2-7680` | `db.t3.large` | `Standard_D2s_v3` | +|-------------|---------------------|----------|---------|--------------------|---------------|-------------------| +| Up to 1,000 | 2 vCPU, 8 GB memory | 1 node | 512 GB | `db-custom-2-7680` | `db.t3.large` | `Standard_D2s_v3` | diff --git a/docs/admin/infrastructure/validated-architectures/2k-users.md b/docs/admin/infrastructure/validated-architectures/2k-users.md index 04ff5bf4ec19a..f63f66fed4b6b 100644 --- a/docs/admin/infrastructure/validated-architectures/2k-users.md +++ b/docs/admin/infrastructure/validated-architectures/2k-users.md @@ -17,15 +17,15 @@ deployment reliability under load. ### Coderd nodes -| Users | Node capacity | Replicas | GCP | AWS | Azure | -| ----------- | -------------------- | ----------------------- | --------------- | ----------- | ----------------- | -| Up to 2,000 | 4 vCPU, 16 GB memory | 2 nodes / 1 coderd each | `n1-standard-4` | `t3.xlarge` | `Standard_D4s_v3` | +| Users | Node capacity | Replicas | GCP | AWS | Azure | +|-------------|----------------------|------------------------|-----------------|-------------|-------------------| +| Up to 2,000 | 4 vCPU, 16 GB memory | 2 nodes, 1 coderd each | `n1-standard-4` | `t3.xlarge` | `Standard_D4s_v3` | ### Provisioner nodes -| Users | Node capacity | Replicas | GCP | AWS | Azure | -| ----------- | -------------------- | ------------------------------ | ---------------- | ------------ | ----------------- | -| Up to 2,000 | 8 vCPU, 32 GB memory | 4 nodes / 30 provisioners each | `t2d-standard-8` | `t3.2xlarge` | `Standard_D8s_v3` | +| Users | Node capacity | Replicas | GCP | AWS | Azure | +|-------------|----------------------|-------------------------------|------------------|--------------|-------------------| +| Up to 2,000 | 8 vCPU, 32 GB memory | 4 nodes, 30 provisioners each | `t2d-standard-8` | `t3.2xlarge` | `Standard_D8s_v3` | **Footnotes**: @@ -36,9 +36,9 @@ deployment reliability under load. ### Workspace nodes -| Users | Node capacity | Replicas | GCP | AWS | Azure | -| ----------- | -------------------- | ------------------------ | ---------------- | ------------ | ----------------- | -| Up to 2,000 | 8 vCPU, 32 GB memory | 128 / 16 workspaces each | `t2d-standard-8` | `t3.2xlarge` | `Standard_D8s_v3` | +| Users | Node capacity | Replicas | GCP | AWS | Azure | +|-------------|----------------------|-------------------------------|------------------|--------------|-------------------| +| Up to 2,000 | 8 vCPU, 32 GB memory | 128 nodes, 16 workspaces each | `t2d-standard-8` | `t3.2xlarge` | `Standard_D8s_v3` | **Footnotes**: @@ -50,8 +50,8 @@ deployment reliability under load. ### Database nodes | Users | Node capacity | Replicas | Storage | GCP | AWS | Azure | -| ----------- | -------------------- | -------- | ------- | ------------------- | -------------- | ----------------- | -| Up to 2,000 | 4 vCPU, 16 GB memory | 1 | 1 TB | `db-custom-4-15360` | `db.t3.xlarge` | `Standard_D4s_v3` | +|-------------|----------------------|----------|---------|---------------------|----------------|-------------------| +| Up to 2,000 | 4 vCPU, 16 GB memory | 1 node | 1 TB | `db-custom-4-15360` | `db.t3.xlarge` | `Standard_D4s_v3` | **Footnotes**: diff --git a/docs/admin/infrastructure/validated-architectures/3k-users.md b/docs/admin/infrastructure/validated-architectures/3k-users.md index 093ec21c5c52c..bea84db5e8b32 100644 --- a/docs/admin/infrastructure/validated-architectures/3k-users.md +++ b/docs/admin/infrastructure/validated-architectures/3k-users.md @@ -18,15 +18,15 @@ continuously improve the reliability and performance of the platform. ### Coderd nodes -| Users | Node capacity | Replicas | GCP | AWS | Azure | -| ----------- | -------------------- | ----------------- | --------------- | ----------- | ----------------- | -| Up to 3,000 | 8 vCPU, 32 GB memory | 4 / 1 coderd each | `n1-standard-4` | `t3.xlarge` | `Standard_D4s_v3` | +| Users | Node capacity | Replicas | GCP | AWS | Azure | +|-------------|----------------------|-----------------------|-----------------|-------------|-------------------| +| Up to 3,000 | 8 vCPU, 32 GB memory | 4 node, 1 coderd each | `n1-standard-4` | `t3.xlarge` | `Standard_D4s_v3` | ### Provisioner nodes -| Users | Node capacity | Replicas | GCP | AWS | Azure | -| ----------- | -------------------- | ------------------------ | ---------------- | ------------ | ----------------- | -| Up to 3,000 | 8 vCPU, 32 GB memory | 8 / 30 provisioners each | `t2d-standard-8` | `t3.2xlarge` | `Standard_D8s_v3` | +| Users | Node capacity | Replicas | GCP | AWS | Azure | +|-------------|----------------------|-------------------------------|------------------|--------------|-------------------| +| Up to 3,000 | 8 vCPU, 32 GB memory | 8 nodes, 30 provisioners each | `t2d-standard-8` | `t3.2xlarge` | `Standard_D8s_v3` | **Footnotes**: @@ -38,9 +38,9 @@ continuously improve the reliability and performance of the platform. ### Workspace nodes -| Users | Node capacity | Replicas | GCP | AWS | Azure | -| ----------- | -------------------- | ------------------------------ | ---------------- | ------------ | ----------------- | -| Up to 3,000 | 8 vCPU, 32 GB memory | 256 nodes / 12 workspaces each | `t2d-standard-8` | `t3.2xlarge` | `Standard_D8s_v3` | +| Users | Node capacity | Replicas | GCP | AWS | Azure | +|-------------|----------------------|-------------------------------|------------------|--------------|-------------------| +| Up to 3,000 | 8 vCPU, 32 GB memory | 256 nodes, 12 workspaces each | `t2d-standard-8` | `t3.2xlarge` | `Standard_D8s_v3` | **Footnotes**: @@ -53,8 +53,8 @@ continuously improve the reliability and performance of the platform. ### Database nodes | Users | Node capacity | Replicas | Storage | GCP | AWS | Azure | -| ----------- | -------------------- | -------- | ------- | ------------------- | --------------- | ----------------- | -| Up to 3,000 | 8 vCPU, 32 GB memory | 2 | 1.5 TB | `db-custom-8-30720` | `db.t3.2xlarge` | `Standard_D8s_v3` | +|-------------|----------------------|----------|---------|---------------------|-----------------|-------------------| +| Up to 3,000 | 8 vCPU, 32 GB memory | 2 nodes | 1.5 TB | `db-custom-8-30720` | `db.t3.2xlarge` | `Standard_D8s_v3` | **Footnotes**: diff --git a/docs/admin/infrastructure/validated-architectures/index.md b/docs/admin/infrastructure/validated-architectures/index.md index f0baa7c632b98..6b81291648e78 100644 --- a/docs/admin/infrastructure/validated-architectures/index.md +++ b/docs/admin/infrastructure/validated-architectures/index.md @@ -23,7 +23,7 @@ This guide targets the following personas. It assumes a basic understanding of cloud/on-premise computing, containerization, and the Coder platform. | Role | Description | -| ------------------------- | ------------------------------------------------------------------------------ | +|---------------------------|--------------------------------------------------------------------------------| | Platform Engineers | Responsible for deploying, operating the Coder deployment and infrastructure | | Enterprise Architects | Responsible for architecting Coder deployments to meet enterprise requirements | | Managed Service Providers | Entities that deploy and run Coder software as a service for customers | @@ -31,7 +31,7 @@ cloud/on-premise computing, containerization, and the Coder platform. ## CVA Guidance | CVA provides: | CVA does not provide: | -| ---------------------------------------------- | ---------------------------------------------------------------------------------------- | +|------------------------------------------------|------------------------------------------------------------------------------------------| | Single and multi-region K8s deployment options | Prescribing OS, or cloud vs. on-premise | | Reference architectures for up to 3,000 users | An approval of your architecture; the CVA solely provides recommendations and guidelines | | Best practices for building a Coder deployment | Recommendations for every possible deployment scenario | @@ -343,7 +343,7 @@ could affect workspace users experience once the platform is live. versions into Coder from git. For example, on GitHub, you can use the [Setup Coder](https://github.com/marketplace/actions/setup-coder) action. 1. Evaluate enabling - [automatic template updates](../../templates/managing-templates/index.md#template-update-policies-enterprise-premium) + [automatic template updates](../../templates/managing-templates/index.md#template-update-policies) upon workspace startup. ### Observability diff --git a/docs/admin/integrations/island.md b/docs/admin/integrations/island.md index 74cd449f4257f..d5159e9e28868 100644 --- a/docs/admin/integrations/island.md +++ b/docs/admin/integrations/island.md @@ -3,23 +3,22 @@ April 24, 2024 --- -[Island](https://www.island.io/) is an enterprise-grade browser, offering a -Chromium-based experience similar to popular web browsers like Chrome and Edge. -It includes built-in security features for corporate applications and data, -aiming to bridge the gap between consumer-focused browsers and the security -needs of the enterprise. +[Island](https://www.island.io/) is an enterprise-grade browser, offering a Chromium-based experience +similar to popular web browsers like Chrome and Edge. It includes built-in +security features for corporate applications and data, aiming to bridge the gap +between consumer-focused browsers and the security needs of the enterprise. -Coder natively integrates with Island's feature set, which include data loss -protection (DLP), application awareness, browser session recording, and single -sign-on (SSO). This guide intends to document these feature categories and how -they apply to your Coder deployment. +Coder natively integrates with Island's feature set, which include data +loss protection (DLP), application awareness, browser session recording, and +single sign-on (SSO). This guide intends to document these feature categories +and how they apply to your Coder deployment. ## General Configuration @@ -33,90 +32,85 @@ creating browser policies. ## Advanced Data Loss Protection -Integrate Island's advanced data loss prevention (DLP) capabilities with Coder's -cloud development environment (CDE), enabling you to control the “last mile” -between developers’ CDE and their local devices, ensuring that sensitive IP -remains in your centralized environment. +Integrate Island's advanced data loss prevention (DLP) capabilities with +Coder's cloud development environment (CDE), enabling you to control the +"last mile" between developers' CDE and their local devices, +ensuring that sensitive IP remains in your centralized environment. ### Block cut, copy, paste, printing, screen share -1. [Create a Data Sandbox Profile](https://documentation.island.io/docs/create-and-configure-a-data-sandbox-profile) +1. [Create a Data Sandbox Profile](https://documentation.island.io/docs/create-and-configure-a-data-sandbox-profile). 1. Configure the following actions to allow/block (based on your security - requirements): + requirements). -- Screenshot and Screen Share -- Printing -- Save Page -- Clipboard Limitations + - Screenshot and Screen Share + - Printing + - Save Page + - Clipboard Limitations -1. [Create a Policy Rule](https://documentation.island.io/docs/create-and-configure-a-policy-rule-general) - to apply the Data Sandbox Profile +1. [Create a Policy Rule](https://documentation.island.io/docs/create-and-configure-a-policy-rule-general) to apply the Data Sandbox Profile. -1. Define the Coder Application group as the Destination Object +1. Define the Coder Application group as the Destination Object. 1. Define the Data Sandbox Profile as the Action in the Last Mile Protection - section + section. ### Conditionally allow copy on Coder's CLI authentication page -1. [Create a URL Object](https://documentation.island.io/docs/create-and-configure-a-policy-rule-general) - with the following configuration: +1. [Create a URL Object](https://documentation.island.io/docs/create-and-configure-a-policy-rule-general) with the following configuration. -- **Include** -- **URL type**: Wildcard -- **URL address**: `coder.example.com/cli-auth` -- **Casing**: Insensitive + - **Include** + - **URL type**: Wildcard + - **URL address**: `coder.example.com/cli-auth` + - **Casing**: Insensitive -1. [Create a Data Sandbox Profile](https://documentation.island.io/docs/create-and-configure-a-data-sandbox-profile) +1. [Create a Data Sandbox Profile](https://documentation.island.io/docs/create-and-configure-a-data-sandbox-profile). -1. Configure action to allow copy/paste +1. Configure action to allow copy/paste. -1. [Create a Policy Rule](https://documentation.island.io/docs/create-and-configure-a-policy-rule-general) - to apply the Data Sandbox Profile +1. [Create a Policy Rule](https://documentation.island.io/docs/create-and-configure-a-policy-rule-general) to apply the Data Sandbox Profile. -1. Define the URL Object you created as the Destination Object +1. Define the URL Object you created as the Destination Object. 1. Define the Data Sandbox Profile as the Action in the Last Mile Protection - section + section. ### Prevent file upload/download from the browser -1. Create a Protection Profiles for both upload/download +1. Create a Protection Profiles for both upload/download. -- [Upload documentation](https://documentation.island.io/docs/create-and-configure-an-upload-protection-profile) -- [Download documentation](https://documentation.island.io/v1/docs/en/create-and-configure-a-download-protection-profile) + - [Upload documentation](https://documentation.island.io/docs/create-and-configure-an-upload-protection-profile) + - [Download documentation](https://documentation.island.io/v1/docs/en/create-and-configure-a-download-protection-profile) -1. [Create a Policy Rule](https://documentation.island.io/docs/create-and-configure-a-policy-rule-general) - to apply the Protection Profiles +1. [Create a Policy Rule](https://documentation.island.io/docs/create-and-configure-a-policy-rule-general) to apply the Protection Profiles. -1. Define the Coder Application group as the Destination Object +1. Define the Coder Application group as the Destination Object. 1. Define the applicable Protection Profile as the Action in the Data Protection - section + section. ### Scan files for sensitive data -1. [Create a Data Loss Prevention scanner](https://documentation.island.io/docs/create-a-data-loss-prevention-scanner) +1. [Create a Data Loss Prevention scanner](https://documentation.island.io/docs/create-a-data-loss-prevention-scanner). -1. [Create a Policy Rule](https://documentation.island.io/docs/create-and-configure-a-policy-rule-general) - to apply the DLP Scanner +1. [Create a Policy Rule](https://documentation.island.io/docs/create-and-configure-a-policy-rule-general) to apply the DLP Scanner. -1. Define the Coder Application group as the Destination Object +1. Define the Coder Application group as the Destination Object. -1. Define the DLP Scanner as the Action in the Data Protection section +1. Define the DLP Scanner as the Action in the Data Protection section. ## Application Awareness and Boundaries Ensure that Coder is only accessed through the Island browser, guaranteeing that -your browser-level DLP policies are always enforced, and developers can’t +your browser-level DLP policies are always enforced, and developers can't sidestep such policies simply by using another browser. ### Configure browser enforcement, conditional access policies -1. Create a conditional access policy for your configured identity provider. +Create a conditional access policy for your configured identity provider. -> Note: the configured IdP must be the same for both Coder and Island +Note that the configured IdP must be the same for both Coder and Island. - [Azure Active Directory/Entra ID](https://documentation.island.io/docs/configure-browser-enforcement-for-island-with-azure-ad#create-and-apply-a-conditional-access-policy) - [Okta](https://documentation.island.io/docs/configure-browser-enforcement-for-island-with-okta) @@ -129,35 +123,34 @@ screenshots, mouse clicks, and keystrokes. ### Activity Logging Module -1. [Create an Activity Logging Profile](https://documentation.island.io/docs/create-and-configure-an-activity-logging-profile) +1. [Create an Activity Logging Profile](https://documentation.island.io/docs/create-and-configure-an-activity-logging-profile). Supported browser + events include: -Supported browser events include: + - Web Navigation + - File Download + - File Upload + - Clipboard/Drag & Drop + - Print + - Save As + - Screenshots + - Mouse Clicks + - Keystrokes -- Web Navigation -- File Download -- File Upload -- Clipboard/Drag & Drop -- Print -- Save As -- Screenshots -- Mouse Clicks -- Keystrokes +1. [Create a Policy Rule](https://documentation.island.io/docs/create-and-configure-a-policy-rule-general) to apply the Activity Logging Profile. -1. [Create a Policy Rule](https://documentation.island.io/docs/create-and-configure-a-policy-rule-general) - to apply the Activity Logging Profile - -1. Define the Coder Application group as the Destination Object +1. Define the Coder Application group as the Destination Object. 1. Define the Activity Logging Profile as the Action in the Security & - Visibility section + Visibility section. ## Identity-aware logins (SSO) -Integrate Island's identity management system with Coder's authentication -mechanisms to enable identity-aware logins. +Integrate Island's identity management system with Coder's +authentication mechanisms to enable identity-aware logins. ### Configure single sign-on (SSO) seamless authentication between Coder and Island Configure the same identity provider (IdP) for both your Island and Coder -deployment. Upon initial login to the Island browser, the user's session token -will automatically be passed to Coder and authenticate their Coder session. +deployment. Upon initial login to the Island browser, the user's session +token will automatically be passed to Coder and authenticate their Coder +session. diff --git a/docs/admin/integrations/istio.md b/docs/admin/integrations/istio.md new file mode 100644 index 0000000000000..3132052e32767 --- /dev/null +++ b/docs/admin/integrations/istio.md @@ -0,0 +1,35 @@ +# Integrate Coder with Istio + +Use Istio service mesh for your Coder workspace traffic to implement access +controls, encrypt service-to-service communication, and gain visibility into +your workspace network patterns. This guide walks through the required steps to +configure the Istio service mesh for use with Coder. + +While Istio is platform-independent, this guide assumes you are leveraging +Kubernetes. Ensure you have a running Kubernetes cluster with both Coder and +Istio installed, and that you have administrative access to configure both +systems. Once you have access to your Coder cluster, apply the following +manifest: + +```yaml +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: tailscale-behind-istio-ingress + namespace: istio-system +spec: + configPatches: + - applyTo: NETWORK_FILTER + match: + listener: + filterChain: + filter: + name: envoy.filters.network.http_connection_manager + patch: + operation: MERGE + value: + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager + upgrade_configs: + - upgrade_type: derp +``` diff --git a/docs/admin/integrations/jfrog-artifactory.md b/docs/admin/integrations/jfrog-artifactory.md index 89a8ac99cf52e..afc94d6158b94 100644 --- a/docs/admin/integrations/jfrog-artifactory.md +++ b/docs/admin/integrations/jfrog-artifactory.md @@ -3,7 +3,7 @@ January 24, 2024 @@ -31,145 +31,122 @@ by using our official Coder [modules](https://registry.coder.com). We publish two type of modules that automate the JFrog Artifactory and Coder integration. 1. [JFrog-OAuth](https://registry.coder.com/modules/jfrog-oauth) -2. [JFrog-Token](https://registry.coder.com/modules/jfrog-token) +1. [JFrog-Token](https://registry.coder.com/modules/jfrog-token) ### JFrog-OAuth This module is usable by JFrog self-hosted (on-premises) Artifactory as it -requires configuring a custom integration. This integration benefits from -Coder's [external-auth](https://coder.com/docs/admin/external-auth) feature and -allows each user to authenticate with Artifactory using an OAuth flow and issues -user-scoped tokens to each user. +requires configuring a custom integration. This integration benefits from Coder's [external-auth](../../admin/external-auth.md) feature allows each user to authenticate with Artifactory using an OAuth flow and issues user-scoped tokens to each user. To set this up, follow these steps: -1. Modify your Helm chart `values.yaml` for JFrog Artifactory to add, - -```yaml -artifactory: - enabled: true - frontend: - extraEnvironmentVariables: - - name: JF_FRONTEND_FEATURETOGGLER_ACCESSINTEGRATION - value: "true" - access: - accessConfig: - integrations-enabled: true - integration-templates: - - id: "1" - name: "CODER" - redirect-uri: "https://CODER_URL/external-auth/jfrog/callback" - scope: "applied-permissions/user" -``` - -> Note Replace `CODER_URL` with your Coder deployment URL, e.g., ->
-The admin-level access token is used to provision user tokens and is never exposed to -developers or stored in workspaces. -- -If you do not want to use the official modules, you can check example template -that uses Docker as the underlying compute -[here](https://github.com/coder/coder/tree/main/examples/jfrog/docker). The same -concepts apply to all compute types. +1. Get a JFrog access token from your Artifactory instance. The token must be an [admin token](https://registry.terraform.io/providers/jfrog/artifactory/latest/docs#access-token) with scope `applied-permissions/admin`. + +1. Create or edit a Coder template and use the [JFrog-Token](https://registry.coder.com/modules/jfrog-token) module to configure the integration and pass the admin token. It is recommended to store the token in a sensitive Terraform variable to prevent it from being displayed in plain text in the terraform state: + + ```tf + variable "artifactory_access_token" { + type = string + sensitive = true + } + + module "jfrog" { + source = "registry.coder.com/modules/jfrog-token/coder" + version = "1.0.0" + agent_id = coder_agent.example.id + jfrog_url = "https://example.jfrog.io" + configure_code_server = true # this depends on the code-server + artifactory_access_token = var.artifactory_access_token + package_managers = { + "npm": "npm", + "go": "go", + "pypi": "pypi" + } + } + ``` + +
+ + The admin-level access token is used to provision user tokens and is never exposed to developers or stored in workspaces. + ++ +If you don't want to use the official modules, you can read through the [example template](https://github.com/coder/coder/tree/main/examples/jfrog/docker), which uses Docker as the underlying compute. The +same concepts apply to all compute types. ## Offline Deployments -See the -[offline deployments](../templates/extending-templates/modules.md#offline-installations) -section for instructions on how to use coder-modules in an offline environment -with Artifactory. +See the [offline deployments](../templates/extending-templates/modules.md#offline-installations) section for instructions on how to use Coder modules in an offline environment with Artifactory. + +## Next Steps -## More reading +- See the [full example Docker template](https://github.com/coder/coder/tree/main/examples/jfrog/docker). -- See the full example template - [here](https://github.com/coder/coder/tree/main/examples/jfrog/docker). - To serve extensions from your own VS Code Marketplace, check out [code-marketplace](https://github.com/coder/code-marketplace#artifactory-storage). diff --git a/docs/admin/integrations/jfrog-xray.md b/docs/admin/integrations/jfrog-xray.md index 933bf2e475edd..f37a813366f76 100644 --- a/docs/admin/integrations/jfrog-xray.md +++ b/docs/admin/integrations/jfrog-xray.md @@ -3,68 +3,71 @@ March 17, 2024 --- -This guide will walk you through the process of adding -[JFrog Xray](https://jfrog.com/xray/) integration to Coder Kubernetes workspaces -using Coder's [JFrog Xray Integration](https://github.com/coder/coder-xray). +This guide describes the process of integrating [JFrog Xray](https://jfrog.com/xray/) to Coder Kubernetes-backed +workspaces using Coder's [JFrog Xray Integration](https://github.com/coder/coder-xray). ## Prerequisites - A self-hosted JFrog Platform instance. - Kubernetes workspaces running on Coder. -## Deploying the Coder - JFrog Xray Integration +## Deploy the **Coder - JFrog Xray** Integration -1. Create a JFrog Platform - [Access Token](https://jfrog.com/help/r/jfrog-platform-administration-documentation/access-tokens) - with a user that has the read - [permission](https://jfrog.com/help/r/jfrog-platform-administration-documentation/permissions) +1. Create a JFrog Platform [Access Token](https://jfrog.com/help/r/jfrog-platform-administration-documentation/access-tokens) with a user that has the `read` [permission](https://jfrog.com/help/r/jfrog-platform-administration-documentation/permissions) for the repositories you want to scan. -1. Create a Coder [token](../../reference/cli/tokens_create.md#tokens-create) - with a user that has the [`owner`](../users/index.md#roles) role. + +1. Create a Coder [token](../../reference/cli/tokens_create.md#tokens-create) with a user that has the [`owner`](../users/index.md#roles) role. + 1. Create Kubernetes secrets for the JFrog Xray and Coder tokens. ```bash - kubectl create secret generic coder-token --from-literal=coder-token='
+ + To authenticate with the Artifactory registry, you may need to + create a [Docker config](https://jfrog.com/help/r/jfrog-artifactory-documentation/docker-advanced-topics) and use it in the + `imagePullSecrets` field of the Kubernetes Pod. See the [Defining ImagePullSecrets for Coder workspaces](../../tutorials/image-pull-secret.md) guide for more + information. -[`coder-xray`](https://github.com/coder/coder-xray) will scan all kubernetes -workspaces in the specified namespace. It depends on the `image` available in -Artifactory and indexed by Xray. To ensure that the images are available in -Artifactory, update the Coder template to use the Artifactory registry. +-```tf -image = "
+ +You can enable +[detailed database metrics](../../reference/cli/server.md#--prometheus-collect-db-metrics) +in Coder's Prometheus endpoint. If you have +[tracing enabled](../../reference/cli/server.md#--trace), these traces may also +contain useful information regarding Coder's database activity. + +## DERP @@ -138,7 +139,7 @@ following: ### EDERP01 -_DERP Node Uses Websocket_ +#### DERP Node Uses Websocket **Problem:** When Coder attempts to establish a connection to one or more DERP servers, it sends a specific `Upgrade: derp` HTTP header. Some load balancers @@ -149,15 +150,19 @@ This is not necessarily a fatal error, but a possible indication of a misconfigured reverse HTTP proxy. Additionally, while workspace users should still be able to reach their workspaces, connection performance may be degraded. -> **Note:** This may also be shown if you have -> [forced websocket connections for DERP](../../reference/cli/server.md#--derp-force-websockets). +
+ +**Note:** This may also be shown if you have +[forced websocket connections for DERP](../../reference/cli/server.md#--derp-force-websockets). + +**Solution:** ensure that any proxies you use allow connection upgrade with the `Upgrade: derp` header. ### EDERP02 -_One or more DERP nodes are unhealthy_ +#### One or more DERP nodes are unhealthy **Problem:** This is shown if Coder is unable to reach one or more configured DERP servers. Clients will fall back to use the remaining DERP servers, but @@ -176,7 +181,7 @@ curl -v "https://coder.company.com/derp" ### ESTUN01 -_No STUN servers available._ +#### No STUN servers available **Problem:** This is shown if no STUN servers are available. Coder will use STUN to establish [direct connections](../networking/stun.md). Without at least one @@ -189,7 +194,7 @@ configured port. ### ESTUN02 -_STUN returned different addresses; you may be behind a hard NAT._ +#### STUN returned different addresses; you may be behind a hard NAT **Problem:** This is a warning shown when multiple attempts to determine our public IP address/port via STUN resulted in different `ip:port` combinations. @@ -218,7 +223,7 @@ message over the connection, and attempt to read back that same message. ### EWS01 -_Failed to establish a WebSocket connection_ +#### Failed to establish a WebSocket connection **Problem:** Coder was unable to establish a WebSocket connection over its own Access URL. @@ -237,7 +242,7 @@ Access URL. ### EWS02 -_Failed to echo a WebSocket message_ +#### Failed to echo a WebSocket message **Problem:** Coder was able to establish a WebSocket connection, but was unable to write a message. @@ -258,7 +263,7 @@ Coder will periodically query their availability and show their status here. ### EWP01 -_Error Updating Workspace Proxy Health_ +#### Error Updating Workspace Proxy Health **Problem:** Coder was unable to query the connected workspace proxies for their health status. @@ -268,7 +273,7 @@ connectivity issue. ### EWP02 -_Error Fetching Workspace Proxies_ +#### Error Fetching Workspace Proxies **Problem:** Coder was unable to fetch the stored workspace proxy health data from the database. @@ -278,7 +283,7 @@ issue with Coder's configured database. ### EWP04 -_One or more Workspace Proxies Unhealthy_ +#### One or more Workspace Proxies Unhealthy **Problem:** One or more workspace proxies are not reachable. @@ -287,7 +292,7 @@ workspace proxies. ### EPD01 -_No Provisioner Daemons Available_ +#### No Provisioner Daemons Available **Problem:** No provisioner daemons are registered with Coder. No workspaces can be built until there is at least one provisioner daemon running. @@ -300,12 +305,16 @@ that they are able to successfully connect to Coder. Otherwise, ensure [`--provisioner-daemons`](../../reference/cli/server.md#--provisioner-daemons) is set to a value greater than 0. -> Note: This may be a transient issue if you are currently in the process of -> updating your deployment. +
+ +**Note:** This may be a transient issue if you are currently in the process of +updating your deployment. + +### EPD02 -_Provisioner Daemon Version Mismatch_ +#### Provisioner Daemon Version Mismatch **Problem:** One or more provisioner daemons are more than one major or minor version out of date with the main deployment. It is important that provisioner @@ -315,12 +324,16 @@ of API incompatibility. **Solution:** Update the provisioner daemon to match the currently running version of Coder. -> Note: This may be a transient issue if you are currently in the process of -> updating your deployment. +
+ +**Note:** This may be a transient issue if you are currently in the process of +updating your deployment. + +### EPD03 -_Provisioner Daemon API Version Mismatch_ +#### Provisioner Daemon API Version Mismatch **Problem:** One or more provisioner daemons are using APIs that are marked as deprecated. These deprecated APIs may be removed in a future release of Coder, @@ -330,12 +343,16 @@ connect to Coder. **Solution:** Update the provisioner daemon to match the currently running version of Coder. -> Note: This may be a transient issue if you are currently in the process of -> updating your deployment. +
+ +**Note:** This may be a transient issue if you are currently in the process of +updating your deployment. + +-## EUNKNOWN +### EUNKNOWN -_Unknown Error_ +#### Unknown Error **Problem:** This error is shown when an unexpected error occurred evaluating deployment health. It may resolve on its own. diff --git a/docs/admin/monitoring/index.md b/docs/admin/monitoring/index.md index 3db9de5092a26..996d8040b0129 100644 --- a/docs/admin/monitoring/index.md +++ b/docs/admin/monitoring/index.md @@ -1,7 +1,7 @@ # Monitoring Coder -Learn about our the tools, techniques, and best practices to monitor Coder your -Coder deployment. +Learn about our the tools, techniques, and best practices to monitor your Coder +deployment. ## Quick Start: Observability Helm Chart diff --git a/docs/admin/monitoring/metrics.md b/docs/admin/monitoring/metrics.md index 167aa2237159b..5a30076f1db57 100644 --- a/docs/admin/monitoring/metrics.md +++ b/docs/admin/monitoring/metrics.md @@ -8,7 +8,7 @@ If you don't have an Prometheus server installed, you can follow the Prometheus [Getting started](https://prometheus.io/docs/prometheus/latest/getting_started/) guide. -### Setting up metrics +## Setting up metrics To set up metrics monitoring, please read our [Prometheus integration guide](../integrations/prometheus.md). The following diff --git a/docs/admin/monitoring/notifications/index.md b/docs/admin/monitoring/notifications/index.md index a9e6a87d78139..a7eeab44d4b79 100644 --- a/docs/admin/monitoring/notifications/index.md +++ b/docs/admin/monitoring/notifications/index.md @@ -3,23 +3,6 @@ Notifications are sent by Coder in response to specific internal events, such as a workspace being deleted or a user being created. -## Enable experiment - -In order to activate the notifications feature on Coder v2.15.X, you'll need to -enable the `notifications` experiment. Notifications are enabled by default -starting in v2.16.0. - -```bash -# Using the CLI flag -$ coder server --experiments=notifications - -# Alternatively, using the `CODER_EXPERIMENTS` environment variable -$ CODER_EXPERIMENTS=notifications coder server -``` - -More information on experiments can be found -[here](https://coder.com/docs/contributing/feature-stages#experimental-features). - ## Event Types Notifications are sent in response to internal events, to alert the affected @@ -64,7 +47,7 @@ You can modify the notification delivery behavior using the following server flags. | Required | CLI | Env | Type | Description | Default | -| :------: | ----------------------------------- | --------------------------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------- | ------- | +|:--------:|-------------------------------------|-----------------------------------------|------------|-----------------------------------------------------------------------------------------------------------------------|---------| | ✔️ | `--notifications-dispatch-timeout` | `CODER_NOTIFICATIONS_DISPATCH_TIMEOUT` | `duration` | How long to wait while a notification is being sent before giving up. | 1m | | ✔️ | `--notifications-method` | `CODER_NOTIFICATIONS_METHOD` | `string` | Which delivery method to use (available options: 'smtp', 'webhook'). See [Delivery Methods](#delivery-methods) below. | smtp | | -️ | `--notifications-max-send-attempts` | `CODER_NOTIFICATIONS_MAX_SEND_ATTEMPTS` | `int` | The upper limit of attempts to send a notification. | 5 | @@ -78,9 +61,8 @@ can only be delivered to one method, and this method is configured globally with will be disabled. Premium customers can configure which method to use for each of the supported -[Events](#workspace-events); see the -[Preferences](#delivery-preferences-enterprise-premium) section below for more -details. +[Events](#workspace-events); see the [Preferences](#delivery-preferences) +section below for more details. ## SMTP (Email) @@ -91,15 +73,15 @@ existing one. **Server Settings:** | Required | CLI | Env | Type | Description | Default | -| :------: | ------------------- | ----------------------- | -------- | ----------------------------------------- | --------- | +|:--------:|---------------------|-------------------------|----------|-------------------------------------------|-----------| | ✔️ | `--email-from` | `CODER_EMAIL_FROM` | `string` | The sender's address to use. | | -| ✔️ | `--email-smarthost` | `CODER_EMAIL_SMARTHOST` | `string` | The SMTP relay to send messages | +| ✔️ | `--email-smarthost` | `CODER_EMAIL_SMARTHOST` | `string` | The SMTP relay to send messages | | | ✔️ | `--email-hello` | `CODER_EMAIL_HELLO` | `string` | The hostname identifying the SMTP server. | localhost | **Authentication Settings:** | Required | CLI | Env | Type | Description | -| :------: | ---------------------------- | -------------------------------- | -------- | ------------------------------------------------------------------------- | +|:--------:|------------------------------|----------------------------------|----------|---------------------------------------------------------------------------| | - | `--email-auth-username` | `CODER_EMAIL_AUTH_USERNAME` | `string` | Username to use with PLAIN/LOGIN authentication. | | - | `--email-auth-password` | `CODER_EMAIL_AUTH_PASSWORD` | `string` | Password to use with PLAIN/LOGIN authentication. | | - | `--email-auth-password-file` | `CODER_EMAIL_AUTH_PASSWORD_FILE` | `string` | File from which to load password for use with PLAIN/LOGIN authentication. | @@ -107,14 +89,14 @@ existing one. **TLS Settings:** -| Required | CLI | Env | Type | Description | Default | -| :------: | --------------------------- | ----------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | -| - | `--email-force-tls` | `CODER_EMAIL_FORCE_TLS` | `bool` | Force a TLS connection to the configured SMTP smarthost. If port 465 is used, TLS will be forced. See https://datatracker.ietf.org/doc/html/rfc8314#section-3.3. | false | -| - | `--email-tls-starttls` | `CODER_EMAIL_TLS_STARTTLS` | `bool` | Enable STARTTLS to upgrade insecure SMTP connections using TLS. Ignored if `CODER_NOTIFICATIONS_EMAIL_FORCE_TLS` is set. | false | -| - | `--email-tls-skip-verify` | `CODER_EMAIL_TLS_SKIPVERIFY` | `bool` | Skip verification of the target server's certificate (**insecure**). | false | -| - | `--email-tls-server-name` | `CODER_EMAIL_TLS_SERVERNAME` | `string` | Server name to verify against the target certificate. | | -| - | `--email-tls-cert-file` | `CODER_EMAIL_TLS_CERTFILE` | `string` | Certificate file to use. | | -| - | `--email-tls-cert-key-file` | `CODER_EMAIL_TLS_CERTKEYFILE` | `string` | Certificate key file to use. | | +| Required | CLI | Env | Type | Description | Default | +|:--------:|-----------------------------|-------------------------------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------| +| - | `--email-force-tls` | `CODER_EMAIL_FORCE_TLS` | `bool` | Force a TLS connection to the configured SMTP smarthost. If port 465 is used, TLS will be forced. See
+ +Delivery preferences is an Enterprise and Premium feature. +[Learn more](https://coder.com/pricing#compare-plans). + +Administrators can configure which delivery methods are used for each different [event type](#event-types). @@ -258,12 +250,17 @@ To resume sending notifications, execute If notifications are not being delivered, use the following methods to troubleshoot: -1. Ensure notifications are being added to the `notification_messages` table -2. Review any error messages in the `status_reason` column, should an error have - occurred -3. Review the logs (search for the term `notifications`) for diagnostic - information
+ +Browser-only connections is an Enterprise and Premium feature. +[Learn more](https://coder.com/pricing#compare-plans). + +Some Coder deployments require that all access is through the browser to comply with security policies. In these cases, pass the `--browser-only` flag to @@ -186,7 +195,14 @@ With browser-only connections, developers can only connect to their workspaces via the web terminal and [web IDEs](../../user-guides/workspace-access/web-ides.md). -### Workspace Proxies (enterprise) (premium) +### Workspace Proxies + +
+ +Workspace proxies are an Enterprise and Premium feature. +[Learn more](https://coder.com/pricing#compare-plans). + +Workspace proxies are a Coder Enterprise feature that allows you to provide low-latency browser experiences for geo-distributed teams. diff --git a/docs/admin/networking/port-forwarding.md b/docs/admin/networking/port-forwarding.md index 692f933658538..34a7133b75855 100644 --- a/docs/admin/networking/port-forwarding.md +++ b/docs/admin/networking/port-forwarding.md @@ -129,7 +129,14 @@ resource uses a different method of authentication and **is not impacted by the template's maximum sharing level**, nor the level of a shared port that points to the app. -### Configure maximum port sharing level (enterprise) (premium) +### Configure maximum port sharing level + +
+ +Configuring port sharing level is an Enterprise and Premium feature. +[Learn more](https://coder.com/pricing#compare-plans). + +Premium-licensed template admins can control the maximum port sharing level for workspaces under a given template in the template settings. By default, the @@ -149,7 +156,7 @@ protocol configuration for each shared port individually. You can access any port on the workspace and can configure the port protocol manually by appending a `s` to the port in the URL. -``` +```text # Uses HTTP https://33295--agent--workspace--user--apps.example.com/ # Uses HTTPS @@ -173,8 +180,8 @@ requests cannot be authenticated and you will see an error resembling the following: > Access to fetch at -> 'https://coder.example.com/api/v2/applications/auth-redirect' from origin -> 'https://8000--dev--user--apps.coder.example.com' has been blocked by CORS +> '
Field | Tracked |
---|---|
created_at | true |
expires_at | true |
hashed_secret | false |
id | false |
ip_address | false |
last_used | true |
lifetime_seconds | false |
login_type | false |
scope | false |
token_name | false |
updated_at | false |
user_id | true |
Field | Tracked |
---|---|
created_at | true |
expires_at | true |
from_login_type | true |
to_login_type | true |
user_id | true |
Field | Tracked |
---|---|
avatar_url | true |
display_name | true |
id | true |
members | true |
name | true |
organization_id | false |
quota_allowance | true |
source | false |
Field | Tracked |
---|---|
created_at | true |
organization_id | false |
roles | true |
updated_at | true |
user_id | true |
username | true |
Field | Tracked |
---|---|
created_at | false |
display_name | true |
id | false |
name | true |
org_permissions | true |
organization_id | false |
site_permissions | true |
updated_at | false |
user_permissions | true |
Field | Tracked |
---|---|
created_at | false |
private_key | true |
public_key | true |
updated_at | false |
user_id | true |
Field | Tracked |
---|---|
dismissed_healthchecks | true |
id | false |
Field | Tracked |
---|---|
exp | true |
id | false |
jwt | false |
uploaded_at | true |
uuid | true |
Field | Tracked |
---|---|
actions | true |
body_template | true |
group | true |
id | false |
kind | true |
method | true |
name | true |
title_template | true |
Field | Tracked |
---|---|
id | false |
notifier_paused | true |
Field | Tracked |
---|---|
callback_url | true |
created_at | false |
icon | true |
id | false |
name | true |
updated_at | false |
Field | Tracked |
---|---|
app_id | false |
created_at | false |
display_secret | false |
hashed_secret | false |
id | false |
last_used_at | false |
secret_prefix | false |
Field | Tracked |
---|---|
created_at | false |
description | true |
display_name | true |
icon | true |
id | false |
is_default | true |
name | true |
updated_at | true |
Field | Tracked |
---|---|
active_version_id | true |
activity_bump | true |
allow_user_autostart | true |
allow_user_autostop | true |
allow_user_cancel_workspace_jobs | true |
autostart_block_days_of_week | true |
autostop_requirement_days_of_week | true |
autostop_requirement_weeks | true |
created_at | false |
created_by | true |
created_by_avatar_url | false |
created_by_username | false |
default_ttl | true |
deleted | false |
deprecated | true |
description | true |
display_name | true |
failure_ttl | true |
group_acl | true |
icon | true |
id | true |
max_port_sharing_level | true |
name | true |
organization_display_name | false |
organization_icon | false |
organization_id | false |
organization_name | false |
provisioner | true |
require_active_version | true |
time_til_dormant | true |
time_til_dormant_autodelete | true |
updated_at | false |
user_acl | true |
Field | Tracked |
---|---|
archived | true |
created_at | false |
created_by | true |
created_by_avatar_url | false |
created_by_username | false |
external_auth_providers | false |
id | true |
job_id | false |
message | false |
name | true |
organization_id | false |
readme | true |
template_id | true |
updated_at | false |
Field | Tracked |
---|---|
avatar_url | false |
created_at | false |
deleted | true |
true | |
github_com_user_id | false |
hashed_one_time_passcode | false |
hashed_password | true |
id | true |
last_seen_at | false |
login_type | true |
name | true |
one_time_passcode_expires_at | true |
quiet_hours_schedule | true |
rbac_roles | true |
status | true |
theme_preference | false |
updated_at | false |
username | true |
Field | Tracked |
---|---|
build_number | false |
created_at | false |
daily_cost | false |
deadline | false |
id | false |
initiator_by_avatar_url | false |
initiator_by_username | false |
initiator_id | false |
job_id | false |
max_deadline | false |
provisioner_state | false |
reason | false |
template_version_id | true |
transition | false |
updated_at | false |
workspace_id | false |
Field | Tracked |
---|---|
created_at | true |
deleted | false |
derp_enabled | true |
derp_only | true |
display_name | true |
icon | true |
id | true |
name | true |
region_id | true |
token_hashed_secret | true |
updated_at | false |
url | true |
version | true |
wildcard_hostname | true |
Field | Tracked |
---|---|
automatic_updates | true |
autostart_schedule | true |
created_at | false |
deleted | false |
deleting_at | true |
dormant_at | true |
favorite | true |
id | true |
last_used_at | false |
name | true |
organization_id | false |
owner_id | true |
template_id | true |
ttl | true |
updated_at | false |
Field | Tracked |
---|---|
created_at | true |
expires_at | true |
hashed_secret | false |
id | false |
ip_address | false |
last_used | true |
lifetime_seconds | false |
login_type | false |
scope | false |
token_name | false |
updated_at | false |
user_id | true |
Field | Tracked |
---|---|
created_at | true |
expires_at | true |
from_login_type | true |
to_login_type | true |
user_id | true |
Field | Tracked |
---|---|
avatar_url | true |
display_name | true |
id | true |
members | true |
name | true |
organization_id | false |
quota_allowance | true |
source | false |
Field | Tracked |
---|---|
created_at | true |
organization_id | false |
roles | true |
updated_at | true |
user_id | true |
username | true |
Field | Tracked |
---|---|
created_at | false |
display_name | true |
id | false |
name | true |
org_permissions | true |
organization_id | false |
site_permissions | true |
updated_at | false |
user_permissions | true |
Field | Tracked |
---|---|
created_at | false |
private_key | true |
public_key | true |
updated_at | false |
user_id | true |
Field | Tracked |
---|---|
auto_create_missing_groups | true |
field | true |
legacy_group_name_mapping | false |
mapping | true |
regex_filter | true |
Field | Tracked |
---|---|
dismissed_healthchecks | true |
id | false |
Field | Tracked |
---|---|
exp | true |
id | false |
jwt | false |
uploaded_at | true |
uuid | true |
Field | Tracked |
---|---|
actions | true |
body_template | true |
enabled_by_default | true |
group | true |
id | false |
kind | true |
method | true |
name | true |
title_template | true |
Field | Tracked |
---|---|
id | false |
notifier_paused | true |
Field | Tracked |
---|---|
callback_url | true |
created_at | false |
icon | true |
id | false |
name | true |
updated_at | false |
Field | Tracked |
---|---|
app_id | false |
created_at | false |
display_secret | false |
hashed_secret | false |
id | false |
last_used_at | false |
secret_prefix | false |
Field | Tracked |
---|---|
created_at | false |
description | true |
display_name | true |
icon | true |
id | false |
is_default | true |
name | true |
updated_at | true |
Field | Tracked |
---|---|
assign_default | true |
field | true |
mapping | true |
Field | Tracked |
---|---|
field | true |
mapping | true |
Field | Tracked |
---|---|
active_version_id | true |
activity_bump | true |
allow_user_autostart | true |
allow_user_autostop | true |
allow_user_cancel_workspace_jobs | true |
autostart_block_days_of_week | true |
autostop_requirement_days_of_week | true |
autostop_requirement_weeks | true |
created_at | false |
created_by | true |
created_by_avatar_url | false |
created_by_username | false |
default_ttl | true |
deleted | false |
deprecated | true |
description | true |
display_name | true |
failure_ttl | true |
group_acl | true |
icon | true |
id | true |
max_port_sharing_level | true |
name | true |
organization_display_name | false |
organization_icon | false |
organization_id | false |
organization_name | false |
provisioner | true |
require_active_version | true |
time_til_dormant | true |
time_til_dormant_autodelete | true |
updated_at | false |
user_acl | true |
Field | Tracked |
---|---|
archived | true |
created_at | false |
created_by | true |
created_by_avatar_url | false |
created_by_username | false |
external_auth_providers | false |
id | true |
job_id | false |
message | false |
name | true |
organization_id | false |
readme | true |
source_example_id | false |
template_id | true |
updated_at | false |
Field | Tracked |
---|---|
avatar_url | false |
created_at | false |
deleted | true |
true | |
github_com_user_id | false |
hashed_one_time_passcode | false |
hashed_password | true |
id | true |
last_seen_at | false |
login_type | true |
name | true |
one_time_passcode_expires_at | true |
quiet_hours_schedule | true |
rbac_roles | true |
status | true |
theme_preference | false |
updated_at | false |
username | true |
Field | Tracked |
---|---|
build_number | false |
created_at | false |
daily_cost | false |
deadline | false |
id | false |
initiator_by_avatar_url | false |
initiator_by_username | false |
initiator_id | false |
job_id | false |
max_deadline | false |
provisioner_state | false |
reason | false |
template_version_id | true |
transition | false |
updated_at | false |
workspace_id | false |
Field | Tracked |
---|---|
created_at | true |
deleted | false |
derp_enabled | true |
derp_only | true |
display_name | true |
icon | true |
id | true |
name | true |
region_id | true |
token_hashed_secret | true |
updated_at | false |
url | true |
version | true |
wildcard_hostname | true |
Field | Tracked |
---|---|
automatic_updates | true |
autostart_schedule | true |
created_at | false |
deleted | false |
deleting_at | true |
dormant_at | true |
favorite | true |
id | true |
last_used_at | false |
name | true |
next_start_at | true |
organization_id | false |
owner_id | true |
template_id | true |
ttl | true |
updated_at | false |
-This article explains how to use secrets in a workspace. To authenticate the -workspace provisioner, see this. -+Coder is open-minded about how you get your secrets into your workspaces. For +more information about how to use secrets and other security tips, visit our +guide to +[security best practices](../../tutorials/best-practices/security-best-practices.md#secrets). -Coder is open-minded about how you get your secrets into your workspaces. +This article explains how to use secrets in a workspace. To authenticate the +workspace provisioner, see the +provisioners documentation. -## Wait a minute... +## Before you begin -Your first stab at secrets with Coder should be your local method. You can do -everything you can locally and more with your Coder workspace, so whatever -workflow and tools you already use to manage secrets may be brought over. +Your first attempt to use secrets with Coder should be your local method. You +can do everything you can locally and more with your Coder workspace, so +whatever workflow and tools you already use to manage secrets may be brought +over. Often, this workflow is simply: @@ -111,3 +114,7 @@ workspace. Refer to our [HashiCorp Vault Integration](../integrations/vault.md) guide for more information on how to integrate HashiCorp Vault with Coder. + +## Next steps + +- [Security - best practices](../../tutorials/best-practices/security-best-practices.md) diff --git a/docs/admin/setup/appearance.md b/docs/admin/setup/appearance.md index ddb94bc04d267..a1ff8ad1450ae 100644 --- a/docs/admin/setup/appearance.md +++ b/docs/admin/setup/appearance.md @@ -1,4 +1,11 @@ -# Appearance (enterprise) (premium) +# Appearance + +
+ +Customizing Coder's appearance is an Enterprise and Premium feature. +[Learn more](https://coder.com/pricing#compare-plans). + +Customize the look of your Coder deployment to meet your enterprise requirements. diff --git a/docs/admin/setup/index.md b/docs/admin/setup/index.md index 527c33adc3706..9af914125a75e 100644 --- a/docs/admin/setup/index.md +++ b/docs/admin/setup/index.md @@ -44,10 +44,15 @@ coder server or running [coder_apps](../templates/index.md) on an absolute path. Set this to a wildcard subdomain that resolves to Coder (e.g. `*.coder.example.com`). +> Note: We do not recommend using a top-level-domain for Coder wildcard access +> (for example `*.workspaces`), even on private networks with split-DNS. Some +> browsers consider these "public" domains and will refuse Coder's cookies, +> which are vital to the proper operation of this feature. + If you are providing TLS certificates directly to the Coder server, either 1. Use a single certificate and key for both the root and wildcard domains. -2. Configure multiple certificates and keys via +1. Configure multiple certificates and keys via [`coder.tls.secretNames`](https://github.com/coder/coder/blob/main/helm/coder/values.yaml) in the Helm Chart, or [`--tls-cert-file`](../../reference/cli/server.md#--tls-cert-file) and @@ -73,29 +78,27 @@ working directory prior to step 1. 1. Create the TLS secret in your Kubernetes cluster -```shell -kubectl create secret tls coder-tls -n
+ +Template update policies are an Enterprise and Premium feature. +[Learn more](https://coder.com/pricing#compare-plans). + +Licensed template admins may want workspaces to always remain on the latest version of their parent template. To do so, enable **Template Update Policies** @@ -91,5 +98,5 @@ coder templates delete
+ +Failure cleanup is an Enterprise and Premium feature. +[Learn more](https://coder.com/pricing#compare-plans). + +Failure cleanup defines how long a workspace is permitted to remain in the failed state prior to being automatically stopped. Failure cleanup is only available for licensed customers. -## Dormancy threshold (enterprise) (premium) +## Dormancy threshold + +
+ +Dormancy threshold is an Enterprise and Premium feature. +[Learn more](https://coder.com/pricing#compare-plans). + +Dormancy Threshold defines how long Coder allows a workspace to remain inactive before being moved into a dormant state. A workspace's inactivity is determined @@ -43,13 +56,27 @@ the user before being accessible. Coder stops workspaces during their transition to the dormant state if they are detected to be running. Dormancy Threshold is only available for licensed customers. -## Dormancy auto-deletion (enterprise) (premium) +## Dormancy auto-deletion + +
+ +Dormancy auto-deletion is an Enterprise and Premium feature. +[Learn more](https://coder.com/pricing#compare-plans). + +Dormancy Auto-Deletion allows a template admin to dictate how long a workspace is permitted to remain dormant before it is automatically deleted. Dormancy Auto-Deletion is only available for licensed customers. -## Autostop requirement (enterprise) (premium) +## Autostop requirement + +
+ +Autostop requirement is an Enterprise and Premium feature. +[Learn more](https://coder.com/pricing#compare-plans). + +Autostop requirement is a template setting that determines how often workspaces using the template must automatically stop. Autostop requirement ignores any @@ -79,7 +106,14 @@ Autostop requirement is disabled when the template is using the deprecated max lifetime feature. Templates can choose to use a max lifetime or an autostop requirement during the deprecation period, but only one can be used at a time. -## User quiet hours (enterprise) (premium) +## User quiet hours + +
+ +User quiet hours are an Enterprise and Premium feature. +[Learn more](https://coder.com/pricing#compare-plans). + +User quiet hours can be configured in the user's schedule settings page. Workspaces on templates with an autostop requirement will only be forcibly diff --git a/docs/admin/templates/template-permissions.md b/docs/admin/templates/template-permissions.md index e09acdfb3124c..22452c23dc5b8 100644 --- a/docs/admin/templates/template-permissions.md +++ b/docs/admin/templates/template-permissions.md @@ -1,4 +1,11 @@ -# Permissions (enterprise) (premium) +# Permissions + +
+ +Template permissions are an Enterprise and Premium feature. +[Learn more](https://coder.com/pricing#compare-plans). + +Licensed Coder administrators can control who can use and modify the template. diff --git a/docs/admin/users/github-auth.md b/docs/admin/users/github-auth.md index cc1f5365bcdc2..97e700e262ff8 100644 --- a/docs/admin/users/github-auth.md +++ b/docs/admin/users/github-auth.md @@ -1,6 +1,6 @@ -## GitHub +# GitHub -### Step 1: Configure the OAuth application in GitHub +## Step 1: Configure the OAuth application in GitHub First, [register a GitHub OAuth app](https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app/). @@ -22,7 +22,7 @@ values in the next step. Coder will need permission to access user email addresses. Find the "Account Permissions" settings for your app and select "read-only" for "Email addresses". -### Step 2: Configure Coder with the OAuth credentials +## Step 2: Configure Coder with the OAuth credentials Navigate to your Coder host and run the following command to start up the Coder server: diff --git a/docs/admin/users/groups-roles.md b/docs/admin/users/groups-roles.md index e40efb0bd5a10..21dc22988b76b 100644 --- a/docs/admin/users/groups-roles.md +++ b/docs/admin/users/groups-roles.md @@ -17,21 +17,28 @@ which templates developers can use. For example: Roles determine which actions users can take within the platform. | | Auditor | User Admin | Template Admin | Owner | -| --------------------------------------------------------------- | ------- | ---------- | -------------- | ----- | -| Add and remove Users | | ✅ | | ✅ | -| Manage groups (enterprise) (premium) | | ✅ | | ✅ | -| Change User roles | | | | ✅ | -| Manage **ALL** Templates | | | ✅ | ✅ | -| View **ALL** Workspaces | | | ✅ | ✅ | -| Update and delete **ALL** Workspaces | | | | ✅ | -| Run [external provisioners](../provisioners.md) | | | ✅ | ✅ | -| Execute and use **ALL** Workspaces | | | | ✅ | -| View all user operation [Audit Logs](../security/audit-logs.md) | ✅ | | | ✅ | +|-----------------------------------------------------------------|---------|------------|----------------|-------| +| Add and remove Users | | ✅ | | ✅ | +| Manage groups (enterprise) (premium) | | ✅ | | ✅ | +| Change User roles | | | | ✅ | +| Manage **ALL** Templates | | | ✅ | ✅ | +| View **ALL** Workspaces | | | ✅ | ✅ | +| Update and delete **ALL** Workspaces | | | | ✅ | +| Run [external provisioners](../provisioners.md) | | | ✅ | ✅ | +| Execute and use **ALL** Workspaces | | | | ✅ | +| View all user operation [Audit Logs](../security/audit-logs.md) | ✅ | | | ✅ | A user may have one or more roles. All users have an implicit Member role that may use personal workspaces. -## Custom Roles (Premium) (Beta) +## Custom Roles + +
+ +Custom roles are an Enterprise and Premium feature. +[Learn more](https://coder.com/pricing#compare-plans). + +Starting in v2.16.0, Premium Coder deployments can configure custom roles on the [Organization](./organizations.md) level. You can create and assign custom roles diff --git a/docs/admin/users/idp-sync.md b/docs/admin/users/idp-sync.md index 123384c963ce7..ee2dc83be387c 100644 --- a/docs/admin/users/idp-sync.md +++ b/docs/admin/users/idp-sync.md @@ -1,164 +1,139 @@ -# IDP Sync (enterprise) (premium) + +# IdP Sync -If your OpenID Connect provider supports group claims, you can configure Coder -to synchronize groups in your auth provider to groups within Coder. To enable -group sync, ensure that the `groups` claim is being sent by your OpenID -provider. You might need to request an additional -[scope](../../reference/cli/server.md#--oidc-scopes) or additional configuration -on the OpenID provider side. +
-If group sync is enabled, the user's groups will be controlled by the OIDC -provider. This means manual group additions/removals will be overwritten on the -next user login. +IdP sync is an Enterprise and Premium feature. +[Learn more](https://coder.com/pricing#compare-plans). -There are two ways you can configure group sync: +-
+ +You must specify Coder group IDs instead of group names. The fastest way to find +the ID for a corresponding group is by visiting +`https://coder.example.com/api/v2/groups`. + +Here is another example which maps `coder-admins` from the identity provider to -2 groups in Coder and `coder-users` from the identity provider to another group: +two groups in Coder and `coder-users` from the identity provider to another +group: ```json { - "field": "groups", - "mapping": { - "coder-admins": [ - "2ba2a4ff-ddfb-4493-b7cd-1aec2fa4c830", - "93371154-150f-4b12-b5f0-261bb1326bb4" - ], - "coder-users": ["2f4bde93-0179-4815-ba50-b757fb3d43dd"] - }, - "regex_filter": null, - "auto_create_missing_groups": false + "field": "groups", + "mapping": { + "coder-admins": [ + "2ba2a4ff-ddfb-4493-b7cd-1aec2fa4c830", + "93371154-150f-4b12-b5f0-261bb1326bb4" + ], + "coder-users": ["2f4bde93-0179-4815-ba50-b757fb3d43dd"] + }, + "regex_filter": null, + "auto_create_missing_groups": false } ``` @@ -172,7 +147,67 @@ coder organizations settings set group-sync \ Visit the Coder UI to confirm these changes: - + + +### Server Flags + +
+ +Use server flags only with Coder deployments with a single organization. + +You can use the dashboard to configure group sync instead. + ++ +1. Configure the Coder server to read groups from the claim name with the + [OIDC group field](../../reference/cli/server.md#--oidc-group-field) server + flag: + + - Environment variable: + + ```sh + CODER_OIDC_GROUP_FIELD=groups + ``` + + - As a flag: + + ```sh + --oidc-group-field groups + ``` + +1. On login, users will automatically be assigned to groups that have matching + names in Coder and removed from groups that the user no longer belongs to. + +1. For cases when an OIDC provider only returns group IDs or you want to have + different group names in Coder than in your OIDC provider, you can configure + mapping between the two with the + [OIDC group mapping](../../reference/cli/server.md#--oidc-group-mapping) server + flag: + + - Environment variable: + + ```sh + CODER_OIDC_GROUP_MAPPING='{"myOIDCGroupID": "myCoderGroupName"}' + ``` + + - As a flag: + + ```sh + --oidc-group-mapping '{"myOIDCGroupID": "myCoderGroupName"}' + ``` + + Below is an example mapping in the Coder Helm chart: + + ```yaml + coder: + env: + - name: CODER_OIDC_GROUP_MAPPING + value: > + {"myOIDCGroupID": "myCoderGroupName"} + ``` + + From this example, users that belong to the `myOIDCGroupID` group in your + OIDC provider will be added to the `myCoderGroupName` group in Coder.
-```json -{ - "field": "roles", - "mapping": { - "coder-admins": ["organization-admin"], - "infra-admins": ["provisioner-admin"] - } -} -``` +Be sure to use the `name` field for each role, not the display name. Use +`coder organization roles show --org=To set these role sync settings, use the following command: @@ -298,85 +302,151 @@ coder organizations settings set role-sync \ Visit the Coder UI to confirm these changes: - + -` to see roles for your +organization. -> Note: Be sure to use the `name` field for each role, not the display name. Use -> `coder organization roles show --org= ` to see roles for your -> organization. +
+ +Use server flags only with Coder deployments with a single organization. + +You can use the dashboard to configure role sync instead. + +-## Organization Sync (Premium) +1. Configure the Coder server to read groups from the claim name with the + [OIDC role field](../../reference/cli/server.md#--oidc-user-role-field) + server flag: -> Note: In a future Coder release, this can be managed via the Coder UI instead -> of server flags. +1. Set the following in your Coder server [configuration](../setup/index.md). + + ```env + # Depending on your identity provider configuration, you may need to explicitly request a "roles" scope + CODER_OIDC_SCOPES=openid,profile,email,roles + + # The following fields are required for role sync: + CODER_OIDC_USER_ROLE_FIELD=roles + CODER_OIDC_USER_ROLE_MAPPING='{"TemplateAuthor":["template-admin","user-admin"]}' + ``` + +One role from your identity provider can be mapped to many roles in Coder. The +example above maps to two roles in Coder. + +
+ +SCIM is an Enterprise and Premium feature. +[Learn more](https://coder.com/pricing#compare-plans). + +Coder supports user provisioning and deprovisioning via SCIM 2.0 with header authentication. Upon deactivation, users are diff --git a/docs/admin/users/organizations.md b/docs/admin/users/organizations.md index 23a4b921d0787..9c832132f7a3a 100644 --- a/docs/admin/users/organizations.md +++ b/docs/admin/users/organizations.md @@ -14,12 +14,17 @@ with multiple platform teams, all with unique resources:  +For more information about how to use organizations, visit the +[organizations best practices](../../tutorials/best-practices/organizations.md) +guide. + ## The default organization -All Coder deployments start with one organization called `Coder`. +All Coder deployments start with one organization called `coder`. All new users +are added to this organization by default. -To edit the organization details, navigate to `Deployment -> Organizations` in -the top bar: +To edit the organization details, select **Deployment** from the top bar, then +**Organizations**:  @@ -30,29 +35,29 @@ From there, you can manage the name, icon, description, users, and groups: ## Additional organizations Any additional organizations have unique admins, users, templates, provisioners, -groups, and workspaces. Each organization must have at least one -[provisioner](../provisioners.md) as the built-in provisioner only applies to +groups, and workspaces. Each organization must have at least one dedicated +[provisioner](../provisioners.md) since the built-in provisioners only apply to the default organization. You can configure [organization/role/group sync](./idp-sync.md) from your identity provider to avoid manually assigning users to organizations. -## Creating an organization +## How to create an organization ### Prerequisites -- Coder v2.16+ deployment with Premium license with Organizations enabled +- Coder v2.16+ deployment with Premium license and Organizations enabled ([contact your account team](https://coder.com/contact)) for more details. - User with `Owner` role ### 1. Create the organization -Within the sidebar, click `New organization` to create an organization. In this +In the sidebar, select **New organization** to create an organization. In this example, we'll create the `data-platform` org.  -From there, let's deploy a provisioner and template for this organization. +Next deploy a provisioner and template for this organization. ### 2. Deploy a provisioner @@ -61,42 +66,44 @@ for executing Terraform/OpenTofu to provision the infrastructure for workspaces and testing templates. Before creating templates, we must deploy at least one provisioner as the built-in provisioners are scoped to the default organization. -Using Coder CLI, run the following command to create a key that will be used to -authenticate the provisioner: +1. Using Coder CLI, run the following command to create a key that will be used + to authenticate the provisioner: + + ```shell + coder provisioner keys create data-cluster-key --org data-platform + Successfully created provisioner key data-cluster! Save this authentication token, it will not be shown again. -```sh -coder provisioner keys create data-cluster-key --org data-platform -Successfully created provisioner key data-cluster! Save this authentication token, it will not be shown again. + < key omitted > + ``` -< key omitted > -``` +1. Start the provisioner with the key on your desired platform. -Next, start the provisioner with the key on your desired platform. In this -example, we'll start it using the Coder CLI on a host with Docker. For -instructions on using other platforms like Kubernetes, see our -[provisioner documentation](../provisioners.md). + In this example, start the provisioner using the Coder CLI on a host with + Docker. For instructions on using other platforms like Kubernetes, see our + [provisioner documentation](../provisioners.md). -```sh -export CODER_URL=https://
+ +**Default Credentials:** `admin@coder.com` and `SomeSecurePassword!`. + +## Tech Stack Overview -All our dependencies are described in `site/package.json` but the following are -the most important: +All our dependencies are described in `site/package.json`, but the following are +the most important. - [React](https://reactjs.org/) for the UI framework - [Typescript](https://www.typescriptlang.org/) to keep our sanity @@ -129,17 +131,17 @@ within the component's story. ```tsx export const WithQuota: Story = { - parameters: { - queries: [ - { - key: getWorkspaceQuotaQueryKey(MockUser.username), - data: { - credits_consumed: 2, - budget: 40, - }, - }, - ], - }, + parameters: { + queries: [ + { + key: getWorkspaceQuotaQueryKey(MockUser.username), + data: { + credits_consumed: 2, + budget: 40, + }, + }, + ], + }, }; ``` @@ -156,12 +158,12 @@ execution. Here's an illustrative example:" ```ts export const getAgentListeningPorts = async ( - agentID: string, + agentID: string, ): Promise
+ +Available in Coder 2.19 and newer. + ++ +Every Coder server hosts CLI binaries for all supported platforms. You can run a +script to download the appropriate CLI for your machine from your Coder +deployment. + +```sh +curl -L https://coder.example.com/install.sh | sh +``` + +This script works within air-gapped deployments and ensures that the version of +the CLI you have installed on your machine matches the version of the server. + +This script can be useful when authoring a template for installing the CLI. + ### Next up - [Create your first template](../tutorials/template-from-scratch.md) diff --git a/docs/install/cloud/azure-vm.md b/docs/install/cloud/azure-vm.md index 751d204b321b4..2ab41bc53a0b5 100644 --- a/docs/install/cloud/azure-vm.md +++ b/docs/install/cloud/azure-vm.md @@ -12,7 +12,7 @@ This guide assumes you have full administrator privileges on Azure. From the Azure Portal, navigate to the Virtual Machines Dashboard. Click Create, and select creating a new Azure Virtual machine . -
bool
|
Bypass prompts.
diff --git a/docs/reference/cli/completion.md b/docs/reference/cli/completion.md
index 45e8ab77b741d..1d14fc2aa2467 100644
--- a/docs/reference/cli/completion.md
+++ b/docs/reference/cli/completion.md
@@ -1,5 +1,4 @@
-
# completion
Install or update shell completion scripts for the detected or chosen shell.
@@ -15,7 +14,7 @@ coder completion [flags]
### -s, --shell
| | |
-| ---- | ---------------------------------------- |
+|------|------------------------------------------|
| Type | bash\|fish\|zsh\|powershell
|
The shell to install completion for.
@@ -23,7 +22,7 @@ The shell to install completion for.
### -p, --print
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Print the completion script instead of installing it.
diff --git a/docs/reference/cli/config-ssh.md b/docs/reference/cli/config-ssh.md
index ef1c75e56ec61..937bcd061bd05 100644
--- a/docs/reference/cli/config-ssh.md
+++ b/docs/reference/cli/config-ssh.md
@@ -1,5 +1,4 @@
-
# config-ssh
Add an SSH Host entry for your workspaces "ssh coder.workspace"
@@ -28,7 +27,7 @@ workspaces:
### --ssh-config-file
| | |
-| ----------- | ----------------------------------- |
+|-------------|-------------------------------------|
| Type | string
|
| Environment | $CODER_SSH_CONFIG_FILE
|
| Default | ~/.ssh/config
|
@@ -38,7 +37,7 @@ Specifies the path to an SSH config.
### --coder-binary-path
| | |
-| ----------- | ------------------------------------------ |
+|-------------|--------------------------------------------|
| Type | string
|
| Environment | $CODER_SSH_CONFIG_BINARY_PATH
|
@@ -47,7 +46,7 @@ Optionally specify the absolute path to the coder binary used in ProxyCommand. B
### -o, --ssh-option
| | |
-| ----------- | ----------------------------------- |
+|-------------|-------------------------------------|
| Type | string-array
|
| Environment | $CODER_SSH_CONFIG_OPTS
|
@@ -56,7 +55,7 @@ Specifies additional SSH options to embed in each host stanza.
### -n, --dry-run
| | |
-| ----------- | ------------------------------- |
+|-------------|---------------------------------|
| Type | bool
|
| Environment | $CODER_SSH_DRY_RUN
|
@@ -65,7 +64,7 @@ Perform a trial run with no changes made, showing a diff at the end.
### --use-previous-options
| | |
-| ----------- | -------------------------------------------- |
+|-------------|----------------------------------------------|
| Type | bool
|
| Environment | $CODER_SSH_USE_PREVIOUS_OPTIONS
|
@@ -74,7 +73,7 @@ Specifies whether or not to keep options from previous run of config-ssh.
### --ssh-host-prefix
| | |
-| ----------- | --------------------------------------------- |
+|-------------|-----------------------------------------------|
| Type | string
|
| Environment | $CODER_CONFIGSSH_SSH_HOST_PREFIX
|
@@ -83,7 +82,7 @@ Override the default host prefix.
### --wait
| | |
-| ----------- | ---------------------------------- |
+|-------------|------------------------------------|
| Type | yes\|no\|auto
|
| Environment | $CODER_CONFIGSSH_WAIT
|
| Default | auto
|
@@ -93,7 +92,7 @@ Specifies whether or not to wait for the startup script to finish executing. Aut
### --disable-autostart
| | |
-| ----------- | ----------------------------------------------- |
+|-------------|-------------------------------------------------|
| Type | bool
|
| Environment | $CODER_CONFIGSSH_DISABLE_AUTOSTART
|
| Default | false
|
@@ -103,7 +102,7 @@ Disable starting the workspace automatically when connecting via SSH.
### -y, --yes
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Bypass prompts.
diff --git a/docs/reference/cli/create.md b/docs/reference/cli/create.md
index c165b33f4ef91..58c0fad4a14e8 100644
--- a/docs/reference/cli/create.md
+++ b/docs/reference/cli/create.md
@@ -1,5 +1,4 @@
-
# create
Create a workspace
@@ -7,7 +6,7 @@ Create a workspace
## Usage
```console
-coder create [flags] [name]
+coder create [flags] [workspace]
```
## Description
@@ -23,7 +22,7 @@ coder create [flags] [name]
### -t, --template
| | |
-| ----------- | --------------------------------- |
+|-------------|-----------------------------------|
| Type | string
|
| Environment | $CODER_TEMPLATE_NAME
|
@@ -32,7 +31,7 @@ Specify a template name.
### --template-version
| | |
-| ----------- | ------------------------------------ |
+|-------------|--------------------------------------|
| Type | string
|
| Environment | $CODER_TEMPLATE_VERSION
|
@@ -41,7 +40,7 @@ Specify a template version name.
### --start-at
| | |
-| ----------- | -------------------------------------- |
+|-------------|----------------------------------------|
| Type | string
|
| Environment | $CODER_WORKSPACE_START_AT
|
@@ -50,7 +49,7 @@ Specify the workspace autostart schedule. Check coder schedule start --help for
### --stop-after
| | |
-| ----------- | ---------------------------------------- |
+|-------------|------------------------------------------|
| Type | duration
|
| Environment | $CODER_WORKSPACE_STOP_AFTER
|
@@ -59,7 +58,7 @@ Specify a duration after which the workspace should shut down (e.g. 8h).
### --automatic-updates
| | |
-| ----------- | ----------------------------------------------- |
+|-------------|-------------------------------------------------|
| Type | string
|
| Environment | $CODER_WORKSPACE_AUTOMATIC_UPDATES
|
| Default | never
|
@@ -69,7 +68,7 @@ Specify automatic updates setting for the workspace (accepts 'always' or 'never'
### --copy-parameters-from
| | |
-| ----------- | -------------------------------------------------- |
+|-------------|----------------------------------------------------|
| Type | string
|
| Environment | $CODER_WORKSPACE_COPY_PARAMETERS_FROM
|
@@ -78,7 +77,7 @@ Specify the source workspace name to copy parameters from.
### -y, --yes
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Bypass prompts.
@@ -86,7 +85,7 @@ Bypass prompts.
### --parameter
| | |
-| ----------- | ---------------------------------- |
+|-------------|------------------------------------|
| Type | string-array
|
| Environment | $CODER_RICH_PARAMETER
|
@@ -95,7 +94,7 @@ Rich parameter value in the format "name=value".
### --rich-parameter-file
| | |
-| ----------- | --------------------------------------- |
+|-------------|-----------------------------------------|
| Type | string
|
| Environment | $CODER_RICH_PARAMETER_FILE
|
@@ -104,7 +103,7 @@ Specify a file path with values for rich parameters defined in the template. The
### --parameter-default
| | |
-| ----------- | ------------------------------------------ |
+|-------------|--------------------------------------------|
| Type | string-array
|
| Environment | $CODER_RICH_PARAMETER_DEFAULT
|
@@ -113,7 +112,7 @@ Rich parameter default values in the format "name=value".
### -O, --org
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | string
|
| Environment | $CODER_ORGANIZATION
|
diff --git a/docs/reference/cli/delete.md b/docs/reference/cli/delete.md
index 7ea5eb0839042..9dc2ea6fa9a19 100644
--- a/docs/reference/cli/delete.md
+++ b/docs/reference/cli/delete.md
@@ -1,12 +1,11 @@
-
# delete
Delete a workspace
Aliases:
-- rm
+* rm
## Usage
@@ -14,12 +13,20 @@ Aliases:
coder delete [flags] bool
|
Delete a workspace without deleting its resources. This can delete a workspace in a broken state, but may also lead to unaccounted cloud resources.
@@ -27,7 +34,7 @@ Delete a workspace without deleting its resources. This can delete a workspace i
### -y, --yes
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Bypass prompts.
diff --git a/docs/reference/cli/dotfiles.md b/docs/reference/cli/dotfiles.md
index 709aab6dd70b0..57074497fee5f 100644
--- a/docs/reference/cli/dotfiles.md
+++ b/docs/reference/cli/dotfiles.md
@@ -1,5 +1,4 @@
-
# dotfiles
Personalize your workspace by applying a canonical dotfiles repository
@@ -23,7 +22,7 @@ coder dotfiles [flags] string
|
| Environment | $CODER_SYMLINK_DIR
|
@@ -32,7 +31,7 @@ Specifies the directory for the dotfiles symlink destinations. If empty, will us
### -b, --branch
| | |
-| ---- | ------------------- |
+|------|---------------------|
| Type | string
|
Specifies which branch to clone. If empty, will default to cloning the default branch or using the existing branch in the cloned repo on disk.
@@ -40,7 +39,7 @@ Specifies which branch to clone. If empty, will default to cloning the default b
### --repo-dir
| | |
-| ----------- | ------------------------------------- |
+|-------------|---------------------------------------|
| Type | string
|
| Environment | $CODER_DOTFILES_REPO_DIR
|
| Default | dotfiles
|
@@ -50,7 +49,7 @@ Specifies the directory for the dotfiles repository, relative to global config d
### -y, --yes
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Bypass prompts.
diff --git a/docs/reference/cli/external-auth.md b/docs/reference/cli/external-auth.md
index ebe16435feb62..5347bfd34e1ac 100644
--- a/docs/reference/cli/external-auth.md
+++ b/docs/reference/cli/external-auth.md
@@ -1,5 +1,4 @@
-
# external-auth
Manage external authentication
@@ -19,5 +18,5 @@ Authenticate with external services inside of a workspace.
## Subcommands
| Name | Purpose |
-| ------------------------------------------------------------ | ----------------------------------- |
+|--------------------------------------------------------------|-------------------------------------|
| [access-token
](./external-auth_access-token.md) | Print auth for an external provider |
diff --git a/docs/reference/cli/external-auth_access-token.md b/docs/reference/cli/external-auth_access-token.md
index ead28af54be31..2303e8f076da8 100644
--- a/docs/reference/cli/external-auth_access-token.md
+++ b/docs/reference/cli/external-auth_access-token.md
@@ -1,5 +1,4 @@
-
# external-auth access-token
Print auth for an external provider
@@ -37,7 +36,7 @@ fi
### --extra
| | |
-| ---- | ------------------- |
+|------|---------------------|
| Type | string
|
Extract a field from the "extra" properties of the OAuth token.
diff --git a/docs/reference/cli/favorite.md b/docs/reference/cli/favorite.md
index 93b5027367020..97ff6fde44032 100644
--- a/docs/reference/cli/favorite.md
+++ b/docs/reference/cli/favorite.md
@@ -1,13 +1,12 @@
-
# favorite
Add a workspace to your favorites
Aliases:
-- fav
-- favourite
+* fav
+* favourite
## Usage
diff --git a/docs/reference/cli/features.md b/docs/reference/cli/features.md
index d367623f049a0..1ba187f964c8e 100644
--- a/docs/reference/cli/features.md
+++ b/docs/reference/cli/features.md
@@ -1,12 +1,11 @@
-
# features
List Enterprise features
Aliases:
-- feature
+* feature
## Usage
@@ -17,5 +16,5 @@ coder features
## Subcommands
| Name | Purpose |
-| --------------------------------------- | ------- |
+|-----------------------------------------|---------|
| [list
](./features_list.md) | |
diff --git a/docs/reference/cli/features_list.md b/docs/reference/cli/features_list.md
index 43795aea2874b..a1aab1d165ae6 100644
--- a/docs/reference/cli/features_list.md
+++ b/docs/reference/cli/features_list.md
@@ -1,10 +1,9 @@
-
# features list
Aliases:
-- ls
+* ls
## Usage
@@ -17,7 +16,7 @@ coder features list [flags]
### -c, --column
| | |
-| ------- | -------------------------------------------------------- |
+|---------|----------------------------------------------------------|
| Type | [name\|entitlement\|enabled\|limit\|actual]
|
| Default | name,entitlement,enabled,limit,actual
|
@@ -26,7 +25,7 @@ Specify columns to filter in the table.
### -o, --output
| | |
-| ------- | ------------------------ |
+|---------|--------------------------|
| Type | table\|json
|
| Default | table
|
diff --git a/docs/reference/cli/groups.md b/docs/reference/cli/groups.md
index 6d5c936e7f0c5..a036d646ab263 100644
--- a/docs/reference/cli/groups.md
+++ b/docs/reference/cli/groups.md
@@ -1,12 +1,11 @@
-
# groups
Manage groups
Aliases:
-- group
+* group
## Usage
@@ -17,7 +16,7 @@ coder groups
## Subcommands
| Name | Purpose |
-| ----------------------------------------- | ------------------- |
+|-------------------------------------------|---------------------|
| [create
](./groups_create.md) | Create a user group |
| [list
](./groups_list.md) | List user groups |
| [edit
](./groups_edit.md) | Edit a user group |
diff --git a/docs/reference/cli/groups_create.md b/docs/reference/cli/groups_create.md
index e758b422ea387..4274a681a5873 100644
--- a/docs/reference/cli/groups_create.md
+++ b/docs/reference/cli/groups_create.md
@@ -1,5 +1,4 @@
-
# groups create
Create a user group
@@ -15,7 +14,7 @@ coder groups create [flags] string
|
| Environment | $CODER_AVATAR_URL
|
@@ -24,7 +23,7 @@ Set an avatar for a group.
### --display-name
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | string
|
| Environment | $CODER_DISPLAY_NAME
|
@@ -33,7 +32,7 @@ Optional human friendly name for the group.
### -O, --org
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | string
|
| Environment | $CODER_ORGANIZATION
|
diff --git a/docs/reference/cli/groups_delete.md b/docs/reference/cli/groups_delete.md
index 7bbf215ae2f29..2135fb635cb8a 100644
--- a/docs/reference/cli/groups_delete.md
+++ b/docs/reference/cli/groups_delete.md
@@ -1,12 +1,11 @@
-
# groups delete
Delete a user group
Aliases:
-- rm
+* rm
## Usage
@@ -19,7 +18,7 @@ coder groups delete [flags] string
|
| Environment | $CODER_ORGANIZATION
|
diff --git a/docs/reference/cli/groups_edit.md b/docs/reference/cli/groups_edit.md
index f7c39c58e1d24..356a7eea4e7a9 100644
--- a/docs/reference/cli/groups_edit.md
+++ b/docs/reference/cli/groups_edit.md
@@ -1,5 +1,4 @@
-
# groups edit
Edit a user group
@@ -15,7 +14,7 @@ coder groups edit [flags] string
|
Update the group name.
@@ -23,7 +22,7 @@ Update the group name.
### -u, --avatar-url
| | |
-| ---- | ------------------- |
+|------|---------------------|
| Type | string
|
Update the group avatar.
@@ -31,7 +30,7 @@ Update the group avatar.
### --display-name
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | string
|
| Environment | $CODER_DISPLAY_NAME
|
@@ -40,7 +39,7 @@ Optional human friendly name for the group.
### -a, --add-users
| | |
-| ---- | ------------------------- |
+|------|---------------------------|
| Type | string-array
|
Add users to the group. Accepts emails or IDs.
@@ -48,7 +47,7 @@ Add users to the group. Accepts emails or IDs.
### -r, --rm-users
| | |
-| ---- | ------------------------- |
+|------|---------------------------|
| Type | string-array
|
Remove users to the group. Accepts emails or IDs.
@@ -56,7 +55,7 @@ Remove users to the group. Accepts emails or IDs.
### -O, --org
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | string
|
| Environment | $CODER_ORGANIZATION
|
diff --git a/docs/reference/cli/groups_list.md b/docs/reference/cli/groups_list.md
index f3ab2f5e0956e..c76e8b382ec44 100644
--- a/docs/reference/cli/groups_list.md
+++ b/docs/reference/cli/groups_list.md
@@ -1,5 +1,4 @@
-
# groups list
List user groups
@@ -15,7 +14,7 @@ coder groups list [flags]
### -c, --column
| | |
-| ------- | ----------------------------------------------------------------------- |
+|---------|-------------------------------------------------------------------------|
| Type | [name\|display name\|organization id\|members\|avatar url]
|
| Default | name,display name,organization id,members,avatar url
|
@@ -24,7 +23,7 @@ Columns to display in table output.
### -o, --output
| | |
-| ------- | ------------------------ |
+|---------|--------------------------|
| Type | table\|json
|
| Default | table
|
@@ -33,7 +32,7 @@ Output format.
### -O, --org
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | string
|
| Environment | $CODER_ORGANIZATION
|
diff --git a/docs/reference/cli/index.md b/docs/reference/cli/index.md
index 525cb8ac7d183..9ad8f5590e727 100644
--- a/docs/reference/cli/index.md
+++ b/docs/reference/cli/index.md
@@ -1,5 +1,4 @@
-
# coder
## Usage
@@ -24,7 +23,7 @@ Coder — A tool for provisioning self-hosted development environments with Terr
## Subcommands
| Name | Purpose |
-| -------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
+|----------------------------------------------------|-------------------------------------------------------------------------------------------------------|
| [completion
](./completion.md) | Install or update shell completion scripts for the detected or chosen shell. |
| [dotfiles
](./dotfiles.md) | Personalize your workspace by applying a canonical dotfiles repository |
| [external-auth
](./external-auth.md) | Manage external authentication |
@@ -66,14 +65,14 @@ Coder — A tool for provisioning self-hosted development environments with Terr
| [features
](./features.md) | List Enterprise features |
| [licenses
](./licenses.md) | Add, delete, and list licenses |
| [groups
](./groups.md) | Manage groups |
-| [provisioner
](./provisioner.md) | Manage provisioner daemons |
+| [provisioner
](./provisioner.md) | View and manage provisioner daemons and jobs |
## Options
### --url
| | |
-| ----------- | ----------------------- |
+|-------------|-------------------------|
| Type | url
|
| Environment | $CODER_URL
|
@@ -82,7 +81,7 @@ URL to a deployment.
### --debug-options
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Print all options, how they're set, then exit.
@@ -90,7 +89,7 @@ Print all options, how they're set, then exit.
### --token
| | |
-| ----------- | --------------------------------- |
+|-------------|-----------------------------------|
| Type | string
|
| Environment | $CODER_SESSION_TOKEN
|
@@ -99,7 +98,7 @@ Specify an authentication token. For security reasons setting CODER_SESSION_TOKE
### --no-version-warning
| | |
-| ----------- | -------------------------------------- |
+|-------------|----------------------------------------|
| Type | bool
|
| Environment | $CODER_NO_VERSION_WARNING
|
@@ -108,7 +107,7 @@ Suppress warning when client and server versions do not match.
### --no-feature-warning
| | |
-| ----------- | -------------------------------------- |
+|-------------|----------------------------------------|
| Type | bool
|
| Environment | $CODER_NO_FEATURE_WARNING
|
@@ -117,7 +116,7 @@ Suppress warnings about unlicensed features.
### --header
| | |
-| ----------- | -------------------------- |
+|-------------|----------------------------|
| Type | string-array
|
| Environment | $CODER_HEADER
|
@@ -126,7 +125,7 @@ Additional HTTP headers added to all requests. Provide as key=value. Can be spec
### --header-command
| | |
-| ----------- | ---------------------------------- |
+|-------------|------------------------------------|
| Type | string
|
| Environment | $CODER_HEADER_COMMAND
|
@@ -135,7 +134,7 @@ An external command that outputs additional HTTP headers added to all requests.
### -v, --verbose
| | |
-| ----------- | --------------------------- |
+|-------------|-----------------------------|
| Type | bool
|
| Environment | $CODER_VERBOSE
|
@@ -144,7 +143,7 @@ Enable verbose output.
### --disable-direct-connections
| | |
-| ----------- | ---------------------------------------------- |
+|-------------|------------------------------------------------|
| Type | bool
|
| Environment | $CODER_DISABLE_DIRECT_CONNECTIONS
|
@@ -153,7 +152,7 @@ Disable direct (P2P) connections to workspaces.
### --disable-network-telemetry
| | |
-| ----------- | --------------------------------------------- |
+|-------------|-----------------------------------------------|
| Type | bool
|
| Environment | $CODER_DISABLE_NETWORK_TELEMETRY
|
@@ -162,7 +161,7 @@ Disable network telemetry. Network telemetry is collected when connecting to wor
### --global-config
| | |
-| ----------- | ------------------------------ |
+|-------------|--------------------------------|
| Type | string
|
| Environment | $CODER_CONFIG_DIR
|
| Default | ~/.config/coderv2
|
diff --git a/docs/reference/cli/licenses.md b/docs/reference/cli/licenses.md
index 63e337afb259d..8e71f01aba8c6 100644
--- a/docs/reference/cli/licenses.md
+++ b/docs/reference/cli/licenses.md
@@ -1,12 +1,11 @@
-
# licenses
Add, delete, and list licenses
Aliases:
-- license
+* license
## Usage
@@ -17,7 +16,7 @@ coder licenses
## Subcommands
| Name | Purpose |
-| ------------------------------------------- | --------------------------------- |
+|---------------------------------------------|-----------------------------------|
| [add
](./licenses_add.md) | Add license to Coder deployment |
| [list
](./licenses_list.md) | List licenses (including expired) |
| [delete
](./licenses_delete.md) | Delete license by ID |
diff --git a/docs/reference/cli/licenses_add.md b/docs/reference/cli/licenses_add.md
index f3d9f201ed099..5562f5f49b365 100644
--- a/docs/reference/cli/licenses_add.md
+++ b/docs/reference/cli/licenses_add.md
@@ -1,5 +1,4 @@
-
# licenses add
Add license to Coder deployment
@@ -15,7 +14,7 @@ coder licenses add [flags] [-f file | -l license]
### -f, --file
| | |
-| ---- | ------------------- |
+|------|---------------------|
| Type | string
|
Load license from file.
@@ -23,7 +22,7 @@ Load license from file.
### -l, --license
| | |
-| ---- | ------------------- |
+|------|---------------------|
| Type | string
|
License string.
@@ -31,7 +30,7 @@ License string.
### --debug
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Output license claims for debugging.
diff --git a/docs/reference/cli/licenses_delete.md b/docs/reference/cli/licenses_delete.md
index 8cf95894d5815..9a24e520e6584 100644
--- a/docs/reference/cli/licenses_delete.md
+++ b/docs/reference/cli/licenses_delete.md
@@ -1,13 +1,12 @@
-
# licenses delete
Delete license by ID
Aliases:
-- del
-- rm
+* del
+* rm
## Usage
diff --git a/docs/reference/cli/licenses_list.md b/docs/reference/cli/licenses_list.md
index a888c44331546..17311df2d6da2 100644
--- a/docs/reference/cli/licenses_list.md
+++ b/docs/reference/cli/licenses_list.md
@@ -1,12 +1,11 @@
-
# licenses list
List licenses (including expired)
Aliases:
-- ls
+* ls
## Usage
@@ -19,7 +18,7 @@ coder licenses list [flags]
### -c, --column
| | |
-| ------- | ----------------------------------------------------------------- |
+|---------|-------------------------------------------------------------------|
| Type | [id\|uuid\|uploaded at\|features\|expires at\|trial]
|
| Default | ID,UUID,Expires At,Uploaded At,Features
|
@@ -28,7 +27,7 @@ Columns to display in table output.
### -o, --output
| | |
-| ------- | ------------------------ |
+|---------|--------------------------|
| Type | table\|json
|
| Default | table
|
diff --git a/docs/reference/cli/list.md b/docs/reference/cli/list.md
index e9e82988c0af8..5911785b87fc1 100644
--- a/docs/reference/cli/list.md
+++ b/docs/reference/cli/list.md
@@ -1,12 +1,11 @@
-
# list
List workspaces
Aliases:
-- ls
+* ls
## Usage
@@ -19,7 +18,7 @@ coder list [flags]
### -a, --all
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Specifies whether all workspaces will be listed or not.
@@ -27,7 +26,7 @@ Specifies whether all workspaces will be listed or not.
### --search
| | |
-| ------- | --------------------- |
+|---------|-----------------------|
| Type | string
|
| Default | owner:me
|
@@ -36,7 +35,7 @@ Search for a workspace with a query.
### -c, --column
| | |
-| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Type | [favorite\|workspace\|organization id\|organization name\|template\|status\|healthy\|last built\|current version\|outdated\|starts at\|starts next\|stops after\|stops next\|daily cost]
|
| Default | workspace,template,status,healthy,last built,current version,outdated,starts at,stops after
|
@@ -45,7 +44,7 @@ Columns to display in table output.
### -o, --output
| | |
-| ------- | ------------------------ |
+|---------|--------------------------|
| Type | table\|json
|
| Default | table
|
diff --git a/docs/reference/cli/login.md b/docs/reference/cli/login.md
index 9a27e4a6357c8..a35038fedef8c 100644
--- a/docs/reference/cli/login.md
+++ b/docs/reference/cli/login.md
@@ -1,5 +1,4 @@
-
# login
Authenticate with Coder deployment
@@ -15,7 +14,7 @@ coder login [flags] [string
|
| Environment | $CODER_FIRST_USER_EMAIL
|
@@ -24,7 +23,7 @@ Specifies an email address to use if creating the first user for the deployment.
### --first-user-username
| | |
-| ----------- | --------------------------------------- |
+|-------------|-----------------------------------------|
| Type | string
|
| Environment | $CODER_FIRST_USER_USERNAME
|
@@ -33,7 +32,7 @@ Specifies a username to use if creating the first user for the deployment.
### --first-user-full-name
| | |
-| ----------- | ---------------------------------------- |
+|-------------|------------------------------------------|
| Type | string
|
| Environment | $CODER_FIRST_USER_FULL_NAME
|
@@ -42,7 +41,7 @@ Specifies a human-readable name for the first user of the deployment.
### --first-user-password
| | |
-| ----------- | --------------------------------------- |
+|-------------|-----------------------------------------|
| Type | string
|
| Environment | $CODER_FIRST_USER_PASSWORD
|
@@ -51,7 +50,7 @@ Specifies a password to use if creating the first user for the deployment.
### --first-user-trial
| | |
-| ----------- | ------------------------------------ |
+|-------------|--------------------------------------|
| Type | bool
|
| Environment | $CODER_FIRST_USER_TRIAL
|
@@ -60,7 +59,7 @@ Specifies whether a trial license should be provisioned for the Coder deployment
### --use-token-as-session
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
By default, the CLI will generate a new session token when logging in. This flag will instead use the provided token as the session token.
diff --git a/docs/reference/cli/logout.md b/docs/reference/cli/logout.md
index 255c474054243..b35369ee36448 100644
--- a/docs/reference/cli/logout.md
+++ b/docs/reference/cli/logout.md
@@ -1,5 +1,4 @@
-
# logout
Unauthenticate your local session
@@ -15,7 +14,7 @@ coder logout [flags]
### -y, --yes
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Bypass prompts.
diff --git a/docs/reference/cli/netcheck.md b/docs/reference/cli/netcheck.md
index 0d70bc3a76642..219f6fa16b762 100644
--- a/docs/reference/cli/netcheck.md
+++ b/docs/reference/cli/netcheck.md
@@ -1,5 +1,4 @@
-
# netcheck
Print network debug information for DERP and STUN
diff --git a/docs/reference/cli/notifications.md b/docs/reference/cli/notifications.md
index 59e74b4324357..169776876e315 100644
--- a/docs/reference/cli/notifications.md
+++ b/docs/reference/cli/notifications.md
@@ -1,12 +1,11 @@
-
# notifications
Manage Coder notifications
Aliases:
-- notification
+* notification
## Usage
@@ -32,6 +31,6 @@ server or Webhook not responding).:
## Subcommands
| Name | Purpose |
-| ------------------------------------------------ | -------------------- |
+|--------------------------------------------------|----------------------|
| [pause
](./notifications_pause.md) | Pause notifications |
| [resume
](./notifications_resume.md) | Resume notifications |
diff --git a/docs/reference/cli/notifications_pause.md b/docs/reference/cli/notifications_pause.md
index 0cb2b101d474c..5bac0c2f9e05b 100644
--- a/docs/reference/cli/notifications_pause.md
+++ b/docs/reference/cli/notifications_pause.md
@@ -1,5 +1,4 @@
-
# notifications pause
Pause notifications
diff --git a/docs/reference/cli/notifications_resume.md b/docs/reference/cli/notifications_resume.md
index a8dc17453a383..79ec60ba543ff 100644
--- a/docs/reference/cli/notifications_resume.md
+++ b/docs/reference/cli/notifications_resume.md
@@ -1,5 +1,4 @@
-
# notifications resume
Resume notifications
diff --git a/docs/reference/cli/open.md b/docs/reference/cli/open.md
index 8b5f5beef4c03..e19bdaeba884d 100644
--- a/docs/reference/cli/open.md
+++ b/docs/reference/cli/open.md
@@ -1,5 +1,4 @@
-
# open
Open a workspace
@@ -13,5 +12,5 @@ coder open
## Subcommands
| Name | Purpose |
-| --------------------------------------- | ----------------------------------- |
+|-----------------------------------------|-------------------------------------|
| [vscode
](./open_vscode.md) | Open a workspace in VS Code Desktop |
diff --git a/docs/reference/cli/open_vscode.md b/docs/reference/cli/open_vscode.md
index 23e4d85d604b6..2b1e80dfbe5b7 100644
--- a/docs/reference/cli/open_vscode.md
+++ b/docs/reference/cli/open_vscode.md
@@ -1,5 +1,4 @@
-
# open vscode
Open a workspace in VS Code Desktop
@@ -15,7 +14,7 @@ coder open vscode [flags] bool
|
| Environment | $CODER_OPEN_VSCODE_GENERATE_TOKEN
|
diff --git a/docs/reference/cli/organizations.md b/docs/reference/cli/organizations.md
index 1fbd076425ace..c2d4497173103 100644
--- a/docs/reference/cli/organizations.md
+++ b/docs/reference/cli/organizations.md
@@ -1,14 +1,13 @@
-
# organizations
Organization related commands
Aliases:
-- organization
-- org
-- orgs
+* organization
+* org
+* orgs
## Usage
@@ -19,7 +18,7 @@ coder organizations [flags] [subcommand]
## Subcommands
| Name | Purpose |
-| ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+|------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [show
](./organizations_show.md) | Show the organization. Using "selected" will show the selected organization from the "--org" flag. Using "me" will show all organizations you are a member of. |
| [create
](./organizations_create.md) | Create a new organization. |
| [members
](./organizations_members.md) | Manage organization members |
@@ -31,7 +30,7 @@ coder organizations [flags] [subcommand]
### -O, --org
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | string
|
| Environment | $CODER_ORGANIZATION
|
diff --git a/docs/reference/cli/organizations_create.md b/docs/reference/cli/organizations_create.md
index 416a1306456e2..14f40f55e00d1 100644
--- a/docs/reference/cli/organizations_create.md
+++ b/docs/reference/cli/organizations_create.md
@@ -1,5 +1,4 @@
-
# organizations create
Create a new organization.
@@ -15,7 +14,7 @@ coder organizations create [flags] bool
|
Bypass prompts.
diff --git a/docs/reference/cli/organizations_members.md b/docs/reference/cli/organizations_members.md
index 49d29ace004a8..b71372f13bdd9 100644
--- a/docs/reference/cli/organizations_members.md
+++ b/docs/reference/cli/organizations_members.md
@@ -1,12 +1,11 @@
-
# organizations members
Manage organization members
Aliases:
-- member
+* member
## Usage
@@ -17,7 +16,7 @@ coder organizations members
## Subcommands
| Name | Purpose |
-| ---------------------------------------------------------------- | ----------------------------------------------- |
+|------------------------------------------------------------------|-------------------------------------------------|
| [list
](./organizations_members_list.md) | List all organization members |
| [edit-roles
](./organizations_members_edit-roles.md) | Edit organization member's roles |
| [add
](./organizations_members_add.md) | Add a new member to the current organization |
diff --git a/docs/reference/cli/organizations_members_add.md b/docs/reference/cli/organizations_members_add.md
index b912a7ab56545..57481f02dd859 100644
--- a/docs/reference/cli/organizations_members_add.md
+++ b/docs/reference/cli/organizations_members_add.md
@@ -1,5 +1,4 @@
-
# organizations members add
Add a new member to the current organization
diff --git a/docs/reference/cli/organizations_members_edit-roles.md b/docs/reference/cli/organizations_members_edit-roles.md
index 3bd9d2066f5cf..0d4a21a379e11 100644
--- a/docs/reference/cli/organizations_members_edit-roles.md
+++ b/docs/reference/cli/organizations_members_edit-roles.md
@@ -1,12 +1,11 @@
-
# organizations members edit-roles
Edit organization member's roles
Aliases:
-- edit-role
+* edit-role
## Usage
diff --git a/docs/reference/cli/organizations_members_list.md b/docs/reference/cli/organizations_members_list.md
index 9a0a5d3fa0640..270fb1d49e945 100644
--- a/docs/reference/cli/organizations_members_list.md
+++ b/docs/reference/cli/organizations_members_list.md
@@ -1,5 +1,4 @@
-
# organizations members list
List all organization members
@@ -15,7 +14,7 @@ coder organizations members list [flags]
### -c, --column
| | |
-| ------- | --------------------------------------------------------------------------------------------------- |
+|---------|-----------------------------------------------------------------------------------------------------|
| Type | [username\|name\|user id\|organization id\|created at\|updated at\|organization roles]
|
| Default | username,organization roles
|
@@ -24,7 +23,7 @@ Columns to display in table output.
### -o, --output
| | |
-| ------- | ------------------------ |
+|---------|--------------------------|
| Type | table\|json
|
| Default | table
|
diff --git a/docs/reference/cli/organizations_members_remove.md b/docs/reference/cli/organizations_members_remove.md
index f36ea00b3ed48..9b6e29416557b 100644
--- a/docs/reference/cli/organizations_members_remove.md
+++ b/docs/reference/cli/organizations_members_remove.md
@@ -1,12 +1,11 @@
-
# organizations members remove
Remove a new member to the current organization
Aliases:
-- rm
+* rm
## Usage
diff --git a/docs/reference/cli/organizations_roles.md b/docs/reference/cli/organizations_roles.md
index 536e6abe89c10..19b6271dcbf9c 100644
--- a/docs/reference/cli/organizations_roles.md
+++ b/docs/reference/cli/organizations_roles.md
@@ -1,12 +1,11 @@
-
# organizations roles
Manage organization roles.
Aliases:
-- role
+* role
## Usage
@@ -17,6 +16,6 @@ coder organizations roles
## Subcommands
| Name | Purpose |
-| -------------------------------------------------- | -------------------------------- |
+|----------------------------------------------------|----------------------------------|
| [show
](./organizations_roles_show.md) | Show role(s) |
| [edit
](./organizations_roles_edit.md) | Edit an organization custom role |
diff --git a/docs/reference/cli/organizations_roles_edit.md b/docs/reference/cli/organizations_roles_edit.md
index 04fc8522a21ef..988f8c0eee1b2 100644
--- a/docs/reference/cli/organizations_roles_edit.md
+++ b/docs/reference/cli/organizations_roles_edit.md
@@ -1,5 +1,4 @@
-
# organizations roles edit
Edit an organization custom role
@@ -23,7 +22,7 @@ coder organizations roles edit [flags] bool
|
Bypass prompts.
@@ -31,7 +30,7 @@ Bypass prompts.
### --dry-run
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Does all the work, but does not submit the final updated role.
@@ -39,7 +38,7 @@ Does all the work, but does not submit the final updated role.
### --stdin
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Reads stdin for the json role definition to upload.
@@ -47,7 +46,7 @@ Reads stdin for the json role definition to upload.
### -c, --column
| | |
-| ------- | ---------------------------------------------------------------------------------------------------------------- |
+|---------|------------------------------------------------------------------------------------------------------------------|
| Type | [name\|display name\|organization id\|site permissions\|organization permissions\|user permissions]
|
| Default | name,display name,site permissions,organization permissions,user permissions
|
@@ -56,7 +55,7 @@ Columns to display in table output.
### -o, --output
| | |
-| ------- | ------------------------ |
+|---------|--------------------------|
| Type | table\|json
|
| Default | table
|
diff --git a/docs/reference/cli/organizations_roles_show.md b/docs/reference/cli/organizations_roles_show.md
index 2d75ae74d4576..1d5653839e756 100644
--- a/docs/reference/cli/organizations_roles_show.md
+++ b/docs/reference/cli/organizations_roles_show.md
@@ -1,5 +1,4 @@
-
# organizations roles show
Show role(s)
@@ -15,7 +14,7 @@ coder organizations roles show [flags] [role_names ...]
### -c, --column
| | |
-| ------- | ---------------------------------------------------------------------------------------------------------------- |
+|---------|------------------------------------------------------------------------------------------------------------------|
| Type | [name\|display name\|organization id\|site permissions\|organization permissions\|user permissions]
|
| Default | name,display name,site permissions,organization permissions,user permissions
|
@@ -24,7 +23,7 @@ Columns to display in table output.
### -o, --output
| | |
-| ------- | ------------------------ |
+|---------|--------------------------|
| Type | table\|json
|
| Default | table
|
diff --git a/docs/reference/cli/organizations_settings.md b/docs/reference/cli/organizations_settings.md
index 15093c984fedc..76a84135edb07 100644
--- a/docs/reference/cli/organizations_settings.md
+++ b/docs/reference/cli/organizations_settings.md
@@ -1,12 +1,11 @@
-
# organizations settings
Manage organization settings.
Aliases:
-- setting
+* setting
## Usage
@@ -17,6 +16,6 @@ coder organizations settings
## Subcommands
| Name | Purpose |
-| ----------------------------------------------------- | --------------------------------------- |
+|-------------------------------------------------------|-----------------------------------------|
| [show
](./organizations_settings_show.md) | Outputs specified organization setting. |
| [set
](./organizations_settings_set.md) | Update specified organization setting. |
diff --git a/docs/reference/cli/organizations_settings_set.md b/docs/reference/cli/organizations_settings_set.md
index e1e9bf0261a1b..c7d0fd8f138e3 100644
--- a/docs/reference/cli/organizations_settings_set.md
+++ b/docs/reference/cli/organizations_settings_set.md
@@ -1,5 +1,4 @@
-
# organizations settings set
Update specified organization setting.
@@ -21,7 +20,7 @@ coder organizations settings set
## Subcommands
| Name | Purpose |
-| ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
+|-------------------------------------------------------------------------------------|--------------------------------------------------------------------------|
| [group-sync
](./organizations_settings_set_group-sync.md) | Group sync settings to sync groups from an IdP. |
| [role-sync
](./organizations_settings_set_role-sync.md) | Role sync settings to sync organization roles from an IdP. |
| [organization-sync
](./organizations_settings_set_organization-sync.md) | Organization sync settings to sync organization memberships from an IdP. |
diff --git a/docs/reference/cli/organizations_settings_set_group-sync.md b/docs/reference/cli/organizations_settings_set_group-sync.md
index f60a456771763..ceefa22a523c2 100644
--- a/docs/reference/cli/organizations_settings_set_group-sync.md
+++ b/docs/reference/cli/organizations_settings_set_group-sync.md
@@ -1,12 +1,11 @@
-
# organizations settings set group-sync
Group sync settings to sync groups from an IdP.
Aliases:
-- groupsync
+* groupsync
## Usage
diff --git a/docs/reference/cli/organizations_settings_set_organization-sync.md b/docs/reference/cli/organizations_settings_set_organization-sync.md
index 6b6557e2c3358..8580c6cef3767 100644
--- a/docs/reference/cli/organizations_settings_set_organization-sync.md
+++ b/docs/reference/cli/organizations_settings_set_organization-sync.md
@@ -1,14 +1,13 @@
-
# organizations settings set organization-sync
Organization sync settings to sync organization memberships from an IdP.
Aliases:
-- organizationsync
-- org-sync
-- orgsync
+* organizationsync
+* org-sync
+* orgsync
## Usage
diff --git a/docs/reference/cli/organizations_settings_set_role-sync.md b/docs/reference/cli/organizations_settings_set_role-sync.md
index 40203b21f752e..01d46319f54a9 100644
--- a/docs/reference/cli/organizations_settings_set_role-sync.md
+++ b/docs/reference/cli/organizations_settings_set_role-sync.md
@@ -1,12 +1,11 @@
-
# organizations settings set role-sync
Role sync settings to sync organization roles from an IdP.
Aliases:
-- rolesync
+* rolesync
## Usage
diff --git a/docs/reference/cli/organizations_settings_show.md b/docs/reference/cli/organizations_settings_show.md
index feaef7d0124f9..90dc642745707 100644
--- a/docs/reference/cli/organizations_settings_show.md
+++ b/docs/reference/cli/organizations_settings_show.md
@@ -1,5 +1,4 @@
-
# organizations settings show
Outputs specified organization setting.
@@ -21,7 +20,7 @@ coder organizations settings show
## Subcommands
| Name | Purpose |
-| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
+|--------------------------------------------------------------------------------------|--------------------------------------------------------------------------|
| [group-sync
](./organizations_settings_show_group-sync.md) | Group sync settings to sync groups from an IdP. |
| [role-sync
](./organizations_settings_show_role-sync.md) | Role sync settings to sync organization roles from an IdP. |
| [organization-sync
](./organizations_settings_show_organization-sync.md) | Organization sync settings to sync organization memberships from an IdP. |
diff --git a/docs/reference/cli/organizations_settings_show_group-sync.md b/docs/reference/cli/organizations_settings_show_group-sync.md
index 6ae796d117e61..75a4398f88bce 100644
--- a/docs/reference/cli/organizations_settings_show_group-sync.md
+++ b/docs/reference/cli/organizations_settings_show_group-sync.md
@@ -1,12 +1,11 @@
-
# organizations settings show group-sync
Group sync settings to sync groups from an IdP.
Aliases:
-- groupsync
+* groupsync
## Usage
diff --git a/docs/reference/cli/organizations_settings_show_organization-sync.md b/docs/reference/cli/organizations_settings_show_organization-sync.md
index 7e2e025c2a4af..2054aa29b4cdb 100644
--- a/docs/reference/cli/organizations_settings_show_organization-sync.md
+++ b/docs/reference/cli/organizations_settings_show_organization-sync.md
@@ -1,14 +1,13 @@
-
# organizations settings show organization-sync
Organization sync settings to sync organization memberships from an IdP.
Aliases:
-- organizationsync
-- org-sync
-- orgsync
+* organizationsync
+* org-sync
+* orgsync
## Usage
diff --git a/docs/reference/cli/organizations_settings_show_role-sync.md b/docs/reference/cli/organizations_settings_show_role-sync.md
index 8a32c138517d1..6fe2fd40a951c 100644
--- a/docs/reference/cli/organizations_settings_show_role-sync.md
+++ b/docs/reference/cli/organizations_settings_show_role-sync.md
@@ -1,12 +1,11 @@
-
# organizations settings show role-sync
Role sync settings to sync organization roles from an IdP.
Aliases:
-- rolesync
+* rolesync
## Usage
diff --git a/docs/reference/cli/organizations_show.md b/docs/reference/cli/organizations_show.md
index 0cd111e9da0eb..540014b46802d 100644
--- a/docs/reference/cli/organizations_show.md
+++ b/docs/reference/cli/organizations_show.md
@@ -1,5 +1,4 @@
-
# organizations show
Show the organization. Using "selected" will show the selected organization from the "--org" flag. Using "me" will show all organizations you are a member of.
@@ -35,7 +34,7 @@ coder organizations show [flags] ["selected"|"me"|uuid|org_name]
### --only-id
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Only print the organization ID.
@@ -43,7 +42,7 @@ Only print the organization ID.
### -c, --column
| | |
-| ------- | ----------------------------------------------------------------------------------------- |
+|---------|-------------------------------------------------------------------------------------------|
| Type | [id\|name\|display name\|icon\|description\|created at\|updated at\|default]
|
| Default | id,name,default
|
@@ -52,7 +51,7 @@ Columns to display in table output.
### -o, --output
| | |
-| ------- | ------------------------------ |
+|---------|--------------------------------|
| Type | text\|table\|json
|
| Default | text
|
diff --git a/docs/reference/cli/ping.md b/docs/reference/cli/ping.md
index c8d63addcf8d7..8fbc1eaf36e8e 100644
--- a/docs/reference/cli/ping.md
+++ b/docs/reference/cli/ping.md
@@ -1,5 +1,4 @@
-
# ping
Ping a workspace
@@ -15,7 +14,7 @@ coder ping [flags] duration
|
| Default | 1s
|
@@ -24,7 +23,7 @@ Specifies how long to wait between pings.
### -t, --timeout
| | |
-| ------- | --------------------- |
+|---------|-----------------------|
| Type | duration
|
| Default | 5s
|
@@ -33,7 +32,7 @@ Specifies how long to wait for a ping to complete.
### -n, --num
| | |
-| ---- | ---------------- |
+|------|------------------|
| Type | int
|
Specifies the number of pings to perform. By default, pings will continue until interrupted.
diff --git a/docs/reference/cli/port-forward.md b/docs/reference/cli/port-forward.md
index f279e2125d93b..976b830fca360 100644
--- a/docs/reference/cli/port-forward.md
+++ b/docs/reference/cli/port-forward.md
@@ -1,12 +1,11 @@
-
# port-forward
Forward ports from a workspace to the local machine. For reverse port forwarding, use "coder ssh -R".
Aliases:
-- tunnel
+* tunnel
## Usage
@@ -45,7 +44,7 @@ machine:
### -p, --tcp
| | |
-| ----------- | ------------------------------------ |
+|-------------|--------------------------------------|
| Type | string-array
|
| Environment | $CODER_PORT_FORWARD_TCP
|
@@ -54,7 +53,7 @@ Forward TCP port(s) from the workspace to the local machine.
### --udp
| | |
-| ----------- | ------------------------------------ |
+|-------------|--------------------------------------|
| Type | string-array
|
| Environment | $CODER_PORT_FORWARD_UDP
|
@@ -63,7 +62,7 @@ Forward UDP port(s) from the workspace to the local machine. The UDP connection
### --disable-autostart
| | |
-| ----------- | ----------------------------------------- |
+|-------------|-------------------------------------------|
| Type | bool
|
| Environment | $CODER_SSH_DISABLE_AUTOSTART
|
| Default | false
|
diff --git a/docs/reference/cli/provisioner.md b/docs/reference/cli/provisioner.md
index 54cc28a84bea4..20acfd4fa5c69 100644
--- a/docs/reference/cli/provisioner.md
+++ b/docs/reference/cli/provisioner.md
@@ -1,12 +1,11 @@
-
# provisioner
-Manage provisioner daemons
+View and manage provisioner daemons and jobs
Aliases:
-- provisioners
+* provisioners
## Usage
@@ -16,7 +15,9 @@ coder provisioner
## Subcommands
-| Name | Purpose |
-| -------------------------------------------- | ------------------------ |
-| [start
](./provisioner_start.md) | Run a provisioner daemon |
-| [keys
](./provisioner_keys.md) | Manage provisioner keys |
+| Name | Purpose |
+|----------------------------------------------|---------------------------------------------|
+| [list
](./provisioner_list.md) | List provisioner daemons in an organization |
+| [jobs
](./provisioner_jobs.md) | View and manage provisioner jobs |
+| [start
](./provisioner_start.md) | Run a provisioner daemon |
+| [keys
](./provisioner_keys.md) | Manage provisioner keys |
diff --git a/docs/reference/cli/provisioner_jobs.md b/docs/reference/cli/provisioner_jobs.md
new file mode 100644
index 0000000000000..1bd2226af0920
--- /dev/null
+++ b/docs/reference/cli/provisioner_jobs.md
@@ -0,0 +1,21 @@
+
+# provisioner jobs
+
+View and manage provisioner jobs
+
+Aliases:
+
+* job
+
+## Usage
+
+```console
+coder provisioner jobs
+```
+
+## Subcommands
+
+| Name | Purpose |
+|-----------------------------------------------------|--------------------------|
+| [cancel
](./provisioner_jobs_cancel.md) | Cancel a provisioner job |
+| [list
](./provisioner_jobs_list.md) | List provisioner jobs |
diff --git a/docs/reference/cli/provisioner_jobs_cancel.md b/docs/reference/cli/provisioner_jobs_cancel.md
new file mode 100644
index 0000000000000..2040247b1199d
--- /dev/null
+++ b/docs/reference/cli/provisioner_jobs_cancel.md
@@ -0,0 +1,21 @@
+
+# provisioner jobs cancel
+
+Cancel a provisioner job
+
+## Usage
+
+```console
+coder provisioner jobs cancel [flags] string
|
+| Environment | $CODER_ORGANIZATION
|
+
+Select which organization (uuid or name) to use.
diff --git a/docs/reference/cli/provisioner_jobs_list.md b/docs/reference/cli/provisioner_jobs_list.md
new file mode 100644
index 0000000000000..03e187b1c6720
--- /dev/null
+++ b/docs/reference/cli/provisioner_jobs_list.md
@@ -0,0 +1,62 @@
+
+# provisioner jobs list
+
+List provisioner jobs
+
+Aliases:
+
+* ls
+
+## Usage
+
+```console
+coder provisioner jobs list [flags]
+```
+
+## Options
+
+### -s, --status
+
+| | |
+|-------------|----------------------------------------------------------------------------------|
+| Type | [pending\|running\|succeeded\|canceling\|canceled\|failed\|unknown]
|
+| Environment | $CODER_PROVISIONER_JOB_LIST_STATUS
|
+
+Filter by job status.
+
+### -l, --limit
+
+| | |
+|-------------|------------------------------------------------|
+| Type | int
|
+| Environment | $CODER_PROVISIONER_JOB_LIST_LIMIT
|
+| Default | 50
|
+
+Limit the number of jobs returned.
+
+### -O, --org
+
+| | |
+|-------------|----------------------------------|
+| Type | string
|
+| Environment | $CODER_ORGANIZATION
|
+
+Select which organization (uuid or name) to use.
+
+### -c, --column
+
+| | |
+|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| Type | [id\|created at\|started at\|completed at\|canceled at\|error\|error code\|status\|worker id\|file id\|tags\|queue position\|queue size\|organization id\|template version id\|workspace build id\|type\|available workers\|organization\|queue]
|
+| Default | created at,id,organization,status,type,queue,tags
|
+
+Columns to display in table output.
+
+### -o, --output
+
+| | |
+|---------|--------------------------|
+| Type | table\|json
|
+| Default | table
|
+
+Output format.
diff --git a/docs/reference/cli/provisioner_keys.md b/docs/reference/cli/provisioner_keys.md
index 014af6f117c3a..80cfd8f0a31b8 100644
--- a/docs/reference/cli/provisioner_keys.md
+++ b/docs/reference/cli/provisioner_keys.md
@@ -1,12 +1,11 @@
-
# provisioner keys
Manage provisioner keys
Aliases:
-- key
+* key
## Usage
@@ -17,7 +16,7 @@ coder provisioner keys
## Subcommands
| Name | Purpose |
-| --------------------------------------------------- | ---------------------------------------- |
+|-----------------------------------------------------|------------------------------------------|
| [create
](./provisioner_keys_create.md) | Create a new provisioner key |
| [list
](./provisioner_keys_list.md) | List provisioner keys in an organization |
| [delete
](./provisioner_keys_delete.md) | Delete a provisioner key |
diff --git a/docs/reference/cli/provisioner_keys_create.md b/docs/reference/cli/provisioner_keys_create.md
index da6479d15bfc9..737ba187c9c27 100644
--- a/docs/reference/cli/provisioner_keys_create.md
+++ b/docs/reference/cli/provisioner_keys_create.md
@@ -1,5 +1,4 @@
-
# provisioner keys create
Create a new provisioner key
@@ -15,7 +14,7 @@ coder provisioner keys create [flags] string-array
|
| Environment | $CODER_PROVISIONERD_TAGS
|
@@ -24,7 +23,7 @@ Tags to filter provisioner jobs by.
### -O, --org
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | string
|
| Environment | $CODER_ORGANIZATION
|
diff --git a/docs/reference/cli/provisioner_keys_delete.md b/docs/reference/cli/provisioner_keys_delete.md
index 56e32e57d048b..4303491106716 100644
--- a/docs/reference/cli/provisioner_keys_delete.md
+++ b/docs/reference/cli/provisioner_keys_delete.md
@@ -1,12 +1,11 @@
-
# provisioner keys delete
Delete a provisioner key
Aliases:
-- rm
+* rm
## Usage
@@ -19,7 +18,7 @@ coder provisioner keys delete [flags] bool
|
Bypass prompts.
@@ -27,7 +26,7 @@ Bypass prompts.
### -O, --org
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | string
|
| Environment | $CODER_ORGANIZATION
|
diff --git a/docs/reference/cli/provisioner_keys_list.md b/docs/reference/cli/provisioner_keys_list.md
index 366db05fa490f..4f05a5e9b5dcc 100644
--- a/docs/reference/cli/provisioner_keys_list.md
+++ b/docs/reference/cli/provisioner_keys_list.md
@@ -1,12 +1,11 @@
-
# provisioner keys list
List provisioner keys in an organization
Aliases:
-- ls
+* ls
## Usage
@@ -19,8 +18,26 @@ coder provisioner keys list [flags]
### -O, --org
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | string
|
| Environment | $CODER_ORGANIZATION
|
Select which organization (uuid or name) to use.
+
+### -c, --column
+
+| | |
+|---------|---------------------------------------|
+| Type | [created at\|name\|tags]
|
+| Default | created at,name,tags
|
+
+Columns to display in table output.
+
+### -o, --output
+
+| | |
+|---------|--------------------------|
+| Type | table\|json
|
+| Default | table
|
+
+Output format.
diff --git a/docs/reference/cli/provisioner_list.md b/docs/reference/cli/provisioner_list.md
new file mode 100644
index 0000000000000..11abd7dcc3d75
--- /dev/null
+++ b/docs/reference/cli/provisioner_list.md
@@ -0,0 +1,43 @@
+
+# provisioner list
+
+List provisioner daemons in an organization
+
+Aliases:
+
+* ls
+
+## Usage
+
+```console
+coder provisioner list [flags]
+```
+
+## Options
+
+### -O, --org
+
+| | |
+|-------------|----------------------------------|
+| Type | string
|
+| Environment | $CODER_ORGANIZATION
|
+
+Select which organization (uuid or name) to use.
+
+### -c, --column
+
+| | |
+|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| Type | [id\|organization id\|created at\|last seen at\|name\|version\|api version\|tags\|key name\|status\|current job id\|current job status\|previous job id\|previous job status\|organization]
|
+| Default | name,organization,status,key name,created at,last seen at,version,tags
|
+
+Columns to display in table output.
+
+### -o, --output
+
+| | |
+|---------|--------------------------|
+| Type | table\|json
|
+| Default | table
|
+
+Output format.
diff --git a/docs/reference/cli/provisioner_start.md b/docs/reference/cli/provisioner_start.md
index 65254d18c0149..2a3c88ff93139 100644
--- a/docs/reference/cli/provisioner_start.md
+++ b/docs/reference/cli/provisioner_start.md
@@ -1,5 +1,4 @@
-
# provisioner start
Run a provisioner daemon
@@ -15,7 +14,7 @@ coder provisioner start [flags]
### -c, --cache-dir
| | |
-| ----------- | ----------------------------------- |
+|-------------|-------------------------------------|
| Type | string
|
| Environment | $CODER_CACHE_DIRECTORY
|
| Default | ~/.cache/coder
|
@@ -25,7 +24,7 @@ Directory to store cached data.
### -t, --tag
| | |
-| ----------- | ------------------------------------- |
+|-------------|---------------------------------------|
| Type | string-array
|
| Environment | $CODER_PROVISIONERD_TAGS
|
@@ -34,7 +33,7 @@ Tags to filter provisioner jobs by.
### --poll-interval
| | |
-| ----------- | ---------------------------------------------- |
+|-------------|------------------------------------------------|
| Type | duration
|
| Environment | $CODER_PROVISIONERD_POLL_INTERVAL
|
| Default | 1s
|
@@ -44,7 +43,7 @@ Deprecated and ignored.
### --poll-jitter
| | |
-| ----------- | -------------------------------------------- |
+|-------------|----------------------------------------------|
| Type | duration
|
| Environment | $CODER_PROVISIONERD_POLL_JITTER
|
| Default | 100ms
|
@@ -54,7 +53,7 @@ Deprecated and ignored.
### --psk
| | |
-| ----------- | ------------------------------------------ |
+|-------------|--------------------------------------------|
| Type | string
|
| Environment | $CODER_PROVISIONER_DAEMON_PSK
|
@@ -63,7 +62,7 @@ Pre-shared key to authenticate with Coder server.
### --key
| | |
-| ----------- | ------------------------------------------ |
+|-------------|--------------------------------------------|
| Type | string
|
| Environment | $CODER_PROVISIONER_DAEMON_KEY
|
@@ -72,7 +71,7 @@ Provisioner key to authenticate with Coder server.
### --name
| | |
-| ----------- | ------------------------------------------- |
+|-------------|---------------------------------------------|
| Type | string
|
| Environment | $CODER_PROVISIONER_DAEMON_NAME
|
@@ -81,7 +80,7 @@ Name of this provisioner daemon. Defaults to the current hostname without FQDN.
### --verbose
| | |
-| ----------- | ---------------------------------------------- |
+|-------------|------------------------------------------------|
| Type | bool
|
| Environment | $CODER_PROVISIONER_DAEMON_VERBOSE
|
| Default | false
|
@@ -91,7 +90,7 @@ Output debug-level logs.
### --log-human
| | |
-| ----------- | ---------------------------------------------------- |
+|-------------|------------------------------------------------------|
| Type | string
|
| Environment | $CODER_PROVISIONER_DAEMON_LOGGING_HUMAN
|
| Default | /dev/stderr
|
@@ -101,7 +100,7 @@ Output human-readable logs to a given file.
### --log-json
| | |
-| ----------- | --------------------------------------------------- |
+|-------------|-----------------------------------------------------|
| Type | string
|
| Environment | $CODER_PROVISIONER_DAEMON_LOGGING_JSON
|
@@ -110,7 +109,7 @@ Output JSON logs to a given file.
### --log-stackdriver
| | |
-| ----------- | ---------------------------------------------------------- |
+|-------------|------------------------------------------------------------|
| Type | string
|
| Environment | $CODER_PROVISIONER_DAEMON_LOGGING_STACKDRIVER
|
@@ -119,16 +118,16 @@ Output Stackdriver compatible logs to a given file.
### --log-filter
| | |
-| ----------- | ------------------------------------------------- |
+|-------------|---------------------------------------------------|
| Type | string-array
|
| Environment | $CODER_PROVISIONER_DAEMON_LOG_FILTER
|
-Filter debug logs by matching against a given regex. Use .\* to match all debug logs.
+Filter debug logs by matching against a given regex. Use .* to match all debug logs.
### --prometheus-enable
| | |
-| ----------- | ------------------------------------- |
+|-------------|---------------------------------------|
| Type | bool
|
| Environment | $CODER_PROMETHEUS_ENABLE
|
| Default | false
|
@@ -138,7 +137,7 @@ Serve prometheus metrics on the address defined by prometheus address.
### --prometheus-address
| | |
-| ----------- | -------------------------------------- |
+|-------------|----------------------------------------|
| Type | string
|
| Environment | $CODER_PROMETHEUS_ADDRESS
|
| Default | 127.0.0.1:2112
|
@@ -148,7 +147,7 @@ The bind address to serve prometheus metrics.
### -O, --org
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | string
|
| Environment | $CODER_ORGANIZATION
|
diff --git a/docs/reference/cli/publickey.md b/docs/reference/cli/publickey.md
index 63e19e7e54423..ec68d813b137b 100644
--- a/docs/reference/cli/publickey.md
+++ b/docs/reference/cli/publickey.md
@@ -1,12 +1,11 @@
-
# publickey
Output your Coder public key used for Git operations
Aliases:
-- pubkey
+* pubkey
## Usage
@@ -19,7 +18,7 @@ coder publickey [flags]
### --reset
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Regenerate your public key. This will require updating the key on any services it's registered with.
@@ -27,7 +26,7 @@ Regenerate your public key. This will require updating the key on any services i
### -y, --yes
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Bypass prompts.
diff --git a/docs/reference/cli/rename.md b/docs/reference/cli/rename.md
index 5cb9242beba38..511ccc60f8d3b 100644
--- a/docs/reference/cli/rename.md
+++ b/docs/reference/cli/rename.md
@@ -1,5 +1,4 @@
-
# rename
Rename a workspace
@@ -15,7 +14,7 @@ coder rename [flags] bool
|
Bypass prompts.
diff --git a/docs/reference/cli/reset-password.md b/docs/reference/cli/reset-password.md
index 2d63226f02d26..ada9ad7e7db3e 100644
--- a/docs/reference/cli/reset-password.md
+++ b/docs/reference/cli/reset-password.md
@@ -1,5 +1,4 @@
-
# reset-password
Directly connect to the database to reset a user's password
@@ -15,8 +14,18 @@ coder reset-password [flags] string
|
| Environment | $CODER_PG_CONNECTION_URL
|
URL of a PostgreSQL database to connect to.
+
+### --postgres-connection-auth
+
+| | |
+|-------------|----------------------------------------|
+| Type | password\|awsiamrds
|
+| Environment | $CODER_PG_CONNECTION_AUTH
|
+| Default | password
|
+
+Type of auth to use when connecting to postgres.
diff --git a/docs/reference/cli/restart.md b/docs/reference/cli/restart.md
index 3b06efb6e4855..1c30e3e1fffaa 100644
--- a/docs/reference/cli/restart.md
+++ b/docs/reference/cli/restart.md
@@ -1,5 +1,4 @@
-
# restart
Restart a workspace
@@ -15,7 +14,7 @@ coder restart [flags] bool
|
Bypass prompts.
@@ -23,7 +22,7 @@ Bypass prompts.
### --build-option
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | string-array
|
| Environment | $CODER_BUILD_OPTION
|
@@ -32,7 +31,7 @@ Build option value in the format "name=value".
### --build-options
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Prompt for one-time build options defined with ephemeral parameters.
@@ -40,7 +39,7 @@ Prompt for one-time build options defined with ephemeral parameters.
### --ephemeral-parameter
| | |
-| ----------- | --------------------------------------- |
+|-------------|-----------------------------------------|
| Type | string-array
|
| Environment | $CODER_EPHEMERAL_PARAMETER
|
@@ -49,7 +48,7 @@ Set the value of ephemeral parameters defined in the template. The format is "na
### --prompt-ephemeral-parameters
| | |
-| ----------- | ----------------------------------------------- |
+|-------------|-------------------------------------------------|
| Type | bool
|
| Environment | $CODER_PROMPT_EPHEMERAL_PARAMETERS
|
@@ -58,7 +57,7 @@ Prompt to set values of ephemeral parameters defined in the template. If a value
### --parameter
| | |
-| ----------- | ---------------------------------- |
+|-------------|------------------------------------|
| Type | string-array
|
| Environment | $CODER_RICH_PARAMETER
|
@@ -67,7 +66,7 @@ Rich parameter value in the format "name=value".
### --rich-parameter-file
| | |
-| ----------- | --------------------------------------- |
+|-------------|-----------------------------------------|
| Type | string
|
| Environment | $CODER_RICH_PARAMETER_FILE
|
@@ -76,7 +75,7 @@ Specify a file path with values for rich parameters defined in the template. The
### --parameter-default
| | |
-| ----------- | ------------------------------------------ |
+|-------------|--------------------------------------------|
| Type | string-array
|
| Environment | $CODER_RICH_PARAMETER_DEFAULT
|
@@ -85,7 +84,7 @@ Rich parameter default values in the format "name=value".
### --always-prompt
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Always prompt all parameters. Does not pull parameter values from existing workspace.
diff --git a/docs/reference/cli/schedule.md b/docs/reference/cli/schedule.md
index cfaf5911bf51a..c25bd4bf60036 100644
--- a/docs/reference/cli/schedule.md
+++ b/docs/reference/cli/schedule.md
@@ -1,5 +1,4 @@
-
# schedule
Schedule automated start and stop times for workspaces
@@ -7,14 +6,14 @@ Schedule automated start and stop times for workspaces
## Usage
```console
-coder schedule { show | start | stop | override } show
](./schedule_show.md) | Show workspace schedules |
-| [start
](./schedule_start.md) | Edit workspace start schedule |
-| [stop
](./schedule_stop.md) | Edit workspace stop schedule |
-| [override-stop
](./schedule_override-stop.md) | Override the stop time of a currently running workspace instance. |
+| Name | Purpose |
+|---------------------------------------------|-----------------------------------------------------------------|
+| [show
](./schedule_show.md) | Show workspace schedules |
+| [start
](./schedule_start.md) | Edit workspace start schedule |
+| [stop
](./schedule_stop.md) | Edit workspace stop schedule |
+| [extend
](./schedule_extend.md) | Extend the stop time of a currently running workspace instance. |
diff --git a/docs/reference/cli/schedule_extend.md b/docs/reference/cli/schedule_extend.md
new file mode 100644
index 0000000000000..e4b696ad5c4a7
--- /dev/null
+++ b/docs/reference/cli/schedule_extend.md
@@ -0,0 +1,25 @@
+
+# schedule extend
+
+Extend the stop time of a currently running workspace instance.
+
+Aliases:
+
+* override-stop
+
+## Usage
+
+```console
+coder schedule extend bool
|
Specifies whether all workspaces will be listed or not.
@@ -34,7 +33,7 @@ Specifies whether all workspaces will be listed or not.
### --search
| | |
-| ------- | --------------------- |
+|---------|-----------------------|
| Type | string
|
| Default | owner:me
|
@@ -43,7 +42,7 @@ Search for a workspace with a query.
### -c, --column
| | |
-| ------- | ------------------------------------------------------------------------- |
+|---------|---------------------------------------------------------------------------|
| Type | [workspace\|starts at\|starts next\|stops after\|stops next]
|
| Default | workspace,starts at,starts next,stops after,stops next
|
@@ -52,7 +51,7 @@ Columns to display in table output.
### -o, --output
| | |
-| ------- | ------------------------ |
+|---------|--------------------------|
| Type | table\|json
|
| Default | table
|
diff --git a/docs/reference/cli/schedule_start.md b/docs/reference/cli/schedule_start.md
index 771bb995e65b0..886e5edf1adaf 100644
--- a/docs/reference/cli/schedule_start.md
+++ b/docs/reference/cli/schedule_start.md
@@ -1,5 +1,4 @@
-
# schedule start
Edit workspace start schedule
diff --git a/docs/reference/cli/schedule_stop.md b/docs/reference/cli/schedule_stop.md
index 399bc69cd5fc9..a832c9c919573 100644
--- a/docs/reference/cli/schedule_stop.md
+++ b/docs/reference/cli/schedule_stop.md
@@ -1,5 +1,4 @@
-
# schedule stop
Edit workspace stop schedule
diff --git a/docs/reference/cli/server.md b/docs/reference/cli/server.md
index 02f5b6ff5f4be..98cb2a90c20da 100644
--- a/docs/reference/cli/server.md
+++ b/docs/reference/cli/server.md
@@ -1,5 +1,4 @@
-
# server
Start a Coder server
@@ -13,7 +12,7 @@ coder server [flags]
## Subcommands
| Name | Purpose |
-| ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
+|---------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|
| [create-admin-user
](./server_create-admin-user.md) | Create a new admin user with the given username, email and password and adds it to every organization. |
| [postgres-builtin-url
](./server_postgres-builtin-url.md) | Output the connection URL for the built-in PostgreSQL deployment. |
| [postgres-builtin-serve
](./server_postgres-builtin-serve.md) | Run the built-in PostgreSQL deployment. |
@@ -24,7 +23,7 @@ coder server [flags]
### --access-url
| | |
-| ----------- | --------------------------------- |
+|-------------|-----------------------------------|
| Type | url
|
| Environment | $CODER_ACCESS_URL
|
| YAML | networking.accessURL
|
@@ -34,17 +33,17 @@ The URL that users will use to access the Coder deployment.
### --wildcard-access-url
| | |
-| ----------- | ----------------------------------------- |
+|-------------|-------------------------------------------|
| Type | string
|
| Environment | $CODER_WILDCARD_ACCESS_URL
|
| YAML | networking.wildcardAccessURL
|
-Specifies the wildcard hostname to use for workspace applications in the form "\*.example.com".
+Specifies the wildcard hostname to use for workspace applications in the form "*.example.com".
### --docs-url
| | |
-| ----------- | ----------------------------------- |
+|-------------|-------------------------------------|
| Type | url
|
| Environment | $CODER_DOCS_URL
|
| YAML | networking.docsURL
|
@@ -55,7 +54,7 @@ Specifies the custom docs URL.
### --redirect-to-access-url
| | |
-| ----------- | ------------------------------------------- |
+|-------------|---------------------------------------------|
| Type | bool
|
| Environment | $CODER_REDIRECT_TO_ACCESS_URL
|
| YAML | networking.redirectToAccessURL
|
@@ -65,7 +64,7 @@ Specifies whether to redirect requests that do not match the access URL host.
### --http-address
| | |
-| ----------- | ---------------------------------------- |
+|-------------|------------------------------------------|
| Type | string
|
| Environment | $CODER_HTTP_ADDRESS
|
| YAML | networking.http.httpAddress
|
@@ -76,7 +75,7 @@ HTTP bind address of the server. Unset to disable the HTTP endpoint.
### --tls-address
| | |
-| ----------- | ----------------------------------- |
+|-------------|-------------------------------------|
| Type | host:port
|
| Environment | $CODER_TLS_ADDRESS
|
| YAML | networking.tls.address
|
@@ -87,7 +86,7 @@ HTTPS bind address of the server.
### --tls-enable
| | |
-| ----------- | ---------------------------------- |
+|-------------|------------------------------------|
| Type | bool
|
| Environment | $CODER_TLS_ENABLE
|
| YAML | networking.tls.enable
|
@@ -97,7 +96,7 @@ Whether TLS will be enabled.
### --tls-cert-file
| | |
-| ----------- | ------------------------------------- |
+|-------------|---------------------------------------|
| Type | string-array
|
| Environment | $CODER_TLS_CERT_FILE
|
| YAML | networking.tls.certFiles
|
@@ -107,7 +106,7 @@ Path to each certificate for TLS. It requires a PEM-encoded file. To configure t
### --tls-client-ca-file
| | |
-| ----------- | ---------------------------------------- |
+|-------------|------------------------------------------|
| Type | string
|
| Environment | $CODER_TLS_CLIENT_CA_FILE
|
| YAML | networking.tls.clientCAFile
|
@@ -117,7 +116,7 @@ PEM-encoded Certificate Authority file used for checking the authenticity of cli
### --tls-client-auth
| | |
-| ----------- | -------------------------------------- |
+|-------------|----------------------------------------|
| Type | string
|
| Environment | $CODER_TLS_CLIENT_AUTH
|
| YAML | networking.tls.clientAuth
|
@@ -128,7 +127,7 @@ Policy the server will follow for TLS Client Authentication. Accepted values are
### --tls-key-file
| | |
-| ----------- | ------------------------------------ |
+|-------------|--------------------------------------|
| Type | string-array
|
| Environment | $CODER_TLS_KEY_FILE
|
| YAML | networking.tls.keyFiles
|
@@ -138,7 +137,7 @@ Paths to the private keys for each of the certificates. It requires a PEM-encode
### --tls-min-version
| | |
-| ----------- | -------------------------------------- |
+|-------------|----------------------------------------|
| Type | string
|
| Environment | $CODER_TLS_MIN_VERSION
|
| YAML | networking.tls.minVersion
|
@@ -149,7 +148,7 @@ Minimum supported version of TLS. Accepted values are "tls10", "tls11", "tls12"
### --tls-client-cert-file
| | |
-| ----------- | ------------------------------------------ |
+|-------------|--------------------------------------------|
| Type | string
|
| Environment | $CODER_TLS_CLIENT_CERT_FILE
|
| YAML | networking.tls.clientCertFile
|
@@ -159,7 +158,7 @@ Path to certificate for client TLS authentication. It requires a PEM-encoded fil
### --tls-client-key-file
| | |
-| ----------- | ----------------------------------------- |
+|-------------|-------------------------------------------|
| Type | string
|
| Environment | $CODER_TLS_CLIENT_KEY_FILE
|
| YAML | networking.tls.clientKeyFile
|
@@ -169,7 +168,7 @@ Path to key for client TLS authentication. It requires a PEM-encoded file.
### --tls-ciphers
| | |
-| ----------- | -------------------------------------- |
+|-------------|----------------------------------------|
| Type | string-array
|
| Environment | $CODER_TLS_CIPHERS
|
| YAML | networking.tls.tlsCiphers
|
@@ -179,7 +178,7 @@ Specify specific TLS ciphers that allowed to be used. See https://github.com/gol
### --tls-allow-insecure-ciphers
| | |
-| ----------- | --------------------------------------------------- |
+|-------------|-----------------------------------------------------|
| Type | bool
|
| Environment | $CODER_TLS_ALLOW_INSECURE_CIPHERS
|
| YAML | networking.tls.tlsAllowInsecureCiphers
|
@@ -190,7 +189,7 @@ By default, only ciphers marked as 'secure' are allowed to be used. See https://
### --derp-server-enable
| | |
-| ----------- | -------------------------------------- |
+|-------------|----------------------------------------|
| Type | bool
|
| Environment | $CODER_DERP_SERVER_ENABLE
|
| YAML | networking.derp.enable
|
@@ -201,7 +200,7 @@ Whether to enable or disable the embedded DERP relay server.
### --derp-server-region-name
| | |
-| ----------- | ------------------------------------------- |
+|-------------|---------------------------------------------|
| Type | string
|
| Environment | $CODER_DERP_SERVER_REGION_NAME
|
| YAML | networking.derp.regionName
|
@@ -212,7 +211,7 @@ Region name that for the embedded DERP server.
### --derp-server-stun-addresses
| | |
-| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
+|-------------|------------------------------------------------------------------------------------------------------------------------------------------|
| Type | string-array
|
| Environment | $CODER_DERP_SERVER_STUN_ADDRESSES
|
| YAML | networking.derp.stunAddresses
|
@@ -223,7 +222,7 @@ Addresses for STUN servers to establish P2P connections. It's recommended to hav
### --derp-server-relay-url
| | |
-| ----------- | ----------------------------------------- |
+|-------------|-------------------------------------------|
| Type | url
|
| Environment | $CODER_DERP_SERVER_RELAY_URL
|
| YAML | networking.derp.relayURL
|
@@ -233,7 +232,7 @@ An HTTP URL that is accessible by other replicas to relay DERP traffic. Required
### --block-direct-connections
| | |
-| ----------- | ---------------------------------------- |
+|-------------|------------------------------------------|
| Type | bool
|
| Environment | $CODER_BLOCK_DIRECT
|
| YAML | networking.derp.blockDirect
|
@@ -243,7 +242,7 @@ Block peer-to-peer (aka. direct) workspace connections. All workspace connection
### --derp-force-websockets
| | |
-| ----------- | -------------------------------------------- |
+|-------------|----------------------------------------------|
| Type | bool
|
| Environment | $CODER_DERP_FORCE_WEBSOCKETS
|
| YAML | networking.derp.forceWebSockets
|
@@ -253,7 +252,7 @@ Force clients and agents to always use WebSocket to connect to DERP relay server
### --derp-config-url
| | |
-| ----------- | ----------------------------------- |
+|-------------|-------------------------------------|
| Type | string
|
| Environment | $CODER_DERP_CONFIG_URL
|
| YAML | networking.derp.url
|
@@ -263,7 +262,7 @@ URL to fetch a DERP mapping on startup. See: https://tailscale.com/kb/1118/custo
### --derp-config-path
| | |
-| ----------- | --------------------------------------- |
+|-------------|-----------------------------------------|
| Type | string
|
| Environment | $CODER_DERP_CONFIG_PATH
|
| YAML | networking.derp.configPath
|
@@ -273,7 +272,7 @@ Path to read a DERP mapping from. See: https://tailscale.com/kb/1118/custom-derp
### --prometheus-enable
| | |
-| ----------- | -------------------------------------------- |
+|-------------|----------------------------------------------|
| Type | bool
|
| Environment | $CODER_PROMETHEUS_ENABLE
|
| YAML | introspection.prometheus.enable
|
@@ -283,7 +282,7 @@ Serve prometheus metrics on the address defined by prometheus address.
### --prometheus-address
| | |
-| ----------- | --------------------------------------------- |
+|-------------|-----------------------------------------------|
| Type | host:port
|
| Environment | $CODER_PROMETHEUS_ADDRESS
|
| YAML | introspection.prometheus.address
|
@@ -294,7 +293,7 @@ The bind address to serve prometheus metrics.
### --prometheus-collect-agent-stats
| | |
-| ----------- | --------------------------------------------------------- |
+|-------------|-----------------------------------------------------------|
| Type | bool
|
| Environment | $CODER_PROMETHEUS_COLLECT_AGENT_STATS
|
| YAML | introspection.prometheus.collect_agent_stats
|
@@ -304,7 +303,7 @@ Collect agent stats (may increase charges for metrics storage).
### --prometheus-aggregate-agent-stats-by
| | |
-| ----------- | -------------------------------------------------------------- |
+|-------------|----------------------------------------------------------------|
| Type | string-array
|
| Environment | $CODER_PROMETHEUS_AGGREGATE_AGENT_STATS_BY
|
| YAML | introspection.prometheus.aggregate_agent_stats_by
|
@@ -315,7 +314,7 @@ When collecting agent stats, aggregate metrics by a given set of comma-separated
### --prometheus-collect-db-metrics
| | |
-| ----------- | -------------------------------------------------------- |
+|-------------|----------------------------------------------------------|
| Type | bool
|
| Environment | $CODER_PROMETHEUS_COLLECT_DB_METRICS
|
| YAML | introspection.prometheus.collect_db_metrics
|
@@ -326,7 +325,7 @@ Collect database query metrics (may increase charges for metrics storage). If se
### --pprof-enable
| | |
-| ----------- | --------------------------------------- |
+|-------------|-----------------------------------------|
| Type | bool
|
| Environment | $CODER_PPROF_ENABLE
|
| YAML | introspection.pprof.enable
|
@@ -336,7 +335,7 @@ Serve pprof metrics on the address defined by pprof address.
### --pprof-address
| | |
-| ----------- | ---------------------------------------- |
+|-------------|------------------------------------------|
| Type | host:port
|
| Environment | $CODER_PPROF_ADDRESS
|
| YAML | introspection.pprof.address
|
@@ -347,7 +346,7 @@ The bind address to serve pprof.
### --oauth2-github-client-id
| | |
-| ----------- | ------------------------------------------- |
+|-------------|---------------------------------------------|
| Type | string
|
| Environment | $CODER_OAUTH2_GITHUB_CLIENT_ID
|
| YAML | oauth2.github.clientID
|
@@ -357,7 +356,7 @@ Client ID for Login with GitHub.
### --oauth2-github-client-secret
| | |
-| ----------- | ----------------------------------------------- |
+|-------------|-------------------------------------------------|
| Type | string
|
| Environment | $CODER_OAUTH2_GITHUB_CLIENT_SECRET
|
@@ -366,7 +365,7 @@ Client secret for Login with GitHub.
### --oauth2-github-allowed-orgs
| | |
-| ----------- | ---------------------------------------------- |
+|-------------|------------------------------------------------|
| Type | string-array
|
| Environment | $CODER_OAUTH2_GITHUB_ALLOWED_ORGS
|
| YAML | oauth2.github.allowedOrgs
|
@@ -376,7 +375,7 @@ Organizations the user must be a member of to Login with GitHub.
### --oauth2-github-allowed-teams
| | |
-| ----------- | ----------------------------------------------- |
+|-------------|-------------------------------------------------|
| Type | string-array
|
| Environment | $CODER_OAUTH2_GITHUB_ALLOWED_TEAMS
|
| YAML | oauth2.github.allowedTeams
|
@@ -386,7 +385,7 @@ Teams inside organizations the user must be a member of to Login with GitHub. St
### --oauth2-github-allow-signups
| | |
-| ----------- | ----------------------------------------------- |
+|-------------|-------------------------------------------------|
| Type | bool
|
| Environment | $CODER_OAUTH2_GITHUB_ALLOW_SIGNUPS
|
| YAML | oauth2.github.allowSignups
|
@@ -396,7 +395,7 @@ Whether new users can sign up with GitHub.
### --oauth2-github-allow-everyone
| | |
-| ----------- | ------------------------------------------------ |
+|-------------|--------------------------------------------------|
| Type | bool
|
| Environment | $CODER_OAUTH2_GITHUB_ALLOW_EVERYONE
|
| YAML | oauth2.github.allowEveryone
|
@@ -406,7 +405,7 @@ Allow all logins, setting this option means allowed orgs and teams must be empty
### --oauth2-github-enterprise-base-url
| | |
-| ----------- | ----------------------------------------------------- |
+|-------------|-------------------------------------------------------|
| Type | string
|
| Environment | $CODER_OAUTH2_GITHUB_ENTERPRISE_BASE_URL
|
| YAML | oauth2.github.enterpriseBaseURL
|
@@ -416,7 +415,7 @@ Base URL of a GitHub Enterprise deployment to use for Login with GitHub.
### --oidc-allow-signups
| | |
-| ----------- | -------------------------------------- |
+|-------------|----------------------------------------|
| Type | bool
|
| Environment | $CODER_OIDC_ALLOW_SIGNUPS
|
| YAML | oidc.allowSignups
|
@@ -427,7 +426,7 @@ Whether new users can sign up with OIDC.
### --oidc-client-id
| | |
-| ----------- | ---------------------------------- |
+|-------------|------------------------------------|
| Type | string
|
| Environment | $CODER_OIDC_CLIENT_ID
|
| YAML | oidc.clientID
|
@@ -437,7 +436,7 @@ Client ID to use for Login with OIDC.
### --oidc-client-secret
| | |
-| ----------- | -------------------------------------- |
+|-------------|----------------------------------------|
| Type | string
|
| Environment | $CODER_OIDC_CLIENT_SECRET
|
@@ -446,7 +445,7 @@ Client secret to use for Login with OIDC.
### --oidc-client-key-file
| | |
-| ----------- | ---------------------------------------- |
+|-------------|------------------------------------------|
| Type | string
|
| Environment | $CODER_OIDC_CLIENT_KEY_FILE
|
| YAML | oidc.oidcClientKeyFile
|
@@ -456,7 +455,7 @@ Pem encoded RSA private key to use for oauth2 PKI/JWT authorization. This can be
### --oidc-client-cert-file
| | |
-| ----------- | ----------------------------------------- |
+|-------------|-------------------------------------------|
| Type | string
|
| Environment | $CODER_OIDC_CLIENT_CERT_FILE
|
| YAML | oidc.oidcClientCertFile
|
@@ -466,7 +465,7 @@ Pem encoded certificate file to use for oauth2 PKI/JWT authorization. The public
### --oidc-email-domain
| | |
-| ----------- | ------------------------------------- |
+|-------------|---------------------------------------|
| Type | string-array
|
| Environment | $CODER_OIDC_EMAIL_DOMAIN
|
| YAML | oidc.emailDomain
|
@@ -476,7 +475,7 @@ Email domains that clients logging in with OIDC must match.
### --oidc-issuer-url
| | |
-| ----------- | ----------------------------------- |
+|-------------|-------------------------------------|
| Type | string
|
| Environment | $CODER_OIDC_ISSUER_URL
|
| YAML | oidc.issuerURL
|
@@ -486,7 +485,7 @@ Issuer URL to use for Login with OIDC.
### --oidc-scopes
| | |
-| ----------- | --------------------------------- |
+|-------------|-----------------------------------|
| Type | string-array
|
| Environment | $CODER_OIDC_SCOPES
|
| YAML | oidc.scopes
|
@@ -497,7 +496,7 @@ Scopes to grant when authenticating with OIDC.
### --oidc-ignore-email-verified
| | |
-| ----------- | ---------------------------------------------- |
+|-------------|------------------------------------------------|
| Type | bool
|
| Environment | $CODER_OIDC_IGNORE_EMAIL_VERIFIED
|
| YAML | oidc.ignoreEmailVerified
|
@@ -507,7 +506,7 @@ Ignore the email_verified claim from the upstream provider.
### --oidc-username-field
| | |
-| ----------- | --------------------------------------- |
+|-------------|-----------------------------------------|
| Type | string
|
| Environment | $CODER_OIDC_USERNAME_FIELD
|
| YAML | oidc.usernameField
|
@@ -518,7 +517,7 @@ OIDC claim field to use as the username.
### --oidc-name-field
| | |
-| ----------- | ----------------------------------- |
+|-------------|-------------------------------------|
| Type | string
|
| Environment | $CODER_OIDC_NAME_FIELD
|
| YAML | oidc.nameField
|
@@ -529,7 +528,7 @@ OIDC claim field to use as the name.
### --oidc-email-field
| | |
-| ----------- | ------------------------------------ |
+|-------------|--------------------------------------|
| Type | string
|
| Environment | $CODER_OIDC_EMAIL_FIELD
|
| YAML | oidc.emailField
|
@@ -540,7 +539,7 @@ OIDC claim field to use as the email.
### --oidc-auth-url-params
| | |
-| ----------- | ---------------------------------------- |
+|-------------|------------------------------------------|
| Type | struct[map[string]string]
|
| Environment | $CODER_OIDC_AUTH_URL_PARAMS
|
| YAML | oidc.authURLParams
|
@@ -551,7 +550,7 @@ OIDC auth URL parameters to pass to the upstream provider.
### --oidc-ignore-userinfo
| | |
-| ----------- | ---------------------------------------- |
+|-------------|------------------------------------------|
| Type | bool
|
| Environment | $CODER_OIDC_IGNORE_USERINFO
|
| YAML | oidc.ignoreUserInfo
|
@@ -562,7 +561,7 @@ Ignore the userinfo endpoint and only use the ID token for user information.
### --oidc-group-field
| | |
-| ----------- | ------------------------------------ |
+|-------------|--------------------------------------|
| Type | string
|
| Environment | $CODER_OIDC_GROUP_FIELD
|
| YAML | oidc.groupField
|
@@ -572,7 +571,7 @@ This field must be set if using the group sync feature and the scope name is not
### --oidc-group-mapping
| | |
-| ----------- | -------------------------------------- |
+|-------------|----------------------------------------|
| Type | struct[map[string]string]
|
| Environment | $CODER_OIDC_GROUP_MAPPING
|
| YAML | oidc.groupMapping
|
@@ -583,7 +582,7 @@ A map of OIDC group IDs and the group in Coder it should map to. This is useful
### --oidc-group-auto-create
| | |
-| ----------- | ------------------------------------------ |
+|-------------|--------------------------------------------|
| Type | bool
|
| Environment | $CODER_OIDC_GROUP_AUTO_CREATE
|
| YAML | oidc.enableGroupAutoCreate
|
@@ -594,18 +593,18 @@ Automatically creates missing groups from a user's groups claim.
### --oidc-group-regex-filter
| | |
-| ----------- | ------------------------------------------- |
+|-------------|---------------------------------------------|
| Type | regexp
|
| Environment | $CODER_OIDC_GROUP_REGEX_FILTER
|
| YAML | oidc.groupRegexFilter
|
-| Default | .\*
|
+| Default | .*
|
If provided any group name not matching the regex is ignored. This allows for filtering out groups that are not needed. This filter is applied after the group mapping.
### --oidc-allowed-groups
| | |
-| ----------- | --------------------------------------- |
+|-------------|-----------------------------------------|
| Type | string-array
|
| Environment | $CODER_OIDC_ALLOWED_GROUPS
|
| YAML | oidc.groupAllowed
|
@@ -615,7 +614,7 @@ If provided any group name not in the list will not be allowed to authenticate.
### --oidc-user-role-field
| | |
-| ----------- | ---------------------------------------- |
+|-------------|------------------------------------------|
| Type | string
|
| Environment | $CODER_OIDC_USER_ROLE_FIELD
|
| YAML | oidc.userRoleField
|
@@ -625,7 +624,7 @@ This field must be set if using the user roles sync feature. Set this to the nam
### --oidc-user-role-mapping
| | |
-| ----------- | ------------------------------------------ |
+|-------------|--------------------------------------------|
| Type | struct[map[string][]string]
|
| Environment | $CODER_OIDC_USER_ROLE_MAPPING
|
| YAML | oidc.userRoleMapping
|
@@ -636,7 +635,7 @@ A map of the OIDC passed in user roles and the groups in Coder it should map to.
### --oidc-user-role-default
| | |
-| ----------- | ------------------------------------------ |
+|-------------|--------------------------------------------|
| Type | string-array
|
| Environment | $CODER_OIDC_USER_ROLE_DEFAULT
|
| YAML | oidc.userRoleDefault
|
@@ -646,7 +645,7 @@ If user role sync is enabled, these roles are always included for all authentica
### --oidc-sign-in-text
| | |
-| ----------- | ------------------------------------- |
+|-------------|---------------------------------------|
| Type | string
|
| Environment | $CODER_OIDC_SIGN_IN_TEXT
|
| YAML | oidc.signInText
|
@@ -657,7 +656,7 @@ The text to show on the OpenID Connect sign in button.
### --oidc-icon-url
| | |
-| ----------- | --------------------------------- |
+|-------------|-----------------------------------|
| Type | url
|
| Environment | $CODER_OIDC_ICON_URL
|
| YAML | oidc.iconURL
|
@@ -667,7 +666,7 @@ URL pointing to the icon to use on the OpenID Connect login button.
### --oidc-signups-disabled-text
| | |
-| ----------- | ---------------------------------------------- |
+|-------------|------------------------------------------------|
| Type | string
|
| Environment | $CODER_OIDC_SIGNUPS_DISABLED_TEXT
|
| YAML | oidc.signupsDisabledText
|
@@ -677,7 +676,7 @@ The custom text to show on the error page informing about disabled OIDC signups.
### --dangerous-oidc-skip-issuer-checks
| | |
-| ----------- | ----------------------------------------------------- |
+|-------------|-------------------------------------------------------|
| Type | bool
|
| Environment | $CODER_DANGEROUS_OIDC_SKIP_ISSUER_CHECKS
|
| YAML | oidc.dangerousSkipIssuerChecks
|
@@ -687,7 +686,7 @@ OIDC issuer urls must match in the request, the id_token 'iss' claim, and in the
### --telemetry
| | |
-| ----------- | ------------------------------------ |
+|-------------|--------------------------------------|
| Type | bool
|
| Environment | $CODER_TELEMETRY_ENABLE
|
| YAML | telemetry.enable
|
@@ -698,7 +697,7 @@ Whether telemetry is enabled or not. Coder collects anonymized usage data to hel
### --trace
| | |
-| ----------- | ----------------------------------------- |
+|-------------|-------------------------------------------|
| Type | bool
|
| Environment | $CODER_TRACE_ENABLE
|
| YAML | introspection.tracing.enable
|
@@ -708,7 +707,7 @@ Whether application tracing data is collected. It exports to a backend configure
### --trace-honeycomb-api-key
| | |
-| ----------- | ------------------------------------------- |
+|-------------|---------------------------------------------|
| Type | string
|
| Environment | $CODER_TRACE_HONEYCOMB_API_KEY
|
@@ -717,7 +716,7 @@ Enables trace exporting to Honeycomb.io using the provided API Key.
### --trace-logs
| | |
-| ----------- | ---------------------------------------------- |
+|-------------|------------------------------------------------|
| Type | bool
|
| Environment | $CODER_TRACE_LOGS
|
| YAML | introspection.tracing.captureLogs
|
@@ -727,7 +726,7 @@ Enables capturing of logs as events in traces. This is useful for debugging, but
### --provisioner-daemons
| | |
-| ----------- | --------------------------------------- |
+|-------------|-----------------------------------------|
| Type | int
|
| Environment | $CODER_PROVISIONER_DAEMONS
|
| YAML | provisioning.daemons
|
@@ -738,7 +737,7 @@ Number of provisioner daemons to create on start. If builds are stuck in queued
### --provisioner-daemon-poll-interval
| | |
-| ----------- | ---------------------------------------------------- |
+|-------------|------------------------------------------------------|
| Type | duration
|
| Environment | $CODER_PROVISIONER_DAEMON_POLL_INTERVAL
|
| YAML | provisioning.daemonPollInterval
|
@@ -749,7 +748,7 @@ Deprecated and ignored.
### --provisioner-daemon-poll-jitter
| | |
-| ----------- | -------------------------------------------------- |
+|-------------|----------------------------------------------------|
| Type | duration
|
| Environment | $CODER_PROVISIONER_DAEMON_POLL_JITTER
|
| YAML | provisioning.daemonPollJitter
|
@@ -760,7 +759,7 @@ Deprecated and ignored.
### --provisioner-force-cancel-interval
| | |
-| ----------- | ----------------------------------------------------- |
+|-------------|-------------------------------------------------------|
| Type | duration
|
| Environment | $CODER_PROVISIONER_FORCE_CANCEL_INTERVAL
|
| YAML | provisioning.forceCancelInterval
|
@@ -771,7 +770,7 @@ Time to force cancel provisioning tasks that are stuck.
### --provisioner-daemon-psk
| | |
-| ----------- | ------------------------------------------ |
+|-------------|--------------------------------------------|
| Type | string
|
| Environment | $CODER_PROVISIONER_DAEMON_PSK
|
@@ -780,17 +779,17 @@ Pre-shared key to authenticate external provisioner daemons to Coder server.
### -l, --log-filter
| | |
-| ----------- | ----------------------------------------- |
+|-------------|-------------------------------------------|
| Type | string-array
|
| Environment | $CODER_LOG_FILTER
|
| YAML | introspection.logging.filter
|
-Filter debug logs by matching against a given regex. Use .\* to match all debug logs.
+Filter debug logs by matching against a given regex. Use .* to match all debug logs.
### --log-human
| | |
-| ----------- | -------------------------------------------- |
+|-------------|----------------------------------------------|
| Type | string
|
| Environment | $CODER_LOGGING_HUMAN
|
| YAML | introspection.logging.humanPath
|
@@ -801,7 +800,7 @@ Output human-readable logs to a given file.
### --log-json
| | |
-| ----------- | ------------------------------------------- |
+|-------------|---------------------------------------------|
| Type | string
|
| Environment | $CODER_LOGGING_JSON
|
| YAML | introspection.logging.jsonPath
|
@@ -811,7 +810,7 @@ Output JSON logs to a given file.
### --log-stackdriver
| | |
-| ----------- | -------------------------------------------------- |
+|-------------|----------------------------------------------------|
| Type | string
|
| Environment | $CODER_LOGGING_STACKDRIVER
|
| YAML | introspection.logging.stackdriverPath
|
@@ -821,7 +820,7 @@ Output Stackdriver compatible logs to a given file.
### --enable-terraform-debug-mode
| | |
-| ----------- | ----------------------------------------------------------- |
+|-------------|-------------------------------------------------------------|
| Type | bool
|
| Environment | $CODER_ENABLE_TERRAFORM_DEBUG_MODE
|
| YAML | introspection.logging.enableTerraformDebugMode
|
@@ -832,7 +831,7 @@ Allow administrators to enable Terraform debug output.
### --additional-csp-policy
| | |
-| ----------- | ------------------------------------------------ |
+|-------------|--------------------------------------------------|
| Type | string-array
|
| Environment | $CODER_ADDITIONAL_CSP_POLICY
|
| YAML | networking.http.additionalCSPPolicy
|
@@ -842,7 +841,7 @@ Coder configures a Content Security Policy (CSP) to protect against XSS attacks.
### --dangerous-allow-path-app-sharing
| | |
-| ----------- | ---------------------------------------------------- |
+|-------------|------------------------------------------------------|
| Type | bool
|
| Environment | $CODER_DANGEROUS_ALLOW_PATH_APP_SHARING
|
@@ -851,7 +850,7 @@ Allow workspace apps that are not served from subdomains to be shared. Path-base
### --dangerous-allow-path-app-site-owner-access
| | |
-| ----------- | -------------------------------------------------------------- |
+|-------------|----------------------------------------------------------------|
| Type | bool
|
| Environment | $CODER_DANGEROUS_ALLOW_PATH_APP_SITE_OWNER_ACCESS
|
@@ -860,17 +859,17 @@ Allow site-owners to access workspace apps from workspaces they do not own. Owne
### --experiments
| | |
-| ----------- | ------------------------------- |
+|-------------|---------------------------------|
| Type | string-array
|
| Environment | $CODER_EXPERIMENTS
|
| YAML | experiments
|
-Enable one or more experiments. These are not ready for production. Separate multiple experiments with commas, or enter '\*' to opt-in to all available experiments.
+Enable one or more experiments. These are not ready for production. Separate multiple experiments with commas, or enter '*' to opt-in to all available experiments.
### --update-check
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | bool
|
| Environment | $CODER_UPDATE_CHECK
|
| YAML | updateCheck
|
@@ -881,7 +880,7 @@ Periodically check for new releases of Coder and inform the owner. The check is
### --max-token-lifetime
| | |
-| ----------- | --------------------------------------------- |
+|-------------|-----------------------------------------------|
| Type | duration
|
| Environment | $CODER_MAX_TOKEN_LIFETIME
|
| YAML | networking.http.maxTokenLifetime
|
@@ -892,7 +891,7 @@ The maximum lifetime duration users can specify when creating an API token.
### --default-token-lifetime
| | |
-| ----------- | ------------------------------------------ |
+|-------------|--------------------------------------------|
| Type | duration
|
| Environment | $CODER_DEFAULT_TOKEN_LIFETIME
|
| YAML | defaultTokenLifetime
|
@@ -903,7 +902,7 @@ The default lifetime duration for API tokens. This value is used when creating a
### --swagger-enable
| | |
-| ----------- | ---------------------------------- |
+|-------------|------------------------------------|
| Type | bool
|
| Environment | $CODER_SWAGGER_ENABLE
|
| YAML | enableSwagger
|
@@ -913,7 +912,7 @@ Expose the swagger endpoint via /swagger.
### --proxy-trusted-headers
| | |
-| ----------- | ------------------------------------------- |
+|-------------|---------------------------------------------|
| Type | string-array
|
| Environment | $CODER_PROXY_TRUSTED_HEADERS
|
| YAML | networking.proxyTrustedHeaders
|
@@ -923,7 +922,7 @@ Headers to trust for forwarding IP addresses. e.g. Cf-Connecting-Ip, True-Client
### --proxy-trusted-origins
| | |
-| ----------- | ------------------------------------------- |
+|-------------|---------------------------------------------|
| Type | string-array
|
| Environment | $CODER_PROXY_TRUSTED_ORIGINS
|
| YAML | networking.proxyTrustedOrigins
|
@@ -933,7 +932,7 @@ Origin addresses to respect "proxy-trusted-headers". e.g. 192.168.1.0/24.
### --cache-dir
| | |
-| ----------- | ----------------------------------- |
+|-------------|-------------------------------------|
| Type | string
|
| Environment | $CODER_CACHE_DIRECTORY
|
| YAML | cacheDir
|
@@ -944,27 +943,27 @@ The directory to cache temporary files. If unspecified and $CACHE_DIRECTORY is s
### --postgres-url
| | |
-| ----------- | ------------------------------------- |
+|-------------|---------------------------------------|
| Type | string
|
| Environment | $CODER_PG_CONNECTION_URL
|
-URL of a PostgreSQL database. If empty, PostgreSQL binaries will be downloaded from Maven (https://repo1.maven.org/maven2) and store all data in the config root. Access the built-in database with "coder server postgres-builtin-url".
+URL of a PostgreSQL database. If empty, PostgreSQL binaries will be downloaded from Maven (https://repo1.maven.org/maven2) and store all data in the config root. Access the built-in database with "coder server postgres-builtin-url". Note that any special characters in the URL must be URL-encoded.
### --postgres-auth
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | password\|awsiamrds
|
| Environment | $CODER_PG_AUTH
|
| YAML | pgAuth
|
| Default | password
|
-Type of auth to use when connecting to postgres.
+Type of auth to use when connecting to postgres. For AWS RDS, using IAM authentication (awsiamrds) is recommended.
### --secure-auth-cookie
| | |
-| ----------- | ---------------------------------------- |
+|-------------|------------------------------------------|
| Type | bool
|
| Environment | $CODER_SECURE_AUTH_COOKIE
|
| YAML | networking.secureAuthCookie
|
@@ -974,7 +973,7 @@ Controls if the 'Secure' property is set on browser session cookies.
### --terms-of-service-url
| | |
-| ----------- | ---------------------------------------- |
+|-------------|------------------------------------------|
| Type | string
|
| Environment | $CODER_TERMS_OF_SERVICE_URL
|
| YAML | termsOfServiceURL
|
@@ -984,7 +983,7 @@ A URL to an external Terms of Service that must be accepted by users when loggin
### --strict-transport-security
| | |
-| ----------- | --------------------------------------------------- |
+|-------------|-----------------------------------------------------|
| Type | int
|
| Environment | $CODER_STRICT_TRANSPORT_SECURITY
|
| YAML | networking.tls.strictTransportSecurity
|
@@ -995,7 +994,7 @@ Controls if the 'Strict-Transport-Security' header is set on all static file res
### --strict-transport-security-options
| | |
-| ----------- | ---------------------------------------------------------- |
+|-------------|------------------------------------------------------------|
| Type | string-array
|
| Environment | $CODER_STRICT_TRANSPORT_SECURITY_OPTIONS
|
| YAML | networking.tls.strictTransportSecurityOptions
|
@@ -1005,7 +1004,7 @@ Two optional fields can be set in the Strict-Transport-Security header; 'include
### --ssh-keygen-algorithm
| | |
-| ----------- | ---------------------------------------- |
+|-------------|------------------------------------------|
| Type | string
|
| Environment | $CODER_SSH_KEYGEN_ALGORITHM
|
| YAML | sshKeygenAlgorithm
|
@@ -1016,7 +1015,7 @@ The algorithm to use for generating ssh keys. Accepted values are "ed25519", "ec
### --browser-only
| | |
-| ----------- | ----------------------------------- |
+|-------------|-------------------------------------|
| Type | bool
|
| Environment | $CODER_BROWSER_ONLY
|
| YAML | networking.browserOnly
|
@@ -1026,7 +1025,7 @@ Whether Coder only allows connections to workspaces via the browser.
### --scim-auth-header
| | |
-| ----------- | ------------------------------------ |
+|-------------|--------------------------------------|
| Type | string
|
| Environment | $CODER_SCIM_AUTH_HEADER
|
@@ -1035,7 +1034,7 @@ Enables SCIM and sets the authentication header for the built-in SCIM server. Ne
### --external-token-encryption-keys
| | |
-| ----------- | -------------------------------------------------- |
+|-------------|----------------------------------------------------|
| Type | string-array
|
| Environment | $CODER_EXTERNAL_TOKEN_ENCRYPTION_KEYS
|
@@ -1044,7 +1043,7 @@ Encrypt OIDC and Git authentication tokens with AES-256-GCM in the database. The
### --disable-path-apps
| | |
-| ----------- | ------------------------------------- |
+|-------------|---------------------------------------|
| Type | bool
|
| Environment | $CODER_DISABLE_PATH_APPS
|
| YAML | disablePathApps
|
@@ -1054,7 +1053,7 @@ Disable workspace apps that are not served from subdomains. Path-based apps can
### --disable-owner-workspace-access
| | |
-| ----------- | -------------------------------------------------- |
+|-------------|----------------------------------------------------|
| Type | bool
|
| Environment | $CODER_DISABLE_OWNER_WORKSPACE_ACCESS
|
| YAML | disableOwnerWorkspaceAccess
|
@@ -1064,7 +1063,7 @@ Remove the permission for the 'owner' role to have workspace execution on all wo
### --session-duration
| | |
-| ----------- | -------------------------------------------- |
+|-------------|----------------------------------------------|
| Type | duration
|
| Environment | $CODER_SESSION_DURATION
|
| YAML | networking.http.sessionDuration
|
@@ -1075,7 +1074,7 @@ The token expiry duration for browser sessions. Sessions may last longer if they
### --disable-session-expiry-refresh
| | |
-| ----------- | -------------------------------------------------------- |
+|-------------|----------------------------------------------------------|
| Type | bool
|
| Environment | $CODER_DISABLE_SESSION_EXPIRY_REFRESH
|
| YAML | networking.http.disableSessionExpiryRefresh
|
@@ -1085,7 +1084,7 @@ Disable automatic session expiry bumping due to activity. This forces all sessio
### --disable-password-auth
| | |
-| ----------- | ------------------------------------------------ |
+|-------------|--------------------------------------------------|
| Type | bool
|
| Environment | $CODER_DISABLE_PASSWORD_AUTH
|
| YAML | networking.http.disablePasswordAuth
|
@@ -1095,7 +1094,7 @@ Disable password authentication. This is recommended for security purposes in pr
### -c, --config
| | |
-| ----------- | ------------------------------- |
+|-------------|---------------------------------|
| Type | yaml-config-path
|
| Environment | $CODER_CONFIG_PATH
|
@@ -1104,7 +1103,7 @@ Specify a YAML file to load configuration from.
### --ssh-hostname-prefix
| | |
-| ----------- | --------------------------------------- |
+|-------------|-----------------------------------------|
| Type | string
|
| Environment | $CODER_SSH_HOSTNAME_PREFIX
|
| YAML | client.sshHostnamePrefix
|
@@ -1115,7 +1114,7 @@ The SSH deployment prefix is used in the Host of the ssh config.
### --ssh-config-options
| | |
-| ----------- | -------------------------------------- |
+|-------------|----------------------------------------|
| Type | string-array
|
| Environment | $CODER_SSH_CONFIG_OPTIONS
|
| YAML | client.sshConfigOptions
|
@@ -1125,7 +1124,7 @@ These SSH config options will override the default SSH config options. Provide o
### --cli-upgrade-message
| | |
-| ----------- | --------------------------------------- |
+|-------------|-----------------------------------------|
| Type | string
|
| Environment | $CODER_CLI_UPGRADE_MESSAGE
|
| YAML | client.cliUpgradeMessage
|
@@ -1135,7 +1134,7 @@ The upgrade message to display to users when a client/server mismatch is detecte
### --write-config
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
struct[[]codersdk.LinkConfig]
|
| Environment | $CODER_SUPPORT_LINKS
|
| YAML | supportLinks
|
@@ -1153,7 +1152,7 @@ Support links to display in the top right drop down menu.
### --proxy-health-interval
| | |
-| ----------- | ------------------------------------------------ |
+|-------------|--------------------------------------------------|
| Type | duration
|
| Environment | $CODER_PROXY_HEALTH_INTERVAL
|
| YAML | networking.http.proxyHealthInterval
|
@@ -1164,18 +1163,18 @@ The interval in which coderd should be checking the status of workspace proxies.
### --default-quiet-hours-schedule
| | |
-| ----------- | ------------------------------------------------------------- |
+|-------------|---------------------------------------------------------------|
| Type | string
|
| Environment | $CODER_QUIET_HOURS_DEFAULT_SCHEDULE
|
| YAML | userQuietHoursSchedule.defaultQuietHoursSchedule
|
-| Default | CRON_TZ=UTC 0 0 \* \* \*
|
+| Default | CRON_TZ=UTC 0 0 ** *
|
-The default daily cron schedule applied to users that haven't set a custom quiet hours schedule themselves. The quiet hours schedule determines when workspaces will be force stopped due to the template's autostop requirement, and will round the max deadline up to be within the user's quiet hours window (or default). The format is the same as the standard cron format, but the day-of-month, month and day-of-week must be \*. Only one hour and minute can be specified (ranges or comma separated values are not supported).
+The default daily cron schedule applied to users that haven't set a custom quiet hours schedule themselves. The quiet hours schedule determines when workspaces will be force stopped due to the template's autostop requirement, and will round the max deadline up to be within the user's quiet hours window (or default). The format is the same as the standard cron format, but the day-of-month, month and day-of-week must be *. Only one hour and minute can be specified (ranges or comma separated values are not supported).
### --allow-custom-quiet-hours
| | |
-| ----------- | --------------------------------------------------------- |
+|-------------|-----------------------------------------------------------|
| Type | bool
|
| Environment | $CODER_ALLOW_CUSTOM_QUIET_HOURS
|
| YAML | userQuietHoursSchedule.allowCustomQuietHours
|
@@ -1186,7 +1185,7 @@ Allow users to set their own quiet hours schedule for workspaces to stop in (dep
### --web-terminal-renderer
| | |
-| ----------- | ----------------------------------------- |
+|-------------|-------------------------------------------|
| Type | string
|
| Environment | $CODER_WEB_TERMINAL_RENDERER
|
| YAML | client.webTerminalRenderer
|
@@ -1197,7 +1196,7 @@ The renderer to use when opening a web terminal. Valid values are 'canvas', 'web
### --allow-workspace-renames
| | |
-| ----------- | ------------------------------------------- |
+|-------------|---------------------------------------------|
| Type | bool
|
| Environment | $CODER_ALLOW_WORKSPACE_RENAMES
|
| YAML | allowWorkspaceRenames
|
@@ -1208,7 +1207,7 @@ DEPRECATED: Allow users to rename their workspaces. Use only for temporary compa
### --health-check-refresh
| | |
-| ----------- | ---------------------------------------------- |
+|-------------|------------------------------------------------|
| Type | duration
|
| Environment | $CODER_HEALTH_CHECK_REFRESH
|
| YAML | introspection.healthcheck.refresh
|
@@ -1219,7 +1218,7 @@ Refresh interval for healthchecks.
### --health-check-threshold-database
| | |
-| ----------- | -------------------------------------------------------- |
+|-------------|----------------------------------------------------------|
| Type | duration
|
| Environment | $CODER_HEALTH_CHECK_THRESHOLD_DATABASE
|
| YAML | introspection.healthcheck.thresholdDatabase
|
@@ -1230,7 +1229,7 @@ The threshold for the database health check. If the median latency of the databa
### --email-from
| | |
-| ----------- | ------------------------------ |
+|-------------|--------------------------------|
| Type | string
|
| Environment | $CODER_EMAIL_FROM
|
| YAML | email.from
|
@@ -1240,7 +1239,7 @@ The sender's address to use.
### --email-smarthost
| | |
-| ----------- | ----------------------------------- |
+|-------------|-------------------------------------|
| Type | string
|
| Environment | $CODER_EMAIL_SMARTHOST
|
| YAML | email.smarthost
|
@@ -1250,7 +1249,7 @@ The intermediary SMTP host through which emails are sent.
### --email-hello
| | |
-| ----------- | ------------------------------- |
+|-------------|---------------------------------|
| Type | string
|
| Environment | $CODER_EMAIL_HELLO
|
| YAML | email.hello
|
@@ -1261,7 +1260,7 @@ The hostname identifying the SMTP server.
### --email-force-tls
| | |
-| ----------- | ----------------------------------- |
+|-------------|-------------------------------------|
| Type | bool
|
| Environment | $CODER_EMAIL_FORCE_TLS
|
| YAML | email.forceTLS
|
@@ -1272,7 +1271,7 @@ Force a TLS connection to the configured SMTP smarthost.
### --email-auth-identity
| | |
-| ----------- | --------------------------------------- |
+|-------------|-----------------------------------------|
| Type | string
|
| Environment | $CODER_EMAIL_AUTH_IDENTITY
|
| YAML | email.emailAuth.identity
|
@@ -1282,7 +1281,7 @@ Identity to use with PLAIN authentication.
### --email-auth-username
| | |
-| ----------- | --------------------------------------- |
+|-------------|-----------------------------------------|
| Type | string
|
| Environment | $CODER_EMAIL_AUTH_USERNAME
|
| YAML | email.emailAuth.username
|
@@ -1292,7 +1291,7 @@ Username to use with PLAIN/LOGIN authentication.
### --email-auth-password
| | |
-| ----------- | --------------------------------------- |
+|-------------|-----------------------------------------|
| Type | string
|
| Environment | $CODER_EMAIL_AUTH_PASSWORD
|
@@ -1301,7 +1300,7 @@ Password to use with PLAIN/LOGIN authentication.
### --email-auth-password-file
| | |
-| ----------- | -------------------------------------------- |
+|-------------|----------------------------------------------|
| Type | string
|
| Environment | $CODER_EMAIL_AUTH_PASSWORD_FILE
|
| YAML | email.emailAuth.passwordFile
|
@@ -1311,7 +1310,7 @@ File from which to load password for use with PLAIN/LOGIN authentication.
### --email-tls-starttls
| | |
-| ----------- | -------------------------------------- |
+|-------------|----------------------------------------|
| Type | bool
|
| Environment | $CODER_EMAIL_TLS_STARTTLS
|
| YAML | email.emailTLS.startTLS
|
@@ -1321,7 +1320,7 @@ Enable STARTTLS to upgrade insecure SMTP connections using TLS.
### --email-tls-server-name
| | |
-| ----------- | ---------------------------------------- |
+|-------------|------------------------------------------|
| Type | string
|
| Environment | $CODER_EMAIL_TLS_SERVERNAME
|
| YAML | email.emailTLS.serverName
|
@@ -1331,7 +1330,7 @@ Server name to verify against the target certificate.
### --email-tls-skip-verify
| | |
-| ----------- | ---------------------------------------------- |
+|-------------|------------------------------------------------|
| Type | bool
|
| Environment | $CODER_EMAIL_TLS_SKIPVERIFY
|
| YAML | email.emailTLS.insecureSkipVerify
|
@@ -1341,7 +1340,7 @@ Skip verification of the target server's certificate (insecure).
### --email-tls-ca-cert-file
| | |
-| ----------- | ---------------------------------------- |
+|-------------|------------------------------------------|
| Type | string
|
| Environment | $CODER_EMAIL_TLS_CACERTFILE
|
| YAML | email.emailTLS.caCertFile
|
@@ -1351,7 +1350,7 @@ CA certificate file to use.
### --email-tls-cert-file
| | |
-| ----------- | -------------------------------------- |
+|-------------|----------------------------------------|
| Type | string
|
| Environment | $CODER_EMAIL_TLS_CERTFILE
|
| YAML | email.emailTLS.certFile
|
@@ -1361,7 +1360,7 @@ Certificate file to use.
### --email-tls-cert-key-file
| | |
-| ----------- | ----------------------------------------- |
+|-------------|-------------------------------------------|
| Type | string
|
| Environment | $CODER_EMAIL_TLS_CERTKEYFILE
|
| YAML | email.emailTLS.certKeyFile
|
@@ -1371,7 +1370,7 @@ Certificate key file to use.
### --notifications-method
| | |
-| ----------- | ---------------------------------------- |
+|-------------|------------------------------------------|
| Type | string
|
| Environment | $CODER_NOTIFICATIONS_METHOD
|
| YAML | notifications.method
|
@@ -1382,7 +1381,7 @@ Which delivery method to use (available options: 'smtp', 'webhook').
### --notifications-dispatch-timeout
| | |
-| ----------- | -------------------------------------------------- |
+|-------------|----------------------------------------------------|
| Type | duration
|
| Environment | $CODER_NOTIFICATIONS_DISPATCH_TIMEOUT
|
| YAML | notifications.dispatchTimeout
|
@@ -1393,7 +1392,7 @@ How long to wait while a notification is being sent before giving up.
### --notifications-email-from
| | |
-| ----------- | -------------------------------------------- |
+|-------------|----------------------------------------------|
| Type | string
|
| Environment | $CODER_NOTIFICATIONS_EMAIL_FROM
|
| YAML | notifications.email.from
|
@@ -1403,7 +1402,7 @@ The sender's address to use.
### --notifications-email-smarthost
| | |
-| ----------- | ------------------------------------------------- |
+|-------------|---------------------------------------------------|
| Type | string
|
| Environment | $CODER_NOTIFICATIONS_EMAIL_SMARTHOST
|
| YAML | notifications.email.smarthost
|
@@ -1413,7 +1412,7 @@ The intermediary SMTP host through which emails are sent.
### --notifications-email-hello
| | |
-| ----------- | --------------------------------------------- |
+|-------------|-----------------------------------------------|
| Type | string
|
| Environment | $CODER_NOTIFICATIONS_EMAIL_HELLO
|
| YAML | notifications.email.hello
|
@@ -1423,7 +1422,7 @@ The hostname identifying the SMTP server.
### --notifications-email-force-tls
| | |
-| ----------- | ------------------------------------------------- |
+|-------------|---------------------------------------------------|
| Type | bool
|
| Environment | $CODER_NOTIFICATIONS_EMAIL_FORCE_TLS
|
| YAML | notifications.email.forceTLS
|
@@ -1433,7 +1432,7 @@ Force a TLS connection to the configured SMTP smarthost.
### --notifications-email-auth-identity
| | |
-| ----------- | ----------------------------------------------------- |
+|-------------|-------------------------------------------------------|
| Type | string
|
| Environment | $CODER_NOTIFICATIONS_EMAIL_AUTH_IDENTITY
|
| YAML | notifications.email.emailAuth.identity
|
@@ -1443,7 +1442,7 @@ Identity to use with PLAIN authentication.
### --notifications-email-auth-username
| | |
-| ----------- | ----------------------------------------------------- |
+|-------------|-------------------------------------------------------|
| Type | string
|
| Environment | $CODER_NOTIFICATIONS_EMAIL_AUTH_USERNAME
|
| YAML | notifications.email.emailAuth.username
|
@@ -1453,7 +1452,7 @@ Username to use with PLAIN/LOGIN authentication.
### --notifications-email-auth-password
| | |
-| ----------- | ----------------------------------------------------- |
+|-------------|-------------------------------------------------------|
| Type | string
|
| Environment | $CODER_NOTIFICATIONS_EMAIL_AUTH_PASSWORD
|
@@ -1462,7 +1461,7 @@ Password to use with PLAIN/LOGIN authentication.
### --notifications-email-auth-password-file
| | |
-| ----------- | ---------------------------------------------------------- |
+|-------------|------------------------------------------------------------|
| Type | string
|
| Environment | $CODER_NOTIFICATIONS_EMAIL_AUTH_PASSWORD_FILE
|
| YAML | notifications.email.emailAuth.passwordFile
|
@@ -1472,7 +1471,7 @@ File from which to load password for use with PLAIN/LOGIN authentication.
### --notifications-email-tls-starttls
| | |
-| ----------- | ---------------------------------------------------- |
+|-------------|------------------------------------------------------|
| Type | bool
|
| Environment | $CODER_NOTIFICATIONS_EMAIL_TLS_STARTTLS
|
| YAML | notifications.email.emailTLS.startTLS
|
@@ -1482,7 +1481,7 @@ Enable STARTTLS to upgrade insecure SMTP connections using TLS.
### --notifications-email-tls-server-name
| | |
-| ----------- | ------------------------------------------------------ |
+|-------------|--------------------------------------------------------|
| Type | string
|
| Environment | $CODER_NOTIFICATIONS_EMAIL_TLS_SERVERNAME
|
| YAML | notifications.email.emailTLS.serverName
|
@@ -1492,7 +1491,7 @@ Server name to verify against the target certificate.
### --notifications-email-tls-skip-verify
| | |
-| ----------- | ------------------------------------------------------------ |
+|-------------|--------------------------------------------------------------|
| Type | bool
|
| Environment | $CODER_NOTIFICATIONS_EMAIL_TLS_SKIPVERIFY
|
| YAML | notifications.email.emailTLS.insecureSkipVerify
|
@@ -1502,7 +1501,7 @@ Skip verification of the target server's certificate (insecure).
### --notifications-email-tls-ca-cert-file
| | |
-| ----------- | ------------------------------------------------------ |
+|-------------|--------------------------------------------------------|
| Type | string
|
| Environment | $CODER_NOTIFICATIONS_EMAIL_TLS_CACERTFILE
|
| YAML | notifications.email.emailTLS.caCertFile
|
@@ -1512,7 +1511,7 @@ CA certificate file to use.
### --notifications-email-tls-cert-file
| | |
-| ----------- | ---------------------------------------------------- |
+|-------------|------------------------------------------------------|
| Type | string
|
| Environment | $CODER_NOTIFICATIONS_EMAIL_TLS_CERTFILE
|
| YAML | notifications.email.emailTLS.certFile
|
@@ -1522,7 +1521,7 @@ Certificate file to use.
### --notifications-email-tls-cert-key-file
| | |
-| ----------- | ------------------------------------------------------- |
+|-------------|---------------------------------------------------------|
| Type | string
|
| Environment | $CODER_NOTIFICATIONS_EMAIL_TLS_CERTKEYFILE
|
| YAML | notifications.email.emailTLS.certKeyFile
|
@@ -1532,7 +1531,7 @@ Certificate key file to use.
### --notifications-webhook-endpoint
| | |
-| ----------- | -------------------------------------------------- |
+|-------------|----------------------------------------------------|
| Type | url
|
| Environment | $CODER_NOTIFICATIONS_WEBHOOK_ENDPOINT
|
| YAML | notifications.webhook.endpoint
|
@@ -1542,7 +1541,7 @@ The endpoint to which to send webhooks.
### --notifications-max-send-attempts
| | |
-| ----------- | --------------------------------------------------- |
+|-------------|-----------------------------------------------------|
| Type | int
|
| Environment | $CODER_NOTIFICATIONS_MAX_SEND_ATTEMPTS
|
| YAML | notifications.maxSendAttempts
|
diff --git a/docs/reference/cli/server_create-admin-user.md b/docs/reference/cli/server_create-admin-user.md
index 611d95094c92e..361465c896dac 100644
--- a/docs/reference/cli/server_create-admin-user.md
+++ b/docs/reference/cli/server_create-admin-user.md
@@ -1,5 +1,4 @@
-
# server create-admin-user
Create a new admin user with the given username, email and password and adds it to every organization.
@@ -15,7 +14,7 @@ coder server create-admin-user [flags]
### --postgres-url
| | |
-| ----------- | ------------------------------------- |
+|-------------|---------------------------------------|
| Type | string
|
| Environment | $CODER_PG_CONNECTION_URL
|
@@ -24,7 +23,7 @@ URL of a PostgreSQL database. If empty, the built-in PostgreSQL deployment will
### --postgres-connection-auth
| | |
-| ----------- | -------------------------------------- |
+|-------------|----------------------------------------|
| Type | password\|awsiamrds
|
| Environment | $CODER_PG_CONNECTION_AUTH
|
| Default | password
|
@@ -34,7 +33,7 @@ Type of auth to use when connecting to postgres.
### --ssh-keygen-algorithm
| | |
-| ----------- | ---------------------------------------- |
+|-------------|------------------------------------------|
| Type | string
|
| Environment | $CODER_SSH_KEYGEN_ALGORITHM
|
| Default | ed25519
|
@@ -44,7 +43,7 @@ The algorithm to use for generating ssh keys. Accepted values are "ed25519", "ec
### --username
| | |
-| ----------- | ---------------------------- |
+|-------------|------------------------------|
| Type | string
|
| Environment | $CODER_USERNAME
|
@@ -53,7 +52,7 @@ The username of the new user. If not specified, you will be prompted via stdin.
### --email
| | |
-| ----------- | ------------------------- |
+|-------------|---------------------------|
| Type | string
|
| Environment | $CODER_EMAIL
|
@@ -62,7 +61,7 @@ The email of the new user. If not specified, you will be prompted via stdin.
### --password
| | |
-| ----------- | ---------------------------- |
+|-------------|------------------------------|
| Type | string
|
| Environment | $CODER_PASSWORD
|
@@ -71,7 +70,7 @@ The password of the new user. If not specified, you will be prompted via stdin.
### --raw-url
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Output the raw connection URL instead of a psql command.
diff --git a/docs/reference/cli/server_dbcrypt.md b/docs/reference/cli/server_dbcrypt.md
index be06560a275ca..f8d638a05ad53 100644
--- a/docs/reference/cli/server_dbcrypt.md
+++ b/docs/reference/cli/server_dbcrypt.md
@@ -1,5 +1,4 @@
-
# server dbcrypt
Manage database encryption.
@@ -13,7 +12,7 @@ coder server dbcrypt
## Subcommands
| Name | Purpose |
-| --------------------------------------------------- | ----------------------------------------------------------------------------- |
+|-----------------------------------------------------|-------------------------------------------------------------------------------|
| [decrypt
](./server_dbcrypt_decrypt.md) | Decrypt a previously encrypted database. |
| [delete
](./server_dbcrypt_delete.md) | Delete all encrypted data from the database. THIS IS A DESTRUCTIVE OPERATION. |
| [rotate
](./server_dbcrypt_rotate.md) | Rotate database encryption keys. |
diff --git a/docs/reference/cli/server_dbcrypt_decrypt.md b/docs/reference/cli/server_dbcrypt_decrypt.md
index 69780471817b1..5126ef0fccb25 100644
--- a/docs/reference/cli/server_dbcrypt_decrypt.md
+++ b/docs/reference/cli/server_dbcrypt_decrypt.md
@@ -1,5 +1,4 @@
-
# server dbcrypt decrypt
Decrypt a previously encrypted database.
@@ -15,7 +14,7 @@ coder server dbcrypt decrypt [flags]
### --postgres-url
| | |
-| ----------- | ------------------------------------- |
+|-------------|---------------------------------------|
| Type | string
|
| Environment | $CODER_PG_CONNECTION_URL
|
@@ -24,7 +23,7 @@ The connection URL for the Postgres database.
### --postgres-connection-auth
| | |
-| ----------- | -------------------------------------- |
+|-------------|----------------------------------------|
| Type | password\|awsiamrds
|
| Environment | $CODER_PG_CONNECTION_AUTH
|
| Default | password
|
@@ -34,7 +33,7 @@ Type of auth to use when connecting to postgres.
### --keys
| | |
-| ----------- | ---------------------------------------------------------- |
+|-------------|------------------------------------------------------------|
| Type | string-array
|
| Environment | $CODER_EXTERNAL_TOKEN_ENCRYPTION_DECRYPT_KEYS
|
@@ -43,7 +42,7 @@ Keys required to decrypt existing data. Must be a comma-separated list of base64
### -y, --yes
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Bypass prompts.
diff --git a/docs/reference/cli/server_dbcrypt_delete.md b/docs/reference/cli/server_dbcrypt_delete.md
index e33560d2ae990..a5e7d16715ecf 100644
--- a/docs/reference/cli/server_dbcrypt_delete.md
+++ b/docs/reference/cli/server_dbcrypt_delete.md
@@ -1,12 +1,11 @@
-
# server dbcrypt delete
Delete all encrypted data from the database. THIS IS A DESTRUCTIVE OPERATION.
Aliases:
-- rm
+* rm
## Usage
@@ -19,7 +18,7 @@ coder server dbcrypt delete [flags]
### --postgres-url
| | |
-| ----------- | ---------------------------------------------------------- |
+|-------------|------------------------------------------------------------|
| Type | string
|
| Environment | $CODER_EXTERNAL_TOKEN_ENCRYPTION_POSTGRES_URL
|
@@ -28,7 +27,7 @@ The connection URL for the Postgres database.
### --postgres-connection-auth
| | |
-| ----------- | -------------------------------------- |
+|-------------|----------------------------------------|
| Type | password\|awsiamrds
|
| Environment | $CODER_PG_CONNECTION_AUTH
|
| Default | password
|
@@ -38,7 +37,7 @@ Type of auth to use when connecting to postgres.
### -y, --yes
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Bypass prompts.
diff --git a/docs/reference/cli/server_dbcrypt_rotate.md b/docs/reference/cli/server_dbcrypt_rotate.md
index 02aaa1451f004..322a909a087b8 100644
--- a/docs/reference/cli/server_dbcrypt_rotate.md
+++ b/docs/reference/cli/server_dbcrypt_rotate.md
@@ -1,5 +1,4 @@
-
# server dbcrypt rotate
Rotate database encryption keys.
@@ -15,7 +14,7 @@ coder server dbcrypt rotate [flags]
### --postgres-url
| | |
-| ----------- | ------------------------------------- |
+|-------------|---------------------------------------|
| Type | string
|
| Environment | $CODER_PG_CONNECTION_URL
|
@@ -24,7 +23,7 @@ The connection URL for the Postgres database.
### --postgres-connection-auth
| | |
-| ----------- | -------------------------------------- |
+|-------------|----------------------------------------|
| Type | password\|awsiamrds
|
| Environment | $CODER_PG_CONNECTION_AUTH
|
| Default | password
|
@@ -34,7 +33,7 @@ Type of auth to use when connecting to postgres.
### --new-key
| | |
-| ----------- | ------------------------------------------------------------- |
+|-------------|---------------------------------------------------------------|
| Type | string
|
| Environment | $CODER_EXTERNAL_TOKEN_ENCRYPTION_ENCRYPT_NEW_KEY
|
@@ -43,7 +42,7 @@ The new external token encryption key. Must be base64-encoded.
### --old-keys
| | |
-| ----------- | -------------------------------------------------------------- |
+|-------------|----------------------------------------------------------------|
| Type | string-array
|
| Environment | $CODER_EXTERNAL_TOKEN_ENCRYPTION_ENCRYPT_OLD_KEYS
|
@@ -52,7 +51,7 @@ The old external token encryption keys. Must be a comma-separated list of base64
### -y, --yes
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Bypass prompts.
diff --git a/docs/reference/cli/server_postgres-builtin-serve.md b/docs/reference/cli/server_postgres-builtin-serve.md
index dda91692a0f78..55d8ad2a8d269 100644
--- a/docs/reference/cli/server_postgres-builtin-serve.md
+++ b/docs/reference/cli/server_postgres-builtin-serve.md
@@ -1,5 +1,4 @@
-
# server postgres-builtin-serve
Run the built-in PostgreSQL deployment.
@@ -15,7 +14,7 @@ coder server postgres-builtin-serve [flags]
### --raw-url
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Output the raw connection URL instead of a psql command.
diff --git a/docs/reference/cli/server_postgres-builtin-url.md b/docs/reference/cli/server_postgres-builtin-url.md
index 8f3eb73307055..f8fdebb042e4a 100644
--- a/docs/reference/cli/server_postgres-builtin-url.md
+++ b/docs/reference/cli/server_postgres-builtin-url.md
@@ -1,5 +1,4 @@
-
# server postgres-builtin-url
Output the connection URL for the built-in PostgreSQL deployment.
@@ -15,7 +14,7 @@ coder server postgres-builtin-url [flags]
### --raw-url
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Output the raw connection URL instead of a psql command.
diff --git a/docs/reference/cli/show.md b/docs/reference/cli/show.md
index c3a81f9e2c83f..87c527ed939f9 100644
--- a/docs/reference/cli/show.md
+++ b/docs/reference/cli/show.md
@@ -1,5 +1,4 @@
-
# show
Display details of a workspace's resources and agents
diff --git a/docs/reference/cli/speedtest.md b/docs/reference/cli/speedtest.md
index 664ac2d3f383e..d17125ad2abcb 100644
--- a/docs/reference/cli/speedtest.md
+++ b/docs/reference/cli/speedtest.md
@@ -1,5 +1,4 @@
-
# speedtest
Run upload and download tests from your machine to a workspace
@@ -15,7 +14,7 @@ coder speedtest [flags] bool
|
Specifies whether to wait for a direct connection before testing speed.
@@ -23,7 +22,7 @@ Specifies whether to wait for a direct connection before testing speed.
### --direction
| | |
-| ------- | --------------------- |
+|---------|-----------------------|
| Type | up\|down
|
| Default | down
|
@@ -32,7 +31,7 @@ Specifies whether to run in reverse mode where the client receives and the serve
### -t, --time
| | |
-| ------- | --------------------- |
+|---------|-----------------------|
| Type | duration
|
| Default | 5s
|
@@ -41,7 +40,7 @@ Specifies the duration to monitor traffic.
### --pcap-file
| | |
-| ---- | ------------------- |
+|------|---------------------|
| Type | string
|
Specifies a file to write a network capture to.
@@ -49,7 +48,7 @@ Specifies a file to write a network capture to.
### -c, --column
| | |
-| ------- | ----------------------------------- |
+|---------|-------------------------------------|
| Type | [Interval\|Throughput]
|
| Default | Interval,Throughput
|
@@ -58,7 +57,7 @@ Columns to display in table output.
### -o, --output
| | |
-| ------- | ------------------------ |
+|---------|--------------------------|
| Type | table\|json
|
| Default | table
|
diff --git a/docs/reference/cli/ssh.md b/docs/reference/cli/ssh.md
index 477c706775e87..72d63a1f003af 100644
--- a/docs/reference/cli/ssh.md
+++ b/docs/reference/cli/ssh.md
@@ -1,5 +1,4 @@
-
# ssh
Start a shell into a workspace
@@ -15,16 +14,25 @@ coder ssh [flags] bool
|
| Environment | $CODER_SSH_STDIO
|
Specifies whether to emit SSH output over stdin/stdout.
+### --ssh-host-prefix
+
+| | |
+|-------------|-----------------------------------------|
+| Type | string
|
+| Environment | $CODER_SSH_SSH_HOST_PREFIX
|
+
+Strip this prefix from the provided hostname to determine the workspace name. This is useful when used as part of an OpenSSH proxy command.
+
### -A, --forward-agent
| | |
-| ----------- | ------------------------------------- |
+|-------------|---------------------------------------|
| Type | bool
|
| Environment | $CODER_SSH_FORWARD_AGENT
|
@@ -33,7 +41,7 @@ Specifies whether to forward the SSH agent specified in $SSH_AUTH_SOCK.
### -G, --forward-gpg
| | |
-| ----------- | ----------------------------------- |
+|-------------|-------------------------------------|
| Type | bool
|
| Environment | $CODER_SSH_FORWARD_GPG
|
@@ -42,7 +50,7 @@ Specifies whether to forward the GPG agent. Unsupported on Windows workspaces, b
### --identity-agent
| | |
-| ----------- | -------------------------------------- |
+|-------------|----------------------------------------|
| Type | string
|
| Environment | $CODER_SSH_IDENTITY_AGENT
|
@@ -51,7 +59,7 @@ Specifies which identity agent to use (overrides $SSH_AUTH_SOCK), forward agent
### --workspace-poll-interval
| | |
-| ----------- | ------------------------------------------- |
+|-------------|---------------------------------------------|
| Type | duration
|
| Environment | $CODER_WORKSPACE_POLL_INTERVAL
|
| Default | 1m
|
@@ -61,7 +69,7 @@ Specifies how often to poll for workspace automated shutdown.
### --wait
| | |
-| ----------- | ---------------------------- |
+|-------------|------------------------------|
| Type | yes\|no\|auto
|
| Environment | $CODER_SSH_WAIT
|
| Default | auto
|
@@ -71,7 +79,7 @@ Specifies whether or not to wait for the startup script to finish executing. Aut
### --no-wait
| | |
-| ----------- | ------------------------------- |
+|-------------|---------------------------------|
| Type | bool
|
| Environment | $CODER_SSH_NO_WAIT
|
@@ -80,7 +88,7 @@ Enter workspace immediately after the agent has connected. This is the default i
### -l, --log-dir
| | |
-| ----------- | ------------------------------- |
+|-------------|---------------------------------|
| Type | string
|
| Environment | $CODER_SSH_LOG_DIR
|
@@ -89,7 +97,7 @@ Specify the directory containing SSH diagnostic log files.
### -R, --remote-forward
| | |
-| ----------- | -------------------------------------- |
+|-------------|----------------------------------------|
| Type | string-array
|
| Environment | $CODER_SSH_REMOTE_FORWARD
|
@@ -98,16 +106,33 @@ Enable remote port forwarding (remote_port:local_address:local_port).
### -e, --env
| | |
-| ----------- | --------------------------- |
+|-------------|-----------------------------|
| Type | string-array
|
| Environment | $CODER_SSH_ENV
|
Set environment variable(s) for session (key1=value1,key2=value2,...).
+### --network-info-dir
+
+| | |
+|------|---------------------|
+| Type | string
|
+
+Specifies a directory to write network information periodically.
+
+### --network-info-interval
+
+| | |
+|---------|-----------------------|
+| Type | duration
|
+| Default | 5s
|
+
+Specifies the interval to update network information.
+
### --disable-autostart
| | |
-| ----------- | ----------------------------------------- |
+|-------------|-------------------------------------------|
| Type | bool
|
| Environment | $CODER_SSH_DISABLE_AUTOSTART
|
| Default | false
|
diff --git a/docs/reference/cli/start.md b/docs/reference/cli/start.md
index 9be64d5a83d85..1ab6df5a9c891 100644
--- a/docs/reference/cli/start.md
+++ b/docs/reference/cli/start.md
@@ -1,5 +1,4 @@
-
# start
Start a workspace
@@ -15,7 +14,7 @@ coder start [flags] bool
|
Bypass prompts.
@@ -23,7 +22,7 @@ Bypass prompts.
### --build-option
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | string-array
|
| Environment | $CODER_BUILD_OPTION
|
@@ -32,7 +31,7 @@ Build option value in the format "name=value".
### --build-options
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Prompt for one-time build options defined with ephemeral parameters.
@@ -40,7 +39,7 @@ Prompt for one-time build options defined with ephemeral parameters.
### --ephemeral-parameter
| | |
-| ----------- | --------------------------------------- |
+|-------------|-----------------------------------------|
| Type | string-array
|
| Environment | $CODER_EPHEMERAL_PARAMETER
|
@@ -49,7 +48,7 @@ Set the value of ephemeral parameters defined in the template. The format is "na
### --prompt-ephemeral-parameters
| | |
-| ----------- | ----------------------------------------------- |
+|-------------|-------------------------------------------------|
| Type | bool
|
| Environment | $CODER_PROMPT_EPHEMERAL_PARAMETERS
|
@@ -58,7 +57,7 @@ Prompt to set values of ephemeral parameters defined in the template. If a value
### --parameter
| | |
-| ----------- | ---------------------------------- |
+|-------------|------------------------------------|
| Type | string-array
|
| Environment | $CODER_RICH_PARAMETER
|
@@ -67,7 +66,7 @@ Rich parameter value in the format "name=value".
### --rich-parameter-file
| | |
-| ----------- | --------------------------------------- |
+|-------------|-----------------------------------------|
| Type | string
|
| Environment | $CODER_RICH_PARAMETER_FILE
|
@@ -76,7 +75,7 @@ Specify a file path with values for rich parameters defined in the template. The
### --parameter-default
| | |
-| ----------- | ------------------------------------------ |
+|-------------|--------------------------------------------|
| Type | string-array
|
| Environment | $CODER_RICH_PARAMETER_DEFAULT
|
@@ -85,7 +84,7 @@ Rich parameter default values in the format "name=value".
### --always-prompt
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Always prompt all parameters. Does not pull parameter values from existing workspace.
diff --git a/docs/reference/cli/stat.md b/docs/reference/cli/stat.md
index 70da8dee47f7a..c84c56ee5afdc 100644
--- a/docs/reference/cli/stat.md
+++ b/docs/reference/cli/stat.md
@@ -1,5 +1,4 @@
-
# stat
Show resource usage for the current workspace.
@@ -13,7 +12,7 @@ coder stat [flags]
## Subcommands
| Name | Purpose |
-| ----------------------------------- | -------------------------------- |
+|-------------------------------------|----------------------------------|
| [cpu
](./stat_cpu.md) | Show CPU usage, in cores. |
| [mem
](./stat_mem.md) | Show memory usage, in gigabytes. |
| [disk
](./stat_disk.md) | Show disk usage, in gigabytes. |
@@ -23,7 +22,7 @@ coder stat [flags]
### -c, --column
| | |
-| ------- | -------------------------------------------------------------------------------- |
+|---------|----------------------------------------------------------------------------------|
| Type | [host cpu\|host memory\|home disk\|container cpu\|container memory]
|
| Default | host cpu,host memory,home disk,container cpu,container memory
|
@@ -32,7 +31,7 @@ Columns to display in table output.
### -o, --output
| | |
-| ------- | ------------------------ |
+|---------|--------------------------|
| Type | table\|json
|
| Default | table
|
diff --git a/docs/reference/cli/stat_cpu.md b/docs/reference/cli/stat_cpu.md
index 8e86ef4ddc7f9..c7013e1683ec4 100644
--- a/docs/reference/cli/stat_cpu.md
+++ b/docs/reference/cli/stat_cpu.md
@@ -1,5 +1,4 @@
-
# stat cpu
Show CPU usage, in cores.
@@ -15,7 +14,7 @@ coder stat cpu [flags]
### --host
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Force host CPU measurement.
@@ -23,7 +22,7 @@ Force host CPU measurement.
### -o, --output
| | |
-| ------- | ----------------------- |
+|---------|-------------------------|
| Type | text\|json
|
| Default | text
|
diff --git a/docs/reference/cli/stat_disk.md b/docs/reference/cli/stat_disk.md
index 6b5ca22ee5750..4cf80f6075e7d 100644
--- a/docs/reference/cli/stat_disk.md
+++ b/docs/reference/cli/stat_disk.md
@@ -1,5 +1,4 @@
-
# stat disk
Show disk usage, in gigabytes.
@@ -15,7 +14,7 @@ coder stat disk [flags]
### --path
| | |
-| ------- | ------------------- |
+|---------|---------------------|
| Type | string
|
| Default | /
|
@@ -24,7 +23,7 @@ Path for which to check disk usage.
### --prefix
| | |
-| ------- | --------------------------- |
+|---------|-----------------------------|
| Type | Ki\|Mi\|Gi\|Ti
|
| Default | Gi
|
@@ -33,7 +32,7 @@ SI Prefix for disk measurement.
### -o, --output
| | |
-| ------- | ----------------------- |
+|---------|-------------------------|
| Type | text\|json
|
| Default | text
|
diff --git a/docs/reference/cli/stat_mem.md b/docs/reference/cli/stat_mem.md
index 1f8b85d32e5fd..d69ba19ee8d11 100644
--- a/docs/reference/cli/stat_mem.md
+++ b/docs/reference/cli/stat_mem.md
@@ -1,5 +1,4 @@
-
# stat mem
Show memory usage, in gigabytes.
@@ -15,7 +14,7 @@ coder stat mem [flags]
### --host
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Force host memory measurement.
@@ -23,7 +22,7 @@ Force host memory measurement.
### --prefix
| | |
-| ------- | --------------------------- |
+|---------|-----------------------------|
| Type | Ki\|Mi\|Gi\|Ti
|
| Default | Gi
|
@@ -32,7 +31,7 @@ SI Prefix for memory measurement.
### -o, --output
| | |
-| ------- | ----------------------- |
+|---------|-------------------------|
| Type | text\|json
|
| Default | text
|
diff --git a/docs/reference/cli/state.md b/docs/reference/cli/state.md
index b0e9ca7433750..ebac28a646895 100644
--- a/docs/reference/cli/state.md
+++ b/docs/reference/cli/state.md
@@ -1,5 +1,4 @@
-
# state
Manually manage Terraform state to fix broken workspaces
@@ -13,6 +12,6 @@ coder state
## Subcommands
| Name | Purpose |
-| ------------------------------------ | --------------------------------------------- |
+|--------------------------------------|-----------------------------------------------|
| [pull
](./state_pull.md) | Pull a Terraform state file from a workspace. |
| [push
](./state_push.md) | Push a Terraform state file to a workspace. |
diff --git a/docs/reference/cli/state_pull.md b/docs/reference/cli/state_pull.md
index 57009750cf64a..089548ab936b2 100644
--- a/docs/reference/cli/state_pull.md
+++ b/docs/reference/cli/state_pull.md
@@ -1,5 +1,4 @@
-
# state pull
Pull a Terraform state file from a workspace.
@@ -15,7 +14,7 @@ coder state pull [flags] int
|
Specify a workspace build to target by name. Defaults to latest.
diff --git a/docs/reference/cli/state_push.md b/docs/reference/cli/state_push.md
index c39831acc4992..039b03fc01c2f 100644
--- a/docs/reference/cli/state_push.md
+++ b/docs/reference/cli/state_push.md
@@ -1,5 +1,4 @@
-
# state push
Push a Terraform state file to a workspace.
@@ -15,7 +14,7 @@ coder state push [flags] int
|
Specify a workspace build to target by name. Defaults to latest.
diff --git a/docs/reference/cli/stop.md b/docs/reference/cli/stop.md
index 65197a2cdbb66..dba81c5cf7e92 100644
--- a/docs/reference/cli/stop.md
+++ b/docs/reference/cli/stop.md
@@ -1,5 +1,4 @@
-
# stop
Stop a workspace
@@ -15,7 +14,7 @@ coder stop [flags] bool
|
Bypass prompts.
diff --git a/docs/reference/cli/support.md b/docs/reference/cli/support.md
index 81bb0509d16ab..b530264f36dd0 100644
--- a/docs/reference/cli/support.md
+++ b/docs/reference/cli/support.md
@@ -1,5 +1,4 @@
-
# support
Commands for troubleshooting issues with a Coder deployment.
@@ -13,5 +12,5 @@ coder support
## Subcommands
| Name | Purpose |
-| ------------------------------------------ | --------------------------------------------------------------------------- |
+|--------------------------------------------|-----------------------------------------------------------------------------|
| [bundle
](./support_bundle.md) | Generate a support bundle to troubleshoot issues connecting to a workspace. |
diff --git a/docs/reference/cli/support_bundle.md b/docs/reference/cli/support_bundle.md
index 602d11297ea3d..59b1fa4130deb 100644
--- a/docs/reference/cli/support_bundle.md
+++ b/docs/reference/cli/support_bundle.md
@@ -1,5 +1,4 @@
-
# support bundle
Generate a support bundle to troubleshoot issues connecting to a workspace.
@@ -21,7 +20,7 @@ This command generates a file containing detailed troubleshooting information ab
### -y, --yes
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Bypass prompts.
@@ -29,7 +28,7 @@ Bypass prompts.
### -O, --output-file
| | |
-| ----------- | ---------------------------------------------- |
+|-------------|------------------------------------------------|
| Type | string
|
| Environment | $CODER_SUPPORT_BUNDLE_OUTPUT_FILE
|
@@ -38,7 +37,7 @@ File path for writing the generated support bundle. Defaults to coder-support-$(
### --url-override
| | |
-| ----------- | ----------------------------------------------- |
+|-------------|-------------------------------------------------|
| Type | string
|
| Environment | $CODER_SUPPORT_BUNDLE_URL_OVERRIDE
|
diff --git a/docs/reference/cli/templates.md b/docs/reference/cli/templates.md
index 9f3936daf787f..99052aa6c3e20 100644
--- a/docs/reference/cli/templates.md
+++ b/docs/reference/cli/templates.md
@@ -1,12 +1,11 @@
-
# templates
Manage templates
Aliases:
-- template
+* template
## Usage
@@ -27,7 +26,7 @@ workspaces:
## Subcommands
| Name | Purpose |
-| ------------------------------------------------ | -------------------------------------------------------------------------------- |
+|--------------------------------------------------|----------------------------------------------------------------------------------|
| [create
](./templates_create.md) | DEPRECATED: Create a template from the current directory or as specified by flag |
| [edit
](./templates_edit.md) | Edit the metadata of a template by name. |
| [init
](./templates_init.md) | Get started with a templated template. |
diff --git a/docs/reference/cli/templates_archive.md b/docs/reference/cli/templates_archive.md
index a229222addf88..ef09707e5f323 100644
--- a/docs/reference/cli/templates_archive.md
+++ b/docs/reference/cli/templates_archive.md
@@ -1,5 +1,4 @@
-
# templates archive
Archive unused or failed template versions from a given template(s)
@@ -7,7 +6,7 @@ Archive unused or failed template versions from a given template(s)
## Usage
```console
-coder templates archive [flags] [template-name...]
+coder templates archive [flags] [template-name...]
```
## Options
@@ -15,7 +14,7 @@ coder templates archive [flags] [template-name...]
### -y, --yes
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Bypass prompts.
@@ -23,7 +22,7 @@ Bypass prompts.
### --all
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Include all unused template versions. By default, only failed template versions are archived.
@@ -31,7 +30,7 @@ Include all unused template versions. By default, only failed template versions
### -O, --org
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | string
|
| Environment | $CODER_ORGANIZATION
|
diff --git a/docs/reference/cli/templates_create.md b/docs/reference/cli/templates_create.md
index 01b153ff2911d..cd3754e383ad5 100644
--- a/docs/reference/cli/templates_create.md
+++ b/docs/reference/cli/templates_create.md
@@ -1,5 +1,4 @@
-
# templates create
DEPRECATED: Create a template from the current directory or as specified by flag
@@ -15,7 +14,7 @@ coder templates create [flags] [name]
### --private
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Disable the default behavior of granting template access to the 'everyone' group. The template permissions must be updated to allow non-admin users to use this template.
@@ -23,7 +22,7 @@ Disable the default behavior of granting template access to the 'everyone' group
### --variables-file
| | |
-| ---- | ------------------- |
+|------|---------------------|
| Type | string
|
Specify a file path with values for Terraform-managed variables.
@@ -31,7 +30,7 @@ Specify a file path with values for Terraform-managed variables.
### --variable
| | |
-| ---- | ------------------------- |
+|------|---------------------------|
| Type | string-array
|
Specify a set of values for Terraform-managed variables.
@@ -39,7 +38,7 @@ Specify a set of values for Terraform-managed variables.
### --var
| | |
-| ---- | ------------------------- |
+|------|---------------------------|
| Type | string-array
|
Alias of --variable.
@@ -47,7 +46,7 @@ Alias of --variable.
### --provisioner-tag
| | |
-| ---- | ------------------------- |
+|------|---------------------------|
| Type | string-array
|
Specify a set of tags to target provisioner daemons.
@@ -55,7 +54,7 @@ Specify a set of tags to target provisioner daemons.
### --default-ttl
| | |
-| ------- | --------------------- |
+|---------|-----------------------|
| Type | duration
|
| Default | 24h
|
@@ -64,7 +63,7 @@ Specify a default TTL for workspaces created from this template. It is the defau
### --failure-ttl
| | |
-| ------- | --------------------- |
+|---------|-----------------------|
| Type | duration
|
| Default | 0h
|
@@ -73,7 +72,7 @@ Specify a failure TTL for workspaces created from this template. It is the amoun
### --dormancy-threshold
| | |
-| ------- | --------------------- |
+|---------|-----------------------|
| Type | duration
|
| Default | 0h
|
@@ -82,7 +81,7 @@ Specify a duration workspaces may be inactive prior to being moved to the dorman
### --dormancy-auto-deletion
| | |
-| ------- | --------------------- |
+|---------|-----------------------|
| Type | duration
|
| Default | 0h
|
@@ -91,7 +90,7 @@ Specify a duration workspaces may be in the dormant state prior to being deleted
### --require-active-version
| | |
-| ------- | ------------------ |
+|---------|--------------------|
| Type | bool
|
| Default | false
|
@@ -100,7 +99,7 @@ Requires workspace builds to use the active template version. This setting does
### -y, --yes
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Bypass prompts.
@@ -108,7 +107,7 @@ Bypass prompts.
### -O, --org
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | string
|
| Environment | $CODER_ORGANIZATION
|
@@ -117,7 +116,7 @@ Select which organization (uuid or name) to use.
### -d, --directory
| | |
-| ------- | ------------------- |
+|---------|---------------------|
| Type | string
|
| Default | .
|
@@ -126,7 +125,7 @@ Specify the directory to create from, use '-' to read tar from stdin.
### --ignore-lockfile
| | |
-| ------- | ------------------ |
+|---------|--------------------|
| Type | bool
|
| Default | false
|
@@ -135,7 +134,7 @@ Ignore warnings about not having a .terraform.lock.hcl file present in the templ
### -m, --message
| | |
-| ---- | ------------------- |
+|------|---------------------|
| Type | string
|
Specify a message describing the changes in this version of the template. Messages longer than 72 characters will be displayed as truncated.
diff --git a/docs/reference/cli/templates_delete.md b/docs/reference/cli/templates_delete.md
index 55730c7d609d8..9037a39d2b378 100644
--- a/docs/reference/cli/templates_delete.md
+++ b/docs/reference/cli/templates_delete.md
@@ -1,12 +1,11 @@
-
# templates delete
Delete templates
Aliases:
-- rm
+* rm
## Usage
@@ -19,7 +18,7 @@ coder templates delete [flags] [name...]
### -y, --yes
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Bypass prompts.
@@ -27,7 +26,7 @@ Bypass prompts.
### -O, --org
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | string
|
| Environment | $CODER_ORGANIZATION
|
diff --git a/docs/reference/cli/templates_edit.md b/docs/reference/cli/templates_edit.md
index 81fdc04d1a176..5d9f6f0a55a0d 100644
--- a/docs/reference/cli/templates_edit.md
+++ b/docs/reference/cli/templates_edit.md
@@ -1,5 +1,4 @@
-
# templates edit
Edit the metadata of a template by name.
@@ -15,7 +14,7 @@ coder templates edit [flags]
### --name
| | |
-| ---- | ------------------- |
+|------|---------------------|
| Type | string
|
Edit the template name.
@@ -23,7 +22,7 @@ Edit the template name.
### --display-name
| | |
-| ---- | ------------------- |
+|------|---------------------|
| Type | string
|
Edit the template display name.
@@ -31,7 +30,7 @@ Edit the template display name.
### --description
| | |
-| ---- | ------------------- |
+|------|---------------------|
| Type | string
|
Edit the template description.
@@ -39,7 +38,7 @@ Edit the template description.
### --deprecated
| | |
-| ---- | ------------------- |
+|------|---------------------|
| Type | string
|
Sets the template as deprecated. Must be a message explaining why the template is deprecated.
@@ -47,7 +46,7 @@ Sets the template as deprecated. Must be a message explaining why the template i
### --icon
| | |
-| ---- | ------------------- |
+|------|---------------------|
| Type | string
|
Edit the template icon path.
@@ -55,7 +54,7 @@ Edit the template icon path.
### --default-ttl
| | |
-| ---- | --------------------- |
+|------|-----------------------|
| Type | duration
|
Edit the template default time before shutdown - workspaces created from this template default to this value. Maps to "Default autostop" in the UI.
@@ -63,7 +62,7 @@ Edit the template default time before shutdown - workspaces created from this te
### --activity-bump
| | |
-| ---- | --------------------- |
+|------|-----------------------|
| Type | duration
|
Edit the template activity bump - workspaces created from this template will have their shutdown time bumped by this value when activity is detected. Maps to "Activity bump" in the UI.
@@ -71,7 +70,7 @@ Edit the template activity bump - workspaces created from this template will hav
### --autostart-requirement-weekdays
| | |
-| ---- | ---------------------------------------------------------------------------------- |
+|------|------------------------------------------------------------------------------------|
| Type | [monday\|tuesday\|wednesday\|thursday\|friday\|saturday\|sunday\|all]
|
Edit the template autostart requirement weekdays - workspaces created from this template can only autostart on the given weekdays. To unset this value for the template (and allow autostart on all days), pass 'all'.
@@ -79,7 +78,7 @@ Edit the template autostart requirement weekdays - workspaces created from this
### --autostop-requirement-weekdays
| | |
-| ---- | ----------------------------------------------------------------------------------- |
+|------|-------------------------------------------------------------------------------------|
| Type | [monday\|tuesday\|wednesday\|thursday\|friday\|saturday\|sunday\|none]
|
Edit the template autostop requirement weekdays - workspaces created from this template must be restarted on the given weekdays. To unset this value for the template (and disable the autostop requirement for the template), pass 'none'.
@@ -87,7 +86,7 @@ Edit the template autostop requirement weekdays - workspaces created from this t
### --autostop-requirement-weeks
| | |
-| ---- | ---------------- |
+|------|------------------|
| Type | int
|
Edit the template autostop requirement weeks - workspaces created from this template must be restarted on an n-weekly basis.
@@ -95,7 +94,7 @@ Edit the template autostop requirement weeks - workspaces created from this temp
### --failure-ttl
| | |
-| ------- | --------------------- |
+|---------|-----------------------|
| Type | duration
|
| Default | 0h
|
@@ -104,7 +103,7 @@ Specify a failure TTL for workspaces created from this template. It is the amoun
### --dormancy-threshold
| | |
-| ------- | --------------------- |
+|---------|-----------------------|
| Type | duration
|
| Default | 0h
|
@@ -113,7 +112,7 @@ Specify a duration workspaces may be inactive prior to being moved to the dorman
### --dormancy-auto-deletion
| | |
-| ------- | --------------------- |
+|---------|-----------------------|
| Type | duration
|
| Default | 0h
|
@@ -122,7 +121,7 @@ Specify a duration workspaces may be in the dormant state prior to being deleted
### --allow-user-cancel-workspace-jobs
| | |
-| ------- | ----------------- |
+|---------|-------------------|
| Type | bool
|
| Default | true
|
@@ -131,7 +130,7 @@ Allow users to cancel in-progress workspace jobs.
### --allow-user-autostart
| | |
-| ------- | ----------------- |
+|---------|-------------------|
| Type | bool
|
| Default | true
|
@@ -140,7 +139,7 @@ Allow users to configure autostart for workspaces on this template. This can onl
### --allow-user-autostop
| | |
-| ------- | ----------------- |
+|---------|-------------------|
| Type | bool
|
| Default | true
|
@@ -149,7 +148,7 @@ Allow users to customize the autostop TTL for workspaces on this template. This
### --require-active-version
| | |
-| ------- | ------------------ |
+|---------|--------------------|
| Type | bool
|
| Default | false
|
@@ -158,7 +157,7 @@ Requires workspace builds to use the active template version. This setting does
### --private
| | |
-| ------- | ------------------ |
+|---------|--------------------|
| Type | bool
|
| Default | false
|
@@ -167,7 +166,7 @@ Disable the default behavior of granting template access to the 'everyone' group
### -y, --yes
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Bypass prompts.
@@ -175,7 +174,7 @@ Bypass prompts.
### -O, --org
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | string
|
| Environment | $CODER_ORGANIZATION
|
diff --git a/docs/reference/cli/templates_init.md b/docs/reference/cli/templates_init.md
index ddbd84ab3d2c8..30df7bb9c0ad3 100644
--- a/docs/reference/cli/templates_init.md
+++ b/docs/reference/cli/templates_init.md
@@ -1,5 +1,4 @@
-
# templates init
Get started with a templated template.
@@ -14,8 +13,8 @@ coder templates init [flags] [directory]
### --id
-| | |
-| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| Type | aws-devcontainer\|aws-linux\|aws-windows\|azure-linux\|devcontainer-docker\|devcontainer-kubernetes\|do-linux\|docker\|gcp-devcontainer\|gcp-linux\|gcp-vm-container\|gcp-windows\|kubernetes\|nomad-docker\|scratch
|
+| | |
+|------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| Type | aws-devcontainer\|aws-linux\|aws-windows\|azure-linux\|digitalocean-linux\|docker\|docker-devcontainer\|gcp-devcontainer\|gcp-linux\|gcp-vm-container\|gcp-windows\|kubernetes\|kubernetes-devcontainer\|nomad-docker\|scratch
|
Specify a given example template by ID.
diff --git a/docs/reference/cli/templates_list.md b/docs/reference/cli/templates_list.md
index 81747abd50d5a..d5ec9d3cea8e5 100644
--- a/docs/reference/cli/templates_list.md
+++ b/docs/reference/cli/templates_list.md
@@ -1,12 +1,11 @@
-
# templates list
List all the templates available for the organization
Aliases:
-- ls
+* ls
## Usage
@@ -19,7 +18,7 @@ coder templates list [flags]
### -c, --column
| | |
-| ------- | --------------------------------------------------------------------------------------------------------------------------------------- |
+|---------|-----------------------------------------------------------------------------------------------------------------------------------------|
| Type | [name\|created at\|last updated\|organization id\|organization name\|provisioner\|active version id\|used by\|default ttl]
|
| Default | name,organization name,last updated,used by
|
@@ -28,7 +27,7 @@ Columns to display in table output.
### -o, --output
| | |
-| ------- | ------------------------ |
+|---------|--------------------------|
| Type | table\|json
|
| Default | table
|
diff --git a/docs/reference/cli/templates_pull.md b/docs/reference/cli/templates_pull.md
index 3678426fd098e..529b110248475 100644
--- a/docs/reference/cli/templates_pull.md
+++ b/docs/reference/cli/templates_pull.md
@@ -1,5 +1,4 @@
-
# templates pull
Download the active, latest, or specified version of a template to a path.
@@ -15,7 +14,7 @@ coder templates pull [flags] bool
|
Output the template as a tar archive to stdout.
@@ -23,7 +22,7 @@ Output the template as a tar archive to stdout.
### --zip
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Output the template as a zip archive to stdout.
@@ -31,7 +30,7 @@ Output the template as a zip archive to stdout.
### --version
| | |
-| ---- | ------------------- |
+|------|---------------------|
| Type | string
|
The name of the template version to pull. Use 'active' to pull the active version, 'latest' to pull the latest version, or the name of the template version to pull.
@@ -39,7 +38,7 @@ The name of the template version to pull. Use 'active' to pull the active versio
### -y, --yes
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Bypass prompts.
@@ -47,7 +46,7 @@ Bypass prompts.
### -O, --org
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | string
|
| Environment | $CODER_ORGANIZATION
|
diff --git a/docs/reference/cli/templates_push.md b/docs/reference/cli/templates_push.md
index e56528841ebda..46687d3fc672e 100644
--- a/docs/reference/cli/templates_push.md
+++ b/docs/reference/cli/templates_push.md
@@ -1,5 +1,4 @@
-
# templates push
Create or update a template from the current directory or as specified by flag
@@ -15,7 +14,7 @@ coder templates push [flags] [template]
### --variables-file
| | |
-| ---- | ------------------- |
+|------|---------------------|
| Type | string
|
Specify a file path with values for Terraform-managed variables.
@@ -23,7 +22,7 @@ Specify a file path with values for Terraform-managed variables.
### --variable
| | |
-| ---- | ------------------------- |
+|------|---------------------------|
| Type | string-array
|
Specify a set of values for Terraform-managed variables.
@@ -31,7 +30,7 @@ Specify a set of values for Terraform-managed variables.
### --var
| | |
-| ---- | ------------------------- |
+|------|---------------------------|
| Type | string-array
|
Alias of --variable.
@@ -39,7 +38,7 @@ Alias of --variable.
### --provisioner-tag
| | |
-| ---- | ------------------------- |
+|------|---------------------------|
| Type | string-array
|
Specify a set of tags to target provisioner daemons.
@@ -47,7 +46,7 @@ Specify a set of tags to target provisioner daemons.
### --name
| | |
-| ---- | ------------------- |
+|------|---------------------|
| Type | string
|
Specify a name for the new template version. It will be automatically generated if not provided.
@@ -55,7 +54,7 @@ Specify a name for the new template version. It will be automatically generated
### --always-prompt
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Always prompt all parameters. Does not pull parameter values from active template version.
@@ -63,7 +62,7 @@ Always prompt all parameters. Does not pull parameter values from active templat
### --activate
| | |
-| ------- | ----------------- |
+|---------|-------------------|
| Type | bool
|
| Default | true
|
@@ -72,7 +71,7 @@ Whether the new template will be marked active.
### -y, --yes
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Bypass prompts.
@@ -80,7 +79,7 @@ Bypass prompts.
### -d, --directory
| | |
-| ------- | ------------------- |
+|---------|---------------------|
| Type | string
|
| Default | .
|
@@ -89,7 +88,7 @@ Specify the directory to create from, use '-' to read tar from stdin.
### --ignore-lockfile
| | |
-| ------- | ------------------ |
+|---------|--------------------|
| Type | bool
|
| Default | false
|
@@ -98,7 +97,7 @@ Ignore warnings about not having a .terraform.lock.hcl file present in the templ
### -m, --message
| | |
-| ---- | ------------------- |
+|------|---------------------|
| Type | string
|
Specify a message describing the changes in this version of the template. Messages longer than 72 characters will be displayed as truncated.
@@ -106,7 +105,7 @@ Specify a message describing the changes in this version of the template. Messag
### -O, --org
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | string
|
| Environment | $CODER_ORGANIZATION
|
diff --git a/docs/reference/cli/templates_versions.md b/docs/reference/cli/templates_versions.md
index 5b1c3b2c2cfb8..8eb927967d162 100644
--- a/docs/reference/cli/templates_versions.md
+++ b/docs/reference/cli/templates_versions.md
@@ -1,12 +1,11 @@
-
# templates versions
Manage different versions of the specified template
Aliases:
-- version
+* version
## Usage
@@ -25,7 +24,7 @@ coder templates versions
## Subcommands
| Name | Purpose |
-| ----------------------------------------------------------- | ----------------------------------------------- |
+|-------------------------------------------------------------|-------------------------------------------------|
| [list
](./templates_versions_list.md) | List all the versions of the specified template |
| [archive
](./templates_versions_archive.md) | Archive a template version(s). |
| [unarchive
](./templates_versions_unarchive.md) | Unarchive a template version(s). |
diff --git a/docs/reference/cli/templates_versions_archive.md b/docs/reference/cli/templates_versions_archive.md
index d6053db9ca185..1c7f4fd7d82c5 100644
--- a/docs/reference/cli/templates_versions_archive.md
+++ b/docs/reference/cli/templates_versions_archive.md
@@ -1,5 +1,4 @@
-
# templates versions archive
Archive a template version(s).
@@ -7,7 +6,7 @@ Archive a template version(s).
## Usage
```console
-coder templates versions archive [flags] bool
|
Bypass prompts.
@@ -23,7 +22,7 @@ Bypass prompts.
### -O, --org
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | string
|
| Environment | $CODER_ORGANIZATION
|
diff --git a/docs/reference/cli/templates_versions_list.md b/docs/reference/cli/templates_versions_list.md
index b19e18abe31e4..0c738f156916f 100644
--- a/docs/reference/cli/templates_versions_list.md
+++ b/docs/reference/cli/templates_versions_list.md
@@ -1,5 +1,4 @@
-
# templates versions list
List all the versions of the specified template
@@ -15,7 +14,7 @@ coder templates versions list [flags]
### --include-archived
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Include archived versions in the result list.
@@ -23,7 +22,7 @@ Include archived versions in the result list.
### -O, --org
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | string
|
| Environment | $CODER_ORGANIZATION
|
@@ -32,7 +31,7 @@ Select which organization (uuid or name) to use.
### -c, --column
| | |
-| ------- | --------------------------------------------------------------------- |
+|---------|-----------------------------------------------------------------------|
| Type | [name\|created at\|created by\|status\|active\|archived]
|
| Default | name,created at,created by,status,active
|
@@ -41,7 +40,7 @@ Columns to display in table output.
### -o, --output
| | |
-| ------- | ------------------------ |
+|---------|--------------------------|
| Type | table\|json
|
| Default | table
|
diff --git a/docs/reference/cli/templates_versions_promote.md b/docs/reference/cli/templates_versions_promote.md
index 30b5f1e8776c6..ecf3ab661cd22 100644
--- a/docs/reference/cli/templates_versions_promote.md
+++ b/docs/reference/cli/templates_versions_promote.md
@@ -1,5 +1,4 @@
-
# templates versions promote
Promote a template version to active.
@@ -21,7 +20,7 @@ Promote an existing template version to be the active version for the specified
### -t, --template
| | |
-| ----------- | --------------------------------- |
+|-------------|-----------------------------------|
| Type | string
|
| Environment | $CODER_TEMPLATE_NAME
|
@@ -30,7 +29,7 @@ Specify the template name.
### --template-version
| | |
-| ----------- | ----------------------------------------- |
+|-------------|-------------------------------------------|
| Type | string
|
| Environment | $CODER_TEMPLATE_VERSION_NAME
|
@@ -39,7 +38,7 @@ Specify the template version name to promote.
### -O, --org
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | string
|
| Environment | $CODER_ORGANIZATION
|
diff --git a/docs/reference/cli/templates_versions_unarchive.md b/docs/reference/cli/templates_versions_unarchive.md
index 7b8d15b4ea21c..c5351939bcf39 100644
--- a/docs/reference/cli/templates_versions_unarchive.md
+++ b/docs/reference/cli/templates_versions_unarchive.md
@@ -1,5 +1,4 @@
-
# templates versions unarchive
Unarchive a template version(s).
@@ -7,7 +6,7 @@ Unarchive a template version(s).
## Usage
```console
-coder templates versions unarchive [flags] bool
|
Bypass prompts.
@@ -23,7 +22,7 @@ Bypass prompts.
### -O, --org
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | string
|
| Environment | $CODER_ORGANIZATION
|
diff --git a/docs/reference/cli/tokens.md b/docs/reference/cli/tokens.md
index 4e74eb9516057..36b6575ed323f 100644
--- a/docs/reference/cli/tokens.md
+++ b/docs/reference/cli/tokens.md
@@ -1,12 +1,11 @@
-
# tokens
Manage personal access tokens
Aliases:
-- token
+* token
## Usage
@@ -34,7 +33,7 @@ Tokens are used to authenticate automated clients to Coder.
## Subcommands
| Name | Purpose |
-| ----------------------------------------- | -------------- |
+|-------------------------------------------|----------------|
| [create
](./tokens_create.md) | Create a token |
| [list
](./tokens_list.md) | List tokens |
| [remove
](./tokens_remove.md) | Delete a token |
diff --git a/docs/reference/cli/tokens_create.md b/docs/reference/cli/tokens_create.md
index bae168c25e50b..7ad9699c17c35 100644
--- a/docs/reference/cli/tokens_create.md
+++ b/docs/reference/cli/tokens_create.md
@@ -1,5 +1,4 @@
-
# tokens create
Create a token
@@ -15,7 +14,7 @@ coder tokens create [flags]
### --lifetime
| | |
-| ----------- | ---------------------------------- |
+|-------------|------------------------------------|
| Type | string
|
| Environment | $CODER_TOKEN_LIFETIME
|
@@ -24,7 +23,7 @@ Specify a duration for the lifetime of the token.
### -n, --name
| | |
-| ----------- | ------------------------------ |
+|-------------|--------------------------------|
| Type | string
|
| Environment | $CODER_TOKEN_NAME
|
@@ -33,7 +32,7 @@ Specify a human-readable name.
### -u, --user
| | |
-| ----------- | ------------------------------ |
+|-------------|--------------------------------|
| Type | string
|
| Environment | $CODER_TOKEN_USER
|
diff --git a/docs/reference/cli/tokens_list.md b/docs/reference/cli/tokens_list.md
index 5b0cdab5f070f..150b411855174 100644
--- a/docs/reference/cli/tokens_list.md
+++ b/docs/reference/cli/tokens_list.md
@@ -1,12 +1,11 @@
-
# tokens list
List tokens
Aliases:
-- ls
+* ls
## Usage
@@ -19,7 +18,7 @@ coder tokens list [flags]
### -a, --all
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Specifies whether all users' tokens will be listed or not (must have Owner role to see all tokens).
@@ -27,7 +26,7 @@ Specifies whether all users' tokens will be listed or not (must have Owner role
### -c, --column
| | |
-| ------- | ----------------------------------------------------------------- |
+|---------|-------------------------------------------------------------------|
| Type | [id\|name\|last used\|expires at\|created at\|owner]
|
| Default | id,name,last used,expires at,created at
|
@@ -36,7 +35,7 @@ Columns to display in table output.
### -o, --output
| | |
-| ------- | ------------------------ |
+|---------|--------------------------|
| Type | table\|json
|
| Default | table
|
diff --git a/docs/reference/cli/tokens_remove.md b/docs/reference/cli/tokens_remove.md
index 408f233494d1b..8825040f5e3a7 100644
--- a/docs/reference/cli/tokens_remove.md
+++ b/docs/reference/cli/tokens_remove.md
@@ -1,13 +1,12 @@
-
# tokens remove
Delete a token
Aliases:
-- delete
-- rm
+* delete
+* rm
## Usage
diff --git a/docs/reference/cli/unfavorite.md b/docs/reference/cli/unfavorite.md
index b1dca7a397bc7..2bf15b437e7b9 100644
--- a/docs/reference/cli/unfavorite.md
+++ b/docs/reference/cli/unfavorite.md
@@ -1,13 +1,12 @@
-
# unfavorite
Remove a workspace from your favorites
Aliases:
-- unfav
-- unfavourite
+* unfav
+* unfavourite
## Usage
diff --git a/docs/reference/cli/update.md b/docs/reference/cli/update.md
index 920fee20058b1..dd2bfa5ff76b5 100644
--- a/docs/reference/cli/update.md
+++ b/docs/reference/cli/update.md
@@ -1,5 +1,4 @@
-
# update
Will update and start a given workspace if it is out of date
@@ -21,7 +20,7 @@ Use --always-prompt to change the parameter values of the workspace.
### --build-option
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | string-array
|
| Environment | $CODER_BUILD_OPTION
|
@@ -30,7 +29,7 @@ Build option value in the format "name=value".
### --build-options
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Prompt for one-time build options defined with ephemeral parameters.
@@ -38,7 +37,7 @@ Prompt for one-time build options defined with ephemeral parameters.
### --ephemeral-parameter
| | |
-| ----------- | --------------------------------------- |
+|-------------|-----------------------------------------|
| Type | string-array
|
| Environment | $CODER_EPHEMERAL_PARAMETER
|
@@ -47,7 +46,7 @@ Set the value of ephemeral parameters defined in the template. The format is "na
### --prompt-ephemeral-parameters
| | |
-| ----------- | ----------------------------------------------- |
+|-------------|-------------------------------------------------|
| Type | bool
|
| Environment | $CODER_PROMPT_EPHEMERAL_PARAMETERS
|
@@ -56,7 +55,7 @@ Prompt to set values of ephemeral parameters defined in the template. If a value
### --parameter
| | |
-| ----------- | ---------------------------------- |
+|-------------|------------------------------------|
| Type | string-array
|
| Environment | $CODER_RICH_PARAMETER
|
@@ -65,7 +64,7 @@ Rich parameter value in the format "name=value".
### --rich-parameter-file
| | |
-| ----------- | --------------------------------------- |
+|-------------|-----------------------------------------|
| Type | string
|
| Environment | $CODER_RICH_PARAMETER_FILE
|
@@ -74,7 +73,7 @@ Specify a file path with values for rich parameters defined in the template. The
### --parameter-default
| | |
-| ----------- | ------------------------------------------ |
+|-------------|--------------------------------------------|
| Type | string-array
|
| Environment | $CODER_RICH_PARAMETER_DEFAULT
|
@@ -83,7 +82,7 @@ Rich parameter default values in the format "name=value".
### --always-prompt
| | |
-| ---- | ----------------- |
+|------|-------------------|
| Type | bool
|
Always prompt all parameters. Does not pull parameter values from existing workspace.
diff --git a/docs/reference/cli/users.md b/docs/reference/cli/users.md
index a45f6b374dad2..174e08fe9f3a0 100644
--- a/docs/reference/cli/users.md
+++ b/docs/reference/cli/users.md
@@ -1,12 +1,11 @@
-
# users
Manage users
Aliases:
-- user
+* user
## Usage
@@ -17,7 +16,7 @@ coder users [subcommand]
## Subcommands
| Name | Purpose |
-| -------------------------------------------- | ------------------------------------------------------------------------------------- |
+|----------------------------------------------|---------------------------------------------------------------------------------------|
| [create
](./users_create.md) | |
| [list
](./users_list.md) | |
| [show
](./users_show.md) | Show a single user. Use 'me' to indicate the currently authenticated user. |
diff --git a/docs/reference/cli/users_activate.md b/docs/reference/cli/users_activate.md
index fe8022616a9e8..e82313c0c817d 100644
--- a/docs/reference/cli/users_activate.md
+++ b/docs/reference/cli/users_activate.md
@@ -1,12 +1,11 @@
-
# users activate
Update a user's status to 'active'. Active users can fully interact with the platform
Aliases:
-- active
+* active
## Usage
@@ -17,7 +16,7 @@ coder users activate [flags] [username\|email\|created at\|status]
|
| Default | username,email,created at,status
|
diff --git a/docs/reference/cli/users_create.md b/docs/reference/cli/users_create.md
index 368f049e0a91d..61768ebfdbbf8 100644
--- a/docs/reference/cli/users_create.md
+++ b/docs/reference/cli/users_create.md
@@ -1,5 +1,4 @@
-
# users create
## Usage
@@ -13,7 +12,7 @@ coder users create [flags]
### -e, --email
| | |
-| ---- | ------------------- |
+|------|---------------------|
| Type | string
|
Specifies an email address for the new user.
@@ -21,7 +20,7 @@ Specifies an email address for the new user.
### -u, --username
| | |
-| ---- | ------------------- |
+|------|---------------------|
| Type | string
|
Specifies a username for the new user.
@@ -29,7 +28,7 @@ Specifies a username for the new user.
### -n, --full-name
| | |
-| ---- | ------------------- |
+|------|---------------------|
| Type | string
|
Specifies an optional human-readable name for the new user.
@@ -37,7 +36,7 @@ Specifies an optional human-readable name for the new user.
### -p, --password
| | |
-| ---- | ------------------- |
+|------|---------------------|
| Type | string
|
Specifies a password for the new user.
@@ -45,7 +44,7 @@ Specifies a password for the new user.
### --login-type
| | |
-| ---- | ------------------- |
+|------|---------------------|
| Type | string
|
Optionally specify the login type for the user. Valid values are: password, none, github, oidc. Using 'none' prevents the user from authenticating and requires an API key/token to be generated by an admin.
@@ -53,7 +52,7 @@ Optionally specify the login type for the user. Valid values are: password, none
### -O, --org
| | |
-| ----------- | -------------------------------- |
+|-------------|----------------------------------|
| Type | string
|
| Environment | $CODER_ORGANIZATION
|
diff --git a/docs/reference/cli/users_delete.md b/docs/reference/cli/users_delete.md
index d4da1c8b5db7a..7bfe7db59c90a 100644
--- a/docs/reference/cli/users_delete.md
+++ b/docs/reference/cli/users_delete.md
@@ -1,12 +1,11 @@
-
# users delete
Delete a user by username or user_id.
Aliases:
-- rm
+* rm
## Usage
diff --git a/docs/reference/cli/users_list.md b/docs/reference/cli/users_list.md
index 4405179b61697..42adf1df8e2c1 100644
--- a/docs/reference/cli/users_list.md
+++ b/docs/reference/cli/users_list.md
@@ -1,10 +1,9 @@
-
# users list
Aliases:
-- ls
+* ls
## Usage
@@ -17,7 +16,7 @@ coder users list [flags]
### -c, --column
| | |
-| ------- | ------------------------------------------------------------------ |
+|---------|--------------------------------------------------------------------|
| Type | [id\|username\|email\|created at\|updated at\|status]
|
| Default | username,email,created at,status
|
@@ -26,7 +25,7 @@ Columns to display in table output.
### -o, --output
| | |
-| ------- | ------------------------ |
+|---------|--------------------------|
| Type | table\|json
|
| Default | table
|
diff --git a/docs/reference/cli/users_show.md b/docs/reference/cli/users_show.md
index 44887a7339518..de53d673849bf 100644
--- a/docs/reference/cli/users_show.md
+++ b/docs/reference/cli/users_show.md
@@ -1,5 +1,4 @@
-
# users show
Show a single user. Use 'me' to indicate the currently authenticated user.
@@ -13,7 +12,7 @@ coder users show [flags] table\|json
|
| Default | table
|
diff --git a/docs/reference/cli/users_suspend.md b/docs/reference/cli/users_suspend.md
index a4bbc8c7b6f82..286a73cd2432c 100644
--- a/docs/reference/cli/users_suspend.md
+++ b/docs/reference/cli/users_suspend.md
@@ -1,5 +1,4 @@
-
# users suspend
Update a user's status to 'suspended'. A suspended user cannot log into the platform
@@ -13,7 +12,7 @@ coder users suspend [flags] [username\|email\|created at\|status]
|
| Default | username,email,created at,status
|
diff --git a/docs/reference/cli/version.md b/docs/reference/cli/version.md
index a88652fed6489..cb0573c597bc9 100644
--- a/docs/reference/cli/version.md
+++ b/docs/reference/cli/version.md
@@ -1,5 +1,4 @@
-
# version
Show coder version
@@ -15,7 +14,7 @@ coder version [flags]
### -o, --output
| | |
-| ------- | ----------------------- |
+|---------|-------------------------|
| Type | text\|json
|
| Default | text
|
diff --git a/docs/reference/cli/whoami.md b/docs/reference/cli/whoami.md
index 7e2736d454bf4..f3038789f25ac 100644
--- a/docs/reference/cli/whoami.md
+++ b/docs/reference/cli/whoami.md
@@ -1,5 +1,4 @@
-
# whoami
Fetch authenticated user info for Coder deployment
diff --git a/docs/reference/index.md b/docs/reference/index.md
index 4ef592d5e0840..4de97ef4a3099 100644
--- a/docs/reference/index.md
+++ b/docs/reference/index.md
@@ -1,6 +1,6 @@
# Reference
-# Automation
+## Automation
All actions possible through the Coder dashboard can also be automated. There
are several ways to extend/automate Coder:
@@ -74,9 +74,9 @@ activity.
-d "{
\"logs\": [
{
- \"created_at\": \"$(date -u +'%Y-%m-%dT%H:%M:%SZ')\",
- \"level\": \"info\",
- \"output\": \"Restoring workspace from snapshot: 05%...\"
+ \"created_at\": \"$(date -u +'%Y-%m-%dT%H:%M:%SZ')\",
+ \"level\": \"info\",
+ \"output\": \"Restoring workspace from snapshot: 05%...\"
}
]
}"
@@ -97,7 +97,7 @@ activity.
curl -X PUT "https://coder.example.com/api/v2/workspaces/$WORKSPACE_ID/extend" \
-H "Coder-Session-Token: $CODER_AGENT_TOKEN" \
-d '{
- "deadline": "2019-08-24T14:15:22Z"
+ "deadline": "2019-08-24T14:15:22Z"
}'
# Sleep for 30 minutes (1800 seconds) if the job is running
diff --git a/docs/start/local-deploy.md b/docs/start/local-deploy.md
index 5a25a525bcec1..d3944caddf051 100644
--- a/docs/start/local-deploy.md
+++ b/docs/start/local-deploy.md
@@ -1,4 +1,4 @@
-## Setting up a Coder deployment
+# Setting up a Coder deployment
For day-zero Coder users, we recommend following this guide to set up a local
Coder deployment from our
@@ -11,7 +11,7 @@ slim deployment to experiment with [workspaces](../user-guides/index.md) and
Docker is not necessary for every Coder deployment and is only used here for
simplicity.
-### Install Coder daemon
+## Install Coder daemon
First, install [Docker](https://docs.docker.com/engine/install/) locally.
@@ -45,7 +45,7 @@ winget install Coder.Coder
+ +If you have any suggestions or experience any issues, please +[create a GitHub issue](https://github.com/coder/coder/issues) or share in +[our Discord channel](https://discord.gg/coder). + +diff --git a/docs/user-guides/workspace-management.md b/docs/user-guides/workspace-management.md index 98158cf0233ef..c613661747187 100644 --- a/docs/user-guides/workspace-management.md +++ b/docs/user-guides/workspace-management.md @@ -88,7 +88,14 @@ manually updated the workspace.  -## Bulk operations (enterprise) (premium) +## Bulk operations + +
+ +Bulk operations are an Enterprise and Premium feature. +[Learn more](https://coder.com/pricing#compare-plans). + +Licensed admins may apply bulk operations (update, delete, start, stop) in the **Workspaces** tab. Select the workspaces you'd like to modify with the @@ -170,7 +177,7 @@ coder state push
+ +Autostop requirement is an Enterprise and Premium feature. +[Learn more](https://coder.com/pricing#compare-plans). + +Licensed template admins may enforce a required stop for workspaces to apply updates or undergo maintenance. These stops ignore any active connections or @@ -61,7 +68,14 @@ and specified quiet hours (see below). > Admins: See the template schedule settings for more information on configuring > Autostop Requirement. -### User quiet hours (enterprise) (premium) +### User quiet hours + +
+ +User quiet hours are an Enterprise and Premium feature. +[Learn more](https://coder.com/pricing#compare-plans). + +User quiet hours can be configured in the user's schedule settings page. Workspaces on templates with an autostop requirement will only be forcibly @@ -99,7 +113,14 @@ Let's say that both are set to 5 hours. When either your workspace autostarts or you sign in, you will have confidence that the only condition for shutdown is 5 hours of inactivity. -## Dormancy (enterprise) (premium) +## Dormancy + +
+ +Dormancy is an Enterprise and Premium feature. +[Learn more](https://coder.com/pricing#compare-plans). + +Dormancy automatically deletes workspaces which remain unused for long durations. Template admins configure an inactivity period after which your diff --git a/dogfood/contents/Dockerfile b/dogfood/contents/Dockerfile index 21a3825427c2d..2de358c5c91e6 100644 --- a/dogfood/contents/Dockerfile +++ b/dogfood/contents/Dockerfile @@ -38,7 +38,7 @@ RUN apt-get update && \ # protoc-gen-go is needed to build sysbox from source go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.30 && \ # drpc support for v2 - go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.33 && \ + go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.34 && \ # migrate for migration support for v2 go install github.com/golang-migrate/migrate/v4/cmd/migrate@v4.15.1 && \ # goreleaser for compiling v2 binaries @@ -57,7 +57,7 @@ RUN apt-get update && \ # charts and values files go install github.com/norwoodj/helm-docs/cmd/helm-docs@v1.5.0 && \ # sqlc for Go code generation - (CGO_ENABLED=1 go install github.com/sqlc-dev/sqlc/cmd/sqlc@v1.25.0) && \ + (CGO_ENABLED=1 go install github.com/sqlc-dev/sqlc/cmd/sqlc@v1.27.0) && \ # gcr-cleaner-cli used by CI to prune unused images go install github.com/sethvargo/gcr-cleaner/cmd/gcr-cleaner-cli@v0.5.1 && \ # ruleguard for checking custom rules, without needing to run all of @@ -75,9 +75,9 @@ RUN apt-get update && \ go install github.com/goreleaser/nfpm/v2/cmd/nfpm@v2.35.1 && \ # yq v4 is used to process yaml files in coder v2. Conflicts with # yq v3 used in v1. - go install github.com/mikefarah/yq/v4@v4.30.6 && \ + go install github.com/mikefarah/yq/v4@v4.44.3 && \ mv /tmp/bin/yq /tmp/bin/yq4 && \ - go install go.uber.org/mock/mockgen@v0.4.0 && \ + go install go.uber.org/mock/mockgen@v0.5.0 && \ # Reduce image size. apt-get remove --yes gcc && \ apt-get autoremove --yes && \ @@ -90,7 +90,7 @@ RUN apt-get update && \ FROM gcr.io/coder-dev-1/alpine:3.18 as proto WORKDIR /tmp RUN apk add curl unzip -RUN curl -L -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v23.3/protoc-23.3-linux-x86_64.zip && \ +RUN curl -L -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protoc-23.4-linux-x86_64.zip && \ unzip protoc.zip && \ rm protoc.zip @@ -104,7 +104,13 @@ ARG DEBIAN_FRONTEND="noninteractive" # Updated certificates are necessary to use the teraswitch mirror. # This must be ran before copying in configuration since the config replaces # the default mirror with teraswitch. -RUN apt-get update && apt-get install --yes ca-certificates +# Also enable the en_US.UTF-8 locale so that we don't generate multiple locales +# and unminimize to include man pages. +RUN apt-get update && \ + apt-get install --yes ca-certificates locales && \ + echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && \ + locale-gen && \ + yes | unminimize COPY files / @@ -214,7 +220,15 @@ RUN GH_CLI_VERSION=$(curl -s "https://api.github.com/repos/cli/cli/releases/late # See https://github.com/jesseduffield/lazygit#ubuntu RUN LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep '"tag_name":' | sed -E 's/.*"v*([^"]+)".*/\1/') && \ curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz" && \ - tar xf lazygit.tar.gz -C /usr/local/bin lazygit + tar xf lazygit.tar.gz -C /usr/local/bin lazygit && \ + rm lazygit.tar.gz + +# Install doctl +# See https://docs.digitalocean.com/reference/doctl/how-to/install +RUN DOCTL_VERSION=$(curl -s "https://api.github.com/repos/digitalocean/doctl/releases/latest" | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/') && \ + curl -L https://github.com/digitalocean/doctl/releases/download/v${DOCTL_VERSION}/doctl-${DOCTL_VERSION}-linux-amd64.tar.gz -o doctl.tar.gz && \ + tar xf doctl.tar.gz -C /usr/local/bin doctl && \ + rm doctl.tar.gz # Install frontend utilities ENV NVM_DIR=/usr/local/nvm diff --git a/dogfood/contents/Dockerfile.nix b/dogfood/contents/Dockerfile.nix deleted file mode 100644 index 40729eb9c5005..0000000000000 --- a/dogfood/contents/Dockerfile.nix +++ /dev/null @@ -1,42 +0,0 @@ -# Build stage -FROM nixos/nix:2.19.2 as nix - -# enable --experimental-features 'nix-command flakes' globally -# nix does not enable these features by default these are required to run commands like -# nix develop -c 'some command' or to use falke.nix -RUN mkdir -p /etc/nix && \ - echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf - -# Copy Nix flake and install dependencies -COPY flake.* /app/ -RUN nix profile install "/app#all" --priority 4 && \ - rm -rf /app && \ - nix-collect-garbage -d - -# Final image -FROM codercom/enterprise-base:latest as final - -# Set the non-root user -USER root - -# Copy the Nix related files into the Docker image -COPY --from=nix --chown=coder:coder /nix /nix -COPY --from=nix /etc/nix /etc/nix -COPY --from=nix --chown=coder:coder /root/.nix-profile /home/coder/.nix-profile -COPY --from=nix /etc/passwd /etc/passwd.nix -COPY --from=nix /etc/group /etc/group.nix - -# Merge the passwd and group files -# We need all nix users and groups to be available in the final image -RUN cat /etc/passwd.nix >> /etc/passwd && \ - cat /etc/group.nix >> /etc/group && \ - rm /etc/passwd.nix /etc/group.nix - -# Set environment variables and PATH -ENV PATH=/home/coder/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:$PATH \ - GOPRIVATE="coder.com,cdr.dev,go.coder.com,github.com/cdr,github.com/coder" \ - NODE_OPTIONS="--max-old-space-size=8192" - -# Set the user to 'coder' -USER coder -WORKDIR /home/coder diff --git a/dogfood/contents/files/etc/apt/preferences.d/containerd b/dogfood/contents/files/etc/apt/preferences.d/containerd new file mode 100644 index 0000000000000..ab0b8f9891aa2 --- /dev/null +++ b/dogfood/contents/files/etc/apt/preferences.d/containerd @@ -0,0 +1,6 @@ +# Ref: https://github.com/nestybox/sysbox/issues/879 +# We need to pin containerd to a specific version to avoid breaking +# Docker-in-Docker. +Package: containerd.io +Pin: version 1.7.23-1 +Pin-Priority: 1001 diff --git a/dogfood/contents/guide.md b/dogfood/contents/guide.md index 599bc15b5cd40..dbaa47ee85eed 100644 --- a/dogfood/contents/guide.md +++ b/dogfood/contents/guide.md @@ -21,12 +21,12 @@ The following explains how to do certain things related to dogfooding. ### Run Coder in your Coder Workspace -1. Clone the Git repo +1. Clone the Git repo `[https://github.com/coder/coder](https://github.com/coder/coder)` and `cd` into it -2. Run `sudo apt update` and then `sudo apt install -y netcat` +2. Run `sudo apt update` and then `sudo apt install -y netcat` - skip this step if using the `coder` template -3. Run `make bin` +3. Run `make bin` -4. Run `./scripts/develop.sh` which will start _two_ separate processes: +4. Run `./scripts/develop.sh` which will start _two_ separate processes: 1. `[http://localhost:3000](http://localhost:3000)` — backend API server 👈 Backend devs will want to talk to this 2. `[http://localhost:8080](http://localhost:8080)` — Node.js dev server 👈 Frontend devs will want to talk to this -5. Ensure that you’re logged in: `./scripts/coder-dev.sh list` — should return +5. Ensure that you’re logged in: `./scripts/coder-dev.sh list` — should return no workspace. If this returns an error, double-check the output of running `scripts/develop.sh`. -6. A template named `docker-amd64` (or `docker-arm64` if you’re on ARM) will +6. A template named `docker-amd64` (or `docker-arm64` if you’re on ARM) will have automatically been created for you. If you just want to create a workspace quickly, you can run `./scripts/coder-dev.sh create myworkspace -t docker-amd64` and this will get you going quickly! -7. To create your own template, you can do: +7. To create your own template, you can do: `./scripts/coder-dev.sh templates init` and choose your preferred option. For example, choosing “Develop in Docker” will create a new folder `docker` that contains the bare bones for starting a Docker workspace template. Then, @@ -75,7 +75,7 @@ The following explains how to do certain things related to dogfooding. ## Troubleshooting -### My Docker containers keep failing and I have no idea what's going on! +### My Docker containers keep failing and I have no idea what's going on ```console ✔ Queued [236ms] diff --git a/dogfood/contents/main.tf b/dogfood/contents/main.tf index 9cc5d2ea3b70c..62329c7b1c616 100644 --- a/dogfood/contents/main.tf +++ b/dogfood/contents/main.tf @@ -19,12 +19,11 @@ locals { "eu-helsinki" = "tcp://reinhard-hel-cdr-dev.tailscale.svc.cluster.local:2375" "ap-sydney" = "tcp://wolfgang-syd-cdr-dev.tailscale.svc.cluster.local:2375" "sa-saopaulo" = "tcp://oberstein-sao-cdr-dev.tailscale.svc.cluster.local:2375" - "za-jnb" = "tcp://greenhill-jnb-cdr-dev.tailscale.svc.cluster.local:2375" - "ja-tokyo" = "tcp://reuenthal-tokyo-cdr-dev.tailscale.svc.cluster.local:2375" + "za-cpt" = "tcp://schonkopf-cpt-cdr-dev.tailscale.svc.cluster.local:2375" } repo_base_dir = data.coder_parameter.repo_base_dir.value == "~" ? "/home/coder" : replace(data.coder_parameter.repo_base_dir.value, "/^~\\//", "/home/coder/") - repo_dir = replace(module.git-clone.repo_dir, "/^~\\//", "/home/coder/") + repo_dir = replace(try(module.git-clone[0].repo_dir, ""), "/^~\\//", "/home/coder/") container_name = "coder-${data.coder_workspace_owner.me.name}-${lower(data.coder_workspace.me.name)}" } @@ -80,13 +79,8 @@ data "coder_parameter" "region" { } option { icon = "/emojis/1f1ff-1f1e6.png" - name = "Johannesburg" - value = "za-jnb" - } - option { - icon = "/emojis/1f1ef-1f1f5.png" - name = "Tokyo" - value = "ja-tokyo" + name = "Cape Town" + value = "za-cpt" } } @@ -102,22 +96,31 @@ data "coder_external_auth" "github" { data "coder_workspace" "me" {} data "coder_workspace_owner" "me" {} +data "coder_workspace_tags" "tags" { + tags = { + "cluster" : "dogfood-v2" + "env" : "gke" + } +} module "slackme" { - source = "registry.coder.com/modules/slackme/coder" + count = data.coder_workspace.me.start_count + source = "dev.registry.coder.com/modules/slackme/coder" version = ">= 1.0.0" agent_id = coder_agent.dev.id auth_provider_id = "slack" } module "dotfiles" { - source = "registry.coder.com/modules/dotfiles/coder" + count = data.coder_workspace.me.start_count + source = "dev.registry.coder.com/modules/dotfiles/coder" version = ">= 1.0.0" agent_id = coder_agent.dev.id } module "git-clone" { - source = "registry.coder.com/modules/git-clone/coder" + count = data.coder_workspace.me.start_count + source = "dev.registry.coder.com/modules/git-clone/coder" version = ">= 1.0.0" agent_id = coder_agent.dev.id url = "https://github.com/coder/coder" @@ -125,21 +128,35 @@ module "git-clone" { } module "personalize" { - source = "registry.coder.com/modules/personalize/coder" + count = data.coder_workspace.me.start_count + source = "dev.registry.coder.com/modules/personalize/coder" version = ">= 1.0.0" agent_id = coder_agent.dev.id } module "code-server" { - source = "registry.coder.com/modules/code-server/coder" + count = data.coder_workspace.me.start_count + source = "dev.registry.coder.com/modules/code-server/coder" version = ">= 1.0.0" agent_id = coder_agent.dev.id folder = local.repo_dir auto_install_extensions = true } +module "vscode-web" { + count = data.coder_workspace.me.start_count + source = "registry.coder.com/modules/vscode-web/coder" + version = ">= 1.0.0" + agent_id = coder_agent.dev.id + folder = local.repo_dir + extensions = ["github.copilot"] + auto_install_extensions = true # will install extensions from the repos .vscode/extensions.json file + accept_license = true +} + module "jetbrains_gateway" { - source = "registry.coder.com/modules/jetbrains-gateway/coder" + count = data.coder_workspace.me.start_count + source = "dev.registry.coder.com/modules/jetbrains-gateway/coder" version = ">= 1.0.0" agent_id = coder_agent.dev.id agent_name = "dev" @@ -150,25 +167,35 @@ module "jetbrains_gateway" { } module "filebrowser" { - source = "registry.coder.com/modules/filebrowser/coder" + count = data.coder_workspace.me.start_count + source = "dev.registry.coder.com/modules/filebrowser/coder" version = ">= 1.0.0" agent_id = coder_agent.dev.id agent_name = "dev" } module "coder-login" { - source = "registry.coder.com/modules/coder-login/coder" + count = data.coder_workspace.me.start_count + source = "dev.registry.coder.com/modules/coder-login/coder" version = ">= 1.0.0" agent_id = coder_agent.dev.id } module "cursor" { - source = "registry.coder.com/modules/cursor/coder" + count = data.coder_workspace.me.start_count + source = "dev.registry.coder.com/modules/cursor/coder" version = ">= 1.0.0" agent_id = coder_agent.dev.id folder = local.repo_dir } +module "zed" { + count = data.coder_workspace.me.start_count + source = "./zed" + agent_id = coder_agent.dev.id + folder = local.repo_dir +} + resource "coder_agent" "dev" { arch = "amd64" os = "linux" @@ -324,7 +351,7 @@ resource "docker_image" "dogfood" { data.docker_registry_image.dogfood.sha256_digest, sha1(join("", [for f in fileset(path.module, "files/*") : filesha1(f)])), filesha1("Dockerfile"), - filesha1("Dockerfile.nix"), + filesha1("nix.hash"), ] keep_locally = true } @@ -343,6 +370,9 @@ resource "docker_container" "workspace" { env = [ "CODER_AGENT_TOKEN=${coder_agent.dev.token}", "USE_CAP_NET_ADMIN=true", + "CODER_PROC_PRIO_MGMT=1", + "CODER_PROC_OOM_SCORE=10", + "CODER_PROC_NICE_SCORE=1", ] host { host = "host.docker.internal" diff --git a/dogfood/contents/nix.hash b/dogfood/contents/nix.hash new file mode 100644 index 0000000000000..426d2750e7555 --- /dev/null +++ b/dogfood/contents/nix.hash @@ -0,0 +1,2 @@ +91e81c240fcf9f72e4c67497b68ba247a3f901147b61736072eb234e03db87b5 flake.nix +b43d86368a0d2713d646d57e964dc2ac49744f5e11b6395fabed2d49596c1615 flake.lock diff --git a/dogfood/contents/zed/main.tf b/dogfood/contents/zed/main.tf new file mode 100644 index 0000000000000..4eb63f7d48e39 --- /dev/null +++ b/dogfood/contents/zed/main.tf @@ -0,0 +1,28 @@ +terraform { + required_version = ">= 1.0" + required_providers { + coder = { + source = "coder/coder" + version = ">= 0.17" + } + } +} + +variable "agent_id" { + type = string +} + +variable "folder" { + type = string +} + +data "coder_workspace" "me" {} + +resource "coder_app" "zed" { + agent_id = var.agent_id + display_name = "Zed Editor" + slug = "zed" + icon = "/icon/zed.svg" + external = true + url = "zed://ssh/coder.${lower(data.coder_workspace.me.name)}/${var.folder}" +} diff --git a/enterprise/audit/diff.go b/enterprise/audit/diff.go index 07cd8a5fdcb87..8196238ecc841 100644 --- a/enterprise/audit/diff.go +++ b/enterprise/audit/diff.go @@ -4,6 +4,7 @@ import ( "database/sql" "fmt" "reflect" + "strings" "github.com/google/uuid" "golang.org/x/xerrors" @@ -49,6 +50,7 @@ func diffValues(left, right any, table Table) audit.Map { ) diffName := field.FieldType.Tag.Get("json") + diffName = strings.TrimSuffix(diffName, ",omitempty") atype, ok := diffKey[diffName] if !ok { diff --git a/enterprise/audit/table.go b/enterprise/audit/table.go index f9e74959f2a28..b72a64c2eeae4 100644 --- a/enterprise/audit/table.go +++ b/enterprise/audit/table.go @@ -5,8 +5,10 @@ import ( "os" "reflect" "runtime" + "strings" "github.com/coder/coder/v2/coderd/database" + "github.com/coder/coder/v2/coderd/idpsync" "github.com/coder/coder/v2/codersdk" ) @@ -127,6 +129,7 @@ var auditableResourcesTypes = map[any]map[string]Action{ "created_by_avatar_url": ActionIgnore, "created_by_username": ActionIgnore, "archived": ActionTrack, + "source_example_id": ActionIgnore, // Never changes. }, &database.User{}: { "id": ActionTrack, @@ -164,6 +167,7 @@ var auditableResourcesTypes = map[any]map[string]Action{ "deleting_at": ActionTrack, "automatic_updates": ActionTrack, "favorite": ActionTrack, + "next_start_at": ActionTrack, }, &database.WorkspaceBuild{}: { "id": ActionIgnore, @@ -275,14 +279,32 @@ var auditableResourcesTypes = map[any]map[string]Action{ "icon": ActionTrack, }, &database.NotificationTemplate{}: { - "id": ActionIgnore, - "name": ActionTrack, - "title_template": ActionTrack, - "body_template": ActionTrack, - "actions": ActionTrack, - "group": ActionTrack, - "method": ActionTrack, - "kind": ActionTrack, + "id": ActionIgnore, + "name": ActionTrack, + "title_template": ActionTrack, + "body_template": ActionTrack, + "actions": ActionTrack, + "group": ActionTrack, + "method": ActionTrack, + "kind": ActionTrack, + "enabled_by_default": ActionTrack, + }, + &idpsync.OrganizationSyncSettings{}: { + "field": ActionTrack, + "mapping": ActionTrack, + "assign_default": ActionTrack, + }, + &idpsync.GroupSyncSettings{}: { + "field": ActionTrack, + "mapping": ActionTrack, + "regex_filter": ActionTrack, + "auto_create_missing_groups": ActionTrack, + // Configured in env vars + "legacy_group_name_mapping": ActionIgnore, + }, + &idpsync.RoleSyncSettings{}: { + "field": ActionTrack, + "mapping": ActionTrack, }, } @@ -333,6 +355,7 @@ func entry(v any, f map[string]Action) (string, map[string]Action) { // This field is explicitly ignored. continue } + jsonTag = strings.TrimSuffix(jsonTag, ",omitempty") if _, ok := fcpy[jsonTag]; !ok { _, _ = fmt.Fprintf(os.Stderr, "ERROR: Audit table entry missing action for field %q in type %q\nPlease update the auditable resource types in: %s\n", d.FieldType.Name, name, self()) //nolint:revive diff --git a/enterprise/cli/provisionerdaemons.go b/enterprise/cli/provisionerdaemons.go index 8d39723a269e3..690762dcc613b 100644 --- a/enterprise/cli/provisionerdaemons.go +++ b/enterprise/cli/provisionerdaemons.go @@ -1,20 +1,15 @@ package cli -import "github.com/coder/serpent" +import ( + "github.com/coder/serpent" +) func (r *RootCmd) provisionerDaemons() *serpent.Command { - cmd := &serpent.Command{ - Use: "provisioner", - Short: "Manage provisioner daemons", - Handler: func(inv *serpent.Invocation) error { - return inv.Command.HelpHandler(inv) - }, - Aliases: []string{"provisioners"}, - Children: []*serpent.Command{ - r.provisionerDaemonStart(), - r.provisionerKeys(), - }, - } + cmd := r.RootCmd.Provisioners() + cmd.AddSubcommands( + r.provisionerDaemonStart(), + r.provisionerKeys(), + ) return cmd } diff --git a/enterprise/cli/provisionerdaemonstart_slim.go b/enterprise/cli/provisionerdaemonstart_slim.go index aa399e9b9a46c..5e43393480c6d 100644 --- a/enterprise/cli/provisionerdaemonstart_slim.go +++ b/enterprise/cli/provisionerdaemonstart_slim.go @@ -15,7 +15,7 @@ func (r *RootCmd) provisionerDaemonStart() *serpent.Command { RawArgs: true, Hidden: true, Handler: func(inv *serpent.Invocation) error { - agplcli.SlimUnsupported(inv.Stderr, "provisionerd start") + agplcli.SlimUnsupported(inv.Stderr, "provisioner start") return nil }, } diff --git a/enterprise/cli/provisionerdaemonstart_test.go b/enterprise/cli/provisionerdaemonstart_test.go index 4829ccc38f23d..58603715f8184 100644 --- a/enterprise/cli/provisionerdaemonstart_test.go +++ b/enterprise/cli/provisionerdaemonstart_test.go @@ -440,7 +440,6 @@ func TestProvisionerDaemon_ProvisionerKey(t *testing.T) { clitest.Start(t, inv) pty.ExpectNoMatchBefore(ctx, "check entitlement", "starting provisioner daemon") pty.ExpectMatchContext(ctx, "matt-daemon") - var daemons []codersdk.ProvisionerDaemon require.Eventually(t, func() bool { daemons, err = client.OrganizationProvisionerDaemons(ctx, anotherOrg.ID, nil) diff --git a/enterprise/cli/provisionerkeys.go b/enterprise/cli/provisionerkeys.go index 99d8bd8acf9ab..f88a5ffe851e6 100644 --- a/enterprise/cli/provisionerkeys.go +++ b/enterprise/cli/provisionerkeys.go @@ -138,8 +138,8 @@ func (r *RootCmd) provisionerKeysList() *serpent.Command { }, } - cmd.Options = serpent.OptionSet{} orgContext.AttachOptions(cmd) + formatter.AttachOptions(&cmd.Options) return cmd } diff --git a/enterprise/cli/proxyserver.go b/enterprise/cli/proxyserver.go index 758c52a8ffcd7..9e10048146481 100644 --- a/enterprise/cli/proxyserver.go +++ b/enterprise/cli/proxyserver.go @@ -34,15 +34,15 @@ import ( "github.com/coder/serpent" ) -type closers []func() +type closerFuncs []func() -func (c closers) Close() { +func (c closerFuncs) Close() { for _, closeF := range c { closeF() } } -func (c *closers) Add(f func()) { +func (c *closerFuncs) Add(f func()) { *c = append(*c, f) } @@ -113,7 +113,8 @@ func (r *RootCmd) proxyServer() *serpent.Command { serpent.RequireNArgs(0), ), Handler: func(inv *serpent.Invocation) error { - var closers closers + var closers closerFuncs + defer closers.Close() // Main command context for managing cancellation of running // services. ctx, topCancel := context.WithCancel(inv.Context()) diff --git a/enterprise/cli/server_dbcrypt.go b/enterprise/cli/server_dbcrypt.go index 148303f85402d..72ac6cc6e82b0 100644 --- a/enterprise/cli/server_dbcrypt.go +++ b/enterprise/cli/server_dbcrypt.go @@ -98,7 +98,7 @@ func (*RootCmd) dbcryptRotateCmd() *serpent.Command { } } - sqlDB, err := cli.ConnectToPostgres(inv.Context(), logger, sqlDriver, flags.PostgresURL) + sqlDB, err := cli.ConnectToPostgres(inv.Context(), logger, sqlDriver, flags.PostgresURL, nil) if err != nil { return xerrors.Errorf("connect to postgres: %w", err) } @@ -163,7 +163,7 @@ func (*RootCmd) dbcryptDecryptCmd() *serpent.Command { } } - sqlDB, err := cli.ConnectToPostgres(inv.Context(), logger, sqlDriver, flags.PostgresURL) + sqlDB, err := cli.ConnectToPostgres(inv.Context(), logger, sqlDriver, flags.PostgresURL, nil) if err != nil { return xerrors.Errorf("connect to postgres: %w", err) } @@ -219,7 +219,7 @@ Are you sure you want to continue?` } } - sqlDB, err := cli.ConnectToPostgres(inv.Context(), logger, sqlDriver, flags.PostgresURL) + sqlDB, err := cli.ConnectToPostgres(inv.Context(), logger, sqlDriver, flags.PostgresURL, nil) if err != nil { return xerrors.Errorf("connect to postgres: %w", err) } diff --git a/enterprise/cli/testdata/coder_--help.golden b/enterprise/cli/testdata/coder_--help.golden index 9b3584a3e48b2..ca5d8c8c886ef 100644 --- a/enterprise/cli/testdata/coder_--help.golden +++ b/enterprise/cli/testdata/coder_--help.golden @@ -17,7 +17,7 @@ SUBCOMMANDS: features List Enterprise features groups Manage groups licenses Add, delete, and list licenses - provisioner Manage provisioner daemons + provisioner View and manage provisioner daemons and jobs server Start a Coder server GLOBAL OPTIONS: diff --git a/enterprise/cli/testdata/coder_provisioner_--help.golden b/enterprise/cli/testdata/coder_provisioner_--help.golden index e6cd69feeceac..79c82987f1311 100644 --- a/enterprise/cli/testdata/coder_provisioner_--help.golden +++ b/enterprise/cli/testdata/coder_provisioner_--help.golden @@ -3,12 +3,14 @@ coder v0.0.0-devel USAGE: coder provisioner - Manage provisioner daemons + View and manage provisioner daemons and jobs Aliases: provisioners SUBCOMMANDS: + jobs View and manage provisioner jobs keys Manage provisioner keys + list List provisioner daemons in an organization start Run a provisioner daemon ——— diff --git a/enterprise/cli/testdata/coder_provisioner_jobs_--help.golden b/enterprise/cli/testdata/coder_provisioner_jobs_--help.golden new file mode 100644 index 0000000000000..36600a06735a5 --- /dev/null +++ b/enterprise/cli/testdata/coder_provisioner_jobs_--help.golden @@ -0,0 +1,15 @@ +coder v0.0.0-devel + +USAGE: + coder provisioner jobs + + View and manage provisioner jobs + + Aliases: job + +SUBCOMMANDS: + cancel Cancel a provisioner job + list List provisioner jobs + +——— +Run `coder --help` for a list of global options. diff --git a/enterprise/cli/testdata/coder_provisioner_jobs_cancel_--help.golden b/enterprise/cli/testdata/coder_provisioner_jobs_cancel_--help.golden new file mode 100644 index 0000000000000..aed9cf20f9091 --- /dev/null +++ b/enterprise/cli/testdata/coder_provisioner_jobs_cancel_--help.golden @@ -0,0 +1,13 @@ +coder v0.0.0-devel + +USAGE: + coder provisioner jobs cancel [flags]
Field | Tracked |
---|
Field | Tracked |
---|