Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add seeya server #160

Merged
merged 8 commits into from
Feb 16, 2024
Merged

add seeya server #160

merged 8 commits into from
Feb 16, 2024

Conversation

minkyu97
Copy link
Contributor

@minkyu97 minkyu97 commented Feb 14, 2024

와커톤을 위한 seeya(시야) 서버 배포를 위한 PR입니다.

  • 인프라팀으로부터 seeya-api.wafflestudio.com 도메인을 발급받아 dualstack.k8s-ingressexternalgr-188e67238b-1798295752.ap-northeast-2.elb.amazonaws.com. 에 연결해두었습니다.
  • 코드 오너는 저( @minkyu97 )와 최병욱( @esc5221 ) 입니다.
  • 간편한 배포를 위해 시크릿 매니저를 사용하지 않을 예정이라 별도 role은 신청하지 않았는데 혹시 반드시 필요한 거라면 말씀해주세요.
  • cpu나 메모리를 조금 넉넉하게 잡았는데, 저희 서비스에서 이미지 처리를 해야되는 부분이 있어 그렇습니다. 혹시 리소스 관련해서 말씀하실 게 있다면 편하게 말씀해주세요.
  • 아직 CD 액션을 개발 중이어서 임시 이미지 태그와 연결해두었습니다.
  • 와커톤용 개발이다보니 dev, prod를 따로 구분하지 않고 있어서 prod 노드와 연결해두었는데, dev로 바꾸는 게 맞을 것 같다면 말씀해주세요.

@minkyu97 minkyu97 self-assigned this Feb 14, 2024
@minkyu97 minkyu97 requested review from davin111 and a team as code owners February 14, 2024 17:31
Copy link
Member

@davin111 davin111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

언제까지 적용 원하시나요? Due 를 말씀주시면 좋습니다

spec:
serviceAccountName: seeya-server
nodeSelector:
phase: prod
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

와커톤 용이고 실제 유저 없으면 dev node 로 가면 좋을 거 같긴 해요~

@davin111
Copy link
Member

별도 role 은 필요한 경우에만 생성 및 부여하면 되는 거 맞습니다

@minkyu97
Copy link
Contributor Author

@davin111 아무래도 와커톤이 금주 주말이다보니, 가급적 빠를 수록 좋습니다. 배포하고 끝이 아니라 프론트와 연동하여 테스트도 해봐야해서요.
급하게 부탁드려서 죄송하지만 금요일까지 가능할까요??...
+) ServiceAccount 삭제하고 dev 노드로 변경해두었습니다!

@davin111
Copy link
Member

@minkyu97 네 가능합니다. 가급적 오늘 중 처리해드릴게요.

@minkyu97
Copy link
Contributor Author

minkyu97 commented Feb 15, 2024

@davin111 감사합니다!!!..
궁금한 거 2가지만 질문드리려는데요,

  1. ecr 헤임달이 자동으로 태그 업데이트해주는 거는 자동으로 되나요 아니면 제가 별도로 작업해야할 게 있나요??
  2. diff 페이지에서 보이는 아래 에러는 무시해도 되나요? 이 레포에 쓰기 권한이 없어서 나타나는 이슈같은데.. 제가 이 레포 어드민이 아니라 자세히는 모르지만 wafflestudio org에 들어와 있으면 이 레포에 쓰기 권한을 자동으로 가지는 게 아닌가보죠??.. 마찬가지로 혹시 제가 별도로 취해야할 조치가 있다면 알려주시면 즉각 하겠습니당
image

@minkyu97
Copy link
Contributor Author

아래 배포의 영향으로 이미지 태그 최신화했습니다.
https://github.com/wafflestudio/seeya-server/actions/runs/7913148493/job/21600203987

http:
- route:
- destination:
host: seeya-server
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

마지막 newline 지켜주시면 좋아요

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

깃헙 dev 모드에서 작업했더니 이런 걸 실수하네요.. 수정했습니다

@@ -20,3 +20,4 @@ apps/wacruit-prod/ @wafflestudio/waffledotcom-backend
apps/pupuri-prod/ @wafflestudio/pupuri
apps/ggzz-dev/ @wafflestudio/ggzz
apps/k8s-monitoring/ @PFCJeong
apps/seeya/ @minkyu97 @esc5221
Copy link
Member

@davin111 davin111 Feb 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@esc5221 는 이 repo write 권한 없으신 거 같은데 넣어드렸어요.

  1. 에 대한 답인데, repo 에 권한이 있어야 합니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

감사합니다!!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기도 마지막 newline 넣어주실 수 있을까요?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newline 넣어서 수정완료했습니다

operator: Equal
value: dev
containers:
- image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/seeya:1
Copy link
Member

@davin111 davin111 Feb 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.에 대한 답이기도 합니다. ecr-heimdall 관련해 따로 하실 건 없는데요.

마법처럼 동작하는 건 아니고 코드에 따라 동작하는 것이므로
https://github.com/wafflestudio/ecr-heimdall/blob/main/handler.py#L55-L60

ecr repo 이름과, 파일 구조를 맞춰주셔야 해요.

위에 코드 참고하셔서, ecr repo 이름을 seeya/seeya-server 로 하시고
파일도 seeya/seeya-server/seeya-server.yaml 로 넣어주셔야 할 거 같아요.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

감사합니다~ 요것도 반영했고, 레포 변경은 인프라에 요청드리겠습니다.

memory: 256Mi
ports:
- containerPort: 8080
---
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이건 tmi 지만 원하시면 livenessProbe, readinessProbe 등을 추후 넣어보셔도 좋습니다. snutt 쪽 서버들에는 주로 있어요.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

조언 감사합니다! 다만 와커톤은 단기간 프로젝트라 옵셔널한 스펙들은 가능한 쳐내고 진행한 점 이해부탁드립니다.
이 프로젝트가 장기화되거나 다음에 다른 장기 프로젝트를 할 일이 생긴다면 말씀하신 기능 한 번 고려해보겠습니다!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아 네, 사실 probe 는 있든없든 제 입장에선 상관 없고 ㅎㅎ 서버 운영하시는 입장에서 더 원하시면 하시면 됩니다

- istio-ingress/waffle-ingressgateway
- mesh
hosts:
- seeya-api.wafflestudio.com
Copy link
Member

@davin111 davin111 Feb 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요 도메인 Route53 에서 k8s cluster lb 에 할당하는 건 하셔야해요. 그런데 이미 되어있군요.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 ㅎㅎ 요건 이미 신청했습니다

Copy link
Member

@YeonghyeonKO YeonghyeonKO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

당장 급한건 아니실테지만, 추후 ServiceAccount 필요하실 때 아래 참고하셔서 쿠버네티스 API 리소스 만드실 수 있습니다.

apiVersion: v1
kind: ServiceAccount
metadata:
  name: ggzz-server
  namespace: ggzz-dev
  annotations:
    eks.amazonaws.com/role-arn: arn:aws:iam::405906814034:role/ggzz-dev-role

@minkyu97
Copy link
Contributor Author

@YeonghyeonKO 조언 감사합니다~ 서비스 어카운트는 시크릿 매니저를 이용하지 않아 당장 필요하진 않지만 추후 필요할 시 참고하겠습니다 🙇

Copy link
Member

@davin111 davin111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ecr repo 준비되면 merge 하시고

https://argocd.wafflestudio.com
https://grafana.wafflestudio.com

이용해서 모니터링 해보세요

@@ -20,3 +20,4 @@ apps/wacruit-prod/ @wafflestudio/waffledotcom-backend
apps/pupuri-prod/ @wafflestudio/pupuri
apps/ggzz-dev/ @wafflestudio/ggzz
apps/k8s-monitoring/ @PFCJeong
apps/seeya/ @minkyu97 @esc5221
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기도 마지막 newline 넣어주실 수 있을까요?

@minkyu97
Copy link
Contributor Author

https://wafflestudio.slack.com/archives/C01M4TMNFPX/p1708077767091109?thread_ts=1707714902.449139&channel=C01M4TMNFPX&message_ts=1708077767.091109
image

ecr 레포명 변경 확인되어 머지하겠습니다.
cc. @davin111 @esc5221

@minkyu97 minkyu97 merged commit ace9e49 into main Feb 16, 2024
@minkyu97 minkyu97 deleted the wackathon-seeya-server branch February 16, 2024 10:41
Copy link
Member

@davin111 davin111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@minkyu97 지금 보니 빠뜨린 게 있으셔서, argocd 자동 sync 가 안 될 거 같네요;

@davin111
Copy link
Member

davin111 commented Feb 16, 2024

@minkyu97 #87 같은 거 참고해보세요

K8S 리소스만 정의가 되어있고, argocd application 정의가 안 되어있어서, 이 dir 를 아예 안 볼 거예요

@minkyu97
Copy link
Contributor Author

@davin111 오,, 네임스페이스 등록을 빠뜨렸군요
수정 PR 올리겠습니다 😭

@davin111
Copy link
Member

@minkyu97 노노 네임스페이스도 네임스페이스지만 (어차피 misc 하위는 자동 반영 안 되게 해놧고 요건 관리자가 수동 생성해드림)

templates/ 하위 파일이 없어요

@minkyu97
Copy link
Contributor Author

아하 넵 템플릿 하위 파일 생성해두겠습니다

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants