호스트 OS위에 많은 도커 컨테이너가 돌아가면 하드웨어 효율성을 극대화할 수 있지만

단점으로 호스트 OS의 보안취약성을 이용해 해커가 뚫으면 컨테이너가 위험에 노출되고

호스트 OS가 다운되면 전체 컨테이너 서비스 장애가 발생할 수 있겠습니다.

 

VMWare 사에서 Docker 컨테이너 운영에 최적화된 OS를 만들었는데 벌써 버전 3.0이 되었나 봅니다.

 

이 OS를 ESXi 하이퍼바이저에 설치 후  Docker 컨테이너를 운영하되 photonos를 여러개 설치해서 컨테이너를 분산시키면 처음 말한 보안 및 안정성 이슈를 완화하는 효과가 나타나겠습니다.

 

(photonos 외에 컨테이너에 최적화된 여러 os가 있습니다.)

 

https://vmware.github.io/photon/

 

  • Optimized for VMware vSphere®: The Linux kernel is tuned for performance when Photon OS runs on vSphere.
  • Support for containers: Photon OS includes the Docker daemon and works with container orchestration frameworks, such as Mesos and Kubernetes.
  • Efficient lifecycle management: Photon OS is easy to manage, patch, and update.
  • Security hardened: The kernel and other aspects of the operating system are built with an emphasis on security.

다음은 ESXi 6.7에 단순히 photonos 3.0을 설치하고 기본 설정을 하는 방법입니다.

 

1. ESXi 6.7에 설치하기

photonos 사이트에서 OVA 배포 파일을 다운로드 (OVA with virtual hardware v13 (UEFI Secure Boot)) 한 후

ESXi 6.7에서 OVA Import 하면 끝입니다! 용량은 153M 정도입니다.

 

2. PhotonOS 기본설정

 2-1. 초기 로그인 ID : root , 초기 로그인 PW : changeme

 2-2. IP 보기 : ip a

 2-3. IP 변경 : 

cd /etc/systemd/network
mv 99-dhcp-en.network 10-static-en.network
chmod 644 10-static-en.network
[Match]
Name=eth0

[Network]
Address=198.51.0.2/24
Gateway=198.51.0.1
systemctl restart systemd-networkd

https://vmware.github.io/photon/assets/files/html/3.0/photon_admin/setting-a-static-ip-address.html

 2-4. Root로 SSH 로그인 허용 (PermitRootLogin yes)

vim /etc/ssh/sshd_config

# override default of no subsystems
Subsystem       sftp    /usr/libexec/sftp-server

# Example of overriding settings on a per-user basis
#Match User anoncvs
#       X11Forwarding no
#       AllowTcpForwarding no
#       PermitTTY no
#       ForceCommand cvs server
PermitRootLogin yes
UsePAM yes
systemctl restart sshd

 2-5. Docker 활성화

systemctl status docker
systemctl enable docker
systemctl start docker

2-6 업데이트

tdnf update

 

 

유용한 링크들

https://medium.com/@darkrasid/docker%EC%99%80-vm-d95d60e56fdd

http://egloos.zum.com/mcchae/v/11314059

 

+ Recent posts