forked from mreferre/eksutils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
utilsversions.sh
executable file
·162 lines (155 loc) · 3.58 KB
/
utilsversions.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
#!/bin/bash
# this script checks the versions of the tools and utilities installed
errorcheck() {
if [ $? != 0 ]; then
logger "red" "Unrecoverable generic error found checking [$1]. Exiting."
exit 1
fi
}
logger() {
LOG_TYPE=$1
MSG=$2
COLOR_OFF="\x1b[39;49;00m"
case "${LOG_TYPE}" in
green)
# Green
COLOR_ON="\x1b[32;01m";;
blue)
# Blue
COLOR_ON="\x1b[36;01m";;
yellow)
# Yellow
COLOR_ON="\x1b[33;01m";;
red)
# Red
COLOR_ON="\x1b[31;01m";;
default)
# Default
COLOR_ON="${COLOR_OFF}";;
*)
# Default
COLOR_ON="${COLOR_OFF}";;
esac
TIME=$(date +%F" "%H:%M:%S)
echo -e "${COLOR_ON}${TIME} -- ${MSG} ${COLOR_OFF}"
}
# yum-installed system tools:
logger "green" "checking yum..."
yum version
errorcheck yum
logger "green" "checking git..."
git version
errorcheck git
#logger "green" "checking yarn..."
#yarn --version
#errorcheck yarn
logger "green" "checking sudo..."
sudo -V # | head -n 1
errorcheck sudo
logger "green" "checking ab..."
ab -V
errorcheck ab
logger "green" "checking jq..."
jq --version
errorcheck jq
logger "green" "checking less..."
less --version
errorcheck less
logger "green" "checking openssl..."
openssl version
errorcheck openssl
logger "green" "checking python..."
python --version
errorcheck python
logger "green" "checking python3..."
python3 --version
errorcheck python3
logger "green" "checking tar..."
tar --version # | head -n 1
errorcheck tar
logger "green" "checking unzip..."
unzip # | head -n 1
errorcheck unzip
logger "green" "checking vi..."
vi --version # | head -n 1
errorcheck vi
logger "green" "checking wget..."
wget --version # | head -n 1
errorcheck wget
logger "green" "checking which..."
which --version # | head -n 1
errorcheck which
#logger "green" "checking figlet..."
#figlet -v # | head -n 1
#errorcheck figlet
# add-ons tools (pre-requisites for the actual utilities)
logger "green" "checking pip..."
pip --version
errorcheck pip
logger "green" "checking node..."
node --version
errorcheck node
# utilities
logger "green" "checking aws..."
aws --version
errorcheck aws
logger "green" "checking eb..."
eb --version
errorcheck eb
logger "green" "checking cdk..."
cdk --version
errorcheck cdk8s
logger "green" "checking cdk8s..."
cdk8s --version
errorcheck cdk
logger "green" "checking kubectl..."
kubectl version --client=true
errorcheck kubectl
logger "green" "checking aws-iam-authenticator..."
aws-iam-authenticator version
errorcheck aws-iam-authenticator
logger "green" "checking helm..."
helm version -c
errorcheck helm
logger "green" "checking eksctl..."
eksctl version
errorcheck eksctl
logger "green" "checking eksuser..."
eksuser version
errorcheck eksuser
logger "green" "checking kubecfg..."
kubecfg version
errorcheck kubecfg
logger "green" "checking ks..."
ks version
errorcheck ks
logger "green" "checking k9s..."
k9s version
errorcheck k9s
logger "green" "checking docker..."
docker --version
errorcheck docker
logger "green" "checking docker-compose..."
docker-compose --version
errorcheck docker-compose
logger "green" "checking kind..."
kind --version
errorcheck kind
logger "green" "checking octant..."
octant version
errorcheck octant
logger "green" "checking glooctl..."
glooctl version
errorcheck glooctl
logger "green" "checking kubectx..."
kubectx -h
errorcheck kubectx
logger "green" "checking kubens..."
kubens -h
errorcheck kubens
logger "green" "checking bat..."
bat --version
errorcheck bat
logger "green" "checking code-server..."
code-server --version
errorcheck code-server