先搭 oVirt, 因为只有三台机器相对方便点
环境:
Master |
192.168.1.50 |
ovirt |
4 |
8 |
OS + Data |
Host 1 |
192.168.1.51 |
host1.ovirt |
4 |
8 |
OS |
Host 2 |
192.168.1.52 |
host2.ovirt |
4 |
8 |
OS |
顺便, 附上官网推荐的硬件配置:
更多详情可以参考官网, 包括系统, 游览器, CPU, 内存以及防火墙端口等
Resource |
Minimum |
Recommended |
CPU |
A dual core CPU. |
A quad core CPU or multiple dual core CPUs. |
Memory |
4 GB of available system RAM if Data Warehouse is not installed and if memory is not being consumed by existing processes. |
16 GB of system RAM. |
Hard Disk |
25 GB of locally accessible, writable, disk space. |
50 GB of locally accessible, writable, disk space. |
Network Interface |
1 Network Interface Card (NIC) with bandwidth of at least 1 Gbps. |
1 Network Interface Card (NIC) with bandwidth of at least 1 Gbps. |
先安装 Master, 在 Master 节点上操作:
1. 安装 yum 源
$ yum -y install http://resources.ovirt.org/pub/yum-repo/ovirt-release41.rpm
# 更新一下, 顺便也能对新增的 ovirt yum repo 做一下 makecache
$ yum -y update
2. 安装 ovirt-engine 软件包
$ yum -y install ovirt-engine
3. 安装配置 oVirt Engine
[root@ovirt ~]# 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-20171205171634-qmk2ng.log Version: otopi-1.6.2 (otopi-1.6.2-1.el7.centos) [ INFO ] Stage: Environment packages setup [ INFO ] Stage: Programs detection [ INFO ] Stage: Environment setup [ INFO ] Stage: Environment customization --== PRODUCT OPTIONS ==-- Configure Engine on this host (Yes, No) [Yes]: Enter Configure Image I/O Proxy on this host? (Yes, No) [Yes]: Enter Configure WebSocket Proxy on this host (Yes, No) [Yes]: Enter 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]: Enter Configure VM Console Proxy on this host (Yes, No) [Yes]: Enter --== PACKAGES ==-- [ INFO ] Checking for product updates... [ INFO ] No product updates found --== NETWORK CONFIGURATION ==-- Host fully qualified DNS name of this server [ovirt.joshua.com]: Enter 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]: Enter [ INFO ] firewalld will be configured as firewall manager. --== DATABASE CONFIGURATION ==-- Where is the DWH database located? (Local, Remote) [Local]: Enter 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]: Enter Where is the Engine database located? (Local, Remote) [Local]: Enter 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]: Enter --== OVIRT ENGINE CONFIGURATION ==-- Engine admin password: Password Confirm engine admin password: Password [WARNING] Password is weak: it is too simplistic/systematic Use weak password? (Yes, No) [No]: Yes Application mode (Virt, Gluster, Both) [Both]: Enter --== STORAGE CONFIGURATION ==-- Default SAN wipe after delete (Yes, No) [No]: Enter --== PKI CONFIGURATION ==-- Organization name for certificate [joshua.com]: Enter --== 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]: Enter 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]: Enter --== SYSTEM CONFIGURATION ==-- Configure an NFS share on this server to be used as an ISO Domain? (Yes, No) [No]: Yes Local ISO domain path [/var/lib/exports/iso]: /exports/iso Please provide the ACL for the Local ISO domain. See the exports(5) manpage for the format. Examples: - To allow access for host1, host2 and host3, input: host1(rw) host2(rw) host3(rw) - To allow access to the entire Internet, input: *(rw) For more information, see: http://www.ovirt.org/Troubleshooting_NFS_Storage_Issues Local ISO domain ACL: *(rw,async,no_root_squash) Local ISO domain name [ISO_DOMAIN]: iso0 --== MISC CONFIGURATION ==-- Please choose Data Warehouse sampling scale: (1) Basic (2) Full (1, 2)[1]: Enter --== 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 Firewall manager : firewalld Update Firewall : True Host FQDN : ovirt.joshua.com Configure local Engine database : True Set application as default page : True Configure Apache SSL : True Engine database secured connection : False Engine database user name : engine Engine database name : engine Engine database host : localhost Engine database port : 5432 Engine database host name validation : False Engine installation : True NFS setup : True PKI organization : joshua.com NFS export ACL : *(rw,async,no_root_squash) NFS mount point : /exports/iso DWH installation : True DWH database secured connection : False DWH database host : localhost DWH database user name : ovirt_engine_history DWH database name : ovirt_engine_history DWH database port : 5432 DWH database host name validation : False Configure local DWH database : True Configure Image I/O Proxy : True Configure VMConsole Proxy : True Configure WebSocket Proxy : True Please confirm installation settings (OK, Cancel) [OK]: Enter [ INFO ] Stage: Transaction setup [ INFO ] Stopping engine service [ INFO ] Stopping ovirt-fence-kdump-listener service [ INFO ] Stopping dwh service [ INFO ] Stopping Image I/O Proxy service [ INFO ] Stopping vmconsole-proxy service [ INFO ] Stopping websocket-proxy service [ INFO ] Stage: Misc configuration [ INFO ] Stage: Package installation [ INFO ] Stage: Misc configuration [ INFO ] Upgrading CA [ INFO ] Creating PostgreSQL 'engine' database [ INFO ] Configuring PostgreSQL [ INFO ] Creating PostgreSQL 'ovirt_engine_history' database [ INFO ] Configuring PostgreSQL [ INFO ] Creating CA [ INFO ] Creating/refreshing Engine database schema [ INFO ] Creating/refreshing DWH database schema [ INFO ] Configuring Image I/O Proxy [ 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 'internal' domain database schema [ 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 ] Restarting nfs services [ INFO ] Starting dwh 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://ovirt.joshua.com:80/ovirt-engine https://ovirt.joshua.com:443/ovirt-engine Internal CA 94:76:9D:13:BF:FD:3D:74:5C:53:44:83:24:FD:17:96:C3:5E:1A:24 SSH fingerprint: SHA256:DNGOBLv8wArIS7hrldcdLptqEkOklE5n0xehRCywRQM [WARNING] Less than 16384MB of memory is available --== END OF SUMMARY ==-- [ INFO ] Stage: Clean up Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20171205172702-2tec4z.log [ INFO ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20171205173058-setup.conf' [ INFO ] Stage: Pre-termination [ INFO ] Stage: Termination [ INFO ] Execution of setup completed successfully
# 如果安装完发现有啥配错了, 导致安装出现 FAIL, 可以用 engine-cleanup 来重置后, 重新 setup
[root@ovirt ~]# engine-cleanup [ 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', '/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf'] Log file: /var/log/ovirt-engine/setup/ovirt-engine-remove-20171205172625-uy7s4q.log Version: otopi-1.6.2 (otopi-1.6.2-1.el7.centos) [ INFO ] Stage: Environment packages setup [ INFO ] Stage: Programs detection [ INFO ] Stage: Environment customization Do you want to remove all components? (Yes, No) [Yes]: Enter The following files were changed since setup: /etc/exports.d/ovirt-engine-iso-domain.exports Remove them anyway? (Yes, No) [Yes]: Enter --== PRODUCT OPTIONS ==-- [ INFO ] Stage: Setup validation During execution engine service will be stopped (OK, Cancel) [OK]: Enter All the installed ovirt components are about to be removed, data will be lost (OK, Cancel) [Cancel]: OK [ INFO ] Stage: Transaction setup [ INFO ] Stopping engine service [ INFO ] Stopping ovirt-fence-kdump-listener service [ INFO ] Stopping dwh service [ INFO ] Stopping Image I/O Proxy service [ INFO ] Stopping vmconsole-proxy service [ INFO ] Stopping websocket-proxy service [ INFO ] Stage: Misc configuration [ INFO ] Stage: Package installation [ INFO ] Stage: Misc configuration [ INFO ] Backing up PKI configuration and keys [ INFO ] Backing up database localhost:engine to '/var/lib/ovirt-engine/backups/engine-20171205172647.3mC2nK.dump'. [ INFO ] Clearing Engine database engine [ INFO ] Backing up database localhost:ovirt_engine_history to '/var/lib/ovirt-engine-dwh/backups/dwh-20171205172654.7NnJ4A.dump'. [ INFO ] Clearing DWH database ovirt_engine_history [ INFO ] Removing files [ INFO ] Reverting changes to files [ INFO ] Stage: Transaction commit [ INFO ] Stage: Closing up --== SUMMARY ==-- Engine setup successfully cleaned up A backup of PKI configuration and keys is available at /var/lib/ovirt-engine/backups/engine-pki-20171205172646NuoaPI.tar.gz ovirt-engine has been removed A backup of the Engine database is available at /var/lib/ovirt-engine/backups/engine-20171205172647.3mC2nK.dump A backup of the DWH database is available at /var/lib/ovirt-engine-dwh/backups/dwh-20171205172654.7NnJ4A.dump --== END OF SUMMARY ==--
4. 登录验证
5. 接下来添加 Hypervisor Host, 主机添加很简单, 会自动配置, 需要 root 认证
# 首先安装 yum 源, 以及 vdsm 包, vdsm 用于 Master 管理 Hypervisor Host
$ ansible ovirt-host -m yum -a "name=http://resources.ovirt.org/pub/yum-repo/ovirt-release41.rpm" -v
$ ansible ovirt-host -m yum -a "name=vdsm" -v
下面的 fetch 可以点一下, 来看是否可以连接上
点击 OK 后会弹出 PowerManagement 的配置选项, 不用管, 点 OK, 我们虚拟机也没有电源管理卡
# 在初始化 host 的时候可能会碰到 yum 安装某个软件包的时候因为网速太慢导致 FAIL, 要么科学上网, 要么就多来几次
# 安装完成:
记录的很简单, 安装过程会花上不少时间, 主要还是在软件包的下载上
下一篇接着配置 oVirt 的存储