-
[Ubuntu] Ubuntu 22.04 needrestart 설정
What? Ubuntu 22.04 를 사용하는 어느 날 apt 를 사용하여 package 설치간 아래와 같은 log 가 나왔다. $ sudo apt install xxx ...생략 Scanning processor microcode... Scanning linux images... Running kernel seems to be up-to-date. The processor microcode seems to be up-to-date. No services need to be restarted. No containers need to be restarted. No user sessions are running outdated binaries. No VM guests are running outdated hypervisor (qemu) binaries on this host 무슨 의미와...
-
[Linux] dig command 사용법
DNS 질의 매번 잊어버려서 따로 정리함. 자주 활용되는 것만 정리. dig command 란? dig 는 도메인 네임 시스템 네임서버에 질의하기 위한 네트워크 관리 명령 줄 인터페이스 도구 입니다. Domain 의 IP 확인 Domain 에 연결된 IP 를 확인하는 방법입니다. chhan@chhanPC:~$ dig chhanz.mooo.com ; <<>> DiG 9.16.1-Ubuntu <<>> chhanz.mooo.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31021 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;;...
-
[Ubuntu] Ubuntu 22.04 PXE Boot Server 구성
isc-dhcp-server, tftpd-hpa, apache2 Ubuntu 22.04 PXE Boot Server 구성 PXE Boot 를 구성하기 위해서는 3가지 요소가 필요하다. httpd : ISO 배포를 위함. tftpd : bootloader 배포를 위함. dhcpd : PXE Boot 간 IP 를 임대하기 위함. httpd 구성 apache2 를 이용하여 구성합니다. (nginx 와 같은 기타 다른 WEB Application 을 이용해도 무방합니다.) Install apache2 아래 명령을 이용하여 설치를 진행합니다. $ sudo apt install -y apache2 Ubuntu ISO 를 Web 서버의 DocumentRoot 에 추가합니다. $ cd /var/www/html/ $ sudo...
-
[Linux] Package 에 포함된 file 목록 확인
Ubuntu/CentOS/Rocky/RHEL Package 에 포함된 file 목록 확인 특정 Package 에 포함된 File 이 무엇인지 확인하기 위해선 아래와 같이 Linux 에 따라 확인이 가능합니다. CentOS / RHEL / Rocky 계열 rpm 명령을 통해 확인합니다. $ rpm -ql epel-release-7-11.noarch /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/epel.repo /usr/lib/systemd/system-preset/90-epel.preset /usr/share/doc/epel-release-7 /usr/share/doc/epel-release-7/GPL 위와 같이 epel-release package 에 포함된 파일을 확인 할 수 있습니다. Ubuntu 계열 dpkg 명령을 통해 확인합니다. $ dpkg -L tmux /. /usr /usr/bin /usr/bin/tmux /usr/share /usr/share/doc /usr/share/doc/tmux /usr/share/doc/tmux/NEWS.Debian.gz /usr/share/doc/tmux/README /usr/share/doc/tmux/changelog.Debian.gz /usr/share/doc/tmux/copyright /usr/share/doc/tmux/example_tmux.conf...
-
[Kubernetes] Cloud Native PostgreSQL Operator (CloudNativePG)
Cloud Native PostgreSQL Operator (CloudNativePG) Cloud Native PostgreSQL Operator (이하 CloudNativePG) 란? 모든 Kubernetes Cluster 에서 PostgreSQL Workload 를 관리하도록 설계된 Operator 입니다. 기본적으로 Primary/Standby 구조, Native Streaming Replication 사용하는 PostgreSQL Database Cluster 생성/관리 됩니다. Install CloudNativePG Manifest 를 이용한 설치 (공식 문서) 는 아래와 같은 방법으로 진행합니다. kubectl apply -f \ https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/main/releases/cnpg-1.15.1.yaml 관련하여 Helm Chart 로도 관리가 가능하도록 Chart 를 제공하고 있습니다. 이번 포스팅에선 Helm Chart 를 이용한 설치에 대한 내용을 담도록 하겠습니다. (☁...
-
[Kubernetes] MySQL Operator
MySQL Operator MySQL Operator 는 MySQL 서버 및 MySQL 라우터 그룹으로 구성된 하나 이상의 MySQL InnoDB 클러스터 관리에 중점을 둔 Operator 입니다. MySQL Operator 자체는 Kubernetes 클러스터에서 실행되며 MySQL Operator 를 통해 계속 사용 가능하고 실행 중인지 확인하는 역할을 합니다. Operator 배포 Helm 을 이용하여 MySQL Operator 를 배포 하겠습니다. (☁ |DOIK-Lab:default) root@chhan-k8s-1:~# helm repo add mysql-operator https://mysql.github.io/mysql-operator/ "mysql-operator" has been added to your repositories (☁ |DOIK-Lab:default) root@chhan-k8s-1:~# helm repo update Hang tight while we...
-
[Kubernetes] Statefulset 와 Headless Service
목차 Statefuleset 이란? Test Run Statefuleset Headless Service 참고 자료 Statefuleset 이란? Statefulset 은 deployment 와 유사하게 container spec 기반으로 pod 를 관리하는 resource 이다. Statefulset 는 아래와 같은 환경을 요구하는 어플리케이션에서 유용하게 사용 할 수 있다. 안정된, 고유한 네트워크 식별자. 안정된, 지속성을 갖는 스토리지. 순차적인, 정상 배포(graceful deployment)와 스케일링. 순차적인, 자동 롤링 업데이트. Test 아래 yaml 을 이용하여 Statefulset 을 만들었다. 사용된 어플리케이션은 Flask 이며, App 이 기동될 때 Pod 정보를 PV 에 기록하는...
-
[Kubernetes] OpenStack Instance 에서 Cailco CNI 로 Kubernetes 구성
목차 Intro Issue Root Cause Finish 참고 자료 Intro 최근 Kubernetes 에서 데이터베이스 오퍼레이터를 이용하여 데이터베이스 배포 및 운영을 스터디하는 그룹에 참여하게 되었습니다. (https://gasidaseo.notion.site/e49b329c833143d4a3b9715d75b5078d) 위와 같은 스터디를 진행하기위해 Kubernetes Cluster 를 생성하는데 kubeadm 으로 Kubernetes 를 배포하면 되는 쉬운 환경이라 큰 걱정 없이 환경 구축을 시작했습니다. 대부분의 스터디맴버의 환경은 AWS 이고 나의 환경은 OpenStack 이며, 나는 Public Cloud 를 사용 할 이유가 없었다. 하지만 스터디맴버들과 다른 나의 환경이 문제가 되었습니다.ㅎㅎㅎ Issue kubeadm 을 이용하여 Master...
-
[Ubuntu] unattended-upgrades 설정 (자동 업데이트)
Ubuntu 22.04 unattended-upgrades 란? unattended-upgrades 는 Ubuntu system 의 최신 보안 패치 및 기타 업데이트를 자동으로 수행하고 시스템을 유지, 관리 하는 것에 목적이 있는 서비스 입니다. 설치 Ubuntu 를 설치하면 기본적으로 해당 서비스는 설치되어 작동하고 있습니다. 만약 설치가 안되어 있다면 아래와 같이 설치를 진행합니다. $ sudo apt install unattended-upgrades -y 구동중인 daemon 정보는 아래와 같습니다. $ sudo systemctl status unattended-upgrades ● unattended-upgrades.service - Unattended Upgrades Shutdown Loaded: loaded (/lib/systemd/system/unattended-upgrades.service; enabled; vendor preset: enabled) Active: active (running) since...
-
[Ubuntu] Local mirror site 구성(DVD/Repository sync)
Ubuntu 22.04 목차 overview DVD 사용 Mount DVD sources.list 추가 Repository 추가 Sync Repository apt-mirror 설치 mirror.list 수정 Sync Repository Check Sync mirror data location Mirror site 운영 Mirror site 추가 APT update overview 이번 포스팅은 DVD 를 활용하여 인터넷이 안되는 환경에서 Ubuntu package 를 다루는 방법과 외부 환경이 아닌 내부에 Repository mirror site 를 구성하는 방법에 대해 알아보도록 하겠습니다. DVD 사용 주로 인터넷이 안되는 망분리 된 곳에서 많이 활용될 방식입니다. Mount DVD 아래 명령어를 통해 DVD...