GitLab
-
퍼블릭 IP 주소 변경GitLab 2024. 8. 1. 14:11
인스턴스를 중지했다가 다시 실행할 경우 퍼블릭 IP 주소가 변경된다.고정 IP 주소 사용을 위해 탄력적 IP를 할당하여 gitlab 인스턴스에 연결한다.docker-compose.yml 수정version: '3.6'services: web: image: 'gitlab/gitlab-ce:latest' restart: always hostname: '3.37.184.202' # 접속할 EC2 IP environment: GITLAB_OMNIBUS_CONFIG: | external_url 'http://3.37.184.202:80' # IP:PORT gitlab_rails['gitlab_shell_ssh_port'] = 22 ..
-
EC2 인스턴스 유형 변경GitLab 2024. 8. 1. 10:37
EC2 인스턴스가 너무 느려서 CPU 사용률을 확인하였더니 100% 였다.CPU 2 Core를 4 Core로 늘리고, 메모리도 4G에서 16G로 늘렸다.https://www.infracody.com/2023/09/3-ways-to-check-linux-cpu-usage.html#elcreative_toc____ 리눅스 CPU 사용률 확인하는 3가지 방법리눅스에서 CPU 사용률을 확인하는 다양한 방법에 대해 알아보고, 쉽게 사용할 수 있습니다. top, vmstat, mpstat 명령어를 사용하여 CPU 사용률을 확인하는 방법에 대해 자세히 설명하고 실습 예제 명www.infracody.comtop -bn1 | grep "Cpu(s)" | awk '{printf("CPU 사용률 : %.1f%%\n", 10..
-
EC2 GitLab Runner 설치GitLab 2024. 7. 31. 17:45
https://docs.gitlab.com/runner/ GitLab Runner | GitLabGitLab product documentation.docs.gitlab.comDocker 설치EC2 인스턴스 생성(AMI : Ubuntu Server 24.04 LTS)인스턴스 유형 t3.xlarge로 CPU 4core, Memory 16G로 맞춰준다.# 충돌하는 모든 패키지를 제거for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get removekg; done# Docker apt저장소를 설정sudo apt-get updatesudo apt-get install ca-certificates cu..
-
GitLab SMTP 설정GitLab 2024. 7. 31. 14:21
SMTP 설정 User를 초대하기 위해서 SMTP 설정을 해야 한다. SMTP 서버는 Google을 사용한다.Gmail 메일 서버 사용해서 이메일을 보낸다.https://docs.gitlab.com/omnibus/settings/smtp.html SMTP settings | GitLabGitLab product documentation.docs.gitlab.com 1) Google SMTP 서버 설정라벨 관리 - 전달 및 POP/IMAP - 모든 메일에 POP 사용하기 2) 앱 인증용 비밀번호 발급 SMTP 서버를 이용할 때 구글 계정과 password가 필요하다. 앱 인증용 비밀번호를 발급하여 구글 계정 password 대신 사용 시 유출을 막을 수 있다.Google 계정 - 보안 - 2단계 인증 ..
-
EC2 GitLab 설치GitLab 2024. 7. 30. 10:35
AMI : Amazon Linux 2, 2023인스턴스 유형 t2.medium인바운드 규칙docker 설치sudo yum update -ysudo amazon-linux-extras install dockersudo yum install -y dockersudo service docker startdocker --version# sudo를 사용하지 않고도 Docker 명령을 실행할 수 있도록 docker 그룹에 ec2-user를 추가sudo usermod -a -G docker ec2-usergitlab 이미지를 이용해서 컨테이너 생성 타임존 변경하기# UTC Asia/Seoul 시간으로 바꾸기rm /etc/localtime sudo ln -s /usr/share/zoneinfo/Asia/Seoul /e..