File tree Expand file tree Collapse file tree 6 files changed +38
-22
lines changed
manifests/prombench/benchmark Expand file tree Collapse file tree 6 files changed +38
-22
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,14 @@ jobs:
110
110
organization : " $DOCKER_ORG"
111
111
login_variable : DOCKER_LOGIN
112
112
password_variable : DOCKER_PASSWORD
113
+ - prometheus/publish_images :
114
+ container_image_name : block-sync
115
+ dockerfile_path : " tools/block-sync/Dockerfile"
116
+ dockerbuild_context : " tools/block-sync/"
117
+ registry : docker.io
118
+ organization : " $DOCKER_ORG"
119
+ login_variable : DOCKER_LOGIN
120
+ password_variable : DOCKER_PASSWORD
113
121
workflows :
114
122
version : 2
115
123
test-infra :
Original file line number Diff line number Diff line change @@ -114,7 +114,13 @@ If used with the GitHub integration:
114
114
export PR_NUMBER=< PR to benchmark against the selected $RELEASE >
115
115
```
116
116
117
- 2 . Before applying benchmarking objects , You have two choices to make:
117
+ 2 . ### Setting Up Benchmarking Data
118
+
119
+ When setting up a benchmarking environment, it’s often useful to have pre-generated data available. This data can help speed up testing and make benchmarks more realistic by simulating actual workloads.
120
+
121
+ In this setup, you have two choices:
122
+
123
+ Here’s how each option works:
118
124
- ** Option 1: Download data from object storage**
119
125
120
126
To download data from object storage, create a Kubernetes secret with exact named ` bucket-config ` and file name ``` object-config.yml ``` with the necessary credentials as per your object storage. This secret enables access to the stored data.
Original file line number Diff line number Diff line change 34
34
runAsUser : 0
35
35
initContainers :
36
36
- name : prometheus-builder
37
- image : kushalshukla/ builder
37
+ image : docker.io/prominfra/prometheus- builder:master
38
38
imagePullPolicy : Always
39
39
env :
40
40
- name : PR_NUMBER
@@ -45,13 +45,15 @@ spec:
45
45
value : " {{ .GITHUB_ORG }}"
46
46
- name : GITHUB_REPO
47
47
value : " {{ .GITHUB_REPO }}"
48
+ - name : STORAGE
49
+ value : " /storage-paths"
48
50
volumeMounts :
49
51
- name : prometheus-executable
50
52
mountPath : /prometheus-builder
51
53
- name : key
52
- mountPath : /config
54
+ mountPath : /storage-paths
53
55
- name : data-downloader
54
- image : kushalshukla/writer
56
+ image : docker.io/prominfra/block-sync:master
55
57
imagePullPolicy : Always
56
58
volumeMounts :
57
59
- name : instance-ssd
@@ -163,21 +165,23 @@ spec:
163
165
runAsUser : 0
164
166
initContainers :
165
167
- name : download-key
166
- image : kushalshukla/ builder
168
+ image : docker.io/prominfra/prometheus- builder:master
167
169
imagePullPolicy : Always
168
- command : [ "/download-key /key.sh" ]
170
+ command : [ "/go/src/github.com /key.sh" ]
169
171
env :
170
172
- name : PR_NUMBER
171
173
value : " {{ .PR_NUMBER }}"
172
174
- name : GITHUB_ORG
173
175
value : " {{ .GITHUB_ORG }}"
174
176
- name : GITHUB_REPO
175
177
value : " {{ .GITHUB_REPO }}"
178
+ - name : STORAGE
179
+ value : " /storage-paths"
176
180
volumeMounts :
177
181
- name : key
178
- mountPath : /config
182
+ mountPath : /storage-paths
179
183
- name : data-downloader
180
- image : kushalshukla/writer
184
+ image : docker.io/prominfra/block-sync:master
181
185
imagePullPolicy : Always
182
186
volumeMounts :
183
187
- name : instance-ssd
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ RUN mkdir -p /go/src/github.com
4
4
5
5
COPY ./build.sh /go/src/github.com/build.sh
6
6
7
- COPY ./key.sh /download-key /key.sh
7
+ COPY ./key.sh /go/src/github.com /key.sh
8
8
9
- RUN chmod +x /go/src/github.com/build.sh
9
+ RUN chmod +x /go/src/github.com/*
10
10
11
11
ENTRYPOINT ["/go/src/github.com/build.sh" ]
Original file line number Diff line number Diff line change 2
2
3
3
DIR=" /go/src/github.com/prometheus/prometheus"
4
4
5
- if [[ -z $PR_NUMBER || -z $VOLUME_DIR || -z $GITHUB_ORG || -z $GITHUB_REPO ]]; then
5
+ if [[ -z $PR_NUMBER || -z $VOLUME_DIR || -z $STORAGE || -z $ GITHUB_ORG || -z $GITHUB_REPO ]]; then
6
6
echo " ERROR:: environment variables not set correctly"
7
7
exit 1;
8
8
fi
24
24
25
25
git checkout pr-branch
26
26
27
- # Here, MKDIR is specified in the volumeMount section of the prometheus-builder init container,
27
+ # Here, STORAGE is specified as an environment variable of the prometheus-builder init container,
28
28
# where it will copy the key.yml file from the Prometheus directory to the volume section of the
29
29
# emptyDir. This file will later be used by the data-downloader init container.
30
- MKDIR=" /config"
31
30
if [ -f " $DIR /key.yml" ]; then
32
- echo " File exists ."
33
- cp " $DIR /key.yml" " $MKDIR /key.yml"
31
+ echo " INFO:: key.yml file is Present on $DIR /key.yml directory ."
32
+ cp " $DIR /key.yml" " $STORAGE /key.yml"
34
33
else
35
- echo " File does not exist."
34
+ echo " INFO:: key.yml File does not exist on $DIR /key.yml directory ."
36
35
fi
37
36
38
37
echo " >> Creating prometheus binaries"
Original file line number Diff line number Diff line change 2
2
3
3
DIR=" /go/src/github.com/prometheus/prometheus"
4
4
5
- if [[ -z $PR_NUMBER || -z $VOLUME_DIR || -z $GITHUB_ORG || -z $GITHUB_REPO ]]; then
5
+ if [[ -z $PR_NUMBER || -z $STORAGE || -z $GITHUB_ORG || -z $GITHUB_REPO ]]; then
6
6
echo " ERROR:: environment variables not set correctly"
7
7
exit 1;
8
8
fi
24
24
25
25
git checkout pr-branch
26
26
27
- # Here, MKDIR is specified in the volumeMount section of the prometheus-builder init container,
27
+ # Here, STORAGE is specified as an environment variable of the download-key init container,
28
28
# where it will copy the key.yml file from the Prometheus directory to the volume section of the
29
29
# emptyDir. This file will later be used by the data-downloader init container.
30
- MKDIR=" /config"
31
30
if [ -f " $DIR /key.yml" ]; then
32
- echo " File exists ."
33
- cp " $DIR /key.yml" " $MKDIR /key.yml"
31
+ echo " INFO:: key.yml file is Present on $DIR /key.yml directory ."
32
+ cp " $DIR /key.yml" " $STORAGE /key.yml"
34
33
else
35
- echo " File does not exist."
34
+ echo " INFO:: key.yml File does not exist on $DIR /key.yml directory ."
36
35
fi
You can’t perform that action at this time.
0 commit comments