5.3. 명령줄을 사용하여 셀프 호스트 엔진 배포

명령줄에서 셀프 호스트 엔진을 배포할 수 있습니다. 설정 패키지를 설치한 후 hosted-engine --deploy 명령을 실행하고 스크립트는 환경의 세부 정보를 수집하여 호스트 및 관리자를 구성하는 데 사용합니다.

배포를 일시 중지하거나 자동화를 사용하여 배포 중에 수동으로 Manager 가상 시스템을 사용자 지정할 수 있습니다.

  • 변수 he_pause_hosttrue 로 설정하면 Manager를 설치하고 배포 호스트를 Manager에 추가한 후 배포를 일시 중지합니다.
  • 변수 he_pause_before_engine_setuptrue 로 설정하면 Manager를 설치하기 전에 배포가 일시 중지되고 Manager를 복원하기 전에 he_restore_from_file 을 사용합니다.

    참고

    he_pause_host 또는 he_pause_before_engine_setup 변수가 true로 설정된 경우 배포 호스트에서 접미사 _he_setup_lock 을 사용하여 /tmp 에 잠금 파일이 생성됩니다. 그러면 필요에 따라 가상 시스템을 수동으로 사용자 지정할 수 있습니다. 잠금 파일을 삭제한 후에도 배포가 계속되거나 24시간이 지난 후에도 배포됩니다.

  • 배포 호스트의 다음 디렉터리에 Ansible 플레이북을 추가하면 플레이북이 자동으로 실행됩니다. /usr/share/ansible/collections/ansible_collections/ansible_collections/redhat/rhv/roles/hosted_engine_setup/hooks/ 의 다음 디렉토리 중 하나에 플레이북을 추가합니다.

    • enginevm_before_engine_setup
    • enginevm_after_engine_setup
    • after_add_host
    • after_setup

사전 요구 사항

  • engine-setup 을 수행하기 전에 어플라이언스 콘텐츠를 최신 제품 버전으로 업그레이드하십시오.

    • 이 작업을 수동으로 수행하려면 he_pause_before_engine_setup 을 사용하여 배포를 일시 중지하고 dnf 업데이트를 수행합니다.
    • 이 작업을 자동으로 수행하려면 enginevm_before_engine_setup 후크를 적용합니다.
  • 관리자 및 호스트에 준비된 FQDN. 정방향 및 역방향 조회 레코드는 모두 DNS에서 설정해야 합니다.
  • FCP 또는 iSCSI 중 하나의 블록 스토리지 도메인을 사용하는 경우 단일 대상 LUN은 자체 호스팅 엔진에 대해 지원되는 유일한 설정입니다.
  • 선택 사항: 자동화를 사용하여 배포하는 동안 Manager 가상 시스템을 사용자 지정하려면 Ansible 플레이북을 추가해야 합니다. 배포 중 자동화를 사용하여 엔진 가상 시스템 사용자 정의를 참조하십시오.
  • 셀프 호스트 엔진 설정 스크립트에는 엔진 가상 시스템에서 베어 메탈 호스트의 루트 계정에 대해 2048비트 RSA 키를 사용하여 ssh 공개 키 액세스가 필요합니다. /etc/ssh/sshd_config 에서 이러한 값은 다음과 같이 설정해야 합니다.

    • PubkeyAcceptedKeyTypes 는 2048비트 RSA 키를 허용해야 합니다.

      기본적으로 이 설정은 시스템 전체 암호화 정책을 사용합니다. 자세한 내용은 설명서 페이지 crypto-policies(7) 을 참조하십시오.

      참고

      4.4.5.5 이전 버전에서 Manager에 등록된 RHVH 호스트는 모든 키가 마이그레이션될 때까지 이전 버전과의 호환성을 위해 RSA 2048이 필요합니다.

      4.4.5.5 이상에 등록된 RHVH 호스트는 Manager와 RHVH에서 둘 다 지원하는 강력한 알고리즘을 사용합니다. PubkeyAcceptedKeyTypes 설정은 사용되는 알고리즘을 결정하는 데 도움이 됩니다.

    • PermitRootLogin암호 없이 또는 yes로 설정됩니다.
    • PubkeyAuthenticationyes로 설정됨

절차

  1. 배포 도구를 설치합니다.

    # dnf install ovirt-hosted-engine-setup
  2. 네트워크 또는 터미널 중단 시 세션이 손실되지 않도록 tmux 창 관리자를 사용하여 스크립트를 실행합니다.

    tmux 설치 및 실행 :

    # dnf -y install tmux
    # tmux
  3. 배포 스크립트를 시작합니다.

    # hosted-engine --deploy

    또는 배포 호스트를 Manager에 추가한 후 배포를 일시 중지하려면 --ansible-extra-vars=he_pause_host=true:

    # hosted-engine --deploy --ansible-extra-vars=he_pause_host=true
    참고

    언제든지 스크립트를 이스케이프하려면 Ctrl+D 키보드 조합을 사용하여 배포를 중단합니다. 세션 시간 제한 또는 연결 중단이 발생하는 경우 tmux attach 를 실행하여 배포 세션을 복구합니다.

  4. 메시지가 표시되면 Yes 를 입력하여 배포를 시작합니다.

    Continuing will configure this host for serving as hypervisor and will create a local VM with a running engine.
    The locally running engine will be used to configure a new storage domain and create a VM there.
    At the end the disk of the local VM will be moved to the shared storage.
    Are you sure you want to continue? (Yes, No)[Yes]:
  5. 네트워크를 구성합니다. 표시된 게이트웨이가 올바른지 확인하고 Enter 를 누릅니다. 스크립트가 호스트의 연결을 확인할 수 있도록 동일한 서브넷에 ping 가능 주소를 입력합니다.

    Please indicate a pingable gateway IP address [X.X.X.X]:
  6. 이 스크립트는 환경의 관리 브릿지로 사용할 수 있는 NIC를 탐지합니다. 해당 항목 중 하나를 입력하거나 Enter 를 눌러 기본값을 적용합니다.

    Please indicate a nic to set ovirtmgmt bridge on: (ens1, ens0) [ens1]:
  7. 네트워크 연결을 확인하는 방법을 지정합니다. 기본값은 dns 입니다.

    Please specify which way the network connectivity should be checked (ping, dns, tcp, none) [dns]:
    ping
    게이트웨이를 ping합니다.
    DNS
    DNS 서버와의 연결을 확인합니다.
    tcp
    호스트 및 포트 조합에 대한 TCP 연결을 생성합니다. 대상 IP 주소와 포트를 지정해야 합니다. 연결이 성공적으로 생성되면 네트워크가 활성인 것으로 간주됩니다. 지정된 호스트가 지정된 포트에서 들어오는 TCP 연결을 수락할 수 있는지 확인합니다.
    none
    네트워크는 항상 연결된 것으로 간주됩니다.
  8. 셀프 호스트 엔진의 호스트를 배포할 데이터 센터의 이름을 입력합니다. 기본 이름은 Default 입니다.

    Please enter the name of the data center where you want to deploy this hosted-engine host.
    Data center [Default]:
  9. 셀프 호스트 엔진의 호스트를 배포할 클러스터의 이름을 입력합니다. 기본 이름은 Default 입니다.

    Please enter the name of the cluster where you want to deploy this hosted-engine host.
    Cluster [Default]:
  10. 가상 시스템 설치에 사용자 지정 어플라이언스를 사용하려면 OVA 아카이브 경로를 입력합니다. 또는 RHV-M Appliance를 사용하려면 이 필드를 비워 둡니다.
  11. 사용자 지정 RHV-M Appliance 어플라이언스 이미지로 배포하려면 OVA 아카이브의 경로를 지정합니다. 또는 RHV-M Appliance를 사용하려면 이 필드를 비워 둡니다.

    If you want to deploy with a custom engine appliance image, please specify the path to the OVA archive you would like to use.
     Entering no value will use the image from the rhvm-appliance rpm, installing it if needed.
     Appliance image path []:
  12. Manager 가상 머신의 CPU 및 메모리 구성을 입력합니다.

    Please specify the number of virtual CPUs for the VM. The default is the appliance OVF value [4]:
    Please specify the memory size of the VM in MB. The default is the maximum available [6824]:
  13. manager.example.com과 같은 Manager 가상 머신의 FQDN을 지정합니다.

    Please provide the FQDN you would like to use for the engine.
    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 []:
  14. Manager 가상 머신의 도메인을 지정합니다. 예를 들어 FQDN이 manager.example.com 인 경우 example.com 을 입력합니다.

    Please provide the domain name you would like to use for the engine appliance.
    Engine VM domain: [example.com]
  15. Manager의 루트 암호를 생성하고 다시 입력하여 확인합니다.

    Enter root password that will be used for the engine appliance:
    Confirm appliance root password:
  16. 선택 사항: 암호를 입력하지 않고 Manager 가상 머신에 root 사용자로 로그인할 수 있도록 SSH 공개 키를 입력하고 root 사용자에 대해 SSH 액세스를 활성화할지 여부를 지정합니다.

    You may provide an SSH public key, that will be added by the deployment script to the authorized_keys file of the root user in the engine appliance.
    This should allow you passwordless login to the engine machine after deployment.
    If you provide no key, authorized_keys will not be touched.
    SSH public key []:
    
    Do you want to enable ssh access for the root user (yes, no, without-password) [yes]:
  17. 선택 사항: Manager 가상 머신에서 DISA STIG 보안 프로파일을 적용할 수 있습니다. DISA STIG 프로파일이 기본 OpenSCAP 프로파일입니다.

    Do you want to apply a default OpenSCAP security profile? (Yes, No) [No]:
  18. Manager 가상 시스템의 MAC 주소를 입력하거나 무작위로 생성된 가상 시스템의 MAC 주소를 수락합니다. DHCP를 통해 Manager 가상 머신에 IP 주소를 제공하려면 이 MAC 주소에 유효한 DHCP 예약이 있는지 확인하십시오. 배포 스크립트는 DHCP 서버를 구성하지 않습니다.

    You may specify a unicast MAC address for the VM or accept a randomly generated default [00:16:3e:3d:34:47]:
  19. Manager 가상 머신의 네트워킹 세부 정보를 입력합니다.

    How should the engine VM network be configured (DHCP, Static)[DHCP]?

    Static 을 지정하면 Manager 가상 머신의 IP 주소를 입력합니다.

    중요
    • 정적 IP 주소는 호스트와 동일한 서브넷에 속해야 합니다. 예를 들어 호스트가 10.1.1.0/24에 있는 경우 Manager 가상 머신의 IP는 동일한 서브넷 범위(10.1.1.1-254/24)에 있어야 합니다.
    • IPv6의 경우 Red Hat Virtualization은 정적 주소 지정만 지원합니다.
    Please enter the IP address to be used for the engine VM [x.x.x.x]:
    Please provide a comma-separated list (max 3) of IP addresses of domain name servers for the engine VM
    Engine VM DNS (leave it empty to skip):
  20. Manager 가상 머신 및 기본 호스트 항목을 가상 머신의 /etc/hosts 파일에 추가할지 여부를 지정합니다. 호스트 이름을 확인할 수 있는지 확인해야 합니다.

    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.
    Add lines to /etc/hosts? (Yes, No)[Yes]:
  21. SMTP 서버의 이름 및 TCP 포트 번호, 이메일 알림을 보내는 데 사용되는 이메일 주소 및 이러한 알림을 받기 위한 쉼표로 구분된 이메일 주소 목록을 제공합니다. 또는 Enter 를 눌러 기본값을 수락합니다.

    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]:
  22. admin@internal 사용자의 암호를 생성하여 관리 포털에 액세스하여 다시 입력하여 확인합니다.

    Enter engine admin password:
    Confirm engine admin password:
  23. 배포 호스트의 호스트 이름을 지정합니다.

    Please provide the hostname of this host on the management network [hostname.example.com]:

    이 스크립트는 가상 시스템을 생성합니다. 기본적으로 스크립트는 먼저 RHV-M Appliance를 다운로드하여 설치 시간을 단축합니다.

  24. 선택 사항: he_pause_host: true 변수를 설정하면 배포 호스트를 Manager에 추가한 후 배포가 일시 중지됩니다. 이제 배포 호스트에서 Manager 가상 시스템에 로그인하여 사용자 지정할 수 있습니다. FQDN 또는 Manager의 IP 주소로 로그인할 수 있습니다. 예를 들어 관리자의 FQDN이 manager.example.com 인 경우 :

    $ ssh root@manager.example.com
    작은 정보

    설치 로그에서 IP 주소는 local_vm_ip 에 있습니다. 설치 로그는 /var/log/ovirt-hosted-engine-setup/ovirt-hosted-engine-setup-ansible-bootstrap_local_vm* 의 최신 인스턴스입니다.

    1. 필요에 따라 Manager 가상 시스템을 사용자 지정합니다.
    2. 마쳤으면 Manager FQDN이 있는 브라우저를 사용하여 관리 포털에 로그인하고 호스트의 상태가 Up 인지 확인합니다.
    3. 잠금 파일을 삭제하고 배포 스크립트가 자동으로 계속되어 Manager 가상 시스템을 구성합니다.
  25. 사용할 스토리지 유형을 선택합니다.

    Please specify the storage you would like to use (glusterfs, iscsi, fc, nfs)[nfs]:
    • NFS의 경우 버전, 스토리지의 전체 주소 및 경로 및 모든 마운트 옵션을 입력합니다.

      Please specify the nfs version you would like to use (auto, v3, v4, v4_1)[auto]:
      Please specify the full shared storage connection path to use (example: host:/path): storage.example.com:/hosted_engine/nfs
      If needed, specify additional mount options for the connection to the hosted-engine storage domain []:
    • iSCSI의 경우 포털 세부 정보를 입력하고 자동 감지 목록에서 대상과 LUN을 선택합니다. 배포 중에 하나의 iSCSI 대상만 선택할 수 있지만 다중 경로는 동일한 포털 그룹의 모든 포털을 연결하는 데 지원됩니다.

      참고

      iSCSI 대상을 두 개 이상 지정하려면 셀프 호스트 엔진을 배포하기 전에 다중 경로를 활성화해야 합니다. 자세한 내용은 Red Hat Enterprise Linux DM Multipath 를 참조하십시오. 다른 옵션으로 다중 경로를 설치하고 구성하는 스크립트를 생성하는 다중 경로 도우미 도구도 있습니다.

      Please specify the iSCSI portal IP address:
      Please specify the iSCSI portal port [3260]:
      Please specify the iSCSI discover user:
      Please specify the iSCSI discover password:
      Please specify the iSCSI portal login user:
      Please specify the iSCSI portal login password:
      
      The following targets have been found:
      	[1]	iqn.2017-10.com.redhat.example:he
      		TPGT: 1, portals:
      			192.168.1.xxx:3260
      			192.168.2.xxx:3260
      			192.168.3.xxx:3260
      
      Please select a target (1) [1]: 1
      
      The following luns have been found on the requested target:
        [1] 360003ff44dc75adcb5046390a16b4beb   199GiB  MSFT   Virtual HD
            status: free, paths: 1 active
      
      Please select the destination LUN (1) [1]:
    • Gluster 스토리지의 경우 스토리지의 전체 주소 및 경로와 모든 마운트 옵션을 입력합니다.

      중요

      복제본 1 및 복제본 3 Gluster 스토리지만 지원됩니다. 다음과 같이 볼륨을 구성해야 합니다.

      gluster volume set VOLUME_NAME group virt
      gluster volume set VOLUME_NAME performance.strict-o-direct on
      gluster volume set VOLUME_NAME network.remote-dio off
      gluster volume set VOLUME_NAME storage.owner-uid 36
      gluster volume set VOLUME_NAME storage.owner-gid 36
      gluster volume set VOLUME_NAME network.ping-timeout 30
      Please specify the full shared storage connection path to use (example: host:/path): storage.example.com:/hosted_engine/gluster_volume
      If needed, specify additional mount options for the connection to the hosted-engine storage domain []:
    • 파이버 채널의 경우 자동 감지 목록에서 LUN을 선택합니다. 호스트 버스 어댑터는 구성 및 연결되어야 하며 LUN은 기존 데이터를 포함하지 않아야 합니다. 기존 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]:
  26. Manager 가상 머신의 디스크 크기를 입력합니다.

    Please specify the size of the VM disk in GB: [50]:

    배포가 완료되면 데이터 센터 1개, 클러스터, 호스트, 스토리지 도메인 및 Manager 가상 시스템이 이미 실행 중입니다. 관리 포털에 로그인하여 다른 리소스를 추가할 수 있습니다.

  27. 선택 사항: 환경에 사용자를 추가할 수 있도록 Red Hat Single Sign On을 설치하고 구성하십시오. 자세한 내용은 관리 가이드의 Red Hat Single Sign-On 설치 및 구성을 참조하십시오.
  28. 선택 사항: RHV 환경에서 보고서를 모니터링하고 표시할 수 있도록 Grafana를 배포합니다. 자세한 내용은 관리 가이드의 Grafana 구성 을 참조하십시오.

Manager 가상 시스템, 호스트 실행 중인 호스트 및 셀프 호스트 엔진 스토리지 도메인은 관리 포털에서 골드 왕관으로 플래그가 지정됩니다.

참고

Manager의 I/O 스케줄러와 Manager의 주문 I/O 요청을 호스팅하는 하이퍼바이저 모두. 이중 재주문으로 인해 스토리지 계층에 대한 I/O 요청이 지연되어 성능에 영향을 미칠 수 있습니다.

데이터 센터에 따라 I/O 스케줄러를 none 으로 변경하여 성능을 향상시킬 수 있습니다. 자세한 내용은 RHEL 시스템 상태 및 성능 모니터링 및 관리에서 사용 가능한 디스크 스케줄러 를 참조하십시오.

다음 단계는 Red Hat Virtualization Manager 리포지토리를 활성화하는 것입니다.