Gravitational Teleport docker-compose组件独立部署运行
Gravitational Teleport 可以作为堡垒机进行使用,上次写过一个all in one 的,这次参考官方
的配置运行一个proxy node auth 分离的应用
备注: 基于docker-compose 运行
环境准备
- docker-compose 文件
version: '2'
services:
two-auth:
mem_limit: 300m
image: quay.io/gravitational/teleport:3.1.1
container_name: two-auth
volumes:
- ./data/two/auth:/var/lib/teleport
- ./two-auth.yaml:/etc/teleport/teleport.yaml
networks:
teleport:
ipv4_address: 172.10.1.2
two-proxy:
mem_limit: 300m
image: quay.io/gravitational/teleport:3.1.1
container_name: two-proxy
ports:
- "5080:5080"
- "5023:5023"
volumes:
- ./data/two/proxy:/var/lib/teleport
- ./two-proxy.yaml:/etc/teleport/teleport.yaml
networks:
teleport:
ipv4_address: 172.10.1.3
two-node:
mem_limit: 300m
image: quay.io/gravitational/teleport:3.1.1
container_name: two-node
volumes:
- ./data/two/node:/var/lib/teleport
- ./two-node.yaml:/etc/teleport/teleport.yaml
networks:
teleport:
ipv4_address: 172.10.1.4
networks:
teleport:
ipam:
driver: default
config:
- subnet: 172.10.1.0/16
ip_range: 172.10.1.0/24
gateway: 172.10.1.254
volumes:
certs:
- auth 配置文件
two-auth.yaml: 同时运行在node 角色
# Auth server for cluster "two". Also runs "node" role
teleport:
nodename: two-auth
log:
output: /var/lib/teleport/teleport.log
severity: INFO
data_dir: /var/lib/teleport
storage:
path: /var/lib/teleport/backend
type: dir
auth_service:
enabled: yes
authentication:
type: local
second_factor: off
cluster_name: two
tokens:
- "node,auth,proxy:foo"
listen_addr: 172.10.1.2:3025
ssh_service:
enabled: yes
labels:
cluster: two
role: auth+node
commands:
- name: kernel
command: [/bin/uname, -r]
period: 5m
proxy_service:
enabled: no
- proxy 配置文件
two-proxy.yaml 文件:同时运行node 角色,注意指定了auth 服务同时使用静态token 进行
加入
# Proxy server for cluster "two". Also runs "node" role
teleport:
nodename: two-proxy
auth_servers: ["two-auth"]
auth_token: foo
log:
output: /var/lib/teleport/teleport.log
severity: INFO
data_dir: /var/lib/teleport
storage:
path: /var/lib/teleport/backend
type: dir
auth_service:
enabled: no
ssh_service:
enabled: yes
labels:
cluster: two
role: proxy+node
commands:
- name: kernel
command: [/bin/uname, -r]
period: 5m
proxy_service:
enabled: yes
listen_addr: 0.0.0.0:5023
web_listen_addr: 0.0.0.0:5080
- node 配置
two-node.yaml,同时使用静态token 进行加入
# Dumb SSH node for cluster "two"
teleport:
nodename: node-on-second-cluster
auth_servers: ["two-auth"]
auth_token: foo
advertise_ip: 172.10.1.4
log:
output: /var/lib/teleport/teleport.log
severity: INFO
data_dir: /var/lib/teleport
storage:
path: /var/lib/teleport/backend
type: dir
ssh_service:
enabled: yes
labels:
cluster: two
role: dumb_node
proxy_service:
enabled: no
auth_service:
enabled: no
运行&&测试
- 运行
docker-compose up -d
- 添加用户
auth server inside 容器
tctl -c /etc/teleport/teleport.yaml users add root
Signup token has been created and is valid for 1 hours. Share this URL with the user:
https://localhost:3080/web/newuser/54ac1593143d9a44a497c1346f9e0fc9
NOTE: Make sure two-proxy:3080 points at a Teleport proxy which users can access.


- 访问连接

- 历史回放功能


参考资料
https://gravitational.com/teleport/docs/quickstart/
Gravitational Teleport docker-compose组件独立部署运行的更多相关文章
- Docker Compose 项目打包部署
Docker Compose 前面我们使用 Docker 的时候,定义 Dockerfile 文件,然后使用 docker build.docker run 等命令操作容器.然而微服务架构的应用系统一 ...
- Docker Compose编排工具部署lnmp实践及理论(详细)
目录 一.理论概述 编排 部署 Compose原理 二.使用docker compose 部署lnmp 三.测试 四.总结 一.理论概述 Docker Compose是一个定义及运行多个Docker容 ...
- maven maven-war-plugin 解决java war项目间的依赖(两个war都可独立部署运行,maven 3.2.x亲测)
最近整理基础框架,有些项目不想分布式,所以基础框架必须同时可独立部署,也可直接被作为依赖和业务工程打到一起,记录下解决war项目依赖的要点,一开始用warpath,结果报找不到,有些帖子还是17年的, ...
- surging+CentOS7+docker+rancher2.0 菜鸟部署运行笔记
https://blog.csdn.net/q5934/article/details/82661250 目录 准备工作 开始干活 1.从github 获取surging源码 2.发布Surging. ...
- Docker Compose 部署前后端分离应用
部署前后端分离应用 容器化 Abp 应用 关于 Abp 应用的容器化,其实和普通的 ASP.NET Core 应用差不多,大家可以参考我此前的文章. 唯一需要注意的是:因为 Abp 解决方案中有多个项 ...
- 利用 Docker Compose 搭建 SpringBoot 运行环境(超详细步骤和分析)
0.前言 相信点进来看这篇文章的同学们已经对 Docker Dompose 有一定的了解了,下面,我们拿最简单的例子来介绍如何使用 Docker Compose 来管理项目. 本文例子: 一个应用服务 ...
- 基于Docker Compose部署分布式MinIO集群
一.概述 Minio 是一个基于Go语言的对象存储服务.它实现了大部分亚马逊S3云存储服务接口,可以看做是是S3的开源版本,非常适合于存储大容量非结构化的数据,例如图片.视频.日志文件.备份数据和容器 ...
- 一文掌握Docker Compose
目录 Docker Compose介绍 Docker Compose安装 Docker Compose基本示例 1.基本文件及目录设置 2.创建一个Dockerfile 3.通过docker-comp ...
- 使用 Docker Compose 快速构建 TiDB 集群
本文档介绍如何在单机上通过 Docker Compose 快速一键部署一套 TiDB 测试集群.Docker Compose 可以通过一个 YAML 文件定义多个容器的应用服务,然后一键启动或停止. ...
随机推荐
- 控制台程序读取WIKI形式的TXT文件并一表格的形式显示在Word中
'Imports System.Collections.Generic 'Imports System.Text 'Imports System.IO 'Imports office = Micros ...
- vs2013 跳过IE10
安装 VS2013要安装IE10,却安装不了..以下为跳过IE10,直接安装VS2013方法 复制以下代码,保存为bat文件 @ECHO OFF :IE10HACK REG ADD "HKL ...
- 深入理解java虚拟机---Class文件(二十)
无符号数.表 当实现了不同语言的编译器,比如jython,jruby等等,那么就可以利用这些语言编写代码,通过各自的编译器编译成符合jvm规范的字节码文件,就可以利用jvm来执行了. Class文件在 ...
- pragma comment的使用 pragma预处理指令详解
pragma comment的使用 pragma预处理指令详解 #pragma comment( comment-type [,"commentstring"] ) 该宏放置一 ...
- unity3d优化总结篇(二)
1. 尽量避免每帧处理,可以每隔几帧处理一次 比如: [C#] 纯文本查看 复制代码 function Update() { DoSomeThing(); } 可改为每5帧处理一次: [C#] ...
- C:基础知识
基础知识 一.基础转义字符 1.常用的转义字符 \n 回车换行 (10) \” 双引号 \t 横向跳格(9) \0 空字符(0) \v 竖向跳格 (11) \a 响铃(7) \b 退格 (8) \ ...
- wx小程序获取用户位置信息
wx小程序内置的接口只能获取用户的坐标,通过微信位置服务获取用户地址: http://lbs.qq.com/qqmap_wx_jssdk/index.html 注:需要在key的设置中打开webSer ...
- nodejs的express框架
介绍: Express是由路由和中间件构成一个的nodejs的一种web应用框架; 功能: 可以设置中间件来响应 HTTP 请求. 定义了路由表用于执行不同的 HTTP 请求动作. 可以通过向模板传递 ...
- saliency 2015-2016的论文、代码
https://github.com/ArcherFMY/Paper_Reading_List 另外2013年之前的见chengmingming的benchmark主页.
- deconvolution layer parameter setting
reference: 1. Paper describes initializing the deconv layer with bilinear filter coefficients and tr ...