Skip to content

Commit

Permalink
scripts: Add Additional Kustomization For Baremetal Deployment
Browse files Browse the repository at this point in the history
Adding an option to inject additional EDPM variables for baremetal
deployments using Kustomize.
The following variables were added:
  - EDPM_BAREMETAL_KERNEL_ARGS, uses `edpm-kernel` role to modify kernel
    arugments
  - EDPM_BAREMETAL_KERNEL_HUGEPAGES, uses `edpm-kernel` role to
    configure hugepages
  - EDPM_BAREMETAL_TUNED_PROFILE="cpu-partitioning", uses `edpm_tuned`
    role to configure a tuned profile
  - EDPM_BAREMETAL_TUNED_ISOLATED_CORES, uses `edpm_tuned` role to
    configured tuned isolated cores
  • Loading branch information
vkhitrin committed Aug 26, 2023
1 parent c45b937 commit 5366d74
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions scripts/gen-edpm-baremetal-kustomize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,42 @@ cat <<EOF >>kustomization.yaml
EOF
fi

# Used for edpm-kernel role to provide additional kernel arguments
if [ ! -z "$EDPM_BAREMETAL_KERNEL_ARGS" ]; then
cat <<EOF >>kustomization.yaml
- op: add
path: /spec/roles/edpm-compute/nodeTemplate/ansibleVars/edpm_kernel_args
value: ${EDPM_BAREMETAL_KERNEL_ARGS}
EOF
fi

# Used for edpm-kernel role to configure huge pages
if [ ! -z "$EDPM_BAREMETAL_KERNEL_HUGEPAGES" ]; then
cat <<EOF >>kustomization.yaml
- op: add
path: /spec/roles/edpm-compute/nodeTemplate/ansibleVars/edpm_kernel_hugepages
value: ${EDPM_BAREMETAL_KERNEL_HUGEPAGES}
EOF
fi

# Used for edpm_tuned role to configure tuned profile
if [ ! -z "$EDPM_BAREMETAL_TUNED_PROFILE" ]; then
cat <<EOF >>kustomization.yaml
- op: add
path: /spec/roles/edpm-compute/nodeTemplate/ansibleVars/edpm_tuned_profile
value: ${EDPM_BAREMETAL_TUNED_PROFILE}
EOF
fi

# Used for edpm_tuned role to configure tuned profile
if [ ! -z "$EDPM_BAREMETAL_TUNED_ISOLATED_CORES" ]; then
cat <<EOF >>kustomization.yaml
- op: add
path: /spec/roles/edpm-compute/nodeTemplate/ansibleVars/edpm_tuned_isolated_cores
value: ${EDPM_BAREMETAL_TUNED_ISOLATED_CORES}
EOF
fi

kustomization_add_resources

popd

0 comments on commit 5366d74

Please sign in to comment.