219 Commits

Author SHA1 Message Date
5285c12b9e chore: update terraform to 1.11.1 in nix image (#16880)
Followup PR to #16781, update the terraform version in our Nix devshell.

Additionally: 

1. Switches from DeterminateSystems/nix-installer-action to nixbuild/nix-quick-install-action -- quicker installer, reduces actions time from ~60 seconds to ~1 seconds.
2. Adds nix-community/cache-nix-action for better caching with garbage collection -- avoids unnecessary rebuilding on subsequent runs, reduces nix image build time from ~6 minutes to <4 minutes.
3. Adds nixpkgs-unstable input to use Terraform 1.11.1

Change-Id: I05d6dfd3f3cf1af48cf8a2d9e61b396bcd2b7191
Signed-off-by: Thomas Kosiewski <tk@coder.com>
2025-03-11 16:23:33 +01:00
09dd69a7e8 chore(dogfood): include multiple templates under dogfood/ (#16846)
* Renames `dogfood/contents` to `dogfood/coder`.
* Moves `coder-envbuilder` to `dogfood/coder-envbuilder`.
* Updates `dogfood/main.tf` to push `coder-envbuilder` template.
* Replaces hard-coded organization IDs with
`data.coderd_organization.default.id`.
2025-03-11 13:17:40 +00:00
9ded2cc7ec fix(flake.nix): synchronize playwright version in nix and package.json (#16715)
Ensure that the version of Playwright installed with the Nix flake is
equal to the one specified in `site/package.json.` -- This assertion
ensures that `pnpm playwright:install` will not attempt to download
newer browser versions not present in the Nix image, fixing the startup
script and reducing the startup time, as `pnpm playwright:install` will
not download or install anything.

We also pre-install the required Playwright web browsers in the dogfood
Dockerfile. This change prevents us from redownloading system
dependencies and Google Chrome each time a workspace starts.

Change-Id: I8cc78e842f7d0b1d2a90a4517a186a03636c5559
Signed-off-by: Thomas Kosiewski <tk@coder.com>

Signed-off-by: Thomas Kosiewski <tk@coder.com>
2025-03-11 13:49:03 +01:00
e817713dc0 revert: "chore: enable SBOM attestation for image builds" (#16868)
Reverts coder/coder#16852

The CI failed to create the multi-arch manifest.

https://github.com/coder/coder/actions/runs/13773079355/job/38516182819#step:18:341

I personally think we should move to a [multi-arch
Dockerfile](https://docs.docker.com/build/building/multi-platform/#cross-compilation)
instead of creating the manifest manually.
2025-03-10 19:55:03 +00:00
05ebece03a chore: enable SBOM attestation for image builds (#16852)
- Added SBOM (Software Bill of Materials) generation during Docker build
to enhance traceability. Refer to Docker documentation on SBOM:
https://docs.docker.com/build/metadata/attestations/sbom/
- Updated Docker build scripts to use BuildKit for provenance and SBOM
support: https://docs.docker.com/build/metadata/attestations/
- Configured Docker daemon in dogfood image to support the Containerd
snapshotter feature to improve performance:
https://docs.docker.com/engine/storage/containerd/

> [!Important]
> We also need to enable `containerd` on depot runners.
> <img width="587" alt="image"
src="https://github.com/user-attachments/assets/1d7f87c7-fdcc-462a-babe-87ac6486ad09"
/>



## Testing

- Tested locally with ` docker buildx build --sbom=true --output
type=local,dest=out -f Dockerfile .` to verify that an SBOM file is
generated.
- Tested in
[CI](https://github.com/coder/coder/actions/runs/13731162662/job/38408790980?pr=16852#step:17:1)
to ensure the image builds without any errors.


Also closes coder/internal#88
2025-03-11 00:24:14 +05:00
54745b1d3f chore(dogfood): update Zed URI to use Coder Desktop provided DNS entries (#16847) 2025-03-07 22:27:49 +05:00
10f1e0b39a chore: update terraform to 1.11.0 (#16781) 2025-03-04 14:28:41 -05:00
546d915d32 chore: install libgbm-dev to allow headless chrome e2e tests to run (#16695)
Without this lib, Chrome can’t set up its offscreen rendering buffers -
apparently.

I've validated this manually in my workspace.

Signed-off-by: Danny Kopping <danny@coder.com>
2025-02-25 12:33:17 +00:00
dfa33b11d9 chore: run make clean on workspace startup (#16660) 2025-02-24 10:43:03 -07:00
10326b458c chore(dogfood): add validation on OOM OOD parameters (#16636) 2025-02-24 11:03:05 -06:00
52cc0ce523 chore: add resources_monitoring to dogfood (#16600)
As we recently merged OOM & OOD Notifications - we can now enable it in
the dogfood instance and workspaces so everyone can use it and help
testing it.
2025-02-19 09:11:53 +01:00
a777c2694e chore: upgrade terraform to 1.10.5 (#16519)
- Updates `terraform` to
[v1.10.5](https://github.com/hashicorp/terraform/blob/v1.10.5/CHANGELOG.md#1105-january-22-2025)
- Updates provider to >=2.0.0 in provider testdata fixtures
- Fixes provider to required release version for resource monitors
- Fixes missing leading / in volumes in resource monitor tests
---------

Co-authored-by: Cian Johnston <cian@coder.com>
2025-02-18 11:45:22 +00:00
ec50a35c08 chore(cli): disable agent devcontainer integration by default (#16531)
Until we have more of the building blocks in place, disable the agent
devcontainer integration by default. We'll enable it by default at a
later date.
2025-02-12 10:47:25 +00:00
6b3e14f3fa fix(dogfood/contents): fix resource metadata under nix (#16349)
Co-authored-by: Thomas Kosiewski <tk@coder.com>
2025-02-04 16:10:10 +01:00
6e2dc6ffd2 fix(flake.nix): include dev buildInputs in dogfood nix image (#16325) 2025-01-30 17:47:19 +01:00
1336925c9f feat(flake.nix): switch dogfood dev image to buildNixShellImage from dockerTools (#16223)
Replace Depot build action with Nix for Nix dogfood image builds

The dogfood Nix image is now built using Nix's native container tooling instead of Depot. This change:

- Adds Nix setup steps to the GitHub Actions workflow
- Removes the Dockerfile.nix in favor of a Nix-native container build
- Updates the flake.nix to support building Docker images
- Introduces a hash file to track Nix-related changes
- Updates the vendorHash for Go dependencies

Change-Id: I4e011fe3a19d9a1375fbfd5223c910e59d66a5d9
Signed-off-by: Thomas Kosiewski <tk@coder.com>
2025-01-28 16:38:37 +01:00
d2ff42560f chore(dogfood): dogfood zed editor (#16255)
This requires running `coder config-ssh`.

I intentially kept it as a module so that we can port it to
`coder/`modules` easily when needed.
2025-01-24 15:17:18 +00:00
5cc7c439f3 chore(dogfood): delete lazygit and doctl archives after installing (#16184) 2025-01-18 09:08:53 +10:00
04a48b8327 chore(dogfood): add doctl (#16136) 2025-01-18 06:15:05 +10:00
e7f108145a fix(flake.nix): install locales on linux host devShells (#16120)
Change-Id: I22dba63d317b41749c807a55e15278006cdcecad
Signed-off-by: Thomas Kosiewski <tk@coder.com>

- Adds neovim and fzf to development tools, removes sapling, and fixes locale issues on Linux systems. 
- Updates Dockerfile.nix syntax to use uppercase `AS` to remove warnings. 
- Refactored conditional logic for strace inclusion using `lib.optional`.
2025-01-15 17:14:55 +01:00
0ecd38c434 chore: remove Tokyo server from dogfood (#16146) 2025-01-15 13:33:48 +00:00
5a89e89d7e chore(dogfood): unminimize ubuntu image to include man pages (#16133) 2025-01-14 19:10:18 +02:00
f4994ca783 chore(dogfood): add vscode-web module (#16081) 2025-01-09 08:03:05 +00:00
94f5d52fdc chore: adopt markdownlint and markdown-table-formatter for *.md (#15831)
Co-authored-by: Edward Angert <EdwardAngert@users.noreply.github.com>
2025-01-03 13:12:59 +00:00
7697005663 chore(dogfood): prevent downloading modules on workspace stop (#15922) 2024-12-19 12:46:41 +05:00
f16c80916e chore: make coder dogfood use dev.registry.coder.com (#15889)
This PR makes the dogfood template use `dev.registry.coder.com` for its
terraform module registry. I think this should be the state going
forward so that every new deployment of the registry gets a small amount
of dogfooding before going live.
2024-12-16 16:02:52 -06:00
89479cc843 fix(dogfood): re-enable process priority management for dogfood (#15765)
- The dogfood-related bugs with this feature are (hopefully) resolved.

This reverts commit 19ec6af2ad92049c029b7a3751bdd1b2782f95fb.
2024-12-16 21:05:28 +02:00
edb0cb155f chore: remove Johannesburg server from dogfood (#15842) 2024-12-12 06:44:51 +00:00
33d67b1f4e chore: add Cape Town dogfood server (#15811) 2024-12-10 05:53:02 +00:00
0ea76637af fix(dogfood): downgrade containerd.io to work around containerd DinD issue (#15723)
ref: https://github.com/nestybox/sysbox/issues/879
2024-12-02 22:51:49 +00:00
19ec6af2ad fix(dogfood): revert enabling process priority management for dogfood (#15713)
This reverts commit b08238c8dbcacb129326b4781dacecbac62a64cb.
2024-12-02 13:22:10 +00:00
694b4e0d3e feat(dogfood/contents): set coder_workspace_tags in dogfood template (#15653)
* Sets `coder_workspace_tags` on our dogfood template to target new tagged provisioner deployment added in coder/dogfood#103
2024-12-02 09:17:40 +00:00
b08238c8db chore: enable process priority management for dogfood (#15674) 2024-11-27 20:43:56 +02:00
6cc1067319 chore: add Tokyo server to dogfood template (#15479) 2024-11-11 23:56:06 +00:00
7b33ab0dcf fix: set dogfood go version to match go.mod (#15446)
Updates our dogfood image to use the same go version as `go.mod`. This allows us to skip downloading the new go version on builds.
2024-11-08 13:51:04 +04:00
065263a852 chore: update dependabot config and pin Docker images (#15194) 2024-11-04 11:01:54 +05:00
097fdaffe2 chore: add quota to source-controlled template (#15271) 2024-10-29 16:31:46 +00:00
074faec7d7 chore: update Terraform to 1.9.8 (#15256) 2024-10-28 15:24:57 -05:00
a77c9079af fix: pin shfmt to 3.7.0 in dogfood to match CI (#15103)
Pins our dogfood Dockerfile to match CI version of `shfmt`
2024-10-16 14:17:27 +04:00
baf8e30458 chore(dogfood): dogfood latest version of modules (#14918)
This will help us catch bugs before our users.
2024-10-01 23:35:36 +05:00
35017822d5 chore(dogfood): add cursor IDE (#14748) 2024-09-20 23:19:28 +05:00
13e5c51c30 chore(dogfood): optimize dockerfile for envbuilder cache probing (#14497) 2024-08-30 17:54:19 +03:00
0afff43f9d chore: remove dogfood import block (#14449) 2024-08-27 06:28:25 +00:00
d9f419308a chore(dogfood): use remote tf state (#14363) 2024-08-21 12:46:28 +10:00
cba6e93176 chore: update docs links (#14221) 2024-08-17 11:51:13 +00:00
979430d635 chore: manage dogfood template using coderd provider (#14321) 2024-08-17 02:33:32 +10:00
95a7c0c4f0 chore: use tabs for prettier and biome (#14283) 2024-08-15 14:53:53 -06:00
a3c45861bf chore: upgrade nodejs tooling (#14134) 2024-08-02 19:56:12 -03:00
36454aa81b fix(dogfood/Dockerfile): create /etc/suoders.d/nopasswd instead of COPY (#13900) 2024-07-15 23:19:23 +01:00
17626b8dd1 Revert "fix(dogfood/Dockerfile): change ownership of /etc/sudoers.d to root (#13793)" (#13898)
This reverts commit da8911426bcf536f9f86d6554d4179526f829739.
2024-07-15 21:08:48 +00:00