-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update AMD Operator and NFD install scripts (#2139)
* workaround for amd certified operator in ocp < 4.16 * add NFD installation script and use it in AMD script * use NFD install script in NVIDIA script * minor change * update warn msg * rm unused function
- Loading branch information
Showing
5 changed files
with
63 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
ods_ci/tasks/Resources/Provisioning/GPU/NFD/install_nfd.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
NFD_INSTALL_DIR="$(dirname "$0")" | ||
NFD_INSTANCE=$NFD_INSTALL_DIR/nfd_deploy.yaml | ||
echo "Installing NFD operator" | ||
oc apply -f "$NFD_INSTALL_DIR/nfd_operator.yaml" | ||
oc wait --timeout=3m --for jsonpath='{.status.state}'=AtLatestKnown -n openshift-nfd sub nfd | ||
|
||
ocpVersion=$(oc version --output json | jq '.openshiftVersion' | tr -d '"') | ||
IFS='.' read -ra ocpVersionSplit <<< "$ocpVersion" | ||
xyVersion="${ocpVersionSplit[0]}.${ocpVersionSplit[1]}" | ||
declare -A images=( | ||
["4.14"]="registry.redhat.io\/openshift4\/ose-node-feature-discovery@sha256:2977e67a413882efbfb90b52facf65d38a5cb2cd7a232ca3a69476e5dec33319" | ||
["4.15"]="registry.redhat.io\/openshift4\/ose-node-feature-discovery-rhel9@sha256:661b6697dee34626a3a98b50cdba787402ab214d2807b8460df92e3c79cdfcc5" | ||
["4.16"]="registry.redhat.io\/openshift4\/ose-node-feature-discovery-rhel9@sha256:bb95bc317ab78e8af4ef34dd66f9f62c2f8c261dfb5eab40918142812802f8b7" | ||
["4.17"]="registry.redhat.io\/openshift4\/ose-node-feature-discovery-rhel9@sha256:154cf3f1ddaf895d7ecd04947bd455a930132f72acc6e8bde8c26bc123184ace" | ||
# 4.18 is a pre-release image. We need to update it later | ||
["4.18"]="registry.redhat.io\/openshift4\/ose-node-feature-discovery-rhel9@sha256:510cb4351253492455664b6c323f54dc2f6f2f8791c5e92ba6b7e60b8adb357c" | ||
) | ||
if [ "${images[$xyVersion]}" ]; then | ||
imageUrl="${images[$xyVersion]}" | ||
echo "Using image SHA for $xyVersion: $imageUrl" | ||
else | ||
imageUrl="${images["4.17"]}" | ||
echo "WARNING: I don't know the sha for $xyVersion. Re-using default 4.17 $imageUrl. It might not work!" | ||
fi | ||
sed -i'' -e "s/<imageUrl>/$imageUrl/g" $NFD_INSTANCE | ||
oc apply -f "$NFD_INSTANCE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters