Engineering
February 4th, 2022

Secure developer infrastructure with Teleport and Coder

author avatar
Ben Potter
Developer Advocate

SHARE

Organizations adopting DevOps continue to benefit from giving developers on-demand access to resources instead of relying on manual systems and ticket queues. In this post, we’ll discuss how Coder and Teleport work together to empower software teams.

First, let’s define these tools:

Coder allows developers to provision remote workspaces on their organization’s infrastructure. Remote workspaces speed up onboarding time, builds, tests, while still giving developers the flexibility they’re used to with local machines.

Teleport gives developers access to cloud infrastructure including Kubernetes clusters, databases, SSH servers, windows servers, and web applications in an easy and secure fashion.

How it works: automating development workflows

1) Engineers can spin up Coder workspaces with all the tools they need, defined by a container image (this can include the teleport CLI).

2) With the Teleport CLI (tsh), it’s simple to connect a Coder workspace to other infrastructure in your clouds, such as a remote Kubernetes cluster, database, SSH servers, or a specific application. Certificates can be short-lived (for debugging) or long-lived (leverage an internal API).

Try it yourself

Prerequisites:

To use Teleport inside a Coder workspace, you need to create a custom image. You can also set environment variables to pre-configure Teleport.

Step 1) Let’s create the Dockerfile:

FROM codercom/enterprise-base:ubuntu

USER root

# Add Teleport CLI (tsh, tctl)

RUN curl https://deb.releases.teleport.dev/teleport-pubkey.asc | sudo apt-key add - && \
    add-apt-repository 'deb https://deb.releases.teleport.dev/ stable main' && \
    apt-get update && \
    apt install teleport

ENV TELEPORT_PROXY=https://teleport.mycompany.com

# Add any other tools you’ll need for development here (e.g OpenJDK-11, TypeScript, kubectl)

USER coder

Step 2) Build and push the image

# this will use Docker Hub by default
docker build . -t username/coder-image
docker push username/coder-image

Step 3) Create a new Coder workspace with your image. You can connect to the workspace from a web-based or desktop IDE.

RELATED ARTICLES

Enjoy what you read?

Subscribe to our newsletter

By signing up, you agree to our Privacy Policy and Terms of service.