Skip to content

split examples into examples and quickstart #4634

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 8 commits into from

Conversation

bpmct
Copy link
Member

@bpmct bpmct commented Oct 18, 2022

Reopening stale PR from @ericpaulsen. Original contents:

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

@github-actions
Copy link

github-actions bot commented Oct 18, 2022

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@bpmct bpmct force-pushed the improve-getting-started branch from b54b127 to bea6c19 Compare October 18, 2022 21:40
Copy link
Member Author

@bpmct bpmct left a comment

Choose a reason for hiding this comment

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

@ericpaulsen - I like the new structure. I also see some references of examples still in the code which makes things a bit confusing IMO. Additionally, I made a few changes

392b23f - move lima example into docs. it is not a template. i also moved scripts to the root
bea6c19 and 9c526de use the proper dir for coder templates init in makefile

I may have incorrectly understood #4201, but for coder templates init do we intend on showing both quickstarts AND examples? cc @kylecarbs? I assumed we just wanted to display the former.

cc @kylecarbs to review as well

@@ -27,7 +27,7 @@ import (
"github.com/coder/coder/coderd/userpassword"
"github.com/coder/coder/coderd/util/slice"
"github.com/coder/coder/codersdk"
"github.com/coder/coder/examples"
examples "github.com/coder/coder/templates"
Copy link
Member Author

Choose a reason for hiding this comment

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

@ericpaulsen Shouldn't this specifically be the quickstarts folder since this is what we want to show in coder templates init?

Copy link
Member

@ericpaulsen ericpaulsen Oct 19, 2022

Choose a reason for hiding this comment

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

@bpmct yeah, quickstarts should be referenced when running coder templates init.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we need to change this to only reference the quickstarts since it's used for the autoimport behavior. I might be missing something though?

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess, I'm asking if we should change it to this

quickstart "github.com/coder/coder/templates/quickstart"

@bpmct bpmct requested a review from kylecarbs October 18, 2022 21:48
@ericpaulsen ericpaulsen self-requested a review October 19, 2022 02:37
@bpmct bpmct changed the title Improve getting started split examples into examples and quickstart Oct 19, 2022
@Emyrk
Copy link
Member

Emyrk commented Oct 24, 2022

I have read the CLA Document and I hereby sign the CLA

@ericpaulsen
Copy link
Member

@bpmct anything pending on this PR, or are we good to merge (after conflict resolution)?

@bpmct
Copy link
Member Author

bpmct commented Oct 26, 2022

@bpmct anything pending on this PR, or are we good to merge (after conflict resolution)?

Let's wait on @kylecarbs to review.

@bpmct
Copy link
Member Author

bpmct commented Oct 26, 2022

@ericpaulsen I think we're super close, but some more work has to be done. For example, examples.test.go expects docker-image-builds will no longer exist if we only display quickstarts. Additionally, should we rename examples.go to quickstarts.go?

@ericpaulsen
Copy link
Member

@ericpaulsen I think we're super close, but some more work has to be done. For example, examples.test.go expects docker-image-builds will no longer exist if we only display quickstarts. Additionally, should we rename examples.go to quickstarts.go?

@bpmct I think it's fine that docker-image-builds will no longer exist, because we already have a docker quickstart that will be pulled in by coder templates init.

@bpmct
Copy link
Member Author

bpmct commented Oct 26, 2022

Ah, yeah. That's correct. I was wrong

@github-actions
Copy link

github-actions bot commented Nov 3, 2022

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 Nov 3, 2022
@github-actions github-actions bot closed this Nov 6, 2022
@Emyrk Emyrk deleted the improve-getting-started branch February 3, 2023 19:00
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.

3 participants