You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a template admin, I want to subject my whole template to version control to simplify change management. If/when #2958 is implemented, this becomes even more true. Let's also remember that our product is built around an IaaC tool, so our users probably prefer this method of configuration.
As a template admin, I sometimes forget what I've named my template. If I thoughtlessly run coder templates update and my directory happens to correspond with the wrong template I just disrupted developers. In a world without #2958, it's possible that the last template doesn't exist anymore and users are offline for days while it is reconstructed.
As a template admin, I forget that there are distinct coder templates update and coder templates edit commands. I'm also confused that coder templates update is the compliment to coder templates pull. I expect push/pull like git, or doors.
Proposal
coder templates edit and coder templates update are unified as coder templates push.
All the configuration in edit is now in a template.yml file that looks like:
version: 1
name: dogfood
description: "Our standard dogfood image"
schedule:
max_ttl: 12h
min_autostart_interval: 24h
# Some future knobs
deprecated_for: "dogfood-ts"
allow:
- all
deny:
- dean@coder.com
Why not HCL?
Our provisioner layer is abstract, and this template config sits above provisioning instead of within it. For example, we may have Docker, Pulumi and Kubernetes provisioners in the near future.
A reason to keep the commands separate is because we don't want to prompt for metadata updates on template update, and we don't want to require that users be in a template directory to update the metadata.
As of a few days ago we at least confirm on template update. I certainly wouldn't mind if we also required the name as an argument instead of inferring it.
I see the use case of wanting to update the metadata but not touch the template meat. I would still put it under the same command for discoverability though. Perhaps a template push --config-only.
This is certainly a necessary feature for large teams who want security and extensibility for their templates.
After a chat with @kylecarbs and @BrunoQuaresma, we decided to expose some basic features (icon, max TTL, description) via the dashboard/CLI for increased interactivity. If a template.yaml is present, this will "grey out" these settings, as we do in Coder Classic:
I think we should hold off on this feature until more user feedback. While theoretically good, bifurcating the product experience seems like unnecessary complexity.
Activity
ketang commentedon Jul 14, 2022
A reason to keep the commands separate is because we don't want to prompt for metadata updates on template update, and we don't want to require that users be in a template directory to update the metadata.
As of a few days ago we at least confirm on template update. I certainly wouldn't mind if we also required the name as an argument instead of inferring it.
ammario commentedon Jul 14, 2022
I see the use case of wanting to update the metadata but not touch the template meat. I would still put it under the same command for discoverability though. Perhaps a
template push --config-only.ketang commentedon Jul 14, 2022
Yeah that'll work, I think.
[-]RFC: Template Config as Code[/-][+]RFC: template.yaml[/+]bpmct commentedon Aug 17, 2022
This is certainly a necessary feature for large teams who want security and extensibility for their templates.
After a chat with @kylecarbs and @BrunoQuaresma, we decided to expose some basic features (icon, max TTL, description) via the dashboard/CLI for increased interactivity. If a template.yaml is present, this will "grey out" these settings, as we do in Coder Classic:
ammario commentedon Aug 17, 2022
I think we should hold off on this feature until more user feedback. While theoretically good, bifurcating the product experience seems like unnecessary complexity.
kylecarbs commentedon Aug 24, 2022
I'm closing for now re the comment above.