Skip to content

feat: Add aws-windows and aws-linux examples #730

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

Merged
merged 11 commits into from
Mar 31, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix grammar and comments from feedback
  • Loading branch information
bpmct committed Mar 30, 2022
commit 43b5b2e2d61e73554c00c8b680fed7006e659ffe
26 changes: 5 additions & 21 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,19 @@
# Project examples
# Examples

| Project name | OS, Type | Features | Status |
| ---------------------------- | ----------------------------- | ------------------------------------------------------- | ------- |
| [gcp-windows](./gcp-windows) | VM, Windows Server 2022 | Regions, instance type | Basic |
| [gcp-linux](./gcp-linux) | VM, Ubuntu 20.04 | Regions, instance type | Basic |
| [aws-linux](./aws-linux) | VM, Ubuntu 20.04 | Regions, instance type | Basic |
| [aws-windows](./aws-windows) | VM, Windows Server 2019 | Regions, instance type | Basic |
| [aws-macos](./aws-macos) | Mac Mini, OSX 12 Monterey | Regions, instance type | WIP |
| kubernetes | Container/pod spec, any linux | Custom image, registry, provisioning ratio, PVC support | Planned |
Examples are available in our CLI with `coder projects init`

## How to use
> Submit [an issue](https://github.com/coder/coder/issues/new) if you experience issues with an example!

These are embedded as examples when you run `coder projects init`. Optionally modify the terraform and use `coder projects create` or `coder projects update`, if you have already imported the project.
## Getting Sarted

You can still use projects that are not embedded in your version of Coder:
Manually clone to create a project from any example in this repo:

```sh
git clone https://github.com/coder/coder
cd examples/aws-macos
coder projects create
```

## Statuses

- Planned
- WIP
- Basic (proof of concept)
- Beta
- Stable
- Broken/unsupported

## Requests

Submit [an issue](https://github.com/coder/coder/issues/new) or pull request to request features or more examples.
11 changes: 1 addition & 10 deletions examples/aws-linux/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
---
name: Develop in Linux on AWS
description: Get started with Linux development on AWS (EC2).
description: Get started with Linux development on AWS.
tags: [cloud, aws]
---

## Supported features

- Persistent storage
- Start/stop

## User preferences

- Region
3 changes: 1 addition & 2 deletions examples/aws-linux/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ resource "coder_agent" "dev" {

locals {

# with AWS, we are using user data
# to start/stop instances with Terraform
# User data is used to stop/start AWS instances. See:
# https://github.com/hashicorp/terraform-provider-aws/issues/22

user_data_start = <<EOT
Expand Down
11 changes: 1 addition & 10 deletions examples/aws-windows/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
---
name: Develop in Windows on AWS
description: Get started with Windows development on AWS (EC2).
description: Get started with Windows development on AWS.
tags: [cloud, aws]
---

## Supported features

- Persistent storage
- Start/stop

## User preferences

- Region
4 changes: 1 addition & 3 deletions examples/aws-windows/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ resource "coder_agent" "dev" {

locals {

# with AWS, we are using user data
# to start/stop instances with Terraform
# User data is used to stop/start AWS instances. See:
# https://github.com/hashicorp/terraform-provider-aws/issues/22

user_data_start = <<EOT
Expand All @@ -91,7 +90,6 @@ EOT
}

resource "aws_instance" "dev" {
# count = data.coder_workspace.me.transition == "start" ? 1 : 0
ami = data.aws_ami.windows.id
availability_zone = "${var.region}a"
instance_type = "t3.micro"
Expand Down