Skip to content

Commit 93495fd

Browse files
authored
Initial Upload
1 parent 6f31291 commit 93495fd

23 files changed

+139
-0
lines changed

backup-existing-tags

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
maas ${MAAS_PROFILE} tags read|jq -r '.[]|select(.name == "virtual"|not)|"maas '${MAAS_PROFILE}' tags create name=\(.name) definition='"'"'\(.definition)'"'"' comment='"'"'\(.comment)'"'"' kernel_opts='"'"'\(.kernel_opts)'"'"'\n"'
2+

cpu-ram-features-xpath-expression

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This tag will identify a machine with proper that CPU tags,
2+
# cores, and RAM and tag them as hypervisor
3+
#
4+
# Note: Adjust cores and RAM (in bytes) to suit your needs
5+
# This example looks for 40 cores and 256 GB of RAM and has all the required CPU features for being a hypervisor
6+
# for both Intel and AMD
7+
8+
maas ${MAAS_PROFILE} tags create name=hypervisor \
9+
definition=//node[@id="memory"]/size >= "274877906944" and \
10+
//node[@id="cpu"]/configuration/setting/id="cores" >= 40 and \
11+
//node[@id="cpu"]//capabilities/capability/@id = "vmx" or @id="svm" and \
12+
//node[@id="cpu"]//capabilities/capability/@id = "aes" and
13+
//node[@id="cpu"]//capabilities/capability/@id = "flexpriority" and
14+
//node[@id="cpu"]//capabilities/capability/@id = "tpr_shadow" and
15+
//node[@id="cpu"]//capabilities/capability/@id = "ept" and
16+
//node[@id="cpu"]//capabilities/capability/@id = "vpid" and
17+
//node[@id="cpu"]//capabilities/capability/@id = "vnmi"'

gpu-quadro-k-amd-xpath-expression

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Note - if you have a single cpu machine, change cpu:0 to just cpu at the start of the definition
2+
3+
maas ${MAAS_PROFILE} tags create \
4+
name=gpgpu-quadro-k-a \
5+
comment="Enable passthrough for Nvidia Quadro K series GPUs on AMD" \
6+
definition='//node[@id="cpu:0"]/capabilities/capability/@id = "svm" and //node[@id="display"]/vendor[contains(.,"NVIDIA")] and //node[@id="display"]/description[contains(.,"3D")] and //node[@id="display"]/product[contains(.,"Quadro K")]'

gpu-quadro-k-intel-xpath-expression

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Note - if you have a single cpu machine, change cpu:0 to just cpu at the start of the definition
2+
3+
maas ${MAAS_PROFILE} tags create \
4+
name=gpgpu-quadro-k-i \
5+
comment="Enable passthrough for Nvidia Quadro K series GPUs on Intel" \
6+
definition='//node[@id="cpu:0"]/capabilities/capability/@id = "vmx" and //node[@id="display"]/vendor[contains(.,"NVIDIA")] and //node[@id="display"]/description[contains(.,"3D")] and //node[@id="display"]/product[contains(.,"Quadro K")]'
7+
8+

gpu-quadro-m-amd-xpath-expression

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Note - if you have a single cpu machine, change cpu:0 to just cpu at the start of the definition
2+
3+
maas ${MAAS_PROFILE} tags create \
4+
name=gpgpu-quadro-m-a \
5+
comment="Enable passthrough for Nvidia Quadro M series GPUs on AMD" \
6+
definition='//node[@id="cpu:0"]/capabilities/capability/@id = "svm" and //node[@id="display"]/vendor[contains(.,"NVIDIA")] and //node[@id="display"]/description[contains(.,"3D")] and //node[@id="display"]/product[contains(.,"Quadro M")]'
7+

gpu-quadro-m-intel-xpath-expression

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Note - if you have a single cpu machine, change cpu:0 to just cpu at the start of the definition
2+
3+
maas ${MAAS_PROFILE} tags create \
4+
name=gpgpu-quadro-m-i \
5+
comment="Enable passthrough for Nvidia Quadro M series GPUs on Intel" \
6+
definition='//node[@id="cpu:0"]/capabilities/capability/@id = "vmx" and //node[@id="display"]/vendor[contains(.,"NVIDIA")] and //node[@id="display"]/description[contains(.,"3D")] and //node[@id="display"]/product[contains(.,"Quadro M")]'
7+

gpu-quadro-p-amd-xpath-expression

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Note - if you have a single cpu machine, change cpu:0 to just cpu at the start of the definition
2+
3+
maas ${MAAS_PROFILE} tags create \
4+
comment="Enable passthrough for Nvidia Quadro P series GPUs on AMD" \
5+
name=gpgpu-quadro-p-a \
6+
definition='//node[@id="cpu:0"]/capabilities/capability/@id = "svm" and //node[@id="display"]/vendor[contains(.,"NVIDIA")] and //node[@id="display"]/description[contains(.,"3D")] and //node[@id="display"]/product[contains(.,"Quadro P")]'
7+

gpu-quadro-p-intel-xpath-expression

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Note - if you have a single cpu machine, change cpu:0 to just cpu at the start of the definition
2+
3+
maas ${MAAS_PROFILE} tags create \
4+
comment="Enable passthrough for Nvidia Quadro P series GPUs on Intel" \
5+
name=gpgpu-quadro-p-i \
6+
definition='//node[@id="cpu:0"]/capabilities/capability/@id = "vmx" and //node[@id="display"]/vendor[contains(.,"NVIDIA")] and //node[@id="display"]/description[contains(.,"3D")] and //node[@id="display"]/product[contains(.,"Quadro P")]'
7+

gpu-telsa-m-amd-xpath-expression

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Note - if you have a single cpu machine, change cpu:0 to just cpu at the start of the definition
2+
3+
maas ${MAAS_PROFILE} tags create \
4+
name=gpgpu-tesla-m-a \
5+
comment="Enable passthrough for Nvidia Tesla M series GPUs on AMD" \
6+
definition='//node[@id="cpu:0"]/capabilities/capability/@id = "svm" and //node[@id="display"]/vendor[contains(.,"NVIDIA")] and //node[@id="display"]/description[contains(.,"3D")] and //node[@id="display"]/product[contains(.,"Tesla M")]'
7+

gpu-telsa-m-intel-xpath-expression

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Note - if you have a single cpu machine, change cpu:0 to just cpu at the start of the definition
2+
3+
maas ${MAAS_PROFILE} tags create \
4+
name=gpgpu-tesla-m-i \
5+
comment="Enable passthrough for Nvidia Tesla M series GPUs on Intel" \
6+
definition='//node[@id="cpu:0"]/capabilities/capability/@id = "vmx" and //node[@id="display"]/vendor[contains(.,"NVIDIA")] and //node[@id="display"]/description[contains(.,"3D")] and //node[@id="display"]/product[contains(.,"Tesla M")]'
7+

gpu-telsa-p-amd-xpath-expression

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Note - if you have a single cpu machine, change cpu:0 to just cpu at the start of the definition
2+
3+
maas ${MAAS_PROFILE} tags create \
4+
name=gpgpu-tesla-p-a \
5+
comment="Enable passthrough for Nvidia Tesla P series GPUs on AMD" \
6+
definition='//node[@id="cpu:0"]/capabilities/capability/@id = "svm" and //node[@id="display"]/vendor[contains(.,"NVIDIA")] and //node[@id="display"]/description[contains(.,"3D")] and //node[@id="display"]/product[contains(.,"Tesla P")]'
7+

gpu-telsa-p-intel-xpath-expression

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Note - if you have a single cpu machine, change cpu:0 to just cpu at the start of the definition
2+
3+
maas ${MAAS_PROFILE} tags create \
4+
name=gpgpu-tesla-p-i \
5+
comment="Enable passthrough for Nvidia Tesla P series GPUs on Intel" \
6+
definition='//node[@id="cpu:0"]/capabilities/capability/@id = "vmx" and //node[@id="display"]/vendor[contains(.,"NVIDIA")] and //node[@id="display"]/description[contains(.,"3D")] and //node[@id="display"]/product[contains(.,"Tesla P")]'
7+

gpu-telsa-v-amd-xpath-expression

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Note - if you have a single cpu machine, change cpu:0 to just cpu at the start of the definition
2+
3+
maas ${MAAS_PROFILE} tags create \
4+
comment="Enable passthrough for Nvidia Tesla V series GPUs on AMD" \
5+
name=gpgpu-tesla-v-a \
6+
definition='//node[@id="cpu:0"]/capabilities/capability/@id = "svm" and //node[@id="display"]/vendor[contains(.,"NVIDIA")] and //node[@id="display"]/description[contains(.,"3D")] and //node[@id="display"]/product[contains(.,"Tesla V")]'
7+

gpu-telsa-v-intel-xpath-expression

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Note - if you have a single cpu machine, change cpu:0 to just cpu at the start of the definition
2+
3+
maas ${MAAS_PROFILE} tags create \
4+
comment="Enable passthrough for Nvidia Tesla V series GPUs on Intel" \
5+
name=gpgpu-tesla-v-i \
6+
definition='//node[@id="cpu:0"]/capabilities/capability/@id = "vmx" and //node[@id="display"]/vendor[contains(.,"NVIDIA")] and //node[@id="display"]/description[contains(.,"3D")] and //node[@id="display"]/product[contains(.,"Tesla V")]'
7+
8+

hp-dl360-G9-xpath-expression

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#This tag will only match Gen9 HP DL360 hardware:
2+
maas ${MAAS_PROFILE} tags create name=DL360G9 \
3+
comment="xpath tag to automatically identify Proliant DL360 Gen9 Servers" \
4+
definition='//node[@id="core" and @class="bus"]/product = "ProLiant DL360 Gen9"'

hp-dl360-xpath-expression

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#This tag will identify any Generation of HP DL360 Server (G1-G9)
2+
maas ${MAAS_PROFILE} tags create name=DL360 \
3+
comment="xpath tag to automatically identify Proliant DL360 Servers" \
4+
definition='contains(//node[@id="core" and @class="bus"]/product,"DL360")'
5+

hp-xl420-G9-xpath-expression

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#This tag will only match Gen9 HP XL420 hardware:
2+
maas ${MAAS_PROFILE} tags create name=XL420G9 \
3+
comment="xpath tag to automatically identify Proliant XL420 Gen9 Servers" \
4+
definition='//node[@id="core" and @class="bus"]/product = "ProLiant XL420 Gen9"'
5+

hp-xl420-xpath-expression

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#This tag will identify any Generation of HP XL420 Server (G1-G9)
2+
maas ${MAAS_PROFILE} tags create name=XL420 \
3+
comment="xpath tag to automatically identify Proliant XL420 Servers" \
4+
definition='contains(//node[@id="core" and @class="bus"]/product,"XL420")'
5+

lldpd-xpath-expression

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
maas ${MAAS_PROFILE} tags create name=${TAG_NAME} definition="//lldp:interface/lldp:chassis/lldp:name = "switch-${CHASSIS_NAME}"

nvme-xpath-expression

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
maas ${MAAS_PROFILE} tags create name=NVME comment="xpath tag for automatically tagging servers that have NVME controllers" definition='//node[@id="storage" and @class="storage"]/description = "Non-Volatile memory controller"'

physical-intel-xpath-expression

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
maas ${MAAS_PROFILE} tag update metal-intel definition='not(starts-with(//node[@class="system"]/vendor,"QEMU")) and //node[@id="cpu:0"]/capabilities/capability/@id = "vmx" or //node[@id="cpu"]/capabilities/capability/@id = "vmx" and contains(//node[@id="cpu"]/product,"Intel")'

spindle-count-xpath-expression

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This tag will identify machines with ten (10) 10GB spindles and tag as ceph-node
2+
#
3+
# Note: Adjust size (in bytes) and disk count to suit your needs
4+
5+
maas ${MAAS_PROFILE} tags create \
6+
name=ceph-node \
7+
definition='count(//node[@class="disk" and contains(size,"10000831348736")]) = 10' \
8+
comment='xpath auto-tag for supermicro servers with ten 10TB disks'

supermicro-all-xpath-expression

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#This tag has a definition that should match all SuperMicro Servers
2+
maas ${MAAS_PROFILE} tags create name=SuperMicro \
3+
comment="xpath tag to automatically identify SuperMirco Servers" \
4+
definition='//node[@id="core" and @class="bus"]/vendor = "Supermicro"'
5+

0 commit comments

Comments
 (0)