-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathÜbungen_Teil_III.txt
More file actions
89 lines (76 loc) · 3.56 KB
/
Übungen_Teil_III.txt
File metadata and controls
89 lines (76 loc) · 3.56 KB
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
+===============================================================================
+ Übungen Einführung OpenShift Teil III
+
+ T-Systems
+ PaaS Training
+ Einführung in OpenShift
+
+===============================================================================
5 - Scaling (optional)
======================
a - Installation Jmeter
=======================
Linux Workstation
> wget http://mirror.23media.de/apache/jmeter/binaries/apache-jmeter-4.0.tgz
> gzip -d apache-jmeter-4.0.tgz
> tar -xvf apache-jmeter-4.0.tar
> sudo apt-get install default-jre
> sudo vi /etc/environment
JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/"
> source /etc/environment
b - Resource Limits definieren
==============================
AppAgile Oberfläche
-> Applications->Deployments
-> insults
-> Actions->Edit Resource Limits
Field Name | What to enter | Description
------------------------------+---------------+--------------------------------------------------------------------------------------------
CPU Request | 1 cores | The minimum amount of CPU the container is guaranteed.
CPU Limit | 2 cores | The maximum amount of CPU the container is allowed to use when running.
Memory Request | 1 MB | The minimum amThe maximum amount of memory the container is allowed to use when running.
Memory Limit | 4 GB | The maximum amount of memory the container is allowed to use when running.
c - Autoscaler konfigurieren
============================
AppAgile Oberfläche
-> Applications->Deployments
-> insults
-> Actions->Edit Autoscaler
Field Name What to enter Description
------------------------------+---------------+--------------------------------------------------------------------------
Min Pods | 1 | The lower limit for the number of pods that can be set by the autoscaler.
| | If not specified, defaults to 1.
Max Pods | 5 | The upper limit for the number of pods that can be set by the autoscaler.
CPU Request Target | 20 % | The percentage of the CPU request that each pod should ideally be using.
d - Jmeter aufrufen
===================
Linux Workstation
> cd ~/apache-jmeter-4.0/bin
> curl https://github.com/thomaswetzler/ https://raw.githubusercontent.com/thomaswetzler/OpenShiftTraining/blob/master/autoscaling.jmx > autoscaling.jmx
> ./jmeter -n -t ./autoscaling.jmx -l ./results.jtl
e - Ergebnis
============
AppAgile Oberfläche
-> Overview
6 - SelfHealing (optional)
==========================
a - Listen Pods
===============
> oc get pods
NAME READY STATUS RESTARTS AGE
first-nodejs-example-1-35vx7 1/1 Running 0 2m
first-nodejs-example-1-59gyi 1/1 Running 0 4m
first-nodejs-example-1-build 0/1 Completed 0 20h
first-nodejs-example-1-n5ozj 1/1 Running 0 3m
b - Löschen Pod
===============
> oc delete pod first-nodejs-example-1-n5ozj
pod "first-nodejs-example-1-n5ozj" deleted
c - Ergebnis beobachten
=======================
> watch oc get pods
NAME READY STATUS RESTARTS AGE
first-nodejs-example-1-35vx7 1/1 Running 0 4m
first-nodejs-example-1-59gyi 1/1 Running 0 6m
first-nodejs-example-1-build 0/1 Completed 0 20h
first-nodejs-example-1-ezpn3 1/1 Running 0 34s