Skip to content

Instantly share code, notes, and snippets.

@benarent
Last active September 11, 2024 00:49
Show Gist options
  • Save benarent/6df318e21f6bf2cb7c6c0aa804451cbd to your computer and use it in GitHub Desktop.
Save benarent/6df318e21f6bf2cb7c6c0aa804451cbd to your computer and use it in GitHub Desktop.

Teleport AI - QuickStart Task Challenge.
https://lu.ma/ozt7jtq5

Introduction

Teleport is an open source Access Platform that provides secure access to share web-apps, Jupyter notebooks, and APIs via Teleport VNET. This guide will help you set up Teleport to share your demo app or endpoint. Prerequisites

  • A computer running macOS or Linux
  • Admin access to your machine
  • Basic familiarity with command-line interfaces
  • A Teleport account (sign up at https://goteleport.com/hacknight/)

Why?
You’ll often have a cool demo or early preview of a project that you want to share internally or with a small group of people. Teleport makes it easy to do this, by providing a secure zero-trust method of sharing and connecting to apps.

How does it work?
How Teleport Works

For the hack night, we’ll have a shared Teleport Account. You can run the App Agent on a VM or on your Mac or Linux Computer.

Quickstart Guide

Login to Teleport

Signup for Teleport

tsh login --proxy=REPLACEME.teleport.sh [email protected]

Download Teleport onto your machine/VM

Download Teleport for Mac if you want to share an app on a local machine.

Download Teleport For Linux if you want to share an app on a Linux machine.

# Install Script of Linux 
curl https://cdn.teleport.dev/install-v16.2.0.sh | bash -s 16.2.0 oss

Teleport Application Access

Option 1: Enroll a new resource

Teleport has a UI wizard that makes it easy to enroll apps.

https://[account-subdomain].teleport.sh/web/discover

Add Apps Via Discover

Option 2: Manually

Step 1 - Download Teleport package to your computer

Step 2 - Login to Teleport

Step 3 - Generate a join token

tctl tokens add --type=app

Step 4 - Configure your teleport agent

Download Teleport onto your machine or a VM,

APP_NAME="HackNight"
APP_URI="http://localhost:3000"
TOKEN=REPLACE_ME

sudo teleport configure \
  --proxy=hacknight.teleport.sh \
  --roles=app \
  --app-name="$APP_NAME" \
  --app-uri="$APP_URI" \
  --token $TOKEN \
  --output="/etc/teleport.yaml"

Step 5 - Start the Teleport agent with the generated configuration file

teleport start --config="/etc/teleport.yaml"

Teleport TCP/API Endpoints

Access TCP Endpoints

To access and share TCP Endpoints, You can leverage Teleport VNET https://goteleport.com/docs/enroll-resources/application-access/guides/vnet/

APP_NAME="HackNight"
APP_URI="tcp://localhost:8080"
TOKEN="replace_me"

sudo teleport configure \
  --proxy=hacknight.teleport.sh \ 
  --roles=app \
  --app-name="$APP_NAME" \
  --app-uri="$APP_URI" \
  --token $TOKEN \
  --output="/etc/teleport.yaml"

Teleport VNET

View Apps in Teleport

Applications can now be accessed via the browser or via https://REPLACEME.teleport.sh/

Apps in VNET

Optional: Add a Server or Kubernetes Cluster to Teleport

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment