전체 글
-
Jenkins로 Gitlab CI/CD 구축하기(Spring + MySQL + JenKins + Redis + Nginx)프로젝트/WebRTC 화상통화 프로젝트 2022. 8. 6. 00:01
(1) Window에서 도커로 MySQL + SpringBoot 띄우기 (2) Ubuntu에서 Spring,MySQL, Redis Docker Compose로 배포하기 (3) Jenkins로 Gitlab CI/CD 구축하기(Spring + MySQL + JenKins + Redis + Nginx) 이해하는데 필요한 사전 지식 - Docker - Docker Compose - ubuntu / linux - gitlab 개요 이전에 Docker Compose를 활용하여 Spring + MySQL + Redis를 배포하였습니다. Jenkins로 CI/CD를 구축하게 되면 gilab에 spring이 새롭게 push 되면 기존의 spring conatiner를 내리고 새로운 spring container를 올릴 ..
-
동작 파라미터화 코드 전달하기Java/모던자바인액션요약 2022. 8. 6. 00:01
동작 파라미터화란? 아직은 어떻게 실행할 것인지 결정하지 않은 코드 블록을 의미합니다. 등장 배경 어떤 상황에서 일을 하든 소비자의 요구사항을 항상 바뀔 수 있습니다. 농부가 재고목록 조사를 쉽게 할 수 있도록 애플리케이션을 만든다고 가정해보겠습니다. 초기의 농부의 요구사항은 다음과 같습니다. "녹색 사과를 찾고 싶어요" 하지만 다음날에는 요구사항이 바뀝니다. "150그램 이상인 사과를 모두 찾고 싶어요" 다음날에 또 요구사항이 바뀌었습니다. "150그램 이상이면서 녹색인 사과를 모두 찾을 수 있으면 좋을 것 같아요" 이런 상황에 대응하기 위해서 동작 파라미터화가 등장하게 되었습니다. 동작 파라미터화를 통해 사용자의 요구사항에 대한 변화에 가장 최소화된 비용으로 대응할 수 있습니다. 코드를 통한 예시 동..
-
letsencrypt 인증서 발급하고 OpenVidu에 적용하기프로젝트/WebRTC 화상통화 프로젝트 2022. 8. 5. 00:01
1. Ubunto 서버에서 다음 명령어를 통해 인증서를 발급받습니다. (인증서를 발급받기 위해서는 도메인이 필요합니다) sudo apt-get install letsencrypt # 만약 nginx를 사용중이면 중지 sudo systemctl stop nginx # 인증서 발급 sudo letsencrypt certonly --standalone -d www제외한 도메인 이름 # 이메일 쓰고 Agree # 뉴스레터 no # 키가 발급되는데 이 두 가지를 써야합니다. 밑의 경로에 각각 하나씩 있습니다. ssl_certificate /etc/letsencrypt/live/도메인이름/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/도메인이름/privkey...
-
자바 8, 9, 10, 11 : 무슨 일이 일어나고 있는가?Java/모던자바인액션요약 2022. 8. 5. 00:01
자바의 변화 책에서 다루면서 이후에 등장하게 될 주요한 내용들입니다. Java11에서 언급한 부분들은 책에서 다룰 수 있지 않지만 관심있으시다면 추가적으로 찾아보셔도 좋을 것 같습니다. Java8 스트림 API 메서드에 코드를 전달하는 기법(람다와 메서드 참조) 디폴트 메서드 Optional CompletableFuture LocalData, LocalTime Java9 리액티브 프로그래밍(RxJava) try-with-resource Java 11 HTTP Client(HTTP/2 지원) ZGC 람다에 대한 지역 변수에 사용 변화의 이유 간결한 코드 멀티코어 CPU 대중화와 같은 하드웨어적인 변화(멀티코어 프로세서의 쉬운 활용을 위해서) 변화의 장점 쉽게 얻을 수 있는 병렬성(synchronized 활..
-
Ubuntu에서 Spring, MySQL, Redis Docker Compose로 배포하기프로젝트/WebRTC 화상통화 프로젝트 2022. 8. 4. 13:33
(1) Window에서 도커로 MySQL + SpringBoot 띄우기 (2) Ubuntu에서 Spring,MySQL, Redis Docker Compose로 배포하기 (3) Jenkins로 Gitlab CI/CD 구축하기(Spring + MySQL + JenKins + Redis + Nginx) 지난 시간에는 Spring과 MySQL을 도커로 띄워서 사용해보았습니다. 하지만 네트워크를 생성하고 이미지를 여러 옵션을 줘서 실행시키는 번거로운 절차들이 필요했습니다. 따라서 이 점을 보완하며 여기에 redis까지 적용하여 Docker Compose로 배포해보겠습니다. https://junuuu.tistory.com/420?category=1014988 스프링 부트 + Mysql 도커로 띄우기 개요 Sprin..
-
[백준] 1865번: 웜홀 - 자바(JAVA)알고리즘/백준 2022. 8. 4. 00:01
https://www.acmicpc.net/problem/1865 1865번: 웜홀 첫 번째 줄에는 테스트케이스의 개수 TC(1 ≤ TC ≤ 5)가 주어진다. 그리고 두 번째 줄부터 TC개의 테스트케이스가 차례로 주어지는데 각 테스트케이스의 첫 번째 줄에는 지점의 수 N(1 ≤ N ≤ 500), www.acmicpc.net 문제 해석 N개의 지점이 있고 N개의 지점 사이에는 M개의 도로와 W개의 웜홀이 존재합니다. 도로에는 방향이 없으며 웜홀에는 방향이 존재합니다. 웜홀은 시작 위치에서 도착 위치로 가는 하나의 경로입니다. 도착을 하게 되면 시작 했을 때보다 시간이 뒤로 가게 됩니다. 이때 한 지점에서 출발하여 시간여행을 하여 다시 출발하였던 위치로 돌아왔을 때 출발하였을 때 보다 시간이 되돌아가는 경우..
-
AOP 적용하기 (+원리 CGlib vs Dynamic Proxy)프로젝트/WebRTC 화상통화 프로젝트 2022. 8. 4. 00:01
이 글을 읽기 전에 프락시 패턴에 대해서 잘 모른다면 다음 글을 읽고 오시면 좋습니다. https://junuuu.tistory.com/246?category=968252 [Java] 프록시 패턴이란? 프록시 패턴이란? 디자인 패턴 중 하나로, 어떤 클래스를 직접 사용하는 대신에 프록시 클래스를 통해 사용하는 것을 의미합니다. 사장님에게 바로 보고하지 않고 비서에게 보고하면 비서가 사 junuuu.tistory.com AOP란? Aspect Oriented Programming의 약자로써 관점 지향 프로그래밍이라 불립니다. 쉽게 풀어 말하면 어떤 로직을 기준으로 핵심적인 관점, 부가적인 관점으로 나누어서 보고 그 관점을 기준으로 각각 모듈화 하겠다는 것입니다. 핵심적인 관점 = 우리가 적용하고자 하는 핵..
-
도커 컨테이너 수정하기MSA & 쿠버네티스(Kubernetes) - k8s 2022. 8. 3. 00:01
이전 시간에 Docker로 Apache 웹서버를 띄워 보았습니다. https://junuuu.tistory.com/384 하지만 index.html에 접속하면 It'works라는 메시지밖에 볼 수 없습니다. 이전 환경에 이어서 작업을 진행하기 해보겠습니다. 컨테이너에 접속하여 파일에 접근하는 방법을 알아보겠습니다. Docker 컨테이너는 시스템 관점에서 보면 하나의 프로세스입니다. 하지만 일반 프로세스와의 차이로 각각의 컨테이너는 호스트 시스템과는 별개로 별개의 파일 시스템, 네트워크, 권한 등 다른 환경을 가지고 있습니다. 이때 특정 컨테이너 환경에서 명령어를 실행할 수 있도록 하는 명령어가 docker exec 명령어입니다. docker exec ws3 pwd docker exec ws3 ls 위의 ..