Skip to content

Commit 15b36b4

Browse files
authored
Minio: use latest version or latest feature rich version (#5423)
* minio ref * Improvements * Update minio-install.sh
1 parent 6a285e1 commit 15b36b4

File tree

2 files changed

+58
-11
lines changed

2 files changed

+58
-11
lines changed

ct/minio.sh

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,33 @@ function update_script() {
2727
msg_error "No ${APP} Installation Found!"
2828
exit
2929
fi
30+
FEATURE_RICH_VERSION="2025-04-22T22-12-26Z"
3031
RELEASE=$(curl -fsSL https://api.github.com/repos/minio/minio/releases/latest | grep '"tag_name"' | awk -F '"' '{print $4}')
31-
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
32+
CURRENT_VERSION=""
33+
[[ -f /opt/${APP}_version.txt ]] && CURRENT_VERSION=$(cat /opt/${APP}_version.txt)
34+
RELEASE=$(curl -fsSL https://api.github.com/repos/minio/minio/releases/latest | grep '"tag_name"' | awk -F '"' '{print $4}')
35+
36+
if [[ "${CURRENT_VERSION}" == "${FEATURE_RICH_VERSION}" && "${RELEASE}" != "${FEATURE_RICH_VERSION}" ]]; then
37+
echo
38+
echo "You are currently running the last feature-rich community version: ${FEATURE_RICH_VERSION}"
39+
echo "WARNING: Updating to the latest version will REMOVE most management features from the Console UI."
40+
echo "Do you still want to upgrade to the latest version? [y/N]: "
41+
read -n 1 -r
42+
echo
43+
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
44+
msg_ok "No update performed. Staying on the feature-rich version."
45+
exit
46+
fi
47+
fi
48+
49+
if [[ "${CURRENT_VERSION}" != "${RELEASE}" ]]; then
3250
msg_info "Stopping ${APP}"
3351
systemctl stop minio
3452
msg_ok "${APP} Stopped"
3553

3654
msg_info "Updating ${APP} to ${RELEASE}"
3755
mv /usr/local/bin/minio /usr/local/bin/minio_bak
38-
curl -fsSL "https://dl.min.io/server/minio/release/linux-amd64/minio" -o $(basename "https://dl.min.io/server/minio/release/linux-amd64/minio")
39-
mv minio /usr/local/bin/
56+
curl -fsSL "https://dl.min.io/server/minio/release/linux-amd64/minio" -o /usr/local/bin/minio
4057
chmod +x /usr/local/bin/minio
4158
echo "${RELEASE}" >/opt/${APP}_version.txt
4259
msg_ok "Updated ${APP}"

install/minio-install.sh

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,60 @@ setting_up_container
1313
network_check
1414
update_os
1515

16-
msg_info "Setup MinIO"
17-
RELEASE=$(curl -fsSL https://api.github.com/repos/minio/minio/releases/latest | grep '"tag_name"' | awk -F '"' '{print $4}')
18-
curl -fsSL "https://dl.min.io/server/minio/release/linux-amd64/minio" -o /usr/local/bin/minio
16+
FEATURE_RICH_VERSION="2025-04-22T22-12-26Z"
17+
18+
echo
19+
echo "MinIO recently removed many management features from the Console UI."
20+
echo "The last feature-complete version is: $FEATURE_RICH_VERSION"
21+
echo "Latest versions require the paid edition for full UI functionality."
22+
echo
23+
echo "Choose which version to install:"
24+
echo " [N] Feature-rich community version ($FEATURE_RICH_VERSION) [Recommended]"
25+
echo " [Y] Latest version (may lack UI features)"
26+
echo
27+
read -p "Install latest MinIO version? [y/N]: " -n 1 -r
28+
echo
29+
if [[ $REPLY =~ ^[Yy]$ ]]; then
30+
USE_LATEST=true
31+
else
32+
USE_LATEST=false
33+
fi
34+
35+
msg_info "Setting up MinIO"
36+
if [[ "$USE_LATEST" == "true" ]]; then
37+
RELEASE=$(curl -fsSL https://api.github.com/repos/minio/minio/releases/latest | grep '"tag_name"' | awk -F '"' '{print $4}')
38+
DOWNLOAD_URL="https://dl.min.io/server/minio/release/linux-amd64/minio"
39+
else
40+
RELEASE="$FEATURE_RICH_VERSION"
41+
DOWNLOAD_URL="https://dl.min.io/server/minio/release/linux-amd64/archive/minio.RELEASE.${FEATURE_RICH_VERSION}"
42+
fi
43+
44+
curl -fsSL "$DOWNLOAD_URL" -o /usr/local/bin/minio
1945
chmod +x /usr/local/bin/minio
2046
useradd -r minio-user -s /sbin/nologin
2147
mkdir -p /home/minio-user
2248
chown minio-user:minio-user /home/minio-user
2349
mkdir -p /data
2450
chown minio-user:minio-user /data
51+
2552
MINIO_ADMIN_USER="minioadmin"
2653
MINIO_ADMIN_PASSWORD="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)"
54+
2755
cat <<EOF >/etc/default/minio
2856
MINIO_ROOT_USER=${MINIO_ADMIN_USER}
2957
MINIO_ROOT_PASSWORD=${MINIO_ADMIN_PASSWORD}
3058
EOF
59+
3160
{
3261
echo ""
33-
echo "MinIO-Credentials"
62+
echo "MinIO Credentials"
3463
echo "MinIO Admin User: $MINIO_ADMIN_USER"
3564
echo "MinIO Admin Password: $MINIO_ADMIN_PASSWORD"
3665
} >>~/minio.creds
37-
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
66+
echo "${RELEASE}" >/opt/${APPLICATION,,}_version.txt
3867
msg_ok "Setup MinIO"
3968

40-
msg_info "Creating Service"
69+
msg_info "Creating service"
4170
cat <<EOF >/etc/systemd/system/minio.service
4271
[Unit]
4372
Description=MinIO
@@ -57,13 +86,14 @@ LimitNOFILE=65536
5786
[Install]
5887
WantedBy=multi-user.target
5988
EOF
89+
6090
systemctl enable -q --now minio
61-
msg_ok "Created Service"
91+
msg_ok "Service created"
6292

6393
motd_ssh
6494
customize
6595

6696
msg_info "Cleaning up"
6797
$STD apt-get -y autoremove
6898
$STD apt-get -y autoclean
69-
msg_ok "Cleaned"
99+
msg_ok "Cleanup complete"

0 commit comments

Comments
 (0)