From 52b2f29bc68cad7574706de76c5d5c5428bc659c Mon Sep 17 00:00:00 2001 From: Ricardo Diaz Date: Wed, 17 Feb 2021 09:36:05 +0100 Subject: [PATCH] M #-: Add Firecracker to oneprovision (#819) Signed-off-by: Ricardo Diaz --- share/oneprovision/ansible/aws.yml | 3 +- .../opennebula-node-firecracker/README.md | 9 +++ .../tasks/centos.yml | 61 ++++++++++++++ .../tasks/debian.yml | 10 +++ .../tasks/main.yml | 11 +++ .../hybrid+/providers/aws/aws-us-west-1.yml | 2 +- .../hybrid+/provisions/common.d/defaults.yml | 2 + .../hybrid+_firecracker/description.txt | 7 ++ .../providers/aws/aws-eu-central-1.yml | 26 ++++++ .../providers/aws/aws-eu-west-2.yml | 26 ++++++ .../providers/aws/aws-us-east-1.yml | 26 ++++++ .../providers/aws/aws-us-west-1.yml | 26 ++++++ .../provisions/aws.d/datastores.yml | 46 +++++++++++ .../provisions/aws.d/defaults.yml | 26 ++++++ .../provisions/aws.d/inputs.yml | 38 +++++++++ .../provisions/aws.d/networks.yml | 40 +++++++++ .../hybrid+_firecracker/provisions/aws.yml | 81 +++++++++++++++++++ .../provisions/common.d/defaults.yml | 24 ++++++ .../provisions/common.d/firecracker_hosts.yml | 35 ++++++++ .../provisions/common.d/resources.yml | 36 +++++++++ .../providers/aws/aws-us-west-1.yml | 2 +- .../provisions/common.d/defaults.yml | 2 + 22 files changed, 536 insertions(+), 3 deletions(-) create mode 100644 share/oneprovision/ansible/roles/opennebula-node-firecracker/README.md create mode 100644 share/oneprovision/ansible/roles/opennebula-node-firecracker/tasks/centos.yml create mode 100644 share/oneprovision/ansible/roles/opennebula-node-firecracker/tasks/debian.yml create mode 100644 share/oneprovision/ansible/roles/opennebula-node-firecracker/tasks/main.yml create mode 100644 share/oneprovision/provisions/hybrid+_firecracker/description.txt create mode 100644 share/oneprovision/provisions/hybrid+_firecracker/providers/aws/aws-eu-central-1.yml create mode 100644 share/oneprovision/provisions/hybrid+_firecracker/providers/aws/aws-eu-west-2.yml create mode 100644 share/oneprovision/provisions/hybrid+_firecracker/providers/aws/aws-us-east-1.yml create mode 100644 share/oneprovision/provisions/hybrid+_firecracker/providers/aws/aws-us-west-1.yml create mode 100644 share/oneprovision/provisions/hybrid+_firecracker/provisions/aws.d/datastores.yml create mode 100644 share/oneprovision/provisions/hybrid+_firecracker/provisions/aws.d/defaults.yml create mode 100644 share/oneprovision/provisions/hybrid+_firecracker/provisions/aws.d/inputs.yml create mode 100644 share/oneprovision/provisions/hybrid+_firecracker/provisions/aws.d/networks.yml create mode 100644 share/oneprovision/provisions/hybrid+_firecracker/provisions/aws.yml create mode 100644 share/oneprovision/provisions/hybrid+_firecracker/provisions/common.d/defaults.yml create mode 100644 share/oneprovision/provisions/hybrid+_firecracker/provisions/common.d/firecracker_hosts.yml create mode 100644 share/oneprovision/provisions/hybrid+_firecracker/provisions/common.d/resources.yml diff --git a/share/oneprovision/ansible/aws.yml b/share/oneprovision/ansible/aws.yml index b94ec2d9a7..cdd20e3052 100644 --- a/share/oneprovision/ansible/aws.yml +++ b/share/oneprovision/ansible/aws.yml @@ -9,7 +9,8 @@ roles: - ddc - opennebula-repository - - opennebula-node-kvm + - { role: opennebula-node-kvm, when: oneprovision_hypervisor == 'kvm' } + - { role: opennebula-node-firecracker, when: oneprovision_hypervisor == 'firecracker' } - opennebula-ssh - role: iptables iptables_base_rules_services: diff --git a/share/oneprovision/ansible/roles/opennebula-node-firecracker/README.md b/share/oneprovision/ansible/roles/opennebula-node-firecracker/README.md new file mode 100644 index 0000000000..c6ab0c6c87 --- /dev/null +++ b/share/oneprovision/ansible/roles/opennebula-node-firecracker/README.md @@ -0,0 +1,9 @@ +# opennebula-node-firecracker + +## Description + +Install the opennebula-node-firecracker package. + +## Requirements + +OpenNebula repository must be configured before executing this role. diff --git a/share/oneprovision/ansible/roles/opennebula-node-firecracker/tasks/centos.yml b/share/oneprovision/ansible/roles/opennebula-node-firecracker/tasks/centos.yml new file mode 100644 index 0000000000..2c24043232 --- /dev/null +++ b/share/oneprovision/ansible/roles/opennebula-node-firecracker/tasks/centos.yml @@ -0,0 +1,61 @@ +--- + +- block: + - name: Update centos-release package + yum: name=centos-release state=latest + register: yum_result + until: yum_result is succeeded + retries: 3 + delay: 10 + - name: Install qemu-ev repository + yum: name=centos-release-qemu-ev state=latest + register: yum_result + until: yum_result is succeeded + retries: 3 + delay: 10 + - name: Install qemu-kvm-ev + yum: name=qemu-kvm-ev state=present + register: yum_result + until: yum_result is succeeded + retries: 3 + delay: 10 + when: + - ansible_distribution == "CentOS" + - ansible_distribution_major_version == "7" + - opennebula_node_kvm_use_ev + +- block: + - name: Enable RHEV repo + command: subscription-manager repos --enable {{ opennebula_node_kvm_rhev_repo }} + register: sm_result + until: sm_result is succeeded + retries: 3 + delay: 10 + - name: Instal RHEV + yum: name=qemu-kvm-rhev state=latest + until: yum_result is succeeded + retries: 3 + delay: 10 + when: + - ansible_distribution == "RedHat" + - ansible_distribution_major_version == "7" + - opennebula_node_kvm_use_ev + +- name: Install libgcrypt + package: + name: libgcrypt + state: latest + register: pkg_result + until: pkg_result is succeeded + retries: 3 + delay: 10 + when: + - ansible_os_family == "RedHat" + - ansible_distribution_major_version == "8" + +- name: Install OpenNebula node Firecracker package + yum: name=opennebula-node-firecracker state=latest + register: yum_result + until: yum_result is succeeded + retries: 3 + delay: 10 diff --git a/share/oneprovision/ansible/roles/opennebula-node-firecracker/tasks/debian.yml b/share/oneprovision/ansible/roles/opennebula-node-firecracker/tasks/debian.yml new file mode 100644 index 0000000000..8c271b6a40 --- /dev/null +++ b/share/oneprovision/ansible/roles/opennebula-node-firecracker/tasks/debian.yml @@ -0,0 +1,10 @@ +--- + +- name: Install OpenNebula node Firecracker package + apt: + name: opennebula-node-firecracker + state: latest + register: apt_result + until: apt_result is success + retries: 3 + delay: 10 diff --git a/share/oneprovision/ansible/roles/opennebula-node-firecracker/tasks/main.yml b/share/oneprovision/ansible/roles/opennebula-node-firecracker/tasks/main.yml new file mode 100644 index 0000000000..a8e0e4c532 --- /dev/null +++ b/share/oneprovision/ansible/roles/opennebula-node-firecracker/tasks/main.yml @@ -0,0 +1,11 @@ +--- + +- include: centos.yml + when: ansible_os_family == "RedHat" + +- include: debian.yml + when: ansible_os_family == "Debian" + +- name: "create datastore for ONE_LOCATION" + file: path={{ one_location }}/var/datastores owner=oneadmin group=oneadmin state=directory + when: one_location is defined diff --git a/share/oneprovision/provisions/hybrid+/providers/aws/aws-us-west-1.yml b/share/oneprovision/provisions/hybrid+/providers/aws/aws-us-west-1.yml index c2283da77d..12412699b2 100644 --- a/share/oneprovision/provisions/hybrid+/providers/aws/aws-us-west-1.yml +++ b/share/oneprovision/provisions/hybrid+/providers/aws/aws-us-west-1.yml @@ -17,7 +17,7 @@ inputs: - name: 'aws_ami_image' type: 'list' options: - - 'ami-08b547f0dcb46c4d3' + - 'ami-00008506813cea27a' - name: 'aws_instance_type' type: 'list' options: diff --git a/share/oneprovision/provisions/hybrid+/provisions/common.d/defaults.yml b/share/oneprovision/provisions/hybrid+/provisions/common.d/defaults.yml index bf3bbaadbb..28c7fa659e 100644 --- a/share/oneprovision/provisions/hybrid+/provisions/common.d/defaults.yml +++ b/share/oneprovision/provisions/hybrid+/provisions/common.d/defaults.yml @@ -21,6 +21,8 @@ defaults: configuration: + oneprovision_hypervisor: 'kvm' + opennebula_node_kvm_use_ev: true # required for copying recovery VM snaphosts to the replica host diff --git a/share/oneprovision/provisions/hybrid+_firecracker/description.txt b/share/oneprovision/provisions/hybrid+_firecracker/description.txt new file mode 100644 index 0000000000..ec1d3b0377 --- /dev/null +++ b/share/oneprovision/provisions/hybrid+_firecracker/description.txt @@ -0,0 +1,7 @@ +The Firecracker provision uses the Firecracker virtualization technology to start VMs in virtualized hosts. It is useful for developing and testing purposes. It features the following characteristics: + +* Hosts are provisioned as VMs in the selected provider +* The provision includes a public network (Internet reachable IPs) +* It also includes a virtual network template to create private VLANs. You need to instantiate this network template. + +More information about using this provision can be found in the [OpenNebula documentation](https://opennebula.io) diff --git a/share/oneprovision/provisions/hybrid+_firecracker/providers/aws/aws-eu-central-1.yml b/share/oneprovision/provisions/hybrid+_firecracker/providers/aws/aws-eu-central-1.yml new file mode 100644 index 0000000000..a554c9cbdf --- /dev/null +++ b/share/oneprovision/provisions/hybrid+_firecracker/providers/aws/aws-eu-central-1.yml @@ -0,0 +1,26 @@ +name: 'aws-frankfurt' + +description: 'Elastic cluster on AWS in Frankfurt' +provider: 'aws' + +plain: + provision_type: 'hybrid+_firecracker' + image: 'AWS.webp' + +location_key: 'region' +connection: + access_key: 'AWS access key' + secret_key: 'AWS secret key' + region: 'eu-central-1' + +inputs: + - name: 'aws_ami_image' + type: 'list' + options: + - 'ami-04c21037b3f953d37' + - name: 'aws_instance_type' + type: 'list' + options: + - 'c5.metal' + - 'i3.metal' + - 'm5.metal' diff --git a/share/oneprovision/provisions/hybrid+_firecracker/providers/aws/aws-eu-west-2.yml b/share/oneprovision/provisions/hybrid+_firecracker/providers/aws/aws-eu-west-2.yml new file mode 100644 index 0000000000..9ad2d2f6f0 --- /dev/null +++ b/share/oneprovision/provisions/hybrid+_firecracker/providers/aws/aws-eu-west-2.yml @@ -0,0 +1,26 @@ +name: 'aws-london' + +description: 'Elastic cluster on AWS in London' +provider: 'aws' + +plain: + provision_type: 'hybrid+_firecracker' + image: 'AWS.webp' + +location_key: 'region' +connection: + access_key: 'AWS access key' + secret_key: 'AWS secret key' + region: 'eu-west-2' + +inputs: + - name: 'aws_ami_image' + type: 'list' + options: + - 'ami-0bab5c8be0975423b' + - name: 'aws_instance_type' + type: 'list' + options: + - 'c5.metal' + - 'm5.metal' + - 'r5.metal' diff --git a/share/oneprovision/provisions/hybrid+_firecracker/providers/aws/aws-us-east-1.yml b/share/oneprovision/provisions/hybrid+_firecracker/providers/aws/aws-us-east-1.yml new file mode 100644 index 0000000000..fc5ca950e6 --- /dev/null +++ b/share/oneprovision/provisions/hybrid+_firecracker/providers/aws/aws-us-east-1.yml @@ -0,0 +1,26 @@ +name: 'aws-north-virginia' + +description: 'Elastic cluster on AWS in North Virginia' +provider: 'aws' + +plain: + provision_type: 'hybrid+_firecracker' + image: 'AWS.webp' + +location_key: 'region' +connection: + access_key: 'AWS access key' + secret_key: 'AWS secret key' + region: 'us-east-1' + +inputs: + - name: 'aws_ami_image' + type: 'list' + options: + - 'ami-0d6e9a57f6259ba3a' + - name: 'aws_instance_type' + type: 'list' + options: + - 'c5.metal' + - 'i3.metal' + - 'm5.metal' diff --git a/share/oneprovision/provisions/hybrid+_firecracker/providers/aws/aws-us-west-1.yml b/share/oneprovision/provisions/hybrid+_firecracker/providers/aws/aws-us-west-1.yml new file mode 100644 index 0000000000..0670cf62f6 --- /dev/null +++ b/share/oneprovision/provisions/hybrid+_firecracker/providers/aws/aws-us-west-1.yml @@ -0,0 +1,26 @@ +name: 'aws-north-california' + +description: 'Elastic cluster on AWS in North California' +provider: 'aws' + +plain: + provision_type: 'hybrid+_firecracker' + image: 'AWS.webp' + +location_key: 'region' +connection: + access_key: 'AWS access key' + secret_key: 'AWS secret key' + region: 'us-west-1' + +inputs: + - name: 'aws_ami_image' + type: 'list' + options: + - 'ami-00008506813cea27a' + - name: 'aws_instance_type' + type: 'list' + options: + - 'c5.metal' + - 'i3.metal' + - 'm5.metal' diff --git a/share/oneprovision/provisions/hybrid+_firecracker/provisions/aws.d/datastores.yml b/share/oneprovision/provisions/hybrid+_firecracker/provisions/aws.d/datastores.yml new file mode 100644 index 0000000000..7dfdf89bc5 --- /dev/null +++ b/share/oneprovision/provisions/hybrid+_firecracker/provisions/aws.d/datastores.yml @@ -0,0 +1,46 @@ +--- +# ---------------------------------------------------------------------------- # +# Copyright 2002-2021, OpenNebula Project, OpenNebula Systems # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); you may # +# not use this file except in compliance with the License. You may obtain # +# a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# ---------------------------------------------------------------------------- # + +#------------------------------------------------------------------------------- +# datastores: Defines the storage area for the cluster using the SSH replication +# drivers. It creates the following datastores, using Replica driver: +# 1. Image datastore, ${cluster_name}-image +# 2. System datastore, ${cluster_name}-system +# 3. File datastore, ${cluster_name}-files +# +# Configuration/Input attributes: +# - replica_host: The host that will hold the cluster replicas and snapshots. +#------------------------------------------------------------------------------- +datastores: + + - name: "${provision}-image" + type: 'image_ds' + ds_mad: 'fs' + tm_mad: 'ssh' + safe_dirs: "/var/tmp /tmp" + + - name: "${provision}-system" + type: 'system_ds' + tm_mad: 'ssh' + safe_dirs: "/var/tmp /tmp" + replica_host: "use-first-host" + + - name: "${provision}-files" + type: 'file_ds' + ds_mad: 'fs' + tm_mad: 'ssh' + safe_dirs: "/var/tmp /tmp" diff --git a/share/oneprovision/provisions/hybrid+_firecracker/provisions/aws.d/defaults.yml b/share/oneprovision/provisions/hybrid+_firecracker/provisions/aws.d/defaults.yml new file mode 100644 index 0000000000..1bfd33a7f0 --- /dev/null +++ b/share/oneprovision/provisions/hybrid+_firecracker/provisions/aws.d/defaults.yml @@ -0,0 +1,26 @@ +--- +# ---------------------------------------------------------------------------- # +# Copyright 2002-2021, OpenNebula Project, OpenNebula Systems # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); you may # +# not use this file except in compliance with the License. You may obtain # +# a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# ---------------------------------------------------------------------------- # + +#------------------------------------------------------------------------------- +# defaults: Common configuration attributes for provision objects +#-------------------------------------------------------------------------------- +# configuration: Ansible role parameters. +#-------------------------------------------------------------------------------- +# Check defaults/main.yml in each role for the available variables +#------------------------------------------------------------------------------- + +... diff --git a/share/oneprovision/provisions/hybrid+_firecracker/provisions/aws.d/inputs.yml b/share/oneprovision/provisions/hybrid+_firecracker/provisions/aws.d/inputs.yml new file mode 100644 index 0000000000..8f82ecc900 --- /dev/null +++ b/share/oneprovision/provisions/hybrid+_firecracker/provisions/aws.d/inputs.yml @@ -0,0 +1,38 @@ +--- +# ---------------------------------------------------------------------------- # +# Copyright 2002-2021, OpenNebula Project, OpenNebula Systems # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); you may # +# not use this file except in compliance with the License. You may obtain # +# a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# ---------------------------------------------------------------------------- # + +inputs: + - name: 'number_hosts' + type: text + description: 'Number of AWS instances to create' + default: '1' + + - name: 'number_public_ips' + type: text + description: 'Number of public IPs to get' + default: '1' + + - name: 'aws_ami_image' + type: text + description: "AWS ami image used for host deployments" + default: '' + + - name: 'aws_instance_type' + type: text + description: "AWS instance type, use bare-metal instances" + default: '' +... diff --git a/share/oneprovision/provisions/hybrid+_firecracker/provisions/aws.d/networks.yml b/share/oneprovision/provisions/hybrid+_firecracker/provisions/aws.d/networks.yml new file mode 100644 index 0000000000..ccdab6f608 --- /dev/null +++ b/share/oneprovision/provisions/hybrid+_firecracker/provisions/aws.d/networks.yml @@ -0,0 +1,40 @@ +--- +# ---------------------------------------------------------------------------- # +# Copyright 2002-2021, OpenNebula Project, OpenNebula Systems # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); you may # +# not use this file except in compliance with the License. You may obtain # +# a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# ---------------------------------------------------------------------------- # + +networks: + - name: "${provision}-public" + vn_mad: 'elastic' + bridge: 'br0' + netrole: 'public' + provision: + count: "${input.number_public_ips}" + ar: + - provison_id: "${provision_id}" + size: '1' + ipam_mad: 'aws' + cidr: "${cluster.0.cidr}" + +vntemplates: + - name: "${provision}-private" + vn_mad: 'vxlan' + phydev: 'eth0' + automatic_vlan_id: 'yes' + netrole: 'private' + vxlan_mode: 'evpn' + vxlan_tep: 'dev' + ip_link_conf: 'nolearning=' + cluster_ids: "${cluster.0.id}" diff --git a/share/oneprovision/provisions/hybrid+_firecracker/provisions/aws.yml b/share/oneprovision/provisions/hybrid+_firecracker/provisions/aws.yml new file mode 100644 index 0000000000..7f3ccced51 --- /dev/null +++ b/share/oneprovision/provisions/hybrid+_firecracker/provisions/aws.yml @@ -0,0 +1,81 @@ +--- +# ---------------------------------------------------------------------------- # +# Copyright 2002-2021, OpenNebula Project, OpenNebula Systems # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); you may # +# not use this file except in compliance with the License. You may obtain # +# a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# ---------------------------------------------------------------------------- # + +#------------------------------------------------------------------------------- +# This is the canonical description file for a cluster build with 'AWS' +# resources using the KVM hypervisor. +# ------------------------------------------------------------------------------ + +name: 'aws-cluster' +provision_type: 'hybrid+_firecracker' +provider: 'aws' + +image: 'OPENNEBULA-AWS.png' + +extends: + - common.d/defaults.yml + - common.d/resources.yml + - common.d/firecracker_hosts.yml + - aws.d/datastores.yml + - aws.d/defaults.yml + - aws.d/inputs.yml + - aws.d/networks.yml + +#------------------------------------------------------------------------------- +# playbook: Ansible playbook used for hosts configuration.The aws playbook +# include the following roles: +# - ddc +# - opennebula-repository +# - opennebula-node-kvm +# - opennebula-ssh +# - tuntap +# - bridged-networking +# - iptables +#------------------------------------------------------------------------------- +playbook: + - aws + +#------------------------------------------------------------------------------- +# defaults: Common configuration attributes for provision objects +#-------------------------------------------------------------------------------- +defaults: + provision: + provider_name: 'aws' + ami: "${input.aws_ami_image}" + instancetype: "${input.aws_instance_type}" + cloud_init: true + connection: + remote_user: 'centos' + +#------------------------------------------------------------------------------- +# cluster: Parameters for the OpenNebula cluster. Applies to all the Hosts +#-------------------------------------------------------------------------------- +# name: of the cluster +# description: Additional information +# reserved_cpu: In percentage. It will be subtracted from the TOTAL CPU +# reserved_memory: In percentage. It will be subtracted from the TOTAL MEM +#-------------------------------------------------------------------------------- +cluster: + name: "${provision}" + description: 'AWS cluster' + reserved_cpu: '0' + reserved_mem: '0' + datastores: + - 1 + - 2 + provision: + cidr: '10.0.0.0/16' diff --git a/share/oneprovision/provisions/hybrid+_firecracker/provisions/common.d/defaults.yml b/share/oneprovision/provisions/hybrid+_firecracker/provisions/common.d/defaults.yml new file mode 100644 index 0000000000..4496bf4bd2 --- /dev/null +++ b/share/oneprovision/provisions/hybrid+_firecracker/provisions/common.d/defaults.yml @@ -0,0 +1,24 @@ +--- +# ---------------------------------------------------------------------------- # +# Copyright 2002-2021, OpenNebula Project, OpenNebula Systems # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); you may # +# not use this file except in compliance with the License. You may obtain # +# a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# ---------------------------------------------------------------------------- # + +#------------------------------------------------------------------------------- +# defaults: Common configuration attributes for provision objects +#-------------------------------------------------------------------------------- + +defaults: + configuration: + oneprovision_hypervisor: 'firecracker' diff --git a/share/oneprovision/provisions/hybrid+_firecracker/provisions/common.d/firecracker_hosts.yml b/share/oneprovision/provisions/hybrid+_firecracker/provisions/common.d/firecracker_hosts.yml new file mode 100644 index 0000000000..d8f473535d --- /dev/null +++ b/share/oneprovision/provisions/hybrid+_firecracker/provisions/common.d/firecracker_hosts.yml @@ -0,0 +1,35 @@ +--- +# ---------------------------------------------------------------------------- # +# Copyright 2002-2021, OpenNebula Project, OpenNebula Systems # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); you may # +# not use this file except in compliance with the License. You may obtain # +# a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# ---------------------------------------------------------------------------- # + +#------------------------------------------------------------------------------- +# hosts: Packet or AWS metal servers +# provision: +# - count: Number of servers to create +# - hostname: kvm-host1, kvm-host2 .... of the server +# +# You can define specific OpenNebula configuration attributes for all the hosts: +# - reserved_cpu: In percentage. It will be subtracted from the TOTAL CPU +# - reserved_memory: In percentage. It will be subtracted from the TOTAL MEM +#------------------------------------------------------------------------------- +hosts: + + - im_mad: 'firecracker' + vm_mad: 'firecracker' + provision: + count: "${input.number_hosts}" + hostname: "firecracker-host${index}" +... diff --git a/share/oneprovision/provisions/hybrid+_firecracker/provisions/common.d/resources.yml b/share/oneprovision/provisions/hybrid+_firecracker/provisions/common.d/resources.yml new file mode 100644 index 0000000000..6644fcd61d --- /dev/null +++ b/share/oneprovision/provisions/hybrid+_firecracker/provisions/common.d/resources.yml @@ -0,0 +1,36 @@ +--- +# ---------------------------------------------------------------------------- # +# Copyright 2002-2021, OpenNebula Project, OpenNebula Systems # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); you may # +# not use this file except in compliance with the License. You may obtain # +# a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# ---------------------------------------------------------------------------- # + +#------------------------------------------------------------------------------- +# Use this file to define custom resources associated to the cluster, example: +# - images +# - marketplaceapps +# - templates +# - vntemplates +# - flowtemplates +# +# Cross-references to other objects can be made: +# - by name, eg. ${datastore.images.id} to get the OpenNebula ID of the +# datastore with name "images" +# - by index, eg. ${datastore.0.id} to get the OpenNebula ID of the **first** +# datastore defined in the provision +#------------------------------------------------------------------------------- +images: + - name: fc_kernel + ds_id: "${datastore.2.id}" + type: kernel + path: https://marketplace.opennebula.io/appliance/634c654e-e32c-43d4-9370-20d0e97a3de2/download/0 diff --git a/share/oneprovision/provisions/hybrid+_qemu/providers/aws/aws-us-west-1.yml b/share/oneprovision/provisions/hybrid+_qemu/providers/aws/aws-us-west-1.yml index 0b041f3a0e..97baf6741b 100644 --- a/share/oneprovision/provisions/hybrid+_qemu/providers/aws/aws-us-west-1.yml +++ b/share/oneprovision/provisions/hybrid+_qemu/providers/aws/aws-us-west-1.yml @@ -17,7 +17,7 @@ inputs: - name: 'aws_ami_image' type: 'list' options: - - 'ami-08b547f0dcb46c4d3' + - 'ami-00008506813cea27a' - name: 'aws_instance_type' type: 'list' options: diff --git a/share/oneprovision/provisions/hybrid+_qemu/provisions/common.d/defaults.yml b/share/oneprovision/provisions/hybrid+_qemu/provisions/common.d/defaults.yml index 0c71f0a558..3a52c3c96c 100644 --- a/share/oneprovision/provisions/hybrid+_qemu/provisions/common.d/defaults.yml +++ b/share/oneprovision/provisions/hybrid+_qemu/provisions/common.d/defaults.yml @@ -21,6 +21,8 @@ defaults: configuration: + oneprovision_hypervisor: 'kvm' + opennebula_node_kvm_use_ev: true # required for copying recovery VM snaphosts to the replica host