Skip to content

Commit 0046160

Browse files
committed
chore(imagebuilder): use rclone replace mc
1 parent 6827e31 commit 0046160

4 files changed

Lines changed: 20 additions & 20 deletions

File tree

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ ENV DRYCC_UID=1001 \
55
DRYCC_GID=1001 \
66
DRYCC_HOME_DIR=/data \
77
JQ_VERSION="1.7.1" \
8-
MC_VERSION="2025.04.03.17.07.56" \
8+
RCLONE_VERSION="1.71.1" \
99
QUICKWIT_VERSION="0.8.2"
1010

1111
ADD rootfs /
1212

1313
RUN groupadd drycc --gid ${DRYCC_GID} \
1414
&& useradd drycc -u ${DRYCC_UID} -g ${DRYCC_GID} -s /bin/bash -m -d ${DRYCC_HOME_DIR} \
1515
&& install-stack jq $JQ_VERSION \
16-
&& install-stack mc $MC_VERSION \
16+
&& install-stack rclone $RCLONE_VERSION \
1717
&& install-stack quickwit $QUICKWIT_VERSION \
1818
&& rm -rf \
1919
/usr/share/doc \

charts/quickwit/templates/_helpers.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ env:
7575
name: storage-creds
7676
key: secretkey
7777
- name: "DRYCC_STORAGE_PATH_STYLE"
78-
value: "on"
78+
value: "true"
7979
{{- end }}
8080
- name: QW_CLUSTER_ID
8181
value: drycc-quickwit

charts/quickwit/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ storageBucket: ""
3030
storageEndpoint: ""
3131
storageAccesskey: ""
3232
storageSecretkey: ""
33-
storagePathStyle: "auto"
33+
storagePathStyle: "true"
3434

3535
control_plane:
3636
nodeAffinityPreset:

rootfs/usr/local/bin/init-quickwit

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,28 @@
33
set -e
44
shopt -s expand_aliases
55

6-
alias mc="init-stack mc"
6+
alias rclone="init-stack rclone"
77
alias jq="init-stack jq"
88
alias quickwit="init-stack quickwit"
99

10-
mc alias set storage \
11-
"${DRYCC_STORAGE_ENDPOINT}" \
12-
"${DRYCC_STORAGE_ACCESSKEY}" \
13-
"${DRYCC_STORAGE_SECRETKEY}" \
14-
--path "${DRYCC_STORAGE_PATH_STYLE}"
10+
mkdir -p ~/.config/rclone
11+
touch ~/.config/rclone/rclone.conf
12+
rclone config create storage s3 \
13+
provider=Other \
14+
access_key_id="${DRYCC_STORAGE_ACCESSKEY}" \
15+
secret_access_key="${DRYCC_STORAGE_SECRETKEY}" \
16+
endpoint="${DRYCC_STORAGE_ENDPOINT}" \
17+
force_path_style="${DRYCC_STORAGE_PATH_STYLE:-true}" --no-output
1518

16-
mc ping storage -x
17-
if ! mc admin info storage > /dev/null 2>&1; then
19+
if ! rclone lsd storage: > /dev/null 2>&1; then
1820
sleep 9s
19-
else
20-
mc ready storage
21+
echo "waiting for object storage to become ready..."
2122
fi
22-
mc mb --ignore-existing storage/"${DRYCC_STORAGE_BUCKET}"
2323

24-
AWS_REGION=${DRYCC_STORAGE_ENDPOINT%%.*}
25-
if [ "$DRYCC_STORAGE_PATH_STYLE" = "on" ]; then
26-
QW_S3_FORCE_PATH_STYLE_ACCESS="true"
27-
fi
28-
export AWS_REGION QW_S3_FORCE_PATH_STYLE_ACCESS
24+
rclone mkdir "storage:${DRYCC_STORAGE_BUCKET}"
25+
26+
QW_S3_FORCE_PATH_STYLE_ACCESS=${DRYCC_STORAGE_PATH_STYLE:-true}
27+
28+
export QW_S3_FORCE_PATH_STYLE_ACCESS
2929

3030
quickwit "$@"

0 commit comments

Comments
 (0)