2장. 셀프 호스트 엔진 (Self-Hosted Engine) 배포

2.1. Red Hat Enterprise Linux Host에 셀프 호스트 엔진 배포

2.1.1. 셀프 호스트 엔진 (Self-Hosted Engine) 패키지 설치

호스트가 등록되었고 필요한 서브스크립션을 등록했는지 확인합니다. 보다 자세한 내용은 설치 가이드에 있는 필요한 서브스크립션을 등록에서 참조하시기 바랍니다.

절차 2.1. 셀프 호스트 엔진 (Self-Hosted Engine) 설치

  1. 셀프 호스트 엔진 패키지를 설치합니다:
    # yum install ovirt-hosted-engine-setup
  2. 옵션으로 RHV-M 가상 어플라이언스 패키지를 설치하는 경우 해당 어플라이언스를 사용하여 Manager 가상 머신을 설치할 수 있습니다:
    # yum install rhevm-appliance
    Manager 운영 체제 설치 시 CD-ROM, 디스크, 또는 PXE 설치 미디어를 사용합니다. 물리적 CD-ROM 드라이브는 지원되지 않습니다.
Red Hat Enterprise Linux 호스트에 셀프 호스트 엔진을 배포 및 설정하기 위해 다음 단계를 진행합니다.

2.1.2. RHEL 기반 셀프 호스트 엔진 (Self-Hosted Engine) 설정

hosted-engine 스크립트를 사용하여 호스트 및 Manager 가상 머신을 설정할 수 있습니다. 이 스크립트는 사용자에게 일련의 질문을 하며, 사용자의 응답을 기반으로 환경을 구성하게 됩니다.
다음과 같은 전제 조건을 모두 충족하는지 확인합니다:

전제 조건

  • 새로 설치된 Red Hat Enterprise Linux 7 시스템이 있어야 하며 여기에 ovirt-hosted-engine-setup 패키지가 설치되어 있어야 합니다.
  • 셀프 호스트 엔진 환경을 위한 스토리지가 준비되어 있어야 합니다. 배포 시 스토리지 준비 방법은 관리 가이드에 있는 스토리지에서 참조하십시오.
  • Manager 및 호스트를 위한 정규화된 도메인 이름(FQDN)이 준비되어 있어야 합니다. 순방향 및 역방향 조회 기록은 모두 DNS에 설정되어야 합니다.
  • Manager 운영 체제 설치를 위해 CD-ROM, 디스크, 또는 PXE 설치 미디어를 준비해야 합니다. 권장되는 방법은 디스크 옵션을 선택하여 Manager 설치 시 RHV-M 가상 어플라이언스를 사용하는 것입니다. RHV-M 가상 어플라이언스를 얻기 위해 rhevm-appliance 패키지를 설치합니다. CD-ROM 옵션을 사용하려면 ISO 파일을 사용할 수 있어야 합니다. 물리적 CD-ROM 드라이브는 지원되지 않습니다.
  • Manager 설치 시 RHV-M 가상 어플라이언스를 사용하려면 최소한 60 GB의 공간이 있는 디렉토리가 있는지 확인합니다. hosted-engine 스크립트는 가장 먼저 /var/tmp 파일에 어플라이언스 파일의 압축을 풀 수 있는 공간이 충분한지 확인합니다. 그렇지 않은 경우 사용자가 다른 디렉토리를 지정할 수 있습니다.

절차 2.2. RHEL 기반 셀프 호스트 엔진 설정

  1. 호스트 엔진 배포 시작

    hosted-engine 스크립트를 실행합니다. 스크립트를 중지하려면 언제든지 CTRL+D 키보드 조합을 사용하여 배포를 중지합니다. 네트워크 또는 터미널 중단 시 세션을 잃지 않도록 screen 윈도우 관리자를 사용하여 스크립트를 실행하는 것이 권장됩니다. screen 패키지는 일반 Red Hat Enterprise Linux 리포지터리에 있으므로 아직 설치하지 않은 경우 이 패키지를 설치합니다.
    # yum install screen
    # screen
    # hosted-engine --deploy

    참고

    세션 시간 초과 또는 연결 중단 시 screen -d -r을 실행하여 hosted-engine 배포 세션을 복구합니다.
  2. 스토리지 설정

    사용할 스토리지 유형을 선택합니다.
    During customization use CTRL-D to abort.
    Please specify the storage you would like to use (glusterfs, iscsi, fc, nfs3, nfs4)[nfs3]:
    • NFS 스토리지 유형의 경우 FQDN 또는 IP 주소를 사용하여 전체 주소를 입력하고 공유 스토리지 도메인의 경로 이름을 입력합니다.
      Please specify the full shared storage connection path to use (example: host:/path): storage.example.com:/hosted_engine/nfs
    • iSCSI의 경우 iSCSI 포털 IP 주소, 포트, 사용자 이름 및 암호를 입력하고 자동 감지된 목록에서 대상 이름을 선택합니다. 배포 중 iSCSI 대상을 하나만 선택할 수 있습니다.
      Please specify the iSCSI portal IP address:           
      Please specify the iSCSI portal port [3260]:           
      Please specify the iSCSI portal user:           
      Please specify the iSCSI portal password:
      Please specify the target name (auto-detected values) [default]:
    • Gluster 스토리지의 경우 FQDN 또는 IP 주소를 사용하여 전체 주소를 입력하고 공유 스토리지 도메인의 경로 이름을 입력합니다.

      중요

      복제 (replica) 3 Gluster 스토리지만 지원됩니다. 다음의 설정이 완료되었는지 확인합니다:
      • 세 개의 Gluster 서버 모두의 /etc/glusterfs/glusterd.vol 파일에서 rpc-auth-allow-insecureon으로 설정합니다.
        option rpc-auth-allow-insecure on
      • 다음과 같이 볼륨을 설정합니다:
        gluster volume set volume cluster.quorum-type auto
        gluster volume set volume network.ping-timeout 10
        gluster volume set volume auth.allow \*
        gluster volume set volume group virt
        gluster volume set volume storage.owner-uid 36
        gluster volume set volume storage.owner-gid 36
        gluster volume set volume server.allow-insecure on
      Please specify the full shared storage connection path to use (example: host:/path): storage.example.com:/hosted_engine/gluster_volume
    • 파이버 채널(Fibre Channel)의 경우 host bus 아답터가 반드시 설정 및 연결되어야 하며, hosted-engine 스크립트가 사용 가능한 LUN을 자동으로 감지합니다. LUN에는 기존 데이터가 존재하지 않아야 합니다.
      The following luns have been found on the requested target:
      [1]     3514f0c5447600351       30GiB   XtremIO XtremApp
                              status: used, paths: 2 active
                
      [2]     3514f0c5447600352       30GiB   XtremIO XtremApp
                              status: used, paths: 2 active
      
      Please select the destination LUN (1, 2) [1]:
  3. 네트워크 설정

    해당 스크립트는 사용자 환경에서 매니지먼트 브리지(management bridge)로 사용할 수 있는 네트워크 인터페이스 컨트롤러(NIC)를 감지합니다. 그 후 사용자의 방화벽 설정을 확인하고 콘솔 (SPICE 또는 VNC) 액세스를 위해 설정을 수정할 수 있도록 제공하고 있습니다.
    Please indicate a nic to set rhvm bridge on: (eth1, eth0) [eth1]:
    iptables was detected on your computer, do you wish setup to configure it? (Yes, No)[Yes]: Yes
    Please indicate a pingable gateway IP address [X.X.X.X]:
  4. 가상 머신 설정

    부팅 장치로 disk 선택 시 스크립트는 사용 가능한 RHV-M 가상 어플라이언스를 자동 감지합니다. 메모리 크기를 지정합니다.
             Please specify the device to boot the VM from (choose disk for the oVirt engine appliance) 
             (cdrom, disk, pxe) [disk]: 
             Please specify the console type you would like to use to connect to the VM (vnc, spice) [vnc]: vnc
    [ INFO ] Detecting available oVirt engine appliances
             The following appliance have been found on your system:
                   [1] - The oVirt Engine Appliance image (OVA)
                   [2] - Directly select an OVA file
             Please select an appliance (1, 2) [1]:
    [ INFO ] Checking OVF archive content (could take a few minutes depending on archive size)
    Yes 선택 시 cloud-init가 Manager 가상 머신 초기 설정을 처리합니다. Generate 선택 시 cloud-init가 root 암호 설정, 네트워크 설정, 호스트 이름 설정, engine-setup에서 사용할 응답 파일 추가, 그리고 부팅 시 engine-setup 실행 등의 작업을 처리합니다. 옵션으로 기존 cloud-init 스크립트가 있는 경우 Existing 선택 시 cloud-init의 더욱 정교한 기능을 처리합니다. Manager 가상 머신의 FQDN을 입력합니다. HostedEngine-VM의 MAC 주소를 입력하거나 임의로 생성된 주소를 허용합니다. 가상 머신에 운영 체제를 설치하기 전에 MAC 주소를 사용하여 사용자의 DHCP 및 DNS 서버를 업데이트할 수 있습니다.

    참고

    cloud-init에 대한 보다 자세한 내용은 https://cloudinit.readthedocs.org/en/latest/에서 참조하시기 바랍니다.
    Would you like to use cloud-init to customize the appliance on the first boot (Yes, No)[Yes]? Yes
    Would you like to generate on-fly a cloud-init ISO image (of no-cloud type)
    or do you have an existing one (Generate, Existing)[Generate]? Generate
    Please provide the FQDN you would like to use for the engine appliance.
    Note: This will be the FQDN of the engine VM you are now going to launch.
    It should not point to the base host or to any other existing machine.
    Engine VM FQDN: (leave it empty to skip): manager.example.com
    Automatically execute engine-setup on the engine appliance on first boot (Yes, No)[Yes]? Yes
    Automatically restart the engine VM as a monitored service after engine-setup (Yes, No)[Yes]? Yes
    Enter root password that will be used for the engine appliance (leave it empty to skip): p@ssw0rd
    Confirm appliance root password: p@ssw0rd
    The following CPU types are supported by this host:
        - model_Penryn: Intel Penryn Family
        - model_Conroe: Intel Conroe Family
    Please specify the CPU type to be used by the VM [model_Penryn]: 
    Please specify the number of virtual CPUs for the VM [Defaults to appliance OVF value: 4]: 
    You may specify a MAC address for the VM or accept a randomly generated default [00:16:3e:77:b2:a4]: 
    How should the engine VM network be configured (DHCP, Static)[DHCP]? Static
    Please enter the IP address to be used for the engine VM: 192.168.x.x
    Please provide a comma-separated list (max3) of IP addresses of domain name servers for the engine VM
    Engine VM DNS (leave it empty to skip):
    Add lines for the appliance itself and for this host to /etc/hosts on the engine VM?
    Note: ensuring that this host could resolve the engine VM hostname is still up to you (Yes, No)[No] Yes
  5. 호스트 엔진 설정

    관리 포털에서 호스트가 인식될 수 있는 이름을 입력하고 admin@internal 사용자가 관리 포털에 액세스하기 위한 암호를 입력합니다. SMTP 서버의 이름 및 TCP 포트 번호, 이메일 알림 전송에 사용되는 이메일 주소, 그리고 이러한 알림을 수신하는 콤마로 구분된 이메일 주소 목록을 입력합니다.
    Enter engine admin password: p@ssw0rd
    Confirm engine admin password: p@ssw0rd
    Enter the name which will be used to identify this host inside the Administrator Portal [hosted_engine_1]:
    Please provide the FQDN for the engine you would like to use.
              This needs to match the FQDN that you will use for the engine installation within the VM.
              Note: This will be the FQDN of the VM you are now going to create,
              it should not point to the base host or to any other existing machine.
              Engine FQDN:  []: manager.example.com
    Please provide the name of the SMTP server through which we will send notifications [localhost]: 
    Please provide the TCP port number of the SMTP server [25]: 
    Please provide the email address from which notifications will be sent [root@localhost]: 
    Please provide a comma-separated list of email addresses which will get notifications [root@localhost]:
  6. 설정 미리 보기

    진행하기 전에 hosted-engine 스크립트는 사용자가 입력한 설정값을 표시하며 해당 값으로 진행할 것인지 확인하라는 메시지가 표시됩니다.
  7. Manager 가상 머신 생성

    스크립트가 Manager 가상 머신 생성, ovirt-engine 및 고가용성 서비스 시작, 그리고 호스트 및 공유 스토리지와 Manager 가상 머신 연결을 처리합니다.
    You can now connect to the VM with the following command:
    	/usr/bin/remote-viewer vnc://localhost:5900
    Use temporary password "3042QHpX" to connect to vnc console.
    Please note that in order to use remote-viewer you need to be able to run graphical applications.
    This means that if you are using ssh you have to supply the -Y flag (enables trusted X11 forwarding).
    Otherwise you can run the command from a terminal in your preferred desktop environment.
    If you cannot run graphical applications you can connect to the graphic console from another host or connect to the serial console using the following command:
    socat UNIX-CONNECT:/var/run/ovirt-vmconsole-console/fabbea5a-1989-411f-8ed7-7abe0917fc66.sock,user=ovirt-vmconsole STDIO,raw,echo=0,escape=1
    
    If you need to reboot the VM you will need to start it manually using the command:
    hosted-engine --vm-start
    You can then set a temporary password using the command:
    hosted-engine --add-console-password
    [ INFO ] Running engine-setup on the appliance
    ...
    [ INFO ] Engine-setup successfully completed
    [ INFO ] Engine is still unreachable
    [ INFO ] Engine is still unreachable, waiting...
    [ INFO ] Engine replied: DB Up!Welcome to Health Status!
    [ INFO ] Connecting to the Engine
             Enter the name of the cluster to which you want to add the host (Default) [Default]:
    [ INFO  ] Waiting for the host to become operational in the engine. This may take several minutes... [ INFO  ] Still waiting for VDSM host to become operational...
    [ INFO  ] The VDSM Host is now operational      
    [ INFO  ] Shutting down the engine VM
    [ INFO  ] Enabling and starting HA services
    [ INFO  ] Saving hosted-engine configuration on the shared storage domain
              Hosted Engine successfully set up
    [ INFO  ] Stage: Clean up
    [ INFO  ] Generating answer file '/var/lib/ovirt-hosted-engine-setup/answers/answers-2015xx.conf'
    [ INFO  ] Generating answer file '/etc/ovirt-hosted-engine/answers.conf'
    [ INFO  ] Stage: Pre-termination
    [ INFO  ] Stage: Termination
hosted-engine 배포 스크립트가 성공적으로 완료되면 Red Hat Virtualization Manager가 사용자 호스트에서 설정 및 실행됩니다. Manager는 이미 데이터 센터, 클러스터, 호스트, Manager 가상 머신, 그리고 Manager 가상 머신 전용 공유 스토리지 도메인을 설정했습니다.

중요

admin@internal 사용자로 로그인 후 계속해서 Manager를 설정하고 추가 리소스를 추가합니다. 다른 데이터 도메인을 생성해야 데이터 센터 초기화 후 일반 가상 머신 데이터를 호스팅하고 Manager 가상 머신을 볼 수 있습니다. 다양한 스토리지 옵션에 대한 정보와 데이터 스토리지 도메인을 추가하는 방법은 관리 가이드에 있는 스토리지에서 참조하십시오.
사용자의 Red Hat Virtualization Manager를 디렉토리 서버에 연결하면 사용자 환경에 사용자를 추가할 수 있습니다. Red Hat Virtualization은 Red Hat Directory Server(RHDS), Red Hat Identity Management (IdM), Active Directory 등 여러 디렉토리 서버 유형을 지원합니다. 대화형 설정 스크립트인 ovirt-engine-extension-aaa-ldap-setup을 사용하여 사용자 환경에 디렉토리 서버를 추가합니다. 보다 자세한 내용은 관리 가이드에 있는 외부 LDAP 공급자 설정에서 참조하십시오.
또한 ovirt-hosted-engine-setup 스크립트는 설정 시 사용자가 입력한 응답을 파일에 저장하여 재해 복구에 사용합니다. --generate-answer=<file> 인수를 사용하여 대상을 지정하지 않는 경우 응답 파일이 /etc/ovirt-hosted-engine/answers.conf에 생성됩니다.

참고

RHV-M 가상 어플라이언스에서 SSH 암호 인증은 기본값으로 활성화되어 있지 않습니다. SSH 암호 인증을 활성화하려면 SPICE 또는 VNC 콘솔을 통해 Red Hat Virtualization Manager 가상 머신에 액세스합니다. sshd 서비스가 실행중인지 확인합니다. /etc/ssh/sshd_config을 편집해서 다음의 두 옵션을 yes로 변경합니다:
  • PasswordAuthentication
  • PermitRootLogin
변경 사항을 적용하기 위해 sshd 서비스를 다시 시작합니다.