-
Notifications
You must be signed in to change notification settings - Fork 0
/
fastinstall_k8s_RPi.sh
434 lines (419 loc) · 10.6 KB
/
fastinstall_k8s_RPi.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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
sudo apt-get install -y python-gevent python-gevent-websocket
sudo apt-get install -y python-gevent
sudo apt-get install -y python-opencv
sudo apt-get install -y libjasper1
sudo apt-get install -y libqtgui4
sudo apt-get install -y libqt4-test
sudo apt-get install -y libcblas-dev
sudo apt-get install -y libhdf5-dev
sudo apt-get install -y libcblas-dev
sudo apt-get install -y libhdf5-dev
sudo apt-get install -y libcblas-dev
sudo apt-get install -y libhdf5-dev
sudo apt-get install -y libhdf5-serial-dev
sudo apt-get install -y libatlas-base-dev
sudo apt-get install -y libcblas-dev
sudo apt-get install -y libhdf5-dev
sudo apt-get install -y libhdf5-serial-dev
sudo apt-get install -y libatlas-base-dev
sudo apt-get install -y libjasper-dev
sudo apt-get install -y python3-pip
sudo apt-get install -y python-pip
sudo apt-get install -y ipmitool openipmi freeipmi i2c-tools
pip install click Flask future iso8601 itsdangerous Jinja2 MarkupSafe numpy opencv-python picamera pip PyYAML RPi.GPIO serial setuptools Werkzeug
pip3 install click Flask future iso8601 itsdangerous Jinja2 MarkupSafe numpy opencv-python picamera pip PyYAML RPi.GPIO serial setuptools Werkzeug
pip install backports-abc
pip install backports.functools-lru-cache
pip install backports.shutil-get-terminal-size
pip install backports.ssl-match-hostname
pip install BeautifulSoup
pip install beautifulsoup4
pip install blivet
pip install boto3
pip install botocore
pip install Brlapi
pip install certifi
pip install cffi
pip install chardet
pip install click
pip install clufter
pip install configobj
pip install configparser
pip install configshell-fb
pip install contextlib2
pip install coverage
pip install cryptography
pip install cupshelpers
pip install custodia
pip install decorator
pip install defusedxml
pip install di
pip install Django
pip install dnspython
pip install docutils
pip install entrypoints
pip install enum34
pip install ethtool
pip install filetype
pip install firstboot
pip install Flask
pip install fros
pip install funcsigs
pip install future
pip install futures
pip install gevent
pip install greenlet
pip install gssapi
pip install idna
pip install importlib-metadata
pip install importlib-resources
pip install iniparse
pip install initial-setup
pip install intel-openmp
pip install ipaclient
pip install ipaddr
pip install ipaddress
pip install ipalib
pip install ipaplatform
pip install ipapython
pip install ipaserver
pip install IPy
pip install ipykernel
pip install ipython
pip install ipython-genutils
pip install isc
pip install isodate
pip install itsdangerous
pip install javapackages
pip install Jinja2
pip install jmespath
pip install jupyter-client
pip install jupyter-core
pip install jwcrypto
pip install kdcproxy
pip install keyring
pip install kitchen
pip install kmod
pip install langtable
pip install lxml
pip install m2r
pip install MarkupSafe
pip install mercurial
pip install mistune
pip install mock
pip install msrest
pip install msrestazure
pip install netaddr
pip install netifaces
pip install nodeenv
pip install nose
pip install ntplib
pip install numpy
pip install oauthlib
pip install pandas
pip install pathlib2
pip install pcs
pip install perf
pip install pexpect
pip install pickleshare
pip install Pillow
pip install pip
pip install ply
pip install policycoreutils-default-encoding
pip install prompt-toolkit
pip install ptyprocess
pip install py
pip install pyasn1
pip install pyasn1-modules
pip install pycparser
pip install pycups
pip install pycurl
pip install Pygments
pip install pygobject
pip install pygpgme
pip install pyinotify
pip install PyJWT
pip install pykickstart
pip install pyliblzma
pip install pyOpenSSL
pip install pyparsing
pip install pyparted
pip install pysmbc
pip install python-augeas
pip install python-dateutil
pip install python-ldap
pip install python-linux-procfs
pip install python-meh
pip install python-nss
pip install python-yubico
pip install pytz
pip install pyudev
pip install pyusb
pip install pyxattr
pip install PyYAML
pip install pyzmq
pip install qrcode
pip install qtconsole
pip install QtPy
pip install redis
pip install requests
pip install requests-oauthlib
pip install rtslib-fb
pip install ruamel.ordereddict
pip install ruamel.yaml
pip install ruamel.yaml.clib
pip install s3transfer
pip install scandir
pip install schedutils
pip install SecretStorage
pip install seobject
pip install sepolicy
pip install setroubleshoot
pip install setuptools
pip install simplegeneric
pip install singledispatch
pip install six
pip install slip
pip install slip.dbus
pip install soupsieve
pip install SSSDConfig
pip install stevedore
pip install subp
pip install subprocess32
pip install suds
pip install ta
pip install targetcli-fb
pip install torch
pip install tornado
pip install traitlets
pip install typing
pip install uamqp
pip install urlgrabber
pip install urllib3
pip install urwid
pip install virtualenv
pip install virtualenv-clone
pip install virtualenvwrapper
pip install wcwidth
pip install webencodings
pip install Werkzeug
pip install wheel
pip install yum-langpacks
pip install yum-metadata-parser
pip install zipp
pip install zope.event
pip install zope.interface
pip3 install backports-abc
pip3 install backports.functools-lru-cache
pip3 install backports.shutil-get-terminal-size
pip3 install backports.ssl-match-hostname
pip3 install BeautifulSoup
pip3 install beautifulsoup4
pip3 install blivet
pip3 install boto3
pip3 install botocore
pip3 install Brlapi
pip3 install certifi
pip3 install cffi
pip3 install chardet
pip3 install click
pip3 install clufter
pip3 install configobj
pip3 install configparser
pip3 install configshell-fb
pip3 install contextlib2
pip3 install coverage
pip3 install cryptography
pip3 install cupshelpers
pip3 install custodia
pip3 install decorator
pip3 install defusedxml
pip3 install di
pip3 install Django
pip3 install dnspython
pip3 install docutils
pip3 install entrypoints
pip3 install enum34
pip3 install ethtool
pip3 install filetype
pip3 install firstboot
pip3 install Flask
pip3 install fros
pip3 install funcsigs
pip3 install future
pip3 install futures
pip3 install gevent
pip3 install greenlet
pip3 install gssapi
pip3 install idna
pip3 install importlib-metadata
pip3 install importlib-resources
pip3 install iniparse
pip3 install initial-setup
pip3 install intel-openmp
pip3 install ipaclient
pip3 install ipaddr
pip3 install ipaddress
pip3 install ipalib
pip3 install ipaplatform
pip3 install ipapython
pip3 install ipaserver
pip3 install IPy
pip3 install ipykernel
pip3 install ipython
pip3 install ipython-genutils
pip3 install isc
pip3 install isodate
pip3 install itsdangerous
pip3 install javapackages
pip3 install Jinja2
pip3 install jmespath
pip3 install jupyter-client
pip3 install jupyter-core
pip3 install jwcrypto
pip3 install kdcproxy
pip3 install keyring
pip3 install kitchen
pip3 install kmod
pip3 install langtable
pip3 install lxml
pip3 install m2r
pip3 install MarkupSafe
pip3 install mercurial
pip3 install mistune
pip3 install mock
pip3 install msrest
pip3 install msrestazure
pip3 install netaddr
pip3 install netifaces
pip3 install nodeenv
pip3 install nose
pip3 install ntplib
pip3 install numpy
pip3 install oauthlib
pip3 install pandas
pip3 install pathlib2
pip3 install pcs
pip3 install perf
pip3 install pexpect
pip3 install pickleshare
pip3 install Pillow
pip3 install pip3
pip3 install ply
pip3 install policycoreutils-default-encoding
pip3 install prompt-toolkit
pip3 install ptyprocess
pip3 install py
pip3 install pyasn1
pip3 install pyasn1-modules
pip3 install pycparser
pip3 install pycups
pip3 install pycurl
pip3 install Pygments
pip3 install pygobject
pip3 install pygpgme
pip3 install pyinotify
pip3 install PyJWT
pip3 install pykickstart
pip3 install pyliblzma
pip3 install pyOpenSSL
pip3 install pyparsing
pip3 install pyparted
pip3 install pysmbc
pip3 install python-augeas
pip3 install python-dateutil
pip3 install python-ldap
pip3 install python-linux-procfs
pip3 install python-meh
pip3 install python-nss
pip3 install python-yubico
pip3 install pytz
pip3 install pyudev
pip3 install pyusb
pip3 install pyxattr
pip3 install PyYAML
pip3 install pyzmq
pip3 install qrcode
pip3 install qtconsole
pip3 install QtPy
pip3 install redis
pip3 install requests
pip3 install requests-oauthlib
pip3 install rtslib-fb
pip3 install ruamel.ordereddict
pip3 install ruamel.yaml
pip3 install ruamel.yaml.clib
pip3 install s3transfer
pip3 install scandir
pip3 install schedutils
pip3 install SecretStorage
pip3 install seobject
pip3 install sepolicy
pip3 install setroubleshoot
pip3 install setuptools
pip3 install simplegeneric
pip3 install singledispatch
pip3 install six
pip3 install slip
pip3 install slip.dbus
pip3 install soupsieve
pip3 install SSSDConfig
pip3 install stevedore
pip3 install subp
pip3 install subprocess32
pip3 install suds
pip3 install ta
pip3 install targetcli-fb
pip3 install torch
pip3 install tornado
pip3 install traitlets
pip3 install typing
pip3 install uamqp
pip3 install urlgrabber
pip3 install urllib3
pip3 install urwid
pip3 install virtualenv
pip3 install virtualenv-clone
pip3 install virtualenvwrapper
pip3 install wcwidth
pip3 install webencodings
pip3 install Werkzeug
pip3 install wheel
pip3 install yum-langpacks
pip3 install yum-metadata-parser
pip3 install zipp
pip3 install zope.event
pip3 install zope.interface
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
systemctl enable docker.service
systemctl enable containerd.service
cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-\$basearch
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
exclude=kubelet kubeadm kubectl
EOF
sudo setenforce 0
sudo sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" \ >> /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update && sudo apt-get install -y apt-transport-https curl
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubelet kubeadm kubectl
sudo apt-mark hold kubelet kubeadm kubectl
sudo apt-get install -y linux-libc-dev golang gcc
sudo apt-get install -y mingw-w64
sudo sed -i 's/ rootwait$/ rootwait cgroup_enable=cpuset cgroup_enable=memory/g' /boot/cmdline.txt #need reboot
swapoff -a
kubeadm init
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
export KUBECONFIG=/etc/kubernetes/admin.conf
hostnamectl set-hostname raspberrypi2