Solution Verified in:
- OpenNebula: 5.10
miniONE is OpenNebula’s simple evaluation tool for deploying an all-in-one installation based on the KVM hypervisor or on LXD system containers. The latest version of miniONE brings a new option that allows users to try OpenNebula’s edge computing features by using cloud resources at the edge from bare-metal infrastructure provider Packet.
You will need a Packet account, and in particular an API token and project ID that will be used to provision resources on Packet. Please follow the Packet's Getting Started Guide to create and retrieve them by using the Packet dashboard.
This screencast follows the procedure described in this article to deploy at the edge a dedicated server for OpenTTD, the well-known open source business simulation game.
Step 1: OpenNebula Frontend Installation
You will need one host for the OpenNebula frontend. It could be a physical host in your rack, your own VM or even a VM running in the public cloud. Choose either the Centos/RHEL or Ubuntu/Debian family, just ensure it is a relatively fresh and updated system.
For this demo, we decided to run the frontend on the small AWS EC2 instance, so let’s start in the AWS console. For the operating system it could be `Ubuntu Server 18.04 LTS`,for the instance type we could choose the `t2.micro` or give it little more memory by choosing `t2.small`. The only option you need to modify is adding some more storage, let’s say 25GB. Optionally you may allow accessing HTTP ports (80/443) to be able to easily connect to Sunstone, OpenNebula's WebUI.
Step 2: miniONE
As soon as your instance is ready, connect to it and download the tool
# wget 'https://github.com/OpenNebula/minione/releases/latest/download/minione'
To start the edge deployment you will need to provide some details about the Packet resource. At least the packet API token and Packet project. Both can be easily found at https://packet.net
Then you should decide the location for your Edge deployment. For the first Packet node, we chose Sunnyvale, CA for which the code name is `sjc1`. Feel free to choose a different location – just be sure the required Packet plan is available there. In any case, miniONE will validate your parameters before it starts to deploy.
And finally you need to pick the size of the node – Packet calls this plan. We suggest keeping the `t1.small` default value. This is what Packet calls cloud killer, but if you want a different plan, provide it using the --edge-packet-plan parameter.
Now you should be ready to run.
# bash minione --edge packet --edge-packet-facility sjc1 --edge-packet-token [token] --edge-packet-project [project]
For the first time you will perhaps encounter the following error
Checking jq is installed FAILED Install jq package first
miniONE would like to validate all the Packet parameters and to parse the json output `jq` command is needed. In our case we will install it using
# apt update # apt-get install jq
Now we will run the deployment again. While miniONE is doing its job, you should receive a similar output
### Checks & detection Checking AppArmor SKIP will try to modify ### Main deployment steps: Install OpenNebula frontend version 5.8 Install ONEProvision Configure IPAM Packet, alias IP mapping driver, VM hooks Trigger oneprovision Export appliance and update VM template Do you agree? [yes/no]: yes ### Installation Updating APT cache OK Configuring repositories OK Updating APT cache OK Installing OpenNebula packages OK Installing Ruby gems OK Installing opennebula-provision package OK ### Configuration Applying packet changes to oned.conf OK Configuring packet hooks in oned.conf OK Update ssh configs to accessing Packet hosts OK Switching OneGate endpoint in oned.conf OK Switching scheduler interval in oned.conf OK Setting initial password for current user and oneadmin OK Changing WebUI to listen on port 80 OK Starting OpenNebula services OK Enabling OpenNebula services OK Add ssh key to oneadmin user OK Update ssh configs to allow VM addresses reusig OK Ensure own hostname is resolvable OK Checking OpenNebula is working OK Prepare packet template OK Checking packet template [/tmp/tmp.ukRnn6J8BE] OK Running oneprovision 2019-10-24 12:07:01 INFO : Creating provision objects WARNING: This operation can take tens of minutes. Please be patient. 2019-10-24 12:07:04 INFO : Deploying 2019-10-24 12:10:40 INFO : Monitoring hosts 2019-10-24 12:10:42 INFO : Checking working SSH connection 2019-10-24 12:10:44 INFO : Configuring hosts ID: 794e1810-a9f4-4047-8601-b4aad4a7d086 OK Exporting [Service WordPress - KVM] from Marketplace to local datastore OK Updating VM template OK
and finally end up with a similar successful report
### Report OpenNebula 5.8 was installed Sunstone [the webui] is runninng on: http://172.31.87.69/ Use following to login: user: oneadmin password: xDV36pWwGe ### Packet provisioned ID NAME CLUSTER TVM ALLOCATED_CPU ALLOCATED_MEM STAT 0 18.104.22.168 PacketClu 0 - - init
Now when all is done just wait for a little until OpenNebula monitors the Packet host and you can see it on. Check using
# onehost list ID NAME CLUSTER TVM ALLOCATED_CPU ALLOCATED_MEM STAT 0 22.214.171.124 PacketClu 0 0 / 400 (0%) 0K / 7.8G (0%) on
Step 3: Run the VM
At this point, you have a ready-to-use OpenNebula frontend connected with the KVM hypervisor on the Packet and you are ready to deploy your VMs. You can do it using the Sunstone frontend or just by typing
# onetemplate instantiate 0
For the demo purposes, we chose the default appliance to be our WordPress service app. So when your first VM is running, go to the public IP of the VM and you should get a bootstrapped WordPress webpage. To see the VM public IP address run
# onevm show 0 | grep ETH0_ALIAS0_IP= ETH0_ALIAS0_IP="126.96.36.199",
However, you might choose a different virtual appliance for your case. Go to our public Marketplace and pick one of the systems. Be aware that you need to put an exact name to the parameter `--edge-marketapp-name`. For instance `CentOS 7 - KVM` is a valid option.
miniONE gives you an option to extend the deployment by adding additional hypervisor nodes at the edge. To do so simply add an option `--node` to the deployment command and run it again. For the second node, we chose the location to be Amsterdam, which has `ams1` code name.
# ./minione --edge packet --node --edge-packet-token [token] --edge-packet-project [project] --edge-packet-facility ams1
When the miniONE finishes, you should see 2 hosts now:
# onehost list ID NAME CLUSTER TVM ALLOCATED_CPU ALLOCATED_MEM STAT 1 188.8.131.52 PacketClu 0 0 / 400 (0%) 0K / 7.8G (0%) on 0 184.108.40.206 PacketClu 1 100 / 800 (12%) 768M / 7.8G (9%) on
# oneprovision list ID NAME CLUSTERS HOSTS VNETS DATASTORES STAT 642e1b04-d266-4ed6-abf4-906ca4a08898 PacketProvision-101 1 1 2 2 configured 794e1810-a9f4-4047-8601-b4aad4a7d086 PacketProvision-100 1 1 2 2 configured
and to see the details
# oneprovision show 642e1b04-d266-4ed6-abf4-906ca4a08898 PROVISION 642e1b04-d266-4ed6-abf4-906ca4a08898 INFORMATION ID : 642e1b04-d266-4ed6-abf4-906ca4a08898 NAME : PacketProvision-101 STATUS : configured CLUSTERS 101 HOSTS 1 VNETS 3 2 DATASTORES 103 102
Step 4: Pricing and Cleanup
If you choose the smallest AWS instance for the frontend as we did you should fit withing the Free tier eligible (up to 750hrs). The price of the Packet `t1.small` instance is $0.07 per hour. So even if you play with the deployment for quite a while you could hardly exceed $1.
Before you finish the evaluation, don’t forget to clean up your AWS EC2 instance as well as the Packet host. To delete the Packet you can use again the oneprovision command
# oneprovision delete [id] --cleanup
[root@minione-fe:~]$ oneprovision delete [ID] --cleanup
miniONE is a tool to really help newcomers get “up and running” with an OpenNebula environment. And now you’ve seen how easy it is to launch your own edge deployment or eventually extend your current setup with on-demand bare-metal resources at the edge. For more details about how OpenNebula is shaping the future (and present) of Edge Computing, please visit OneEdge.io Godspeed! 🚀