-
Notifications
You must be signed in to change notification settings - Fork 15
arch_generic_ds
Michal Opala edited this page Nov 19, 2024
·
1 revision
The "simple" datastore configration mode is limited to only 3 basic datastores (IDs 0, 1, 2):
ds:
mode: ssh
mounts:
- type: system
path: /mnt/one_datastores/system/
- type: image
path: /mnt/one_datastores/default/
- type: files
path: /mnt/one_datastores/files/
Fortunately, it's possible to define datastores more freely with the "generic" mode, for example:
ds:
mode: generic
config:
SYSTEM_DS:
system:
enabled: false
system1:
id: 100
symlink:
groups: [node]
src: /mnt/nfs1/100/
template: &template
TYPE: SYSTEM_DS
TM_MAD: shared
BRIDGE_LIST: "{{ groups.node | map('extract', hostvars, ['ansible_host']) | join(' ') }}"
system2:
id: 101
symlink:
groups: [node]
src: /mnt/nfs2/101/
template: *template
system3:
id: 102
symlink:
groups: [node]
src: /mnt/nfs3/102/
template: *template
IMAGE_DS:
default:
symlink: { src: /mnt/nfs0/1/ }
template:
TM_MAD: shared
FILE_DS:
files:
symlink: { src: /mnt/nfs0/2/ }
With the "generic" mode it's actually possible to configure any number of user-defined datastores, for example:
SYSTEM_DS:
system1:
id: 100
symlink:
groups: [node]
src: /mnt/nfs1/100/
template: &template
TYPE: SYSTEM_DS
TM_MAD: shared
BRIDGE_LIST: "{{ groups.node | map('extract', hostvars, ['ansible_host']) | join(' ') }}"
Where:
-
system1
is a name assigned to the new user-defined datastore -
id
is a predicted or existing datatore ID (OpenNebula always starts numbering user-defined datastores from100
) -
symlink
is optional, if defined thengroups
should be used to specify where the actual symlinking has to happen,src
specfies the source directory that is going to be symlinked as/var/lib/one/datastores/<id>
(unless it's/var/lib/one/datastores/
, then it must be skipped) -
template
is an usual raw (expressed in YAML) OpenNebula template for the datastore
Warning
When creating user-defined datastores you must provide predicted datastore IDs starting from 100
, then incrementing by 1
for subsequent ones. Or, if datatores already exist you can tell one-deploy to start/continue managing them by providing existing datastore IDs.
For the reference, the default "generic" mode configuration (which can be considered an equivalent for the "simple" mode) is:
SYSTEM_DS:
system:
id: 0
managed: true
enabled: true
symlink:
groups: [node]
src: /var/lib/one/datastores/ # this skips symlinking
template:
TYPE: SYSTEM_DS
TM_MAD: ssh
IMAGE_DS:
default:
id: 1
managed: true
symlink:
groups: [frontend, node]
src: /var/lib/one/datastores/ # this skips symlinking
template:
TYPE: IMAGE_DS
DS_MAD: fs
TM_MAD: ssh
FILE_DS:
files:
id: 2
managed: true
symlink:
groups: [frontend]
src: /var/lib/one/datastores/ # this skips symlinking
template:
TYPE: FILE_DS
DS_MAD: fs
TM_MAD: ssh
- Requirements & Platform Notes
- Release Notes
- Using the playbooks
- Reference Architectures:
- Verifying the installation
- Advanced Configurations:
- Additional Options:
- Developer Information: