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

Deploy wacruit-server (dev, prod) with sso #88

Merged
merged 11 commits into from
Jul 14, 2023
Merged

Conversation

shp7724
Copy link
Contributor

@shp7724 shp7724 commented Jun 30, 2023

와플 리크루팅 API 서버 배포하려고 합니다.
#87 여기 있는 wacruit-judge는 채점용 서버로 별개입니다.

  • wacruit-api.wafflestudio.com, wacruit-api-dev.wafflestudio.com로 Route 53 설정
  • Secret manager 접근을 위한 dev, prod role 생성
  • wacruit-server ECR push workflow 설정 (prod 레포에는 아직 이미지 푸시가 안되어있습니다)
  • waffle-jwt-authorizer 사용을 위한 kong-gateway 설정
  • #87과 이 PR 모두 같은 namespace를 사용하는데, conflict 방지를 위해 여기서만 yaml 정의해둘게요.

waffle-world, sso 덕분에 배포가 너무 편해져서 좋습니다 🧇🧇🧇

@shp7724 shp7724 requested a review from a team June 30, 2023 10:10
@shp7724 shp7724 self-assigned this Jun 30, 2023
@shp7724 shp7724 requested review from a team and davin111 as code owners June 30, 2023 10:10
apps/sso-prod/kong-gateway/kong-config.yaml Outdated Show resolved Hide resolved
apps/sso-prod/kong-gateway/kong-gateway.yaml Outdated Show resolved Hide resolved
apps/wacruit-dev/wacruit-server/wacruit-server.yaml Outdated Show resolved Hide resolved
gateways:
- istio-ingress/waffle-ingressgateway
hosts:
- wacruit-api-dev.wafflestudio.com
Copy link
Member

Choose a reason for hiding this comment

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

kong-gateway 통해서 어차피 모든 트래픽이 들어온다면, 이 도메인을 istio vs 가 받게 하는 설정은 필요 없을 거 같습니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

넵 수정했습니다 5b329a2

misc/apps/namespace.yaml Outdated Show resolved Hide resolved
Copy link
Member

@davin111 davin111 Jul 9, 2023

Choose a reason for hiding this comment

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

설정하는 것은 자유이시지만, https://github.com/wafflestudio/waffle-world/blob/main/apps/snutt-prod/snutt-timetable/snutt-timetable.yaml#L37-L49 이런 식으로 probe 설정하여서 고장난 container 에 대한 대응이 자동으로 이뤄질 수 있도록 할 수 있습니다. https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/

startupProbe 는 서버가 초반에 늦게 뜨는 경우에만 필요할 수 있습니다. GET /health-check 같은 endpoint 는 직접 만들어두어야 합니다.

app: wacruit-server
namespace: wacruit-prod
spec:
replicas: 1
Copy link
Member

@davin111 davin111 Jul 9, 2023

Choose a reason for hiding this comment

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

prod 의 경우 좀 더 욕심을 부리면... 트래픽이 튈 때를 대비해 HPA 설정도 가능. 근데 거의 그럴 일 없다 싶으면 안 해도 됩니다. snutt 수강편람 오픈 직후 정도에나 유의미하긴 해서.

https://github.com/wafflestudio/waffle-world/blob/main/apps/snutt-prod/snutt-timetable/snutt-timetable.yaml#L58-L78

Copy link
Contributor Author

@shp7724 shp7724 Jul 9, 2023

Choose a reason for hiding this comment

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

네 접속자 풀이 스누티티보단 많이 작을거라 모니터링 해보고 필요하다 싶으면 적용해보겠습니다.

@davin111 davin111 mentioned this pull request Jul 14, 2023
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.

빠르게 merge 해드리기 위해 살짝만 수정했습니다.

이미 잘 해주셔서 별로 할 건 없었어요. 수정된 것에 궁금한 거 있으시면 질문주세요. @minkyu97 @shp7724

@davin111 davin111 merged commit 580fd73 into main Jul 14, 2023
@davin111 davin111 deleted the feature/wacruit-server branch July 14, 2023 21:14
@davin111
Copy link
Member

@shp7724 하나 이상한 거 발견해서 수정했어요 fdb8174

@shp7724
Copy link
Contributor Author

shp7724 commented Jul 14, 2023

@davin111
#88 (comment) 이 커멘트에 따라 VS 설정은 삭제했는데요,
e63d766 여기서 다시 추가하신 것 같더라고요.
혹시 이유가 있을까요?

@shp7724
Copy link
Contributor Author

shp7724 commented Jul 15, 2023

아 ㅎㅎ 잠이 덜깨서 잘못본거같네여 host 다른거 확인했습니다~

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.

2 participants