mirror of
https://github.com/clearlinux/cloud-native-setup.git
synced 2026-08-19 13:36:43 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4ed6f3fca2 | |||
| 7efe99f139 | |||
| 103bfcc681 | |||
| 9574f44b20 | |||
| f7254e2b30 | |||
| df0af2ab2c |
@@ -6,7 +6,7 @@ patchesJson6902:
|
|||||||
# adds "networking.k8s.io" to ClusterRole's apiGroups
|
# adds "networking.k8s.io" to ClusterRole's apiGroups
|
||||||
- target:
|
- target:
|
||||||
group: rbac.authorization.k8s.io
|
group: rbac.authorization.k8s.io
|
||||||
version: v1beta1
|
version: v1
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
name: nginx-ingress-clusterrole
|
name: nginx-ingress-clusterrole
|
||||||
path: patch_clusterrole.yaml
|
path: patch_clusterrole.yaml
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# operator
|
# operator
|
||||||
apiVersion: apps/v1beta1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: rook-ceph-operator
|
name: rook-ceph-operator
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
apiVersion: apiextensions.k8s.io/v1beta1
|
apiVersion: apiextensions.k8s.io/v1
|
||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
# name must match the spec fields below, and be in the form: <plural>.<group>
|
# name must match the spec fields below, and be in the form: <plural>.<group>
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ patchesJson6902:
|
|||||||
# adds "networking.k8s.io" to ClusterRole's apiGroups
|
# adds "networking.k8s.io" to ClusterRole's apiGroups
|
||||||
- target:
|
- target:
|
||||||
group: rbac.authorization.k8s.io
|
group: rbac.authorization.k8s.io
|
||||||
version: v1beta1
|
version: v1
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
name: nginx-ingress-clusterrole
|
name: nginx-ingress-clusterrole
|
||||||
path: patch_clusterrole.yaml
|
path: patch_clusterrole.yaml
|
||||||
@@ -137,7 +137,7 @@ itself contains the operation to perform, target path and value. The `rules/3/ap
|
|||||||
operation (in this case "add") at the `apiGroups:` list found under the 4th list item of `rules:`.
|
operation (in this case "add") at the `apiGroups:` list found under the 4th list item of `rules:`.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
metadata:
|
metadata:
|
||||||
name: nginx-ingress-clusterrole
|
name: nginx-ingress-clusterrole
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
apiVersion: admissionregistration.k8s.io/v1beta1
|
apiVersion: admissionregistration.k8s.io/v1
|
||||||
kind: MutatingWebhookConfiguration
|
kind: MutatingWebhookConfiguration
|
||||||
metadata:
|
metadata:
|
||||||
name: pod-annotate-webhook
|
name: pod-annotate-webhook
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: extensions/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: pod-annotate-webhook
|
name: pod-annotate-webhook
|
||||||
|
|||||||
@@ -52,3 +52,4 @@ sudo systemctl is-enabled containerd && sudo systemctl restart containerd
|
|||||||
sudo systemctl restart kubelet
|
sudo systemctl restart kubelet
|
||||||
|
|
||||||
reset_cluster
|
reset_cluster
|
||||||
|
sudo -E bash -c "rm -rf /var/lib/containerd/*"
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ function setup_proxy() {
|
|||||||
sed_val=${ADD_NO_PROXY//\//\\/}
|
sed_val=${ADD_NO_PROXY//\//\\/}
|
||||||
[ -f /etc/environment ] && sudo sed -i "/no_proxy/I s/$/,${sed_val}/g" /etc/environment
|
[ -f /etc/environment ] && sudo sed -i "/no_proxy/I s/$/,${sed_val}/g" /etc/environment
|
||||||
if [ -f /etc/profile.d/proxy.sh ]; then
|
if [ -f /etc/profile.d/proxy.sh ]; then
|
||||||
sudo sed -i "/no_proxy/I s/\"$/,${sed_val}\"/g" /etc/profile.d/proxy.sh
|
sudo sed -i "/no_proxy/I s/$/,${sed_val}/g" /etc/profile.d/proxy.sh
|
||||||
else
|
else
|
||||||
echo "Warning, failed to find /etc/profile.d/proxy.sh to edit no_proxy line"
|
echo "Warning, failed to find /etc/profile.d/proxy.sh to edit no_proxy line"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: extensions/v1beta1
|
apiVersion: extensions/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: php-apache-kata
|
name: php-apache-kata
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: extensions/v1beta1
|
apiVersion: extensions/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: php-apache-runc
|
name: php-apache-runc
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
# We would have used the 'verse' base, that already has some of the docs processing
|
# We would have used the 'verse' base, that already has some of the docs processing
|
||||||
# installed, but I could not figure out how to add in the extra bits we needed to
|
# installed, but I could not figure out how to add in the extra bits we needed to
|
||||||
# the lite tex version is uses.
|
# the lite tex version is uses.
|
||||||
FROM rocker/tidyverse
|
FROM rocker/tidyverse:latest
|
||||||
|
|
||||||
# Version of the Dockerfile
|
# Version of the Dockerfile
|
||||||
LABEL DOCKERFILE_VERSION="1.0"
|
LABEL DOCKERFILE_VERSION="1.0"
|
||||||
|
|||||||
@@ -30,15 +30,6 @@ cpustats=c() # Statistics for cpu usage
|
|||||||
bootstats=c() # Statistics for boot (launch) times
|
bootstats=c() # Statistics for boot (launch) times
|
||||||
inodestats=c() # Statistics for inode usage
|
inodestats=c() # Statistics for inode usage
|
||||||
|
|
||||||
# values for scaling the secondary y axes on some graphs
|
|
||||||
mem_scale=1
|
|
||||||
cpu_scale=1
|
|
||||||
inode_scale=1
|
|
||||||
ip_scale=1
|
|
||||||
oct_scale=1
|
|
||||||
drop_scale=1
|
|
||||||
error_scale=1
|
|
||||||
|
|
||||||
# iterate over every set of results (test run)
|
# iterate over every set of results (test run)
|
||||||
for (currentdir in resultdirs) {
|
for (currentdir in resultdirs) {
|
||||||
# For every results file we are interested in evaluating
|
# For every results file we are interested in evaluating
|
||||||
@@ -277,43 +268,79 @@ for (currentdir in resultdirs) {
|
|||||||
next
|
next
|
||||||
}
|
}
|
||||||
|
|
||||||
max_free_mem=max(node_mem_free_data$value)
|
# get the epoch time of first and last pod launch
|
||||||
min_free_mem=min(node_mem_free_data$value)
|
start_time=local_bootdata$epoch[1]
|
||||||
|
end_time=local_bootdata$epoch[length(local_bootdata$epoch)]
|
||||||
|
|
||||||
|
# get value closest to first pod launch
|
||||||
|
mem_start_index=Position(function(x) x > start_time, node_mem_free_data$epoch)
|
||||||
|
# take the reading previous to the index as long as a valid index
|
||||||
|
if (is.na(mem_start_index)) {
|
||||||
|
mem_start_index = 1
|
||||||
|
} else if (mem_start_index > 1) {
|
||||||
|
mem_start_index = mem_start_index - 1
|
||||||
|
}
|
||||||
|
max_free_mem=node_mem_free_data$value[mem_start_index]
|
||||||
|
|
||||||
|
# get value closest to last pod launch
|
||||||
|
mem_end_index=Position(function(x) x > end_time, node_mem_free_data$epoch)
|
||||||
|
# take the reading previous to the index as long as a valid index
|
||||||
|
if (is.na(mem_end_index)) {
|
||||||
|
mem_end_index = length(node_mem_free_data$epoch)
|
||||||
|
} else if (mem_end_index > 1) {
|
||||||
|
mem_end_index = mem_end_index - 1
|
||||||
|
}
|
||||||
|
min_free_mem=node_mem_free_data$value[mem_end_index]
|
||||||
|
|
||||||
memtotal = memtotal + (max_free_mem - min_free_mem)
|
memtotal = memtotal + (max_free_mem - min_free_mem)
|
||||||
max_idle_cpu=max(node_cpu_idle_data$value)
|
|
||||||
min_idle_cpu=min(node_cpu_idle_data$value)
|
# get value closest to first pod launch
|
||||||
|
cpu_start_index=Position(function(x) x > start_time, node_cpu_idle_data$epoch)
|
||||||
|
# take the reading previous to the index as long as a valid index
|
||||||
|
if (is.na(cpu_start_index)) {
|
||||||
|
cpu_start_index = 1
|
||||||
|
} else if (cpu_start_index > 1) {
|
||||||
|
cpu_start_index = cpu_start_index - 1
|
||||||
|
}
|
||||||
|
max_idle_cpu=node_cpu_idle_data$value[cpu_start_index]
|
||||||
|
|
||||||
|
# get value closest to last pod launch
|
||||||
|
cpu_end_index=Position(function(x) x > end_time, node_cpu_idle_data$epoch)
|
||||||
|
# take the reading previous to the index as long as a valid index
|
||||||
|
if (is.na(cpu_end_index)) {
|
||||||
|
cpu_end_index = length(node_cpu_idle_data$epoch)
|
||||||
|
} else if (cpu_end_index > 1) {
|
||||||
|
cpu_end_index = cpu_end_index - 1
|
||||||
|
}
|
||||||
|
min_idle_cpu=node_cpu_idle_data$value[cpu_end_index]
|
||||||
|
|
||||||
cputotal = cputotal + (max_idle_cpu - min_idle_cpu)
|
cputotal = cputotal + (max_idle_cpu - min_idle_cpu)
|
||||||
max_free_inode=max(node_inode_free_data$value)
|
|
||||||
min_free_inode=min(node_inode_free_data$value)
|
# get value closest to first pod launch
|
||||||
|
inode_start_index=Position(function(x) x > start_time, node_inode_free_data$epoch)
|
||||||
|
# take the reading previous to the index as long as a valid index
|
||||||
|
if (is.na(inode_start_index)) {
|
||||||
|
inode_start_index = 1
|
||||||
|
} else if (inode_start_index > 1) {
|
||||||
|
inode_start_index = inode_start_index - 1
|
||||||
|
}
|
||||||
|
max_free_inode=node_inode_free_data$value[inode_start_index]
|
||||||
|
|
||||||
|
# get value closest to last pod launch
|
||||||
|
inode_end_index=Position(function(x) x > end_time, node_inode_free_data$epoch)
|
||||||
|
# take the reading previous to the index as long as a valid index
|
||||||
|
if (is.na(inode_end_index)) {
|
||||||
|
inode_end_index = length(node_cpu_idle_data$epoch)
|
||||||
|
} else if (inode_end_index > 1) {
|
||||||
|
inode_end_index = inode_end_index - 1
|
||||||
|
}
|
||||||
|
min_free_inode=node_inode_free_data$value[inode_end_index]
|
||||||
|
|
||||||
inodetotal = inodetotal + (max_free_inode - min_free_inode)
|
inodetotal = inodetotal + (max_free_inode - min_free_inode)
|
||||||
}
|
}
|
||||||
|
|
||||||
num_pods = local_bootdata$n_pods[length(local_bootdata$n_pods)]
|
num_pods = local_bootdata$n_pods[length(local_bootdata$n_pods)]
|
||||||
|
|
||||||
# calculate scaling for secondary y axis
|
|
||||||
# the two y scales, in R, must be mathematically related
|
|
||||||
mem_scale = max(c(mem_scale,
|
|
||||||
(max(mem_free_data$value) / (1024*1024*1024)) / num_pods))
|
|
||||||
cpu_scale = max(c(cpu_scale,
|
|
||||||
max(cpu_idle_data$value) / num_pods))
|
|
||||||
inode_scale = max(c(inode_scale,
|
|
||||||
max(inode_free_data$value) / num_pods))
|
|
||||||
ip_scale = max(c(ip_scale,
|
|
||||||
max(c(max(interface_packets_data$tx, na.rm=TRUE),
|
|
||||||
max(interface_packets_data$rx, na.rm=TRUE))) / num_pods))
|
|
||||||
oct_scale = max(c(oct_scale,
|
|
||||||
max(c(max(interface_octets_data$tx, na.rm=TRUE),
|
|
||||||
max(interface_octets_data$rx, na.rm=TRUE))) / num_pods))
|
|
||||||
# drops and scale are often 0, so providing 1 so we won't scale by infinity
|
|
||||||
drop_scale = max(c(drop_scale,
|
|
||||||
max(c(1,
|
|
||||||
max(interface_dropped_data$tx, na.rm=TRUE),
|
|
||||||
max(interface_dropped_data$rx, na.rm=TRUE))) / num_pods))
|
|
||||||
error_scale = max(c(error_scale,
|
|
||||||
max(c(1,
|
|
||||||
max(interface_errors_data$tx, na.rm=TRUE),
|
|
||||||
max(interface_errors_data$rx, na.rm=TRUE))) / num_pods))
|
|
||||||
|
|
||||||
# We get data in b, but want the graphs in Gb.
|
# We get data in b, but want the graphs in Gb.
|
||||||
memtotal = memtotal / (1024*1024*1024)
|
memtotal = memtotal / (1024*1024*1024)
|
||||||
gb_per_pod = memtotal/num_pods
|
gb_per_pod = memtotal/num_pods
|
||||||
@@ -380,13 +407,14 @@ memfreedata$mem_free_gb = memfreedata$value/(1024*1024*1024)
|
|||||||
# And show the boot times in seconds, not ms
|
# And show the boot times in seconds, not ms
|
||||||
podbootdata$launch_time_s = podbootdata$launch_time/1000.0
|
podbootdata$launch_time_s = podbootdata$launch_time/1000.0
|
||||||
|
|
||||||
|
|
||||||
########### Output memory page ##############
|
########### Output memory page ##############
|
||||||
mem_stats_plot = suppressWarnings(ggtexttable(data.frame(memstats),
|
mem_stats_plot = suppressWarnings(ggtexttable(data.frame(memstats),
|
||||||
theme=ttheme(base_size=10),
|
theme=ttheme(base_size=10),
|
||||||
rows=NULL
|
rows=NULL
|
||||||
))
|
))
|
||||||
|
|
||||||
#mem_sec_axis_scale=
|
mem_scale = (max(memfreedata$value) / (1024*1024*1024)) / max(podbootdata$n_pods)
|
||||||
mem_line_plot <- ggplot() +
|
mem_line_plot <- ggplot() +
|
||||||
geom_line(data=memfreedata,
|
geom_line(data=memfreedata,
|
||||||
aes(s_offset, mem_free_gb, colour=interaction(testname, node),
|
aes(s_offset, mem_free_gb, colour=interaction(testname, node),
|
||||||
@@ -424,6 +452,7 @@ cpu_stats_plot = suppressWarnings(ggtexttable(data.frame(cpustats),
|
|||||||
rows=NULL
|
rows=NULL
|
||||||
))
|
))
|
||||||
|
|
||||||
|
cpu_scale = max(cpuidledata$value) / max(podbootdata$n_pods)
|
||||||
cpu_line_plot <- ggplot() +
|
cpu_line_plot <- ggplot() +
|
||||||
geom_line(data=cpuidledata,
|
geom_line(data=cpuidledata,
|
||||||
aes(x=s_offset, y=value, colour=interaction(testname, node),
|
aes(x=s_offset, y=value, colour=interaction(testname, node),
|
||||||
@@ -485,6 +514,7 @@ inode_stats_plot = suppressWarnings(ggtexttable(data.frame(inodestats),
|
|||||||
rows=NULL
|
rows=NULL
|
||||||
))
|
))
|
||||||
|
|
||||||
|
inode_scale = max(inodefreedata$value) / max(podbootdata$n_pods)
|
||||||
inode_line_plot <- ggplot() +
|
inode_line_plot <- ggplot() +
|
||||||
geom_line(data=inodefreedata,
|
geom_line(data=inodefreedata,
|
||||||
aes(x=s_offset, y=value, colour=interaction(testname, node),
|
aes(x=s_offset, y=value, colour=interaction(testname, node),
|
||||||
@@ -517,6 +547,8 @@ page4 = grid.arrange(
|
|||||||
cat("\n\n\\pagebreak\n")
|
cat("\n\n\\pagebreak\n")
|
||||||
|
|
||||||
########## Output interface page packets and octets ##############
|
########## Output interface page packets and octets ##############
|
||||||
|
ip_scale = max(c(max(ifpacketdata$tx, na.rm=TRUE),
|
||||||
|
max(ifpacketdata$rx, na.rm=TRUE))) / max(podbootdata$n_pods)
|
||||||
interface_packet_line_plot <- ggplot() +
|
interface_packet_line_plot <- ggplot() +
|
||||||
geom_line(data=ifpacketdata,
|
geom_line(data=ifpacketdata,
|
||||||
aes(x=s_offset, y=tx, colour=interaction(testname, node, name, "tx"),
|
aes(x=s_offset, y=tx, colour=interaction(testname, node, name, "tx"),
|
||||||
@@ -547,6 +579,8 @@ interface_packet_line_plot <- ggplot() +
|
|||||||
ggtitle("interface packets") +
|
ggtitle("interface packets") +
|
||||||
theme(axis.text.x=element_text(angle=90))
|
theme(axis.text.x=element_text(angle=90))
|
||||||
|
|
||||||
|
oct_scale = max(c(max(ifoctetdata$tx, na.rm=TRUE),
|
||||||
|
max(ifoctetdata$rx, na.rm=TRUE))) / max(podbootdata$n_pods)
|
||||||
interface_octet_line_plot <- ggplot() +
|
interface_octet_line_plot <- ggplot() +
|
||||||
geom_line(data=ifoctetdata,
|
geom_line(data=ifoctetdata,
|
||||||
aes(x=s_offset, y=tx, colour=interaction(testname, node, name, "tx"),
|
aes(x=s_offset, y=tx, colour=interaction(testname, node, name, "tx"),
|
||||||
@@ -577,7 +611,6 @@ interface_octet_line_plot <- ggplot() +
|
|||||||
ggtitle("interface octets") +
|
ggtitle("interface octets") +
|
||||||
theme(axis.text.x=element_text(angle=90))
|
theme(axis.text.x=element_text(angle=90))
|
||||||
|
|
||||||
|
|
||||||
page5 = grid.arrange(
|
page5 = grid.arrange(
|
||||||
interface_packet_line_plot,
|
interface_packet_line_plot,
|
||||||
interface_octet_line_plot,
|
interface_octet_line_plot,
|
||||||
@@ -588,6 +621,10 @@ page5 = grid.arrange(
|
|||||||
cat("\n\n\\pagebreak\n")
|
cat("\n\n\\pagebreak\n")
|
||||||
|
|
||||||
########## Output interface page drops and errors ##############
|
########## Output interface page drops and errors ##############
|
||||||
|
# drops are often 0, so providing 1 so we won't scale by infinity
|
||||||
|
drop_scale = max(c(1,
|
||||||
|
max(ifdropdata$tx, na.rm=TRUE),
|
||||||
|
max(ifdropdata$rx, na.rm=TRUE))) / max(podbootdata$n_pods)
|
||||||
interface_drop_line_plot <- ggplot() +
|
interface_drop_line_plot <- ggplot() +
|
||||||
geom_line(data=ifdropdata,
|
geom_line(data=ifdropdata,
|
||||||
aes(x=s_offset, y=tx, colour=interaction(testname, node, name, "tx"),
|
aes(x=s_offset, y=tx, colour=interaction(testname, node, name, "tx"),
|
||||||
@@ -618,6 +655,10 @@ interface_drop_line_plot <- ggplot() +
|
|||||||
ggtitle("interface drops") +
|
ggtitle("interface drops") +
|
||||||
theme(axis.text.x=element_text(angle=90))
|
theme(axis.text.x=element_text(angle=90))
|
||||||
|
|
||||||
|
# errors are often 0, so providing 1 so we won't scale by infinity
|
||||||
|
error_scale = max(c(1,
|
||||||
|
max(iferrordata$tx, na.rm=TRUE),
|
||||||
|
max(iferrordata$rx, na.rm=TRUE))) / max(podbootdata$n_pods)
|
||||||
interface_error_line_plot <- ggplot() +
|
interface_error_line_plot <- ggplot() +
|
||||||
geom_line(data=iferrordata,
|
geom_line(data=iferrordata,
|
||||||
aes(x=s_offset, y=tx, colour=interaction(testname, node, name, "tx"),
|
aes(x=s_offset, y=tx, colour=interaction(testname, node, name, "tx"),
|
||||||
|
|||||||
@@ -253,8 +253,8 @@ help()
|
|||||||
usage=$(cat << EOF
|
usage=$(cat << EOF
|
||||||
Usage: $0 [-h] [options]
|
Usage: $0 [-h] [options]
|
||||||
Description:
|
Description:
|
||||||
Launch a series of workloads and take memory metric measurements after
|
Launch a series of workloads in a parallel manner and take memory metric measurements
|
||||||
each launch.
|
after each launch.
|
||||||
Options:
|
Options:
|
||||||
-h, Help page.
|
-h, Help page.
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
@@ -380,8 +380,8 @@ help()
|
|||||||
usage=$(cat << EOF
|
usage=$(cat << EOF
|
||||||
Usage: $0 [-h] [options]
|
Usage: $0 [-h] [options]
|
||||||
Description:
|
Description:
|
||||||
Launch a series of workloads and take memory metric measurements after
|
Launch a series of workloads in a linear manner and take memory metric measurements
|
||||||
each launch.
|
after each launch.
|
||||||
Options:
|
Options:
|
||||||
-h, Help page.
|
-h, Help page.
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user