[prev in list] [next in list] [prev in thread] [next in thread]
List: npaci-rocks-discussion
Subject: [Rocks-Discuss] Re: If-Then-Else in extend-compute.xml?
From: Philip Michael Papadopoulos <ppapadop () uci ! edu>
Date: 2020-04-15 19:30:21
Message-ID: CAF2yGiUbsbmgwwhJVC9n-5X4AepvybYMqoam3ppiE5W3LbU+Qw () mail ! gmail ! com
[Download RAW message or body]
Yes.
(did you want detail? ;-) -- Sorry a bit snarky due to Covid-19 lockdown .
The cond tag is general, You can use it in package, post, pre tags.
<package cond="hasFeature">Package_A</package>
<package cond="not hasFeature">Package_B</package>
Set the attribute for a host where you want the package installed. When an
attribute doesn't
exist for a host, it is considered False
rocks set host attr hasFeature True
Here's an example for adding "wireshark"
extend-compute.xml in site-profiles looks like
# cat /export/rocks/install/site-profiles/7.0/nodes/extend-compute.xml
<kickstart>
<package cond="inst_wireshark">wireshark</package>
</kickstart>
# (cd /export/rocks/install; rocks create distro)
### no attribute, wireshark not installed
# rocks list host profile compute-0-0 | grep wireshark
### turn on the attribute and verify that wireshark is part of the kickstart
# rocks set host attr compute-0-0 inst_wireshark True
# rocks list host profile compute-0-0 | grep wireshark
wireshark
### remove the attribute and check again
# rocks remove host attr compute-0-0 inst_wireshark
# rocks list host profile compute-0-0 | grep wireshark
On Wed, Apr 15, 2020 at 11:14 AM Kritzel Kratzel <kritzel.kratzel@gmx.de>
wrote:
> Is it possible to use custom-made attributes in extend-compute.xml for
> selective installation of RPM packages over slightly different compute
> nodes?
>
> For example:
> # rocks set appliance attr compute-0-0 hasFeature True
> # rocks set appliance attr compute-0-1 hasFeature False
>
> And then somewhere in extend-compute.xml:
>
> If ("hasFeature" == "True")
> <package>Package_A</package>
> Else
> <package>Package_B</package>
> End If
>
> I have compute nodes of different vendors and would like to install
> additional packages only on nodes of vendor A, for example.
>
>
> Thanks,
> Michael
>
>
>
>
>
>
--
Philip Papadopoulos, Ph.D
Director, Research Cyber Infrastructure Center
University of California, Irvine
E-mail: ppapadop@uci.edu
Phone: (949) 824-5343
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sdsc.edu/pipermail/npaci-rocks-discussion/attachments/20200415/fd87d0fe/attachment.html \
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic