MinIO: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
No edit summary
Line 23: Line 23:
| <code>$MINIO_HOME/data</code> || <code>/data</code> || MinIO data
| <code>$MINIO_HOME/data</code> || <code>/data</code> || MinIO data
|}
|}
<source lang="bash">
<syntaxhighlight lang="bash">
docker run -it --rm \
docker run -it --rm \
--publish 9000:9000 \
--publish 9000:9000 \
Line 29: Line 29:
quay.io/minio/minio \
quay.io/minio/minio \
--version
--version
</source>
</syntaxhighlight>


  mkdir -p $HOME/.chorke/academia/var/minio/data
  mkdir -p $HOME/.chorke/academia/var/minio/data
Line 38: Line 38:
{|
{|
| valign="top" |
| valign="top" |
<source lang="bash" highlight="4,6,7">
<syntaxhighlight lang="bash" highlight="4,6,7">
docker run --detach \
docker run --detach \
--publish 9000:9000 \
--publish 9000:9000 \
Line 46: Line 46:
--volume  $MINIO_HOME/data:/data \
--volume  $MINIO_HOME/data:/data \
quay.io/minio/minio server /data --console-address ":9001"
quay.io/minio/minio server /data --console-address ":9001"
</source>
</syntaxhighlight>


| valign="top" |
| valign="top" |


<source lang="bash" highlight="4,6,7">
<syntaxhighlight lang="bash" highlight="4,6,7">
docker run --detach \
docker run --detach \
--publish 9000:9000 \
--publish 9000:9000 \
Line 58: Line 58:
--volume $HOME/.chorke/academia/var/minio/data:/data \
--volume $HOME/.chorke/academia/var/minio/data:/data \
quay.io/minio/minio server /data --console-address ":9001"
quay.io/minio/minio server /data --console-address ":9001"
</source>
</syntaxhighlight>


|}
|}
Line 65: Line 65:
===Install===
===Install===
----
----
<source lang="bash">
<syntaxhighlight lang="bash">
sudo apt -qq update;\
sudo apt -qq update;\
export MINIO_HOME=/var/minio;\
export MINIO_HOME=/var/minio;\
export MINIO_ADMIN_PASSWORD='academia';\
export MINIO_ADMIN_PASSWORD='academia';\
bash <(curl -s 'https://cdn.chorke.org/exec/cli/bash/install/minio/2022-07-30.sh.txt')
bash <(curl -s 'https://cdn.chorke.org/exec/cli/bash/install/minio/2022-07-30.sh.txt')
</source>
</syntaxhighlight>


===Remove===
===Remove===
----
----
<source lang="bash">
<syntaxhighlight lang="bash">
sudo systemctl stop minio.service  
sudo systemctl stop minio.service  
sudo systemctl disable minio.service  
sudo systemctl disable minio.service  
sudo rm -rf /etc/systemd/system/minio.service
sudo rm -rf /etc/systemd/system/minio.service
sudo rm -rf /var/minio && sudo systemctl daemon-reload
sudo rm -rf /var/minio && sudo systemctl daemon-reload
</source>
</syntaxhighlight>


===Environments===
===Environments===
----
----
<source lang="bash">
<syntaxhighlight lang="bash">
MINIO_OPTS="--address :9000 --console-address :9001"
MINIO_OPTS="--address :9000 --console-address :9001"
MINIO_VOLUMES="/var/minio/var/data"
MINIO_VOLUMES="/var/minio/var/data"
Line 90: Line 90:
MINIO_CONFIG_ENV_FILE=/var/minio/etc/.env
MINIO_CONFIG_ENV_FILE=/var/minio/etc/.env
MINIO_BROWSER_REDIRECT_URL="https://academia.chorke.org/minio"
MINIO_BROWSER_REDIRECT_URL="https://academia.chorke.org/minio"
</source>
</syntaxhighlight>


==Knowledge==
==Knowledge==

Revision as of 10:35, 11 August 2024

Linux:
export MINIO_HOME=/srv/minio
export MINIO_DATA=$MINIO_HOME/data
MacOS:
export MINIO_HOME=$HOME/minio
export MINIO_DATA=$MINIO_HOME/data
Chorke:
export MINIO_HOME=$HOME/.chorke/academia/var/minio
export MINIO_DATA=$MINIO_HOME/data
Local location Container location Usage
$MINIO_HOME/data /data MinIO data
docker run -it --rm \
--publish 9000:9000 \
--publish 9001:9001 \
quay.io/minio/minio \
--version
mkdir -p $HOME/.chorke/academia/var/minio/data
mkdir -p $MINIO_HOME/data
mkdir -p $MINIO_DATA

Docker

docker run --detach \
--publish 9000:9000 \
--publish 9001:9001 \
--restart always \
--name minio \
--volume  $MINIO_HOME/data:/data \
quay.io/minio/minio server /data --console-address ":9001"
docker run --detach \
--publish 9000:9000 \
--publish 9001:9001 \
--restart always \
--name minio \
--volume $HOME/.chorke/academia/var/minio/data:/data \
quay.io/minio/minio server /data --console-address ":9001"

Debian

Install


sudo apt -qq update;\
export MINIO_HOME=/var/minio;\
export MINIO_ADMIN_PASSWORD='academia';\
bash <(curl -s 'https://cdn.chorke.org/exec/cli/bash/install/minio/2022-07-30.sh.txt')

Remove


sudo systemctl stop minio.service 
sudo systemctl disable minio.service 
sudo rm -rf /etc/systemd/system/minio.service
sudo rm -rf /var/minio && sudo systemctl daemon-reload

Environments


MINIO_OPTS="--address :9000 --console-address :9001"
MINIO_VOLUMES="/var/minio/var/data"
MINIO_ROOT_USER=admin
MINIO_ROOT_PASSWORD=password
MINIO_CONFIG_ENV_FILE=/var/minio/etc/.env
MINIO_BROWSER_REDIRECT_URL="https://academia.chorke.org/minio"

Knowledge

docker exec -it minio minio --version
docker exec -it minio minio --help
docker exec -it minio bash
http://localhost:9001/login
username: minioadmin
password: minioadmin
kubectl krew update
kubectl krew install minio
kubectl minio version

kubectl minio init
kubectl get pods -n minio-operator
kubectl get svc  -n minio-operator
kubectl get all --namespace minio-operator
kubectl minio proxy
sudo ss -tulwn | grep LISTEN
sudo ss -tulpn | grep LISTEN
sudo ss -tulpn | grep LISTEN | grep sshd
sudo ss -tulpn | grep LISTEN | grep minio
sudo ss -tulpn | grep LISTEN | grep resolve
ssh -L 9800:localhost:9800\
    -L 9801:localhost:9801\
 [email protected]

http://localhost:9801/

References