Skip to content

Commit 1dfe367

Browse files
1. Changed Image name
2. Modified Prometheus deployment yml file 3. changed Prometheus Builder Docker file Signed-off-by: Kushal Shukla <[email protected]>
1 parent b18501c commit 1dfe367

File tree

6 files changed

+38
-22
lines changed

6 files changed

+38
-22
lines changed

.circleci/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,14 @@ jobs:
110110
organization: "$DOCKER_ORG"
111111
login_variable: DOCKER_LOGIN
112112
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
113121
workflows:
114122
version: 2
115123
test-infra:

prombench/docs/kind.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,13 @@ If used with the GitHub integration:
114114
export PR_NUMBER=<PR to benchmark against the selected $RELEASE>
115115
```
116116

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:
118124
- **Option 1: Download data from object storage**
119125

120126
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.

prombench/manifests/prombench/benchmark/3b_prometheus-test_deployment.yaml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ spec:
3434
runAsUser: 0
3535
initContainers:
3636
- name: prometheus-builder
37-
image: kushalshukla/builder
37+
image: docker.io/prominfra/prometheus-builder:master
3838
imagePullPolicy: Always
3939
env:
4040
- name: PR_NUMBER
@@ -45,13 +45,15 @@ spec:
4545
value: "{{ .GITHUB_ORG }}"
4646
- name: GITHUB_REPO
4747
value: "{{ .GITHUB_REPO }}"
48+
- name: STORAGE
49+
value: "/storage-paths"
4850
volumeMounts:
4951
- name: prometheus-executable
5052
mountPath: /prometheus-builder
5153
- name: key
52-
mountPath: /config
54+
mountPath: /storage-paths
5355
- name: data-downloader
54-
image: kushalshukla/writer
56+
image: docker.io/prominfra/block-sync:master
5557
imagePullPolicy: Always
5658
volumeMounts:
5759
- name: instance-ssd
@@ -163,21 +165,23 @@ spec:
163165
runAsUser: 0
164166
initContainers:
165167
- name: download-key
166-
image: kushalshukla/builder
168+
image: docker.io/prominfra/prometheus-builder:master
167169
imagePullPolicy: Always
168-
command: [ "/download-key/key.sh" ]
170+
command: [ "/go/src/github.com/key.sh" ]
169171
env:
170172
- name: PR_NUMBER
171173
value: "{{ .PR_NUMBER }}"
172174
- name: GITHUB_ORG
173175
value: "{{ .GITHUB_ORG }}"
174176
- name: GITHUB_REPO
175177
value: "{{ .GITHUB_REPO }}"
178+
- name: STORAGE
179+
value: "/storage-paths"
176180
volumeMounts:
177181
- name: key
178-
mountPath: /config
182+
mountPath: /storage-paths
179183
- name: data-downloader
180-
image: kushalshukla/writer
184+
image: docker.io/prominfra/block-sync:master
181185
imagePullPolicy: Always
182186
volumeMounts:
183187
- name: instance-ssd

tools/prometheus-builder/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ RUN mkdir -p /go/src/github.com
44

55
COPY ./build.sh /go/src/github.com/build.sh
66

7-
COPY ./key.sh /download-key/key.sh
7+
COPY ./key.sh /go/src/github.com/key.sh
88

9-
RUN chmod +x /go/src/github.com/build.sh
9+
RUN chmod +x /go/src/github.com/*
1010

1111
ENTRYPOINT ["/go/src/github.com/build.sh"]

tools/prometheus-builder/build.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
DIR="/go/src/github.com/prometheus/prometheus"
44

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
66
echo "ERROR:: environment variables not set correctly"
77
exit 1;
88
fi
@@ -24,15 +24,14 @@ fi
2424

2525
git checkout pr-branch
2626

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,
2828
# where it will copy the key.yml file from the Prometheus directory to the volume section of the
2929
# emptyDir. This file will later be used by the data-downloader init container.
30-
MKDIR="/config"
3130
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"
3433
else
35-
echo "File does not exist."
34+
echo "INFO:: key.yml File does not exist on $DIR/key.yml directory."
3635
fi
3736

3837
echo ">> Creating prometheus binaries"

tools/prometheus-builder/key.sh

100644100755
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
DIR="/go/src/github.com/prometheus/prometheus"
44

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
66
echo "ERROR:: environment variables not set correctly"
77
exit 1;
88
fi
@@ -24,13 +24,12 @@ fi
2424

2525
git checkout pr-branch
2626

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,
2828
# where it will copy the key.yml file from the Prometheus directory to the volume section of the
2929
# emptyDir. This file will later be used by the data-downloader init container.
30-
MKDIR="/config"
3130
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"
3433
else
35-
echo "File does not exist."
34+
echo "INFO:: key.yml File does not exist on $DIR/key.yml directory."
3635
fi

0 commit comments

Comments
 (0)