108 lines
2.6 KiB
Markdown
108 lines
2.6 KiB
Markdown
# Teleport
|
|
|
|
## 설명
|
|
접근 제어를 위한 오픈소스 솔루션으로 Teleport 도입을 결정<br>
|
|
기존에 설치 및 설정 하였던 정보를 정리할 목적으로 작성<br>
|
|
권한 설정 같은 경우 별도의 레파지토리로 작성하였음 ([바로가기](https://lab.jhcloud.kr/sa_8001/teleport_role))
|
|
|
|
## 설치
|
|
Teleport의 설치 같은 경우 docker와 helm chart를 통한 설치 방식 두가지를 사용 하였음<br>
|
|
devops팀 : helm chart<br>
|
|
기술지원팀 : docker<br>
|
|
|
|
### Docker
|
|
```shell
|
|
mkdir -p ~/teleport/config ~/teleport/data
|
|
# teleport config와 data를 저장할 경로 생성
|
|
|
|
docker run --hostname localhost --rm --entrypoint=/usr/local/bin/teleport public.ecr.aws/gravitational/teleport-distroless:15.2.2 configure --roles=proxy,auth > ~/teleport/config/teleport.yaml
|
|
# teleport config 생성
|
|
|
|
vi ~/teleport/config/teleport.yaml
|
|
# teleport config 수정 (도메인 적용을 위해 아래의 내용 참고)
|
|
|
|
docker run -d --hostname cloud.elppa.xyz --name teleport -v /teleport/config:/etc/teleport -v /teleport/data:/var/lib/teleport -p 3025:3025 -p 3080:3080 public.ecr.aws/gravitational/teleport-distroless:14.3.3
|
|
# teleport 실행
|
|
|
|
```
|
|
|
|
#### teleport.yaml
|
|
```yaml
|
|
version: v3
|
|
teleport:
|
|
nodename: cloud.elppa.xyz:443
|
|
data_dir: /var/lib/teleport
|
|
log:
|
|
output: stderr
|
|
severity: INFO
|
|
format:
|
|
output: text
|
|
ca_pin: ""
|
|
diag_addr: ""
|
|
auth_service:
|
|
enabled: "yes"
|
|
listen_addr: 0.0.0.0:3025
|
|
proxy_listener_mode: multiplex
|
|
ssh_service:
|
|
enabled: "no"
|
|
proxy_service:
|
|
enabled: "yes"
|
|
public_addr: "cloud.elppa.xyz:443"
|
|
https_keypairs: []
|
|
https_keypairs_reload_interval: 0s
|
|
acme: {}
|
|
```
|
|
|
|
### Helm Chart
|
|
```shell
|
|
helm repo add teleport https://charts.releases.teleport.dev
|
|
# helm repo 추가
|
|
|
|
helm repo update
|
|
# helm 업데이트
|
|
|
|
vi override.yaml
|
|
# value 값 설정 (아래의 내용 참고)
|
|
|
|
helm -n teleport install teleport . -f override.yaml
|
|
# teleport 배포
|
|
```
|
|
|
|
#### override.yaml
|
|
```yaml
|
|
chartMode: standalone
|
|
clusterName: teleport.datasaker.io
|
|
teleportVersionOverride: "13.3.5"
|
|
|
|
auth:
|
|
teleportConfig:
|
|
# put any teleport.yaml auth configuration overrides here
|
|
teleport:
|
|
log:
|
|
output: stderr
|
|
severity: DEBUG
|
|
|
|
auth_service:
|
|
enabled: true
|
|
web_idle_timeout: 1h
|
|
authentication:
|
|
locking_mode: best_effort
|
|
|
|
proxy:
|
|
teleportConfig:
|
|
# put any teleport.yaml proxy configuration overrides here
|
|
teleport:
|
|
log:
|
|
output: stderr
|
|
severity: DEBUG
|
|
|
|
proxy_service:
|
|
https_keypairs_reload_interval: 12h
|
|
|
|
podSecurityPolicy:
|
|
enabled: false
|
|
|
|
proxy_service:
|
|
web_listen_addr: 0.0.0.0:3080
|
|
public_addr: teleport.datasaker.io:443
|
|
``` |