eclair

75
EC2용 SSH Tool Eclair

Upload: minkyu-kim

Post on 19-Jan-2017

375 views

Category:

Software


5 download

TRANSCRIPT

Page 1: Eclair

EC2용 SSH Tool Eclair

Page 2: Eclair

김민규

Page 3: Eclair

원래 계획

Page 4: Eclair

– 7월 27일의 나

‘3주쯤 남았으니 2주쯤 오픈소스화 작업하고, 1주쯤 발표자료 준비하면 되겠지...’

Page 5: Eclair
Page 6: Eclair
Page 7: Eclair
Page 8: Eclair

가장 간단하고, 강력한 도구

SSH

Page 9: Eclair

어떤 인스턴스에 접속하고 싶을 때

Page 10: Eclair

1. AWS 웹 콘솔에 접속

2. 인스턴스를 검색

3. hostname을 복사

4. ssh username@hostname

Page 11: Eclair

서버가 여러 대면?

Page 12: Eclair
Page 13: Eclair

이제는 이렇게 하세요.

Page 14: Eclair

AWS Ruby SDK

Curses

Page 15: Eclair

설치하기

Page 16: Eclair

1. tmux 설치

Page 17: Eclair

2. AWS CLI Tools configure

(~/.aws/credentials를 사용합니다)

Page 18: Eclair

3. gem install ecl

Page 19: Eclair

4. ~/.eclrc 편집

Page 20: Eclair
Page 21: Eclair

아이디어

Page 22: Eclair

https://github.com/dennishafemann/tmux-cssh

Page 23: Eclair
Page 24: Eclair

이런 좋은 스크립트가 있는데,

왜 굳이?

Page 25: Eclair

주소가 계속 바뀌어요!

Autoscale

Page 26: Eclair
Page 27: Eclair

API가 있어요!

Page 28: Eclair

SSH의 3요소

Page 29: Eclair

ssh user@host -p port

Page 30: Eclair

ssh user@host -p port

Page 31: Eclair

Username을 찾아서

Page 32: Eclair

ubuntu @ ubuntu-server ec2-user @ amazon-linux hadoop @ emr-cluster

Page 33: Eclair

혹시 AMI 정보에 유저명이 있지 않을까?

Page 34: Eclair
Page 35: Eclair
Page 36: Eclair

처음 생각

AMI랑 유저명 매핑을 하자!

Page 37: Eclair
Page 38: Eclair

결국 직접 만들어야 해요.

Page 39: Eclair

설정 파일 ~/.eclrc

Page 40: Eclair

lambda configuration

Page 41: Eclair
Page 42: Eclair

ssh user@host -p port

Page 43: Eclair

AWS Ruby SDK

Page 44: Eclair

옆 팀: 우리는 private ip로 접근해요!

Page 45: Eclair
Page 46: Eclair

ssh user@host -p port

Page 47: Eclair

SSH로 1234번 포트를 사용하는 A회사

…하지만 아닌 서버도 섞여 있죠?

Page 48: Eclair

그냥 둘다 붙어!

Page 49: Eclair
Page 50: Eclair

ssh user@host -p port -i /path/to/key

발표 끝나고 추가됨

Page 51: Eclair

Keypair name => Private key path

Page 52: Eclair

Grouping

Page 53: Eclair

Security Group

Page 54: Eclair
Page 55: Eclair
Page 56: Eclair
Page 57: Eclair

tmux를 잘 쓰면 더 유용해요!

Page 58: Eclair

:break-pane

Page 59: Eclair

:setw synchronize-panes

Page 60: Eclair

https://tmux.github.io/

Page 61: Eclair

지금까지 이런거 없이도 잘 써왔는데,

사용하면 뭐가 좋은가요?

Page 62: Eclair

일단 뭔가 있어보입니다

Page 63: Eclair

터미널에서 모든게 해결

Page 64: Eclair

Less Context Switching

Page 65: Eclair

‘접속할때 OTP 안열어도 돼서 좋아요’ - 팀원 A

‘전에는 배포하고 CloudWatch에서 메트릭을 봤는데, 이젠 그냥 ssh 열고 보면 되네요’ - 팀원 H

‘들어온지 얼마 안됐는데,원하는 서버에 바로바로 갈 수 있어요’ - 팀원 K

Page 66: Eclair

Eclair?

Page 67: Eclair
Page 68: Eclair

TODO

Page 69: Eclair

Auto-Refresh

사실 이거 다 하고 공개하려 했는데...

Page 70: Eclair

https://github.com/devsisters/eclair

Page 71: Eclair

PR, 피드백, 기능 제안 모두 환영합니다!

Page 72: Eclair
Page 73: Eclair
Page 74: Eclair

[email protected]특히 루비 좋아하시는분들 제가 격하게 환영합니다.