OpenNebula is an open source cloud computing platform that allows us to combine and manage VMware and KVM virtual machines in a fully virtualized cloud
Step 1: Install MariaDB Database Server
OpenNebula also requires a database server to store its content.
Install MariaDB:
1 2 |
|
After installing MariaDB, the commands below can be used to stop, start and enable MariaDB service.
1 2 3 |
|
After that, run the following command to secure MariaDB server by creating root password and disabling remote root access.
1 |
|
When prompted, answer the following questions by following the tutorial.
- Enter root's current password (enter none): just press Enter
- set root password? [Y/N]: Y
- New Password: Enter a password
- Re-enter new password: repeat password
- Delete anonymous user? [Y/N]: Y
- Disable root login remotely? [Y/N]: Y
- delete the test database and access it? [Y/N]: Y
- Reload permissions table now? [Y/N]: Y
View MariaDB service status.
1 |
|
Example output:
1 2 3 4 5 6 7 8 9 10 11 |
|
Step 2: Create the OpenNebula Database
Login to MariaDB
1 |
|
Create a blank database opennebula
1 |
|
Create a database user opennebulauser
with the password new_password_here
1 |
|
Grant the user cakephpuser
full access to the database.
1 |
|
Finally, save your changes and exit.
1 2 |
|
Step 3: Install Opennula
By default, Ubuntu default repositories use no OpenneBula.
We have to install from OpenneBula repository.
Add its repository key to Ubuntu:
1 |
|
Add its repository files.
1 |
|
Install OpenNebula.
1 2 |
|
Install the Ruby library and other required packages to support Opennula.
1 |
|
The commands below can be used to start and enable the OpenNebula service.
1 2 3 4 |
|
Open the configuration file.
1 |
|
Fill in the configuration file using the database name, user and password created above:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
By default, its default username and password are stored in the credentials below:
1 |
|
Check the status of the OpenNebula service:
1 |
|
Example output:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
Step 4: Access the OpenNebula Portal
open login page
http://localhost:9869
After logging in you will be taken to the Opennula Dashboard.
Set up KVM nodes
添加KVM节点,只需运行我们要通过Opennula管理的节点下面的命令。
1 |
|
然后添加其存储库
1 |
|
最后,运行以下命令以安装节点包
1 2 |
|
打开其配置文件以允许OpenneBula管理它。
1 |
|
然后编辑这些行并保存。
1 2 3 4 5 |
|
重新启动客户端服务
1 2 |
|
设置无密码的SSH身份验证。
创建密码身份验证后,将服务器SSH密钥复制到客户端known_hosts文件中。
1 |
|
将有信任的所有密钥。
要管理KVM主机,请转到OpenneBula Web界面,开放式基础架构>>主机,然后单击+按钮。
添加新节点以进行管理。