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
之后就可以添加主机了。
因hosted-engine部署经常会碰到一些问题,建议可将ovirt-engine独立部署,主机建议通过ovirt-node的iso镜像安装(比较简单),安装完主机,就可以到ovirt-engine的管理台添加主机和存储了。
PS:转载文章请注明来源:oVirt中文社区(www.cnovirt.com)
扫码加好友拉你进oVirt技术交流群!
您好 我使用iso镜像做的Node节点,用xftp上传一个4G得镜像,速度从80M/S一直下降到30M/S才稳定,而使用centos镜像装就稳定80M/S,希望版本看到回答一下,这个问题影响到存储啊(测了好几遍了)
首先我先确定一下问题情况:
1、使用xftp上传镜像,是上传的iso镜像吗,上传到什么地方了?
2、使用centos镜像装是指通过在centos上使用yum安装host的方式吗?
3、这两种不同方式所对应的服务器硬件环境一致吗?
1、对,上传到root目录下(其他目录也一样),这个上传镜像不是别的意思,就是传个大点的文件,测试一下传输速度(本地磁盘最大的文件就是镜像了“捂脸”)
2、不是,我指的是重做系统,ovirt-node不是官方提供最小化的镜像安装node节点嘛,然后做完,测试nfs上传速度就很慢,您可以试下, 然后我使用centos官网下载的镜像,装完系统以后,在测试上传就很稳定,
3、环境一样,专门在一样的环境测了一下,确实是这样。如果方便 的话我不清楚微信群里哪个是您,我可以给您发下截图
2、不是测试nfs,是ftp,扣错了
node的版本发一下
4.4.1
1、对,上传到root目录下(其他目录也一样),这个上传镜像不是别的意思,就是传个大点的文件,测试一下传输速度(本地磁盘最大的文件就是镜像了“捂脸”)
2、不是,我指的是重做系统,ovirt-node不是官方提供最小化的镜像安装node节点嘛,然后做完,测试nfs上传速度就很慢,您可以试下, 然后我使用centos官网下载的镜像,装完系统以后,在测试上传就很稳定,
3、环境一样,专门在一样的环境测了一下,确实是这样。如果方便 的话我不清楚微信群里哪个是您,我可以给您发下截图
第二点,测试nfs上传是?再具体说下
评论可以附图片的。
说错了,是测试ftp上传
这是centos官网的镜像安装的系统测试结果为80M/S
https://www.cnovirt.com/wp-content/uploads/bfi_thumb/38756982a557efd8-6wtttsetr3wnurzmv5rflamqa38nk27e6ncy1ai99z0.jpg
这是使用ovirt下载的iso镜像安装的系统测试结果为30M/s(从80M/s逐步下降到30M/s)
https://www.cnovirt.com/wp-content/uploads/bfi_thumb/3876f857a5938e3b-6wttuiiscy8ela1pip1qik1j84jylvj1rklbl77jllg.jpg
dnf module -y enable javapackages-tools 这里系统提示没有这个模块
缺少的组或模块 : javapackages-tools
解决了。安装的时候不要选择开发工具,就选择最小化安装。基本上没有问题了。
这个只能是在线安装,Centos7版本的时候当时使用createrepo 制作yum离线源。我想问一下楼主有尝试使用Centos8 DNF进行下载配置离线源吗?
一样的,Centos8也可以做本地离线源
engine-setup完成之后,配置ip后用在浏览器访问显示500