Plane: install silo and mcli from pgsty instead of dl.min.io

This commit is contained in:
MickLesk
2026-09-28 13:41:40 +02:00
parent a50fe45184
commit df8aecafca
+12 -13
View File
@@ -43,9 +43,10 @@ $STD rabbitmqctl add_user plane "${RABBITMQ_PASS}"
$STD rabbitmqctl set_permissions -p plane plane ".*" ".*" ".*" $STD rabbitmqctl set_permissions -p plane plane ".*" ".*" ".*"
msg_ok "Configured RabbitMQ" msg_ok "Configured RabbitMQ"
msg_info "Installing MinIO" fetch_and_deploy_gh_release "silo" "pgsty/silo" "prebuild" "latest" "/opt/silo" "silo_*_linux_$(arch_resolve).tar.gz"
curl -fsSL https://dl.min.io/server/minio/release/linux-$(arch_resolve)/minio -o /usr/local/bin/minio fetch_and_deploy_gh_release "mcli" "pgsty/mc" "prebuild" "latest" "/opt/mcli" "mcli_*_linux_$(arch_resolve).tar.gz"
chmod +x /usr/local/bin/minio
msg_info "Configuring Silo"
mkdir -p /opt/minio/data mkdir -p /opt/minio/data
MINIO_ACCESS_KEY=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c16) MINIO_ACCESS_KEY=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c16)
MINIO_SECRET_KEY=$(openssl rand -base64 36 | tr -dc 'a-zA-Z0-9' | head -c32) MINIO_SECRET_KEY=$(openssl rand -base64 36 | tr -dc 'a-zA-Z0-9' | head -c32)
@@ -56,13 +57,13 @@ MINIO_VOLUMES="/opt/minio/data"
EOF EOF
cat <<EOF >/etc/systemd/system/minio.service cat <<EOF >/etc/systemd/system/minio.service
[Unit] [Unit]
Description=MinIO Object Storage Description=Silo Object Storage
After=network.target After=network.target
[Service] [Service]
Type=simple Type=simple
EnvironmentFile=/etc/default/minio EnvironmentFile=/etc/default/minio
ExecStart=/usr/local/bin/minio server \$MINIO_VOLUMES --console-address ":9090" ExecStart=/opt/silo/silo server \$MINIO_VOLUMES --console-address ":9090"
Restart=on-failure Restart=on-failure
RestartSec=5 RestartSec=5
@@ -70,7 +71,7 @@ RestartSec=5
WantedBy=multi-user.target WantedBy=multi-user.target
EOF EOF
systemctl enable -q --now minio systemctl enable -q --now minio
msg_ok "Installed MinIO" msg_ok "Configured Silo"
fetch_and_deploy_gh_release "plane" "makeplane/plane" "tarball" fetch_and_deploy_gh_release "plane" "makeplane/plane" "tarball"
@@ -175,12 +176,10 @@ $STD /opt/plane-venv/bin/python manage.py configure_instance
$STD /opt/plane-venv/bin/python manage.py register_instance "${MACHINE_SIG}" $STD /opt/plane-venv/bin/python manage.py register_instance "${MACHINE_SIG}"
msg_ok "Ran Database Migrations" msg_ok "Ran Database Migrations"
msg_info "Creating Services and MinIO Bucket" msg_info "Creating Services and Bucket"
curl -fsSL https://dl.min.io/client/mc/release/linux-$(arch_resolve)/mc -o /usr/local/bin/mcli $STD /opt/mcli/mcli alias set plane http://localhost:9000 "${MINIO_ACCESS_KEY}" "${MINIO_SECRET_KEY}"
chmod +x /usr/local/bin/mcli $STD /opt/mcli/mcli mb plane/uploads --ignore-existing
$STD /usr/local/bin/mcli alias set plane http://localhost:9000 "${MINIO_ACCESS_KEY}" "${MINIO_SECRET_KEY}" $STD /opt/mcli/mcli anonymous set download plane/uploads
$STD /usr/local/bin/mcli mb plane/uploads --ignore-existing
$STD /usr/local/bin/mcli anonymous set download plane/uploads
cat <<EOF >/etc/systemd/system/plane-api.service cat <<EOF >/etc/systemd/system/plane-api.service
[Unit] [Unit]
@@ -279,7 +278,7 @@ MinIO Secret Key: ${MINIO_SECRET_KEY}
Secret Key: ${SECRET_KEY} Secret Key: ${SECRET_KEY}
Config: /opt/plane/apps/api/.env Config: /opt/plane/apps/api/.env
EOF EOF
msg_ok "Created Services and MinIO Bucket" msg_ok "Created Services and Bucket"
msg_info "Configuring Nginx" msg_info "Configuring Nginx"
cat <<'EOF' >/etc/nginx/sites-available/plane.conf cat <<'EOF' >/etc/nginx/sites-available/plane.conf