Skip to content

Improve getting started #4346

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed

Improve getting started #4346

wants to merge 4 commits into from

Conversation

ericpaulsen
Copy link
Member

@ericpaulsen ericpaulsen commented Oct 3, 2022

this PR addresses step 1 of #4201, and separates example templates from quickstarts.

the quickstart directory houses subdirectories for each type of compute, containers and virtual machines. within these subdirs are the example templates for each cloud/infra.

with the help of @Emyrk, the examples.go test is now more generic and lists all templates in the quickstart subdirs:

quickstart/containers/aws-ecs-container
quickstart/containers/docker
quickstart/containers/kubernetes
quickstart/virtual-machines/aws-linux
quickstart/virtual-machines/aws-windows
quickstart/virtual-machines/azure-linux
quickstart/virtual-machines/do-linux
quickstart/virtual-machines/gcp-linux
quickstart/virtual-machines/gcp-windows

alternatively the examples directory is intended for more specific, bespoke template examples. we can extend examples_test.go to include the examples dir if need be.

i removed the bare template since it was not usable out-of-the-box, and the gcp-vm-container, docker-code-server templates because they were duplicates of existing templates. feedback appreciated.

Coder templates init

New templates listed when running templates init. Used to list 15 templates, now lists 9

./coder templates init                                                  9s 05:47:00 PM
A template defines infrastructure as code to be provisioned for individual      
developer workspaces. Select an example to be copied to the active directory:   
                                                                                
Type to search

  > Develop in an ECS-hosted container
      Get started with Linux development on AWS ECS.                            
      https://github.com/coder/coder/tree/main/examplesaws-ecs-container

    Develop in Docker
      Run workspaces on a Docker host using registry images                     
      https://github.com/coder/coder/tree/main/examplesdocker

    Develop in Kubernetes
      Get started with Kubernetes development.                                  
      https://github.com/coder/coder/tree/main/exampleskubernetes

    Develop in Linux on AWS EC2
      Get started with Linux development on AWS EC2.                            
      https://github.com/coder/coder/tree/main/examplesaws-linux

    Develop in Windows on AWS
      Get started with Windows development on AWS.                              
      https://github.com/coder/coder/tree/main/examplesaws-windows

    Develop in Linux on Azure
      Get started with Linux development on Microsoft Azure.                    
      https://github.com/coder/coder/tree/main/examplesazure-linux

    Develop in Linux on a Digital Ocean Droplet
      Get started with Linux development on a Digital Ocean Droplet.            
      https://github.com/coder/coder/tree/main/examplesdo-linux
    Develop in Linux on Google Cloud

      Get started with Linux development on Google Cloud.                       
      https://github.com/coder/coder/tree/main/examplesgcp-linux

    Develop in Windows on Google Cloud
      Get started with Windows development on Google Cloud.                     
      https://github.com/coder/coder/tree/main/examplesgcp-windows

Comment on lines +39 to +41
// WalkForExamples will walk recursively through the examples directory and call
// exampleDirectory() on each directory that contains a main.tf file.
func WalkForExamples(files fs.FS, rootDir string, exampleDirectory func(path string)) error {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It now will follow nested directories until it hits a main.tf file. So we can create w/e structure we want for these files.

@github-actions
Copy link

This Pull Request is becoming stale. In order to minimize WIP, prevent merge conflicts and keep the tracker readable, I'm going close to this PR in 3 days if there isn't more activity.

@github-actions github-actions bot added the stale This issue is like stale bread. label Oct 11, 2022
@github-actions github-actions bot closed this Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale This issue is like stale bread.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants