-
배포, 컴파일, 빌드, CI/CD란 무엇인가?Java 2023. 12. 11. 22:21
프로젝트를 하면서 WAS에서만 프로젝트를 돌리고 따로 배포를 하지 못했었다. 그래서 따로 배포와 관련된 공부를 하지 않았었기에 하나씩 알아가 보려고 한다.
컴파일
번역가가 영어로된 글을 한글로 바꿔주듯, 컴퓨터가 이해할 수 있는 언어로 바꿔주는 과정을 말한다.
빌드
번역된 글을 책으로 엮어주는 것과 같이, 컴파일된 코드를 실행할 수 있는 상태로 만들어주는 과정이다.
보통 컴파일을 포함한 배포하기 직전의 모든 과정을 빌드라고 표현하기도 한다.
빌드 툴로는 빌드 툴로는 Ant, Maven, Gradle 등이 있다.
배포
빌드가 완성된 실행 파일(JAR, WAR)을 사용자가 접근할 수 있는 환경에 배치시키는 일을 뜻한다.
JAR : Java Archive의 약자로 Java어플리케이션이 동작할 수 있돌고 자바 프로젝트를 압축한 파일이다.
WAR : Web Application Archive의 약자로 웹어플리케이션 압축파일 포맷이다.
JSP, SERVLET, JAR, CLASS, XML, HTML, JAVASCRIPT 등 Servlet Context 관련 파일들로 패키징 되어있다.
war는 웹 응용프로그램을 위한 포맷으로 웹 관련 자원만 포함하며, 이를 통해 웹 어플리케이션을 쉽게 배포할 수 있다.
WAR파일을 실행하기 위해선 Tomcat, Weblogic, Websphere와 같은 웹 서버, 웹 어플리케이션 서버(WAS)가 필요하다.
Web Server(웹 서버) : 주로 정적인 콘텐츠를 처리한다. 즉, HTML 파일, 이미지, CSS, JavaScript 등과 같은 정적 파일을 클라이언트에게 제공한다.
Web Application Server(웹 어플리케이션 서버) : 주로 동적인 콘텐츠를 처리한다. 즉, 서버 측에서 데이터베이스와 상호 작용하며 동적인 페이지를 생성하여 클라이언트에게 전달합니다.
Java Servlet, JavaServer Pages(JSP), ASP.NET, PHP, Python Django 등과 같은 서버 사이드 기술을 지원한다.
CI
Continuous Integration의 약자로 지속적인 통합이라는 이라는 뜻으로, 개발자들이 코드를 지속적으로 통합하고 테스트하는 과정을 자동화하는 것을 의미한다.
CI 시스템을 구축하지 않은 경우, 개발자가 수동으로 병합과 테스트를 진행하게 되는데, 프로젝트의 크기가 커질 수록 시간이 많이 소요되게 된다.
CD
CD는 Continuos Delivery, Continuous Deployment 두 가지의 의미를 가지고 있다.
Continuos Delivery
지속적 제공라는 뜻으로 CI를 통해 검증된 코드가 빌드와 테스트를 거쳐 gitHub과 같은 공유저장소에 업로드 되는 것을 말한다.Continuous Deployment
지속적 배포라는 뜻으로 성공적으로 병합된 코드를 공유저장소에 업로드 뿐만 아니라 사용자가 사용할 수 있는 배포환경까지 릴리즈하는 것을 의미한다.
즉, 지속적 제공은 공유저장소에서 수동으로 배포를 진행하며, 지속적 배포는 공유저장소에서 배포까지 자동적으로 릴리즈 되는 것을 의미한다.
참고자료
https://ifuwanna.tistory.com/224
https://tecoble.techcourse.co.kr/post/2021-08-14-ci-cd/https://artist-developer.tistory.com/24
https://www.youtube.com/watch?v=sIPU_VkrguI&ab_channel=%EC%9A%B0%EC%95%84%ED%95%9C%ED%85%8C%ED%81%AC
'Java' 카테고리의 다른 글
TIL 자바 스프링부트 서버개발 올인원 : 30-32강 (0) 2024.05.08 @RequiredArgsConstructor 사용에러(Feat.eclipse) (0) 2023.12.20 Spring AOP란 무엇인가? (1) 2023.11.30 @Transactional은 모든 예외에 rollback이 될까? (0) 2023.11.29 Java 입출력 Scanner와 BufferedReader (0) 2023.11.26