Skip to content

Commit 5271b32

Browse files
committed
Add node-metadata.sh to ops/eks, bump version to 20050205
1 parent da91641 commit 5271b32

3 files changed

Lines changed: 26 additions & 1 deletion

File tree

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export MOD=""
5959
export MOD_TAG=$(if [ "$MOD" == "" ]; then echo ""; else echo "-${MOD}"; fi)
6060
## VERSION: [optional] - Version tag for this Docker image. Example: v20180302
6161
#export VERSION=v$(date +%Y%m%d)
62-
export VERSION=v20250124
62+
export VERSION=v20250205
6363
export TAG=$(if [ -z "${VERSION}" ]; then echo ":latest${MOD_TAG}"; else echo ":${VERSION}${MOD_TAG}"; fi)
6464
## BUILD_OPTS: [optional] - arguments for the docker image build command
6565
export BUILD_OPTS="--progress plain --build-arg http_proxy=${http_proxy} --build-arg https_proxy=${https_proxy} --build-arg no_proxy=${no_proxy} --build-arg MOD=${MOD}"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
3+
help(){
4+
echo ""
5+
echo "Usage: $0 <node_name> [metadata_name]"
6+
echo " node_name - required, partial or full node name of which to retrieve metadata"
7+
echo " metadata_name - optional, name of metadata to retrieve"
8+
echo " if not specified, metadata options are listed"
9+
echo ""
10+
}
11+
12+
if [ "$1" == "" ]; then
13+
help
14+
else
15+
16+
node_name=$1
17+
metadata_name=$2
18+
19+
CMD="TOKEN=\$(curl -X PUT \\\"http://169.254.169.254/latest/api/token\\\" -H \\\"X-aws-ec2-metadata-token-ttl-seconds: 21600\\\"); echo \\\"\\\"; curl -H \\\"X-aws-ec2-metadata-token: \$TOKEN\\\" http://169.254.169.254/latest/meta-data/$metadata_name; echo \\\"\\\"; echo \\\"\\\""
20+
21+
node-exec.sh $node_name "$CMD"
22+
23+
fi
24+

Container-Root/hyperpod/setup/eks/install-kubeps1.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ alias gpu-util='nvtop.sh'
5353
alias nu='neurontop.sh'
5454
alias neuron-util='neurontop.sh'
5555
alias hp='hyperpod'
56+
alias nm='node-metadata.sh'
5657
5758
if [ -f ~/.kubeon ]; then
5859
source ~/kube-ps1.sh

0 commit comments

Comments
 (0)