Centos8.2安装oVirt-engine V4.4.1

2021/02 作者:ihunter 0 0

oVirt-engine既可以以虚机的形式部署在ovirt-node上,也可以部署在一台独立的服务器上,本文以oVirt4.4.1版本的engine在Centos8.2上的部署为例展示下独立部署的过程。

首先安装Centos8.2,可以安装minimal版本的,可以将此系统安装在虚拟机中,安装过程略。

安装完Centos8.2系统后,以root用户进入系统,设置系统主机名,并在/etc/hosts中添加解析。

配置ovirt4.4的yum源并启用需要的模块

# dnf install https://resources.ovirt.org/pub/yum-repo/ovirt-release44.rpm
# dnf module -y enable javapackages-tools
# dnf module -y enable pki-deps
# dnf module -y enable postgresql:12

升级系统软件包

dnf -y update

安装ovirt-engine软件包

dnf -y install ovirt-engine

执行engine-setup命令初始化配置ovirt-engine,过程如下(基本都采用默认选项即可):

[root@engine178 ~]# engine-setup

[ INFO ] Stage: Initializing

[ INFO ] Stage: Environment setup

     Configuration files: /etc/ovirt-engine-setup.conf.d/10-packaging-jboss.conf, /etc/ovirt-engine-setup.conf.d/10-packaging.conf

     Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20200910082401-gdce3p.log

     Version: otopi-1.9.2 (otopi-1.9.2-1.el8)

[ INFO ] DNF Downloading 1 files, 0.00KB

[ INFO ] DNF Downloaded CentOS-8 – AppStream

[ INFO ] DNF Downloading 1 files, 0.00KB

[ INFO ] DNF Downloaded CentOS-8 – Base

[ INFO ] DNF Downloading 1 files, 0.00KB

[ INFO ] DNF Downloaded CentOS-8 – Extras

[ INFO ] DNF Downloading 1 files, 0.00KB

[ INFO ] DNF Downloaded CentOS-8 – PowerTools

[ INFO ] DNF Downloading 1 files, 0.00KB

[ INFO ] DNF Downloaded Extra Packages for Enterprise Linux 8 – x86_64

[ INFO ] Stage: Environment packages setup

[ INFO ] Stage: Programs detection

[ INFO ] Stage: Environment setup (late)

[ INFO ] Stage: Environment customization

     –== PRODUCT OPTIONS ==–

     Configure Cinderlib integration (Currently in tech preview) (Yes, No) [No]: Yes

     Configure Engine on this host (Yes, No) [Yes]: Yes

     Configuring ovirt-provider-ovn also sets the Default cluster’s default network provider to ovirt-provider-ovn.

     Non-Default clusters may be configured with an OVN after installation.

     Configure ovirt-provider-ovn (Yes, No) [Yes]: Yes

     Configure WebSocket Proxy on this host (Yes, No) [Yes]: Yes

     * Please note * : Data Warehouse is required for the engine.

     If you choose to not configure it on this host, you have to configure

     it on a remote host, and then configure the engine on this host so

     that it can access the database of the remote Data Warehouse host.

     Configure Data Warehouse on this host (Yes, No) [Yes]: Yes

     Configure Grafana on this host (Yes, No) [Yes]: Yes

     Configure VM Console Proxy on this host (Yes, No) [Yes]: Yes

     –== PACKAGES ==–

[ INFO ] Checking for product updates…

[ INFO ] No product updates found

     –== NETWORK CONFIGURATION ==–

     Host fully qualified DNS name of this server [engine178.com]: engine178.com

[WARNING] Failed to resolve engine178.com using DNS, it can be resolved only locally

     Setup can automatically configure the firewall on this system.

     Note: automatic configuration of the firewall may overwrite current settings.

     Do you want Setup to configure the firewall? (Yes, No) [Yes]: Yes

[ INFO ] firewalld will be configured as firewall manager.

     –== DATABASE CONFIGURATION ==–

     Where is the DWH database located? (Local, Remote) [Local]: Local

     Setup can configure the local postgresql server automatically for the DWH to run. This may conflict with existing applications.

     Would you like Setup to automatically configure postgresql and create DWH database, or prefer to perform that manually? (Automatic, Manual) [Automatic]: Automatic

     Where is the ovirt cinderlib database located? (Local, Remote) [Local]: Local

     Setup can configure the local postgresql server automatically for the CinderLib to run. This may conflict with existing applications.

     Would you like Setup to automatically configure postgresql and create CinderLib database, or prefer to perform that manually? (Automatic, Manual) [Automatic]: Automatic

     Where is the Engine database located? (Local, Remote) [Local]: Local

     Setup can configure the local postgresql server automatically for the engine to run. This may conflict with existing applications.

     Would you like Setup to automatically configure postgresql and create Engine database, or prefer to perform that manually? (Automatic, Manual) [Automatic]: Automatic

     –== OVIRT ENGINE CONFIGURATION ==–

     Engine admin password:

     Confirm engine admin password:

[WARNING] Password is weak: 密码未通过字典检查 – 它基于一个字典中的词

     Use weak password? (Yes, No) [No]: Yes

     Application mode (Virt, Gluster, Both) [Both]: Both

     Use default credentials (admin@internal) for ovirt-provider-ovn (Yes, No) [Yes]: Yes

     –== STORAGE CONFIGURATION ==–

     Default SAN wipe after delete (Yes, No) [No]: No

     –== PKI CONFIGURATION ==–

     Organization name for certificate [com]: com

     –== APACHE CONFIGURATION ==–

     Setup can configure the default page of the web server to present the application home page. This may conflict with existing applications.

     Do you wish to set the application as the default page of the web server? (Yes, No) [Yes]: Yes

     Setup can configure apache to use SSL using a certificate issued from the internal CA.

     Do you wish Setup to configure that, or prefer to perform that manually? (Automatic, Manual) [Automatic]: Automatic

     –== SYSTEM CONFIGURATION ==–

     –== MISC CONFIGURATION ==–

     Please choose Data Warehouse sampling scale:

     (1) Basic

     (2) Full

     (1, 2)[1]: 1

     Use Engine admin password as initial Grafana admin password (Yes, No) [Yes]: Yes

     –== END OF CONFIGURATION ==–

[ INFO ] Stage: Setup validation

[WARNING] Less than 16384MB of memory is available

     –== CONFIGURATION PREVIEW ==–

     Application mode            : both

     Default SAN wipe after delete     : False

     Host FQDN               : engine178.com

     Firewall manager            : firewalld

     Update Firewall            : True

     CinderLib database host        : localhost

     CinderLib database port        : 5432

     CinderLib database secured connection : False

     CinderLib database host name validation : False

     CinderLib database name        : ovirt_cinderlib

     CinderLib database user name      : ovirt_cinderlib

     Set up Cinderlib integration      : True

     Configure local CinderLib database   : True

     Configure local Engine database    : True

     Set application as default page    : True

     Configure Apache SSL          : True

     Engine database host          : localhost

     Engine database port          : 5432

     Engine database secured connection   : False

     Engine database host name validation  : False

     Engine database name          : engine

     Engine database user name       : engine

     Engine installation          : True

     PKI organization            : com

     Set up ovirt-provider-ovn       : True

     Grafana integration          : True

     DWH database host           : localhost

     DWH database port           : 5432

     DWH database secured connection    : False

     DWH database host name validation   : False

     DWH database name           : ovirt_engine_history

     Grafana database user name       : ovirt_engine_history_grafana

     Configure WebSocket Proxy       : True

     DWH installation            : True

     Configure local DWH database      : True

     Configure VMConsole Proxy       : True

     Please confirm installation settings (OK, Cancel) [OK]: OK

[ INFO ] Stage: Transaction setup

[ INFO ] Stopping engine service

[ INFO ] Stopping ovirt-fence-kdump-listener service

[ INFO ] Stopping dwh service

[ INFO ] Stopping vmconsole-proxy service

[ INFO ] Stopping websocket-proxy service

[ INFO ] Stage: Misc configuration (early)

[ INFO ] Stage: Package installation

[ INFO ] Stage: Misc configuration

[ INFO ] Initializing PostgreSQL

[ INFO ] Creating PostgreSQL ‘ovirt_cinderlib’ database

[ INFO ] Configuring PostgreSQL

[ INFO ] Upgrading CA

[ INFO ] Creating PostgreSQL ‘engine’ database

[ INFO ] Configuring PostgreSQL

[ INFO ] Creating PostgreSQL ‘ovirt_engine_history’ database

[ INFO ] Configuring PostgreSQL

[ INFO ] Creating CA: /etc/pki/ovirt-engine/ca.pem

[ INFO ] Creating CA: /etc/pki/ovirt-engine/qemu-ca.pem

[ INFO ] Updating OVN SSL configuration

[ INFO ] Creating/refreshing DWH database schema

[ INFO ] Setting up ovirt-vmconsole proxy helper PKI artifacts

[ INFO ] Setting up ovirt-vmconsole SSH PKI artifacts

[ INFO ] Configuring WebSocket Proxy

[ INFO ] Creating/refreshing Engine database schema

[ INFO ] Creating a user for Grafana

[ INFO ] Creating/refreshing Engine ‘internal’ domain database schema

[ INFO ] Creating default mac pool range

[ INFO ] Adding default OVN provider to database

[ INFO ] Adding OVN provider secret to database

[ INFO ] Setting a password for internal user admin

[ INFO ] Install selinux module /usr/share/ovirt-engine/selinux/ansible-runner-service.cil

[ INFO ] Generating post install configuration file ‘/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf’

[ INFO ] Stage: Transaction commit

[ INFO ] Stage: Closing up

[ INFO ] Starting engine service

[ INFO ] Starting dwh service

[ INFO ] Starting Grafana service

[ INFO ] Restarting ovirt-vmconsole proxy service

     –== SUMMARY ==–

[ INFO ] Restarting httpd

     Please use the user ‘admin@internal’ and password specified in order to login

     Web access is enabled at:

       http://engine178.com:80/ovirt-engine

       https://engine178.com:443/ovirt-engine

     Internal CA 05:1F:C7:FE:DE:18:1C:F1:C4:C0:F0:76:49:EC:30:D8:D2:BF:C7:17

     SSH fingerprint: SHA256:+PdP6W3V/sQMTMi7ZhAPIItyd1PFB0zI/kOzldzEvyU

[WARNING] Less than 16384MB of memory is available

     Web access for grafana is enabled at:

       https://engine178.com/ovirt-engine-grafana/

     Please run the following command on the engine machine engine178.com, for SSO to work:

     systemctl restart ovirt-engine

     –== END OF SUMMARY ==–

[ INFO ] Stage: Clean up

     Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20200910082401-gdce3p.log

[ INFO ] Generating answer file ‘/var/lib/ovirt-engine/setup/answers/20200910084406-setup.conf’

[ INFO ] Stage: Pre-termination

[ INFO ] Stage: Termination

[ INFO ] Execution of setup completed successfully

 

setup成功后,到/etc/ovirt-engine/engine.conf.d这个目录下,

新建“99-custom-sso-setup.conf”这个文件,

文件内容为(此处的ip地址根据你的实际环境填写):

SSO_ALTERNATE_ENGINE_FQDNS="192.168.8.178"

重启engine服务,

systemctl restart ovirt-engine

然后可以在浏览器里通过ip访问了:

https://192.168.8.178

Centos8.2安装oVirt-engine V4.4.1

之后就可以添加主机了。

因hosted-engine部署经常会碰到一些问题,建议可将ovirt-engine独立部署,主机建议通过ovirt-node的iso镜像安装(比较简单),安装完主机,就可以到ovirt-engine的管理台添加主机和存储了。


赞(3) 更多分享

上篇: oVirt4.4超融合架构部署教程(v4.4.3)
下篇: oVirt4.4单台主机Allinone部署(非HostedEngine方式)