* docs: apache reverse proxy
* fixed to correctly pass WebSocket headers
* add a sample configuration file
* updating with suggestions
* Update coder.conf
* fix http to https redirection
* fix: upgrade http to https
* Update examples/web-server/apache/README.md
Co-authored-by: Ben Potter <me@bpmct.net>
* add other dns providers documentation link
---------
Co-authored-by: Ben Potter <me@bpmct.net>
Co-authored-by: Ben Potter <ben@coder.com>
* docs: Add nginx reverse-proxy example
This PR adds nginx reverse-proxy example to provision coder with tls certificate using letsencrypt certbot.
This will partially resolve#6086.
* change nginx example to to absolute path
* Update examples/web-server/nginx/README.md
Co-authored-by: Ben Potter <me@bpmct.net>
* Update examples/web-server/nginx/README.md
Co-authored-by: Ben Potter <me@bpmct.net>
* Update examples/web-server/nginx/README.md
Co-authored-by: Ben Potter <me@bpmct.net>
* Update examples/web-server/nginx/README.md
Co-authored-by: Ben Potter <me@bpmct.net>
* Update examples/web-server/nginx/README.md
Co-authored-by: Ben Potter <me@bpmct.net>
* Update examples/web-server/nginx/README.md
Co-authored-by: Ben Potter <me@bpmct.net>
* Update examples/web-server/nginx/README.md
Co-authored-by: Ben Potter <me@bpmct.net>
* Update examples/web-server/nginx/README.md
Co-authored-by: Ben Potter <me@bpmct.net>
* Update examples/web-server/nginx/README.md
Co-authored-by: Ben Potter <me@bpmct.net>
* Update examples/web-server/nginx/README.md
Co-authored-by: Ben Potter <me@bpmct.net>
* Update examples/web-server/nginx/README.md
Co-authored-by: Ben Potter <me@bpmct.net>
* Update examples/web-server/nginx/README.md
Co-authored-by: Ben Potter <me@bpmct.net>
* Update examples/web-server/nginx/README.md
Co-authored-by: Ben Potter <me@bpmct.net>
* Update examples/web-server/nginx/README.md
Co-authored-by: Ben Potter <me@bpmct.net>
* Update examples/web-server/nginx/README.md
Co-authored-by: Ben Potter <me@bpmct.net>
* refactor: replaced bullets with numbered lists
* remove the ambiguous ip addr.
* fixed a typo
* correctly handle the wildcard subdomain
* simplified after testing
* fmt: prettier formatting
* Adapt to the coder style guide
* fix: agent disconnection
* Update examples/web-server/nginx/README.md
Co-authored-by: Ben Potter <me@bpmct.net>
* Update docs/admin/configure.md
Co-authored-by: Ben Potter <me@bpmct.net>
* Update examples/web-server/nginx/README.md
Co-authored-by: Ben Potter <me@bpmct.net>
* updated with suggested changes
* updated with requested changes
* add reference to certbot docs for other dns providers
---------
Co-authored-by: Ben Potter <me@bpmct.net>
Updates templates examples and docs to pass the --method standalone argument
to code-server install script, and installs code-server under /tmp/code-server.
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
---------
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
This is part of a multi-step cleanup for the example templates.
The goal is to have a lot of templates here, and only embed
specific ones we feel are impactful during setup.
#5586 added the capability for install.sh to download and install Terraform automatically.
Using this now in the example Lima specification.
Also no longer hard-coding the instance name in favour of {{.Instance.Name}} in the output
that gets emitted upon successful instance provisioning.
* chore: lima: update ubuntu image version
* fix: lima: make docker socket usable by Lima user without sudo
* fix: lima: set access URL to host.lima.internal
* apply suggestion from PR
* chore: Improve project-wide prettier formatting and ignored files
* chore: `Run make fmt/prettier`
* Fix gitignore for `.vscode` folder so that ! works
* Add comment in `.prettierrc.yaml` to explain `.editorconfig`
* Remove scripts/apidocgen/markdown-template/README.md
* Use `yq` for processing prettierrc, update lib.sh dependency check
* Add `yq` to Dockerfile and Nix
The base ubuntu image lands the user as root, but the terraform tempalte
expected /home/coder to be used. This change adds a user with the same
name as the Coder users username and allows them to sudo.
Changes to terraform templates:
* Remove DNS (this can interfere with users running their own DNS
servers)
* Remove `lower()` restriction from hostnames so that it will show the
name set by the user, as-is (there is no restriction on upper case
letters in hostnames)
* Remove superfluous `trap` in entrypoints, this is already handled by
the init script
* Switch from `command` to `entrypoint` as the latter can support more
Docker images out-of-the-box
* feat: use app wildcards for apps if configured
* feat: relative_path -> subdomain
- rename relative_path -> subdomain when referring to apps
- migrate workspace_apps.relative_path to workspace_apps.subdomain
- upgrade coder/coder terraform module to 0.5.0
Download terraform binary directly instead of using Hashicorp APT
repo.
Workaround for https://github.com/hashicorp/terraform/issues/31826
Signed-off-by: Cian Johnston <cian@coder.com>
Co-authored-by: Ben Potter <ben@coder.com>
* add: ECS example template
* fix: empty main.tf
* cleanup
* rm: cluster & compute
* set CPU & memory vars
Co-authored-by: Ben Potter <ben@coder.com>
Co-authored-by: Ben Potter <ben@coder.com>
* add: code-server to template examples
* add: code-server to gcp templates
* add: code-server to gcp-linux template
* update: READMEs
* update: boot disk version
* update: google provider version
* fix: Reduce variables needed for Docker template
This should make initial setup a bit simpler!
* Fix for M2 Macbooks
PostgreSQL 13 doesn't support the M series architecture.
* Fix name <-> id swap
* Update Docker provider to remove host requirement
Co-authored-by: Kyle Carberry <kyle@air.local>
* make gcp-linux example template use a non-root user
* don't try to create user account if it already exists
* upgrade to debian-10 image since debian-9 is no longer available
* fix: update agent ID in example templates
* fix: update agent ID in dogfood template
* chore: update default agent ID in documentation
* fix: develop.sh: start FE after template is created; leave template dir around if template creation fails
* Pass workspace owner email address to provisioner
* Remove owner_email and owner_username fields from agent metadata
* Add Git environment variables to example templates
* Remove "owner_name" field from provisioner metadata, use username instead
* Remove Git configuration from most templates, add documentation
* Proofreading/typo fixes from @mafredri
* Update example templates to latest version of terraform-provider-coder
- make default template max TTL 24 hours (still less than 168)
- make default workspace autostop 2 hours unless specified otherwise
- add instance type selector to aws templates
This commit makes the following changes:
- Adds two variables docker_host and docker_arch to the example docker-code-server template
- Adds an example params.yaml to docker-code-server and updates the README.md to reference these parameters
- scripts/develop.sh will now attempt to create a template using docker-code-server with the appropriate parameters for the environment
- Updated Lima example to make use of the template parameters for docker-code-server
Additional drive-bys:
- webpack.dev.ts references CODER_HOST and not CODERV2_HOST; updated develop.sh accordingly
- develop.sh should now terminate child processes upon error.
- template init: add links to template docs
- examples: add URL field to examples, ensure that example fields are always non-empty
- cliui: bump wrap width to 80 from 58
This commit adds a lima example for Coder.
You can now run limactl start --name=coder ./examples/lima/coder.yaml and have a "prod-like" Coder instance up and running within a minute or so.
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
* feat: Add app support
This adds apps as a property to a workspace agent.
The resource is added to the Terraform provider here:
https://github.com/coder/terraform-provider-coder/pull/17
Apps will be opened in the dashboard or via the CLI
with `coder open <name>`. If `command` is specified, a
terminal will appear locally and in the web. If `target`
is specified, the browser will open to an exposed instance
of that target.
* Compare fields in apps test
* Update Terraform provider to use relative path
* Add some basic structure for routing
* chore: Remove interface from coderd and lift API surface
Abstracting coderd into an interface added misdirection because
the interface was never intended to be fulfilled outside of a single
implementation.
This lifts the abstraction, and attaches all handlers to a root struct
named `*coderd.API`.
* Add basic proxy logic
* Add proxying based on path
* Add app proxying for wildcards
* Add wsconncache
* fix: Race when writing to a closed pipe
This is such an intermittent race it's difficult to track,
but regardless this is an improvement to the code.
* fix: Race when writing to a closed pipe
This is such an intermittent race it's difficult to track,
but regardless this is an improvement to the code.
* fix: Race when writing to a closed pipe
This is such an intermittent race it's difficult to track,
but regardless this is an improvement to the code.
* fix: Race when writing to a closed pipe
This is such an intermittent race it's difficult to track,
but regardless this is an improvement to the code.
* Add workspace route proxying endpoint
- Makes the workspace conn cache concurrency-safe
- Reduces unnecessary open checks in `peer.Channel`
- Fixes the use of a temporary context when dialing a workspace agent
* Add embed errors
* chore: Refactor site to improve testing
It was difficult to develop this package due to the
embed build tag being mandatory on the tests. The logic
to test doesn't require any embedded files.
* Add test for error handler
* Remove unused access url
* Add RBAC tests
* Fix dial agent syntax
* Fix linting errors
* Fix gen
* Fix icon required
* Adjust migration number
* Fix proxy error status code
* Fix empty db lookup
* Changes all public-facing codersdk types to use a plain int64 (milliseconds) instead of time.Duration.
* Makes autostart_schedule a *string as it may not be present.
* Adds a utils/ptr package with some useful methods.
* fix: Update GIT_COMMITTER_NAME to use username
This was a mistake when adding the committer fields 🤦.
* fix: Use environment variables for agent authentication
Using files led to situations where running "coder server --dev" would
break `gitssh`. This is applicable in a production environment too. Users
should be able to log into another Coder deployment from their workspace.
Users can still set "CODER_URL" if they'd like with agent env vars!
This fixes the dependency tree by adding recursion. It
now finds indirect connections and associates it with
an agent.
An example is attached which surfaced this issue.
This enables a "kubernetes_pod" to attach multiple agents that
could be for multiple services. Each agent is required to have
a unique name, so SSH syntax is:
`coder ssh <workspace>.<agent>`
A resource can have zero agents too, they aren't required.
* add readme for samples
* add sample of importing from repo
* add aws-linux and aws-windows examples
* cleanup
* cleanup
* sign
* fix grammar and comments from feedback
* use descript workspace name
* use TF version
* Fix requested changes on README
Co-authored-by: Kyle Carberry <kyle@coder.com>
* feat: Add stage to build logs
This adds a stage property to logs, and refactors the job logs
cliui.
It also adds tests to the cliui for build logs!
* feat: Add stage to build logs
This adds a stage property to logs, and refactors the job logs
cliui.
It also adds tests to the cliui for build logs!
* feat: Add config-ssh and tests for resiliency
* Rename "Echo" test to "ImmediateExit"
* Fix Terraform resource agent association
* Fix logs post-cancel
* Fix select on Windows
* Remove terraform init logs
* Move timer into it's own loop
* Fix race condition in provisioner jobs
* Fix requested changes
This update exposes the workspace name and owner, and changes
authentication methods to be explicit. Implicit authentication
added unnecessary complexity and introduced inconsistency.
Thought it'd be helpful to show a bare-bones example of a project with a parameter, along with references to the Terraform docs so developers can learn about more interesting variable types (and ways to leverage them in expressions).
With this project, we can go through the `projects create` flow of setting a parameter:
<img width="677" alt="Screen Shot 2022-02-18 at 7 53 07 PM" src="https://user-images.githubusercontent.com/88213859/154785203-ab626268-0e51-48c3-b374-3d49d541042b.png">
I was thinking it might be nice to have some example projects (especially as we on-board new developers) to make it easy to create new projects.
This adds the most basic possible terraform module... just an output block. However, it's enough to run `coder projects create` and go through the whole lifecycle of creating a project and workspace (although, it's really boring since there are no parameters).