MinIO: Difference between revisions

From Wiki
(Created page with " = Deploy Minio as Container = podman run -d \ -p 9000:9000 \ -p 9001:9001 \ -v /minio/data:/data \ -e "MINIO_ROOT_USER=root" \ -e "MINIO_ROOT_PASSWORD=passw0rd" \ --name minio_server_9001 \ quay.io/minio/minio server /data --console-address ":9001" Now open a browser and access the url http://<your server>:9001/ = Configure Minio container as Linux Service = Create file '''/etc/systemd/system/minio-container.service''', and add the following c...")
 
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:


= Deploy Minio as Container =
* [[MinIO: Deploy MinIO as Container]]




podman run -d \
= Testing =
  -p 9000:9000 \
  -p 9001:9001 \
  -v /minio/data:/data \
  -e "MINIO_ROOT_USER=root" \
  -e "MINIO_ROOT_PASSWORD=passw0rd" \
  --name minio_server_9001 \
  quay.io/minio/minio server /data --console-address ":9001"


Now open a browser and access the url http://<your server>:9001/
1) Create a bucket. Sample: '''mysfg-bucket-minio'''


= Configure Minio container as Linux Service =
2) Access the MinIO console and create a access token.


Create file '''/etc/systemd/system/minio-container.service''', and add the following content
The file is something like this:


  [Unit]
  {
Description=Minio container
  "url":"<nowiki>http://10.1.1.1:9001/api/v1/service-account-credentials</nowiki>",
  "accessKey":"VQ...A",
[Service]
  "secretKey":"K4...e",
Restart=always
  "api":"s3v4",
ExecStart=/usr/bin/podman start -a minio_server_9001
  "path":"auto"
ExecStop=/usr/bin/podman stop -t 2 minio_server_9001
  }
[Install]
  WantedBy=local.target


save the file
3) Install aws client


Enable the service
4) run command below to configure connection


  systemctl enable minio-container.service
  aws configure


Start the service
and informe accessKey and secretKey.


systemctl start minio-container.service
5) Copy file from bucket to local machine


Check the status of the service
aws s3 cp s3://mysfg-bucket-minio/ . --recursive --endpoint-url <nowiki>http://10.1.1.1:9001</nowiki>


  systemctl status minio-container.service
6) Copy file from local machine to bucket
 
  aws s3  cp arquivo_teste2.txt s3://mysfg-bucket-minio/  --endpoint-url <nowiki>http://10.1.1.1:9001</nowiki>




Line 47: Line 39:
= Ver também =
= Ver também =


* [[Rust| Artigos sobre Rust]]
* [[MinIO| Artigos sobre MinIO]]


[[Category:Python]]
[[Category: MinIO]]
[[Category: S3]]

Latest revision as of 21:47, 25 February 2024


Testing

1) Create a bucket. Sample: mysfg-bucket-minio

2) Access the MinIO console and create a access token.

The file is something like this:

{
  "url":"http://10.1.1.1:9001/api/v1/service-account-credentials",
  "accessKey":"VQ...A",
  "secretKey":"K4...e",
  "api":"s3v4",
  "path":"auto"
}

3) Install aws client

4) run command below to configure connection

aws configure

and informe accessKey and secretKey.

5) Copy file from bucket to local machine

aws s3 cp s3://mysfg-bucket-minio/ . --recursive --endpoint-url http://10.1.1.1:9001 

6) Copy file from local machine to bucket

aws s3  cp arquivo_teste2.txt s3://mysfg-bucket-minio/   --endpoint-url http://10.1.1.1:9001 


Ver também