Skip to content

Comments

[setting] MOA-84 백엔드 서버 오라클 클라우드로 이전#546

Merged
PororoAndFriends merged 10 commits intodevelop/befrom
setting/#542-oracle_cloud
Jul 20, 2025
Merged

[setting] MOA-84 백엔드 서버 오라클 클라우드로 이전#546
PororoAndFriends merged 10 commits intodevelop/befrom
setting/#542-oracle_cloud

Conversation

@PororoAndFriends
Copy link
Collaborator

@PororoAndFriends PororoAndFriends commented Jul 17, 2025

#️⃣연관된 이슈

ex) #542

📝작업 내용

백엔드 서버 오라클 클라우드로 이전
개발섭, 배포섭 모두 이전

Summary by CodeRabbit

  • Chores

    • CI/CD 워크플로우가 Google Cloud에서 Docker Hub 및 Oracle VM 기반 배포로 전환되었습니다.
    • Docker 이미지는 이제 ARM64와 AMD64 아키텍처 모두에 대해 빌드 및 배포됩니다.
    • Google Cloud 인증 및 관련 설정 단계가 제거되었습니다.
  • Refactor

    • Google Cloud Storage 및 Google Drive 관련 설정 코드가 비활성화(주석 처리)되었습니다.

@PororoAndFriends PororoAndFriends requested review from Zepelown and lepitaaar and removed request for lepitaaar July 17, 2025 14:58
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 17, 2025

"""

Walkthrough

GitHub Actions 워크플로우에서 Google Cloud 관련 인증 및 배포 단계를 제거하고, Docker Hub를 통한 이미지 빌드 및 배포로 전환했습니다. 백엔드 코드에서는 Google Cloud Storage 및 Google Drive 관련 설정 클래스를 모두 주석 처리하여 비활성화했습니다.

Changes

파일/경로 변경 요약
.github/workflows/oracle_server_cd_develop.yml
.github/workflows/server_cd_release.yml
워크플로우 트리거, Gradle 캐시, Docker Hub 로그인, Google Cloud 인증/배포 제거, Docker multi-platform 빌드 및 SSH 배포로 수정
backend/src/main/java/moadong/global/config/SecurityConfig.java Google Cloud Storage 관련 credentials 필드 및 Storage 빈 메서드 전체 주석 처리
backend/src/main/java/moadong/media/util/GoogleDriveConfig.java Google DriveConfig 클래스 및 모든 코드 전체 주석 처리

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant GitHub Actions
    participant Docker Hub
    participant Oracle VM (via SSH)

    Developer->>GitHub Actions: Push/PR 트리거
    GitHub Actions->>Docker Hub: Docker 이미지 빌드 및 푸시 (multi-platform)
    GitHub Actions->>Oracle VM (via SSH): SSH로 접속 후 배포 스크립트 실행
    Oracle VM (via SSH)->>Docker Hub: Docker 이미지 pull
    Oracle VM (via SSH)->>Oracle VM (via SSH): 컨테이너 실행 및 이미지 정리
Loading

Assessment against linked issues

Objective (이슈 번호) Addressed Explanation
오라클 클라우드 서버로 백엔드 배포 파이프라인 전환 (MOA-84)
Google Cloud Storage/Drive 의존성 비활성화 (MOA-84)

Possibly related PRs

Suggested labels

💾 BE, 📦 CI/CD

Suggested reviewers

  • Due-IT
  • Zepelown
    """

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link

github-actions bot commented Jul 17, 2025

Test Results

75 tests   75 ✅  2s ⏱️
12 suites   0 💤
12 files     0 ❌

Results for commit 182e89f.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🔭 Outside diff range comments (1)
backend/src/main/java/moadong/global/config/SecurityConfig.java (1)

3-8: Google Cloud 관련 import가 더 이상 사용되지 않습니다.

GoogleCredentials, Storage, StorageOptions 등 모든 GCP 관련 import가 남아 있지만, 아래에서 Bean 정의가 주석 처리되면서 실제 사용처가 사라졌습니다. 빌드 시 unused-import 경고가 발생하므로 제거해주세요.

-import com.google.auth.oauth2.GoogleCredentials;
-import com.google.cloud.storage.Storage;
-import com.google.cloud.storage.StorageOptions;
🧹 Nitpick comments (7)
backend/src/main/java/moadong/media/util/GoogleDriveConfig.java (1)

1-41: 주석으로만 남겨두기보다는 파일 자체를 삭제하거나 Git 기록에 맡기세요.

전체 클래스가 주석 처리되어 실제로 컴파일·실행 타깃에서 전혀 쓰이지 않습니다. 주석으로 남겨두면 IDE 검색 결과에 불필요하게 노출되고 유지보수자가 혼란을 겪을 수 있으니,
① 해당 기능을 완전히 폐기할 예정이라면 파일을 삭제하고 Git 히스토리로 추적하거나,
② 장차 재활성화를 고려한다면 @Profile, @ConditionalOnProperty 등으로 토글 가능하게 구현하는 편이 낫습니다.
현재 상태는 코드베이스에 의미 없는 노이즈만 추가합니다.

backend/src/main/java/moadong/global/config/SecurityConfig.java (1)

43-44: 주석 처리 대신 조건부 Bean 혹은 완전 제거를 고려하세요.

credentialsLocation 필드와 storage() Bean 메서드가 주석으로만 비활성화돼 있습니다.
장기적으로 GCP 스토리지를 쓰지 않는다면 코드를 삭제하고 의존성도 build.gradle 에서 제외해 빌드 크기를 줄이세요.
반대로 환경별로 토글해야 한다면 @Profile("gcp") 같은 조건부 빈으로 분리하는 것이 명시적입니다.
현재처럼 주석으로 남겨두면 코드베이스 일관성이 떨어집니다.

Also applies to: 65-72

.github/workflows/oracle_server_cd_develop.yml (2)

55-55: 불필요한 공백 제거 필요

55행 끝에 남은 트레일링 스페이스 때문에 YAMLlint 오류가 발생합니다. 빌드 실패를 막기 위해 공백을 삭제해주세요.

-          
+

67-75: 스텝 이름이 실제 동작과 어긋납니다.

Build and Push ARM64 Docker Image → 현재는 linux/arm64,linux/amd64 두 플랫폼을 빌드합니다. 가독성을 위해 스텝 이름을 수정하세요.

.github/workflows/server_cd_release.yml (3)

55-55: 트레일링 스페이스 제거

55행에 남아 있는 공백은 YAMLlint 오류를 유발합니다. 삭제해주세요.


63-75: 스텝 이름 수정 제안

멀티플랫폼 이미지를 빌드하므로 스텝 이름을 Build and Push Docker Image (arm64+amd64) 등으로 변경하면 한눈에 파악하기 쉽습니다.


86-103: 여러 줄에 트레일링 스페이스 및 EOF 개행 누락

86-103행 다수와 파일 끝에 공백·개행 문제가 있어 YAMLlint 오류가 납니다. 스크립트 실행엔 영향 없지만 CI 품질을 위해 정리하세요.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dea11cf and 911637e.

📒 Files selected for processing (4)
  • .github/workflows/oracle_server_cd_develop.yml (3 hunks)
  • .github/workflows/server_cd_release.yml (3 hunks)
  • backend/src/main/java/moadong/global/config/SecurityConfig.java (2 hunks)
  • backend/src/main/java/moadong/media/util/GoogleDriveConfig.java (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/oracle_server_cd_develop.yml

57-57: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

.github/workflows/server_cd_release.yml

57-57: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🪛 YAMLlint (1.37.1)
.github/workflows/oracle_server_cd_develop.yml

[error] 55-55: trailing spaces

(trailing-spaces)

.github/workflows/server_cd_release.yml

[error] 95-95: trailing spaces

(trailing-spaces)


[error] 97-97: trailing spaces

(trailing-spaces)


[error] 102-102: trailing spaces

(trailing-spaces)


[error] 103-103: no new line character at the end of file

(new-line-at-end-of-file)

🔇 Additional comments (2)
.github/workflows/oracle_server_cd_develop.yml (1)

32-38: Gradle 캐시 경로 확장 👍

~/.gradle/wrapper까지 포함해 캐시 효율이 좋아졌습니다. LGTM.

.github/workflows/server_cd_release.yml (1)

32-38: Gradle 캐시 경로 확장 👍

릴리즈 워크플로에도 wrapper 캐시를 추가해 일관성이 확보되었습니다.

Comment on lines +56 to 61
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
project_id: ${{ secrets.GCE_PROJECT }}
username: ${{ secrets.SERVER_DOCKER_USERNAME }}
password: ${{ secrets.SERVER_DOCKER_PASSWORD }}

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

docker/login-action 버전을 최신(v3)으로 올려야 합니다.

actionlint 경고: “the runner of docker/login-action@v2 action is too old”.
GH Actions 런타임과 호환성을 위해 v3로 업데이트하십시오.

-      - name: Log in to Docker Hub
-        uses: docker/login-action@v2
+      - name: Log in to Docker Hub
+        uses: docker/login-action@v3
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
project_id: ${{ secrets.GCE_PROJECT }}
username: ${{ secrets.SERVER_DOCKER_USERNAME }}
password: ${{ secrets.SERVER_DOCKER_PASSWORD }}
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.SERVER_DOCKER_USERNAME }}
password: ${{ secrets.SERVER_DOCKER_PASSWORD }}
🧰 Tools
🪛 actionlint (1.7.7)

57-57: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
In .github/workflows/oracle_server_cd_develop.yml around lines 56 to 61, update
the version of the docker/login-action from v2 to v3 to ensure compatibility
with the latest GitHub Actions runtime and resolve the actionlint warning.
Change the uses line to use docker/login-action@v3 instead of v2.

Comment on lines +56 to 61
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
credentials_json: ${{ secrets.GCE_SA_KEY }}
username: ${{ secrets.SERVER_DOCKER_USERNAME }}
password: ${{ secrets.SERVER_DOCKER_PASSWORD }}

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

docker/login-action v2 → v3 업그레이드 필요

develop 워크플로와 동일한 actionlint 오류가 발생합니다. 버전을 v3로 올려주세요.

-      - name: Log in to Docker Hub
-        uses: docker/login-action@v2
+      - name: Log in to Docker Hub
+        uses: docker/login-action@v3
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
credentials_json: ${{ secrets.GCE_SA_KEY }}
username: ${{ secrets.SERVER_DOCKER_USERNAME }}
password: ${{ secrets.SERVER_DOCKER_PASSWORD }}
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.SERVER_DOCKER_USERNAME }}
password: ${{ secrets.SERVER_DOCKER_PASSWORD }}
🧰 Tools
🪛 actionlint (1.7.7)

57-57: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
In .github/workflows/server_cd_release.yml around lines 56 to 61, the
docker/login-action is currently using version v2, which causes actionlint
errors similar to the develop workflow. Update the version from v2 to v3 in the
uses field to fix these errors and keep consistency with the develop workflow.

Copy link
Member

@Zepelown Zepelown left a comment

Choose a reason for hiding this comment

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

인프라 고생이 많으셨습니다~

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
.github/workflows/server_cd_release.yml (1)

56-60: docker/login-action 버전 미업그레이드 재발견

이미 이전 리뷰에서 지적된 사항( v2 → v3 업그레이드)이 아직 반영되지 않았습니다. actionlint 오류가 그대로 남아 있으므로 반드시 v3 이상으로 올려주세요.

🧹 Nitpick comments (1)
.github/workflows/server_cd_release.yml (1)

96-104: 공백 문자 및 EOF 개행 누락

YAMLlint 경고:

  • 96, 98, 103 라인: 후행 공백
  • 파일 끝 개행 없음

CI 안정성을 위해 불필요한 공백 제거 및 최종 개행 추가를 권장합니다.

-            docker pull ${{ secrets.DOCKER_IMAGE_RELEASE }}:latest␠
+            docker pull ${{ secrets.DOCKER_IMAGE_RELEASE }}:latest
...
-            docker image prune -af␠
+            docker image prune -af
+
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 911637e and 182e89f.

📒 Files selected for processing (1)
  • .github/workflows/server_cd_release.yml (4 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/server_cd_release.yml

58-58: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🪛 YAMLlint (1.37.1)
.github/workflows/server_cd_release.yml

[error] 96-96: trailing spaces

(trailing-spaces)


[error] 98-98: trailing spaces

(trailing-spaces)


[error] 103-103: trailing spaces

(trailing-spaces)


[error] 104-104: no new line character at the end of file

(new-line-at-end-of-file)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Deploy

Comment on lines +89 to +95
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.ORACLE_INSTANCE_RELEASE_IP }}
username: ${{ secrets.ORACLE_INSTANCE_USER }}
key: ${{ secrets.ORACLE_INSTANCE_RELEASE_PRIVATE_KEY }}
port: ${{ secrets.ORACLE_INSTANCE_RELEASE_PORT }}
script: |
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

appleboy/ssh-action@master → 고정된 커밋/태그로 핀 고정 권장

@master 레퍼런스는 예기치 않은 브레이킹 변경·공급망 공격 위험이 있습니다. 신뢰할 수 있는 릴리스 태그(예: v1.0.0)나 커밋 SHA로 고정하세요.

🤖 Prompt for AI Agents
In .github/workflows/server_cd_release.yml around lines 89 to 95, the usage of
appleboy/ssh-action@master should be replaced with a fixed commit SHA or a
specific release tag to avoid unexpected breaking changes or supply chain
attacks. Update the action reference from @master to a stable version like a
release tag (e.g., v1.0.0) or a commit SHA to ensure consistent and secure
workflow execution.

@PororoAndFriends PororoAndFriends added 💾 BE Backend 📦 CI/CD CI/CD 관련 설정 및 유지보수 labels Jul 19, 2025
Copy link
Contributor

@lepitaaar lepitaaar left a comment

Choose a reason for hiding this comment

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

수고하셧읍니다

@PororoAndFriends PororoAndFriends merged commit 3523204 into develop/be Jul 20, 2025
6 checks passed
@PororoAndFriends PororoAndFriends deleted the setting/#542-oracle_cloud branch September 14, 2025 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💾 BE Backend 📦 CI/CD CI/CD 관련 설정 및 유지보수

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants