Merge "Add unsafe profile for VM's disk"
This commit is contained in:
commit
91505272fb
|
@ -72,8 +72,8 @@ Network Configuration
|
||||||
#####################
|
#####################
|
||||||
|
|
||||||
The ``.networking`` key defines the network topology of the site. Each
|
The ``.networking`` key defines the network topology of the site. Each
|
||||||
subkey is the name of a network. Under each network name is a semi-recursive stanza
|
subkey is the name of a network. Under each network name is a semi-recursive
|
||||||
defining the layer 2 and layer 3 attributes of the network:
|
stanza defining the layer 2 and layer 3 attributes of the network:
|
||||||
|
|
||||||
.. code-block: json
|
.. code-block: json
|
||||||
|
|
||||||
|
@ -114,18 +114,18 @@ or
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
* roles - These strings are used to select the correct network for internal gate
|
* roles - These strings are used to select the correct network for internal
|
||||||
functions - supported: "ssh", "dns", "bgp"
|
gate functions - supported: "ssh", "dns", "bgp"
|
||||||
* layer2 - Define Layer 2 attributes
|
* layer2 - Define Layer 2 attributes
|
||||||
* layer3 - Valid if the ``layer2`` attribute is NOT defining VLANs, then define
|
* layer3 - Valid if the ``layer2`` attribute is NOT defining VLANs, then
|
||||||
Layer 3 attributes.
|
define Layer 3 attributes.
|
||||||
|
|
||||||
Disk Layouts
|
Disk Layouts
|
||||||
############
|
############
|
||||||
|
|
||||||
The ``.disk_layouts`` key defines the various disk layouts that can be assigned
|
The ``.disk_layouts`` key defines the various disk layouts that can be assigned
|
||||||
to VMs being built. Each named layout key then defines one or more block devices
|
to VMs being built. Each named layout key then defines one or more block
|
||||||
that will be created as file-backed volumes.
|
devices that will be created as file-backed volumes.
|
||||||
|
|
||||||
.. code-block: json
|
.. code-block: json
|
||||||
|
|
||||||
|
@ -154,20 +154,25 @@ that will be created as file-backed volumes.
|
||||||
|
|
||||||
* size - Size of the volume in gigabytes
|
* size - Size of the volume in gigabytes
|
||||||
* io_profile - One of the below I/O configurations
|
* io_profile - One of the below I/O configurations
|
||||||
* fast - In the case of a VM disruption, synchronous I/O may be lost. Better throughput.
|
* fast - In the case of a VM disruption, synchronous I/O may be lost.
|
||||||
|
Better throughput.
|
||||||
* safe - Synchronous I/O fully written to disk, slower throughput.
|
* safe - Synchronous I/O fully written to disk, slower throughput.
|
||||||
* bootstrap - For VMs that are bootstrapped by the framework, not Airship, use this disk
|
* unsafe - Host are caching all disk IO, and sync requests from VM are
|
||||||
* format - For VMs that are bootstrapped by the framework, describe how the disk should be
|
ignored. Max performance.
|
||||||
formatted and mounted when desired.
|
* bootstrap - For VMs that are bootstrapped by the framework, not Airship,
|
||||||
|
use this disk
|
||||||
|
* format - For VMs that are bootstrapped by the framework, describe how the
|
||||||
|
disk should be formatted and mounted when desired.
|
||||||
* type - Filesystem type (e.g. 'xfs' or 'ext4')
|
* type - Filesystem type (e.g. 'xfs' or 'ext4')
|
||||||
* mountpoint - Path to mountpoint
|
* mountpoint - Path to mountpoint
|
||||||
|
|
||||||
VM Configuration
|
VM Configuration
|
||||||
################
|
################
|
||||||
|
|
||||||
Under the ``.vm`` key is a mapping of all the VMs that will be created via virt-install.
|
Under the ``.vm`` key is a mapping of all the VMs that will be created via
|
||||||
This can be a mix of VMs that are bootstrapped via virsh/cloud-init and those deployed
|
virt-install. This can be a mix of VMs that are bootstrapped via
|
||||||
via Airship. Each key is the name of a VM and value is a JSON object:
|
virsh/cloud-init and those deployed via Airship. Each key is the name of a VM
|
||||||
|
and value is a JSON object:
|
||||||
|
|
||||||
.. code-block: json
|
.. code-block: json
|
||||||
|
|
||||||
|
@ -214,20 +219,27 @@ via Airship. Each key is the name of a VM and value is a JSON object:
|
||||||
* vcpus - Number of VM CPUs
|
* vcpus - Number of VM CPUs
|
||||||
* sockets - Number of sockets. (Optional)
|
* sockets - Number of sockets. (Optional)
|
||||||
* threads - Number of threads. (Optional)
|
* threads - Number of threads. (Optional)
|
||||||
* disk_layout - A disk profile for the VM matching one defined under ``.disk_layouts``
|
* disk_layout - A disk profile for the VM matching one defined under
|
||||||
* bootstrap - True/False for whether the framework should bootstrap the VM's OS
|
``.disk_layouts``
|
||||||
* cpu_cells - Parameter to setup NUMA nodes and allocate RAM memory. (Optional)
|
* bootstrap - True/False for whether the framework should bootstrap the
|
||||||
|
VM's OS
|
||||||
|
* cpu_cells - Parameter to setup NUMA nodes and allocate RAM memory.
|
||||||
|
(Optional)
|
||||||
* cpu_mode - CPU mode for the VM. (if not specified, default: host)
|
* cpu_mode - CPU mode for the VM. (if not specified, default: host)
|
||||||
* userdata - Cloud-init userdata to feed the VM when bootstrapped for further customization
|
* userdata - Cloud-init userdata to feed the VM when bootstrapped for
|
||||||
* networking - Network attachment and addressing configuration. Every key but ``addresses``
|
further customization
|
||||||
is assumed to be a desired NIC on the VM. For each NIC stanza, the following fields are respected:
|
* networking - Network attachment and addressing configuration. Every key
|
||||||
|
but ``addresses`` is assumed to be a desired NIC on the VM. For each NIC
|
||||||
|
stanza, the following fields are respected:
|
||||||
|
|
||||||
* mac - A MAC address for the NIC
|
* mac - A MAC address for the NIC
|
||||||
* model - A model for the NIC (if not specified, default: virtio)
|
* model - A model for the NIC (if not specified, default: virtio)
|
||||||
* pci - A JSON object specifying ``slot`` and ``port`` specifying the PCI address for the NIC
|
* pci - A JSON object specifying ``slot`` and ``port`` specifying the
|
||||||
|
PCI address for the NIC
|
||||||
* attachment - What network from ``.networking`` is attached to this NIC
|
* attachment - What network from ``.networking`` is attached to this NIC
|
||||||
|
|
||||||
The ``addresses`` key specifies the IP address for each layer 3 network that the VM is attached to.
|
The ``addresses`` key specifies the IP address for each layer 3 network
|
||||||
|
that the VM is attached to.
|
||||||
|
|
||||||
Stage Pipeline
|
Stage Pipeline
|
||||||
##############
|
##############
|
||||||
|
|
|
@ -444,6 +444,9 @@ vm_create_vols(){
|
||||||
elif [[ "$io_prof" == "safe" ]]
|
elif [[ "$io_prof" == "safe" ]]
|
||||||
then
|
then
|
||||||
DISK_OPTS="bus=virtio,cache=directsync,discard=unmap,format=qcow2,io=native"
|
DISK_OPTS="bus=virtio,cache=directsync,discard=unmap,format=qcow2,io=native"
|
||||||
|
elif [[ "$io_prof" == "unsafe" ]]
|
||||||
|
then
|
||||||
|
DISK_OPTS="bus=virtio,cache=unsafe,format=qcow2"
|
||||||
else
|
else
|
||||||
DISK_OPTS="bus=virtio,format=qcow2"
|
DISK_OPTS="bus=virtio,format=qcow2"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue