This repository contains the needed code and documentation to perform an OpenNebula deployment and configuration as a Hosted Cloud on IONOS bare-metal resources. It extends the one-deploy-validation repository, which is added as a git submodule.
- OpenNebula Cloud Hosted on IONOS Cloud
- Requirements
- Infrastructure Provisioning
- Required Parameters
- Configure IONOS Server Networking
- Deployment and Validation
-
Install
hatchpip install hatch
-
Initialize the dependent
one-deploy-validationandone-deploysubmodulegit submodule update --init --remote --merge
-
Install the
opennebula.deploycollection with dependencies using the submodule's tooling:make submodule-requirements
A detailed guide to provision the required reference infrastructure is published in IONOS - OpenNebula Deployment Guide. Follow the provisioning steps and extract the requiremed parameters needed to proceed with the OpenNebula deployment.
Update the inventory values and the _netplan files to match the provisioned infrastructure.
| Description | Variable Names | Files/Location |
|---|---|---|
| Frontend Host IP | ansible_host |
inventory/ionos.yml |
| KVM Host IPs | ansible_host |
inventory/ionos.yml , _netplan/*.yaml |
| KVM Host Gateway | network.bridges.br0.routes.to and .via |
_netplan/*.yaml |
| VXLAN PHYDEV | vn.vxlan.template.PHYDEV |
inventory/ionos.yml |
| pubridge PHYDEV | vn.pubridge.template.PHYDEV |
inventory/ionos.yml |
| VMs Public IP Range | vn.pubridge.template.AR.IP, vn.pubridge.template.AR.SIZE |
inventory/ionos.yml |
GUI password of oneadmin |
one_pass |
inventory/ionos.yml |
| IONOS Data Center UUID | ionos_config.data_center_uuid |
inventory/ionos.yml, group_vars/all.yml |
| IONOSCTL Token | ionosctl.token |
playbooks/files/.ionosctl_token |
Optional customization parameters:
| Description | Variable Names | Files/Location |
|---|---|---|
| IONOS Public Bridge Name | ionos_config.public_bridge_name, vn.pubridge.template.BRIDGE, network.bridges.br0 |
inventory/ionos.yml, group_vars/all.yml |
| IONOSCTL Install Path | ionosctl.install_path |
inventory/ionos.yml, group_vars/all.yml |
| IONOSCTL Version | ionosctl.version |
inventory/ionos.yml, group_vars/all.yml |
After provisioning, adjust the default network configuration in each of the hosts:
-
SSH into the host and remove the default netplan config:
root@h1:~# rm /etc/netplan/50-cloud-init.yaml
-
Copy the updated configuration to the host:
$ scp _netplan/h1.yaml root@h1:/etc/netplan
-
Allow IP forwarding on all hosts (and add the
net.ipv4.ip_forward=1line to/etc/sysctl.confto make it persistent across reboots):root@h1:~# sysctl -w net.ipv4.ip_forward=1
-
Apply the netplan configuration:
root@h1:~# netplan apply
If connectivity is lost, revert via IONOS DCD console access by restoring the original netplan file (50-cloud-init.yaml) or recreating the host.
As discovered in this bug there is a problem with the nic-attach operation, see this issue: OpenNebula/one#7203
As a workaround, follow the optional steps to disable AppArmor on KVM nodes.
Use the provided Makefile commands to automate deployment and testing:
-
Deploy OpenNebula:
make deployment
The launched Ansible scripts should finish without any error, and report on the number of changes performed for each hosts. If any error is reported, after the necessary troubleshooting and fixes, the deployment script can be re-executed without further cleanup steps.
-
Configure IONOS-specific components:
make ionos
Similarly, this should finish without any errors. After this step the cloud environment is fully functional.
-
Test the deployment:
make validation
If the test fails in any of the steps, after the necessary troubleshooting and fixes, the validation command can be safely re-executed. The final HTML report is only created when all tests have passed. The output of the tests are compiled into a HTML report that can be found in path, printed by the automation script.
For more information about the submodule's tooling, refer to the one-deploy-validation's README.md and for detailed documentation on the deployment automation refer to the one-deploy repo.
To extend the deployment with a new host, follow the same steps as descibed above, in summary:
- Provision the new host as described in Infrastructure Provisioning,
- Save the required parameters and adapt the files to match the provisioned infra, as shown in Required Parameters,
- Configure networking the same way as for all hosts, following Configure IONOS Server Networking,
- Execute the automation commands to deploy and test the cloud, as descibred in Deployment and Validation.
