### Install MinIO Go SDK Source: https://docs.min.io/aistor/developers/sdk Install the Go SDK using the go get command. Ensure you are using the correct version. ```bash go get github.com/minio/minio-go/v7 ``` -------------------------------- ### Install MinIO Go Client SDK Source: https://docs.min.io/aistor/developers/sdk/go Use 'go get' to download and install the MinIO Go client SDK from GitHub. Ensure you are in your project directory. ```bash go get github.com/minio/minio-go/v7 ``` -------------------------------- ### Quick Start: File Uploader Example Source: https://docs.min.io/aistor/developers/sdk/javascript Connect to a MinIO server, create a bucket if it doesn't exist, and upload a file. This example uses the public MinIO 'play' server and demonstrates basic bucket and object operations. ```javascript import * as Minio from 'minio' // Instantiate the MinIO client with the object store service // endpoint and an authorized user's credentials // play.min.io is the MinIO public test cluster const minioClient = new Minio.Client({ endPoint: 'play.min.io', port: 9000, useSSL: true, accessKey: 'Q3AM3UQ867SPQQA43P2F', secretKey: 'zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG', }) // File to upload const sourceFile = '/tmp/test-file.txt' // Destination bucket const bucket = 'js-test-bucket' // Destination object name const destinationObject = 'my-test-file.txt' // Check if the bucket exists // If it doesn't, create it const exists = await minioClient.bucketExists(bucket) if (exists) { console.log('Bucket ' + bucket + ' exists.') } else { await minioClient.makeBucket(bucket, 'us-east-1') console.log('Bucket ' + bucket + ' created in "us-east-1".') } // Set the object metadata var metaData = { 'Content-Type': 'text/plain', 'X-Amz-Meta-Testing': 1234, example: 5678, } // Upload the file with fPutObject // If an object with the same name exists, // it is updated with new data await minioClient.fPutObject(bucket, destinationObject, sourceFile, metaData) console.log('File ' + sourceFile + ' uploaded as object ' + destinationObject + ' in bucket ' + bucket) ``` -------------------------------- ### Install MinIO Python SDK from GitHub Source: https://docs.min.io/aistor/developers/sdk/python Install the MinIO Python SDK by cloning the GitHub repository and running the setup script. Requires Python 3.7+. ```bash git clone https://github.com/minio/minio-py cd minio-py python setup.py install ``` -------------------------------- ### Complete File Uploader Example (.NET) Source: https://docs.min.io/aistor/developers/sdk/dotnet Connects to an object storage server, creates a bucket if it doesn't exist, and uploads a file. Ensure you have the MinIO client library installed and replace placeholder values with your actual credentials and file paths. ```csharp using System; using Minio; using Minio.Exceptions; using Minio.DataModel; using Minio.Credentials; using Minio.DataModel.Args; using System.Threading.Tasks; namespace FileUploader { class FileUpload { static void Main(string[] args) { var endpoint = "play.min.io"; var accessKey = "minioadmin"; var secretKey = "minioadmin"; try { var minio = new MinioClient() .WithEndpoint(endpoint) .WithCredentials(accessKey, secretKey) .WithSSL() .Build(); FileUpload.Run(minio).Wait(); } catch (Exception ex) { Console.WriteLine(ex.Message); } Console.ReadLine(); } // File uploader task. private async static Task Run(IMinioClient minio) { var bucketName = "mymusic"; var location = "us-east-1"; var objectName = "golden-oldies.zip"; var filePath = "C:\\Users\\username\\Downloads\\golden_oldies.mp3"; var contentType = "application/zip"; try { // Make a bucket on the server, if not already present. var beArgs = new BucketExistsArgs() .WithBucket(bucketName); bool found = await minio.BucketExistsAsync(beArgs).ConfigureAwait(false); if (!found) { var mbArgs = new MakeBucketArgs() .WithBucket(bucketName); await minio.MakeBucketAsync(mbArgs).ConfigureAwait(false); } // Upload a file to bucket. var putObjectArgs = new PutObjectArgs() .WithBucket(bucketName) .WithObject(objectName) .WithFileName(filePath) .WithContentType(contentType); await minio.PutObjectAsync(putObjectArgs).ConfigureAwait(false); Console.WriteLine("Successfully uploaded " + objectName ); } catch (MinioException e) { Console.WriteLine("File Upload Error: {0}", e.Message); } } } } ``` -------------------------------- ### Example Kubernetes Resource Output Source: https://docs.min.io/aistor/installation/kubernetes/install/deploy-aistor-private-registry This is an example output from `kubectl get all -n aistor`, showing the status of pods, services, deployments, and replica sets after a successful installation. ```text NAME READY STATUS RESTARTS AGE pod/adminjob-operator-cfc97d9f-hjbp5 1/1 Running 0 4m16s pod/object-store-operator-78c9f84b85-kmwlv 1/1 Running 0 4m16s NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/object-store-operator ClusterIP 10.43.210.230 4221/TCP 4m16s NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/adminjob-operator 1/1 1 1 4m16s deployment.apps/object-store-operator 1/1 1 1 4m16s NAME DESIRED CURRENT READY AGE replicaset.apps/adminjob-operator-cfc97d9f 1 1 1 4m16s replicaset.apps/object-store-operator-78c9f84b85 1 1 1 4m16s ``` -------------------------------- ### Running SDK Examples Source: https://docs.min.io/aistor/developers/sdk/rust Instructions on how to compile and run examples from the MinIO minio-rs GitHub repository using Cargo. ```bash cargo run --example ``` -------------------------------- ### Enable and Start MinIO AIStor Service Source: https://docs.min.io/aistor/installation/linux/install/deploy-aistor-on-red-hat-linux Enable the MinIO service to start on boot and then start the service immediately. Use `journalctl -u minio` to monitor the startup status. ```shell systemctl enable minio.service && systemctl start minio ``` -------------------------------- ### Install eBPF Binary and Test Source: https://docs.min.io/aistor/operations/security/storage-hardening Install the compiled eBPF protection binary to '/usr/local/bin/' with execute permissions and test the installation by running the 'check' command. ```bash sudo install -m 755 minio-protect /usr/local/bin/ ``` ```bash /usr/local/bin/minio-protect check ``` -------------------------------- ### Minimal Configuration Example Source: https://docs.min.io/aistor/reference/aistor-server/configuration-file This is a minimal configuration example for MinIO AIStor, including only the essential parameters required for startup. ```yaml version: v3 rootUser: "minioadmin" rootPassword: "secret-CHANGE-ME" address: ":9000" pools: - nodes: - addresses: - "https://server{1...4}:9000" path: "/mnt/disk{1...4}/" ``` -------------------------------- ### Starting the AIStor Server Source: https://docs.min.io/aistor/reference/aistor-server The `minio server` command starts the Server process. It requires a license file and one or more directories for storage. ```APIDOC ## minio server ### Description Starts the AIStor Server process. ### Syntax ``` minio server --license path/to/minio.license [FLAGS] HOSTNAME/DIRECTORIES [HOSTNAME/DIRECTORIES..] ``` ### Parameters #### --license (Required) Specifies the path to the license file. The server cannot start without a valid license. #### HOSTNAME The hostname of a `minio server` process. Optional for standalone deployments. For distributed deployments, specify hostnames for each server in the pool. Supports MinIO AIStor expansion notation `{x...y}`. #### DIRECTORIES (Required) The directories or drives that the `minio server` process uses as the storage backend. Supports MinIO AIStor expansion notation `{x...y}`. Must be empty when first starting. Requires at least 4 drives for erasure coding. #### --address (Optional) Binds the `minio` server process to a specific network address and port number in the format `ADDRESS:PORT`. If omitted, `minio` binds to port `9000` on all configured interfaces. ### Request Example ```bash minio server --license /path/to/minio.license /mnt/disk{1...4} ``` ### Request Example (Distributed) ```bash minio server --license /path/to/minio.license https://minio{1...4}.example.net/data{1...4} ``` ``` -------------------------------- ### Install and Run Warp Benchmarking Tool Source: https://docs.min.io/aistor/operations/benchmarking Install the MinIO 'warp' tool using 'go install' and run it for detailed S3 benchmarking. Configure host, access key, and secret key for your MinIO deployment. ```bash go install github.com/minio/warp@latest warp mixed --host=server1:9000,server2:9000 \ --access-key=minioadmin --secret-key=minioadmin ``` -------------------------------- ### Enable and Start MinIO AIStor Service Source: https://docs.min.io/aistor/installation/linux/install/deploy-aistor-on-ubuntu-server Enable the MinIO AIStor service to start on boot and start the server process. Monitor the service status using journalctl. ```shell systemctl enable minio.service ``` ```shell systemctl start minio ``` ```shell journalctl -u minio ``` -------------------------------- ### Access Key Info Output Example Source: https://docs.min.io/aistor/reference/cli/admin/mc-admin-accesskey/mc-admin-accesskey-info This is an example of the output you can expect when retrieving access key details. ```text AccessKey: myuserserviceaccount ParentUser: myuser Status: on Comment: Policy: implied Expiration: no-expiry ``` -------------------------------- ### Install minio-cpp via vcpkg Source: https://docs.min.io/aistor/developers/sdk/cpp Use this command to install the MinIO C++ client SDK using the vcpkg package manager. ```bash $ vcpkg install minio-cpp ``` -------------------------------- ### Install AIStor Client (mc) for AMD64 Source: https://docs.min.io/aistor/installation/container/install Download, make executable, and install the AIStor Client (mc) for AMD64 architecture. ```bash curl --progress-bar -L https://dl.min.io/aistor/mc/release/linux-amd64/mc -o mc chmod +x ./mc sudo mv ./mc /usr/local/bin/ mc --version ``` -------------------------------- ### Install AIStor Client (mc) for ARM64 Source: https://docs.min.io/aistor/installation/container/install Download, make executable, and install the AIStor Client (mc) for ARM64 architecture. ```bash curl --progress-bar -L https://dl.min.io/aistor/mc/release/linux-arm64/mc -o mc chmod +x ./mc sudo mv ./mc /usr/local/bin mc --version ``` -------------------------------- ### Install xl-meta Tool Source: https://docs.min.io/aistor/operations/debugging-and-troubleshooting Install the `xl-meta` tool using Go. This tool is used for decoding MinIO AIStor object metadata. ```bash go install github.com/minio/minio/docs/debugging/xl-meta@latest ``` -------------------------------- ### Run FileUploader Example Source: https://docs.min.io/aistor/developers/sdk/go Commands to initialize the Go module, download dependencies, and run the FileUploader Go program. This prepares the environment and executes the upload logic. ```bash go mod init example/FileUploader go get github.com/minio/minio-go/v7 go get github.com/minio/minio-go/v7/pkg/credentials go run FileUploader.go ``` -------------------------------- ### Automated eBPF LSM Setup Source: https://docs.min.io/aistor/operations/security/storage-hardening Download, make executable, and run the setup script for automatic installation of eBPF LSM protection. The script handles dependency installation, building, and service setup. ```bash curl -O https://raw.githubusercontent.com/miniohq/eos/master/scripts/setup-ebpf-protection.sh ``` ```bash chmod +x setup-ebpf-protection.sh ``` ```bash sudo ./setup-ebpf-protection.sh ``` -------------------------------- ### Create Bucket with AdminJob - Kubernetes YAML Source: https://docs.min.io/aistor/reference/kubernetes/adminjob This minimal example uses AdminJob to create a bucket named `my-bucket` in the `primary-object-store` cluster using the `consoleAdmin` policy for full administrative access. Save the following YAML as `adminjob-quickstart.yaml` to get started. ```yaml --- apiversion: v1 kind: ServiceAccount metadata: name: minio-job namespace: primary-object-store --- apiversion: sts.min.io/v1beta1 kind: PolicyBinding metadata: name: minio-job namespace: primary-object-store spec: application: serviceaccount: minio-job namespace: primary-object-store policies: - consoleAdmin --- apiversion: aistor.min.io/v1alpha1 kind: AdminJob metadata: name: create-bucket-job namespace: primary-object-store spec: serviceAccountName: minio-job objectStore: name: primary-object-store namespace: primary-object-store commands: - op: make-bucket args: name: my-bucket ``` -------------------------------- ### Install mc on Linux (64-bit Intel) Source: https://docs.min.io/aistor/reference/cli Installs the mc client for Linux 64-bit Intel systems. Ensure the binary is executable and accessible. ```bash curl --progress-bar -L https://dl.min.io/aistor/mc/release/linux-amd64/mc \ --create-dirs \ -o $HOME/aistor-binaries/mc chmod +x ~/aistor-binaries/mc ~/aistor-binaries/mc --help ``` -------------------------------- ### Example: List Access Keys for a Deployment Source: https://docs.min.io/aistor/reference/cli/mc-idp-openid-accesskey/mc-idp-openid-accesskey-info Demonstrates how to list existing access keys for a MinIO AIStor deployment, which can be useful before retrieving specific key information. Replace `myaistor` with your deployment alias. ```bash mc idp openid accesskey ls myaistor ``` -------------------------------- ### Example output of user list Source: https://docs.min.io/aistor/reference/cli/admin/mc-admin-user/mc-admin-user-list This is an example of the output format when listing users. It shows the user's status, username, and permissions. ```text enabled devadmin readwrite enabled devtest readonly enabled newuser ``` -------------------------------- ### Automated SELinux Protection Setup Source: https://docs.min.io/aistor/operations/security/storage-hardening Use this script for an automated setup of SELinux-based storage protection. It verifies SELinux, installs packages, compiles the policy, labels files, and creates a hardened service. ```bash curl -O https://raw.githubusercontent.com/miniohq/eos/master/scripts/setup-selinux-protection.sh chmod +x setup-selinux-protection.sh sudo ./setup-selinux-protection.sh ``` -------------------------------- ### Curl Request and Response Example Source: https://docs.min.io/aistor/developers/transforms-with-object-lambda This is an example output from the curl command, showing the details of the GET request made to the presigned URL and the subsequent HTTP response, including the transformed object content. ```text * Trying 127.0.0.1:9000... * Connected to localhost (127.0.0.1) port 9000 (#0) > GET /myfunctionbucket/testobject?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=minioadmin%2F20230406%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230406T184749Z&X-Amz-Expires=1000&X-Amz-SignedHeaders=host&lambdaArn=arn%3Aminio%3As3-object-lambda%3A%3Amyfunction%3Awebhook&X-Amz-Signature=68fe7e03929a7c0da38255121b2ae09c302840c06654d1b79d7907d942f69915 HTTP/1.1 > Host: localhost:9000 > User-Agent: curl/7.81.0 > Accept: */* > * Mark bundle as not supporting multiuse < HTTP/1.1 200 OK < Content-Security-Policy: block-all-mixed-content < Strict-Transport-Security: max-age=31536000; includeSubDomains < Vary: Origin < Vary: Accept-Encoding < X-Amz-Id-2: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 < X-Amz-Request-Id: 17536CF16130630E < X-Content-Type-Options: nosniff < X-Xss-Protection: 1; mode=block < Date: Thu, 06 Apr 2023 18:47:49 GMT < Content-Length: 14 < Content-Type: text/plain; charset=utf-8 < hELLO, wORLD! * Connection #0 to host localhost left intact ``` -------------------------------- ### Initialize MinIO Client and List Buckets Source: https://docs.min.io/aistor/developers/sdk/dotnet Initialize the MinIO client with endpoint, credentials, and SSL settings. This example demonstrates how to list buckets and print their names and creation dates. ```csharp using Minio; var endpoint = "play.min.io"; var accessKey = "minioadmin"; var secretKey = "minioadmin"; var secure = true; // Initialize the client with access credentials. private static IMinioClient minio = new MinioClient() .WithEndpoint(endpoint) .WithCredentials(accessKey, secretKey) .WithSSL(secure) .Build(); // Create an async task for listing buckets. var getListBucketsTask = await minio.ListBucketsAsync().ConfigureAwait(false); // Iterate over the list of buckets. foreach (var bucket in getListBucketsTask.Result.Buckets) { Console.WriteLine(bucket.Name + " " + bucket.CreationDateDateTime); } ``` -------------------------------- ### Basic Usage Example Source: https://docs.min.io/aistor/reference/cli/mc-tree This is a fundamental example of using the `mc tree` command. Replace `ALIAS` and `PATH` with your specific MinIO deployment alias and bucket path. ```bash mc tree ALIAS/PATH ``` -------------------------------- ### Example Per-Bucket CORS Configuration XML Source: https://docs.min.io/aistor/administration/cors-configuration An example XML configuration for a bucket's CORS rules. This allows GET, PUT, and HEAD methods from `https://app.example.com`, with all headers allowed and ETag exposed. The maximum age for preflight requests is set to 3600 seconds. ```xml https://app.example.com GET PUT HEAD * ETag 3600 ``` -------------------------------- ### Full Example Configuration File Source: https://docs.min.io/aistor/reference/aistor-server/configuration-file This example demonstrates all available fields in the MinIO AIStor configuration file. Remove any parameters not needed for your specific deployment. ```yaml version: v3 # Core settings address: ":9000" consoleAddress: ":9001" rootUser: "minioadmin" rootPassword: "secret-CHANGE-ME" license: "/path/to/license.minio" certsDir: "/etc/minio/certs" # Behavior settings api: "S3" objectNaming: "safe" # Network tuning network: idleTimeout: "15s" readHeaderTimeout: "5s" connUserTimeout: "10m" dnsCacheTTL: "1h" maxIdleConnsPerHost: 2048 sendBufSize: 4194304 recvBufSize: 4194304 writeBufSize: 65536 readBufSize: 65536 # Storage configuration storage: lazyAccessTime: "24h" # Logging log: json: false dir: "" size: 10485760 compress: false # FTP server configuration ftp: address: ":8021" passivePortRange: "30000-40000" # SFTP server configuration sftp: address: ":8022" sshPrivateKey: "/etc/minio/sftp-key" # Storage pools pools: - nodes: - addresses: - "https://rack{1,3,5,7}.example.com:9000" path: "/mnt/disk{1...4}" - nodes: - addresses: - "https://rack{2,4,6,8}.example.com:9000" path: "/mnt/disk{1...4}" ``` -------------------------------- ### Connect to SFTP Server and List Bucket Contents Source: https://docs.min.io/aistor/developers/file-transfer-protocol This example demonstrates how to connect to an SFTP server using the `sftp` command-line client. It specifies the port, username, and host, then lists the contents of the `runner` bucket. ```bash > sftp -P 8022 aistor@localhost minio@localhost's password: Connected to localhost. sftp> ls runner/ chunkdocs testdir ``` -------------------------------- ### Get default AD/LDAP configuration Source: https://docs.min.io/aistor/reference/cli/mc-idp-ldap/mc-idp-ldap-info Outputs the default AD/LDAP configuration settings on the specified MinIO AIStor deployment. Use this to view the general integration setup. ```bash mc idp ldap info myaistor ``` -------------------------------- ### Start Resynchronization using ALIAS/BUCKET for Remote Target Source: https://docs.min.io/aistor/reference/cli/mc-replicate/mc-replicate-resync Starts replication using the specified bucket as the source and the `--remote-bucket` parameter for the remote target. This example uses an ALIAS/BUCKET format for the remote target, which requires AIStor Client `RELEASE.2025-07-28T19-02-30Z` or later. Replace `ARN` with the actual ARN or ALIAS/BUCKET of the remote target. ```bash mc replicate resync start myaistor/data --remote-bucket "ARN" ``` -------------------------------- ### Create Access Keys with Name and Description Source: https://docs.min.io/aistor/reference/cli/mc-idp-openid-accesskey/mc-idp-openid-accesskey-create-with-login This example demonstrates creating access keys with a human-readable name and a description. This helps in identifying the purpose of the access key later. Use this when you need to add metadata to the generated keys for better organization. ```bash mc idp openid accesskey create-with-login https://myaistor.example.net/ \ --name "my-service-account" \ --description "Access key for CI/CD pipeline" ``` -------------------------------- ### Basic OpenTelemetry Logging Configuration Source: https://docs.min.io/aistor/reference/kubernetes/operator-opentelemetry Configure the Operator to export logs to an OTLP collector using gRPC. This example shows the basic environment variable setup within a Kubernetes Deployment. ```yaml apiVersion: apps/v1 kind: Deployment metadata: name: object-store-operator namespace: aistor spec: template: spec: containers: - name: operator env: - name: OTEL_EXPORTER_OTLP_ENDPOINT value: "http://otel-collector.observability.svc:4317" ``` -------------------------------- ### Configure a Storage Pool Source: https://docs.min.io/aistor/reference/kubernetes/object-store-helm-chart Define a storage pool for the MinIO Object Store, specifying the number of servers, volumes per server, and volume size. This example configures a distributed setup with 4 servers. ```yaml pools: - servers: 4 name: pool-0 volumesPerServer: 4 size: 10Gi ``` -------------------------------- ### Install AIStor Client (`mc`) for Intel AMD64 Source: https://docs.min.io/aistor/installation/macos/install Download the `mc` binary for Intel AMD64, make it executable, and move it to your PATH. Verify the installation with `mc --version`. ```bash curl --progress-bar -L https://dl.min.io/aistor/mc/release/amd64/mc -o mc chmod +x ./mc mv ./mc /usr/local/bin/ mc --version ``` -------------------------------- ### Get anonymous policy for a bucket using ALIAS/PATH Source: https://docs.min.io/aistor/reference/cli/mc-anonymous/mc-anonymous-get A general example demonstrating how to retrieve an anonymous policy for a bucket. Remember to substitute `ALIAS` with your configured S3 host alias and `PATH` with the target bucket. ```bash mc anonymous get ALIAS/PATH ``` -------------------------------- ### Example PostgreSQL Target ARN on Startup Source: https://docs.min.io/aistor/administration/bucket-notifications/publish-events-to-postgresql This is an example log line printed by the `minio server` process on startup for each configured PostgreSQL target. The ARN is used when configuring bucket notifications. ```text SQS ARNs: arn:minio:sqs::primary:postgresql ``` -------------------------------- ### Get Inventory Job Status Source: https://docs.min.io/aistor/operations/inventory/api-reference Retrieve the status of a specific inventory job, including details like schedule, state, start and end times, scanned and matched object counts, and output file information. The response is in JSON format. ```http GET /{bucket}?minio-inventory&id={id}&status ``` ```json { "bucket": "my-bucket", "id": "daily-report", "user": "admin", "schedule": "daily", "state": "completed", "startTime": "2025-10-11T10:30:00Z", "endTime": "2025-10-11T10:45:00Z", "scanned": "my-bucket/path/to/last/scanned/object", "matched": "my-bucket/path/to/last/matched/object", "scannedCount": 15234, "matchedCount": 8421, "recordsWritten": 8421, "outputFilesCount": 3, "executionTime": "15m0s", "manifestPath": "dest-bucket/prefix/source-bucket/daily-report/2025-10-11T10-30Z/manifest.json" } ``` -------------------------------- ### Set MINIO_ARGS Environment Variable for command line or custom systemd Source: https://docs.min.io/aistor/reference/aistor-server/settings/core If running `minio` on the command line or using a custom systemd unit file that omits `MINIO_OPTS`, use `MINIO_ARGS` instead. This example shows setting the variable and then starting the server. ```shell export MINIO_ARGS=' --console-address=":9001" --ftp="address=:8021" --ftp="passive-port-range=30000-40000" ' minio server ... # The above is equivalent to running the following: # minio server --console-address=":9001" \ # --ftp="address=:8021" \ # --ftp="passive-port-range=30000-40000" ``` -------------------------------- ### View RPC Metrics with Output Example Source: https://docs.min.io/aistor/reference/cli/mc-support/mc-support-top/mc-support-top-rpc This example shows the typical output format when running the `mc support top rpc` command, detailing metrics for various server connections. ```bash λ mc support top rpc myaistor SERVER CONCTD PING PONG OUT.Q RECONNS STR.IN STR.OUT MSG.IN MSG.OUT To 127.0.0.1:9002 5 0.7ms 1s ago 0 0 ->0 0-> 3269 3212 From 127.0.0.1:9002 5 1.1ms 1s ago 0 0 ->0 0-> 3213 3269 To 127.0.0.1:9003 5 0.6ms 1s ago 0 0 ->0 0-> 6001 6076 From 127.0.0.1:9003 5 0.6ms 1s ago 0 0 ->0 0-> 6077 6001 To 127.0.0.1:9004 5 0.6ms 1s ago 0 0 ->0 0-> 3243 3160 From 127.0.0.1:9004 5 0.4ms 1s ago 0 0 ->0 0-> 3161 3243 To 127.0.0.1:9005 5 0.6ms 1s ago 0 0 ->0 0-> 3150 3094 From 127.0.0.1:9005 5 0.3ms 1s ago 0 0 ->0 0-> 3095 3150 To 127.0.0.1:9006 5 0.3ms 1s ago 0 0 ->0 0-> 3185 3221 From 127.0.0.1:9006 5 0.6ms 1s ago 0 0 ->0 0-> 3222 3185 ``` -------------------------------- ### Compile and Install SELinux Policy Module Source: https://docs.min.io/aistor/operations/security/storage-hardening Compile the SELinux policy module from a .te file, package it, and install it into the system. Verify the installation by listing installed modules. ```bash checkmodule -M -m -o minio_storage.mod minio_storage.te ``` ```bash semodule_package -o minio_storage.pp -m minio_storage.mod ``` ```bash semodule -i minio_storage.pp ``` ```bash semodule -l | grep minio_storage ``` -------------------------------- ### Set up MinIO Alias and Bucket Source: https://docs.min.io/aistor/developers/transforms-with-object-lambda Configure MinIO alias, create a bucket, and upload a test object. This prepares the environment for testing the Object Lambda handler. ```bash mc alias set myaistor/ http://localhost:9000 minioadmin minioadmin mc mb myaistor/myfunctionbucket cat > testobject << EOF Hello, World! EOF mc cp testobject myaistor/myfunctionbucket/ ``` -------------------------------- ### Install AIStor Client (mc) Source: https://docs.min.io/aistor/installation/windows/install Downloads and installs the AIStor Client (mc) and verifies the installation. ```powershell Invoke-WebRequest https://dl.min.io/aistor/mc/release/windows-amd64/mc.exe -OutFile C:\mc.exe C:\mc.exe --version ``` -------------------------------- ### Create a New Bucket Source: https://docs.min.io/aistor/developers/sdk/haskell/api Example of creating a new bucket using `makeBucket`. It shows how to specify a region or let it default to the one in `ConnectInfo`. Error handling for the creation process is included. ```haskell {-# Language OverloadedStrings #} main :: IO () main = do res <- runMinio minioPlayCI $ do makeBucket bucketName (Just "us-east-1") case res of Left err -> putStrLn $ "Failed to make bucket: " ++ (show res) Right _ -> putStrLn $ "makeBucket successful." ``` -------------------------------- ### Download and Install AIStor Server for ARM64 Source: https://docs.min.io/aistor/installation/linux/install/deploy-aistor-on-ubuntu-server Use this command to download the ARM64 .deb package for MinIO AIStor Server and install it. Ensure you have curl installed. ```bash curl --progress-bar -L dl.min.io/aistor/minio/release/linux-arm64/minio.deb -o minio.deb sudo dpkg -i minio.deb ``` -------------------------------- ### Install AIStor Client (`mc`) for M-Series ARM64 Source: https://docs.min.io/aistor/installation/macos/install Download the `mc` binary for M-series ARM64, make it executable, and move it to your PATH. Verify the installation with `mc --version`. ```bash curl --progress-bar -L https://dl.min.io/aistor/mc/release/darwin-arm64/mc -o mc chmod +x ./mc mv ./mc /usr/local/bin mc --version ``` -------------------------------- ### Initialize MinioClient with Builder Source: https://docs.min.io/aistor/developers/sdk/dotnet/api Demonstrates initializing the MinioClient using the builder pattern with different configurations for endpoint, credentials, and SSL. ```csharp IMinioClient minioClient = new MinioClient() .WithEndpoint("play.min.io") .WithCredentials("Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG") .WithSSL() .Build() ``` ```csharp IMinioClient minioClient = new MinioClient() .WithEndpoint("play.min.io", 9000, true) .WithCredentials("Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG") .WithSSL() .Build() ``` ```csharp IWebProxy proxy = new WebProxy("192.168.0.1", 8000); IMinioClient minioClient = new MinioClient() .WithEndpoint("my-ip-address:9000") .WithCredentials("minio", "minio123") .WithSSL() .WithProxy(proxy) .Build(); ``` -------------------------------- ### Download and Install AIStor Server for AMD64 Source: https://docs.min.io/aistor/installation/linux/install/deploy-aistor-on-ubuntu-server Use this command to download the AMD64 .deb package for MinIO AIStor Server and install it. Ensure you have curl installed. ```bash curl --progress-bar -L dl.min.io/aistor/minio/release/linux-amd64/minio.deb -o minio.deb sudo dpkg -i minio.deb ``` -------------------------------- ### Install MinIO JavaScript SDK from Source Source: https://docs.min.io/aistor/developers/sdk/javascript Install the MinIO JavaScript client SDK by cloning the repository and building from source. This is useful for development or if you need the latest unreleased features. ```bash git clone https://github.com/minio/minio-js cd minio-js npm install npm run build npm install -g ``` -------------------------------- ### Error message when no license is installed Source: https://docs.min.io/aistor/reference/cli/mc-license/mc-license-info This message appears when a MinIO AIStor deployment does not have a license installed. It provides instructions on how to install one using 'mc license update'. ```bash License is not installed. Please run 'mc license update ' to install a license. ``` -------------------------------- ### Generate and Create Inventory Configuration Source: https://docs.min.io/aistor/reference/cli/mc-inventory/mc-inventory-put This example demonstrates the workflow of generating a template YAML file for inventory configuration, customizing it, and then using `mc inventory put` to create the configuration. ```bash mc inventory generate myminio/mybucket weekly-report > weekly.yml ``` ```bash mc inventory put myminio/mybucket weekly.yml ``` -------------------------------- ### Install warp Source: https://docs.min.io/aistor/operations/network-performance-testing Installs the warp tool for S3 application-layer benchmarking. ```bash go install github.com/minio/warp@latest ``` -------------------------------- ### Install MinIO AIStor Server for Intel AMD64 Source: https://docs.min.io/aistor/installation/macos/install Download the MinIO AIStor binary for Intel AMD64 processors, make it executable, and move it to your PATH. Verify the installation with `minio --version`. ```bash curl --progress-bar -L https://dl.min.io/aistor/minio/release/darwin-amd64/minio -o minio chmod +x ./minio mv ./minio /usr/local/bin #may require sudo permissions minio --version ``` -------------------------------- ### Initialize MinIO Client Source: https://docs.min.io/aistor/developers/sdk/javascript/api Demonstrates how to create a new MinIO client instance for connecting to a MinIO server. ```APIDOC ## Initialize MinIO client object ## MinIO ```javascript import * as Minio from 'minio' const minioClient = new Minio.Client({ endPoint: 'play.min.io', port: 9000, useSSL: true, accessKey: 'Q3AM3UQ867SPQQA43P2P', secretKey: 'zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG', }) ``` ``` -------------------------------- ### Install dperf Source: https://docs.min.io/aistor/operations/network-performance-testing Installs the dperf tool for drive I/O benchmarking. ```bash go install github.com/minio/dperf@latest ``` -------------------------------- ### Install hperf Source: https://docs.min.io/aistor/operations/network-performance-testing Installs the hperf tool for network performance testing. ```bash go install github.com/minio/hperf@latest ``` -------------------------------- ### Create a new group with members Source: https://docs.min.io/aistor/reference/cli/admin/mc-admin-group Example demonstrating how to create a new group and add initial members to an S3-compatible host. Replace placeholders with your specific alias, group name, and user names. ```bash mc admin group add ALIAS GROUPNAME MEMBER [MEMBER...] ``` -------------------------------- ### Connect to SFTP, List, and Download Bucket Contents Source: https://docs.min.io/aistor/developers/file-transfer-protocol Connect to the AIStor Server using SFTP, list items in a bucket, and then download the contents of the bucket. ```bash > sftp -P 8022 aistor@localhost aistor@localhost's password: Connected to localhost. sftp> ls runner/ chunkdocs testdir sftp> get runner/chunkdocs/metadata metadata Fetching /runner/chunkdocs/metadata to metadata metadata 100% 226 16.6KB/s 00:00 sftp> ``` -------------------------------- ### JSON schema example Source: https://docs.min.io/aistor/reference/cli/mc-table/mc-table-create An example of a JSON schema definition for an Iceberg table. ```json {"type":"struct","fields":[{"id":1,"name":"id","type":"long","required":true}]} ``` -------------------------------- ### AssumeRoleWithLDAPIdentity Example Request Source: https://docs.min.io/aistor/developers/security-token-service/assumerolewithldapidentity An example of a complete AssumeRoleWithLDAPIdentity request with all supported arguments. ```http POST https://aistor.example.net?Action=AssumeRoleWithLDAPIdentity &LDAPUsername=USERNAME &LDAPPassword=PASSWORD &Version=2011-06-15 &Policy={} &ConfigName=CONFIGNAME ``` -------------------------------- ### Example Output Source: https://docs.min.io/aistor/reference/cli/admin/mc-admin-policy/mc-admin-policy-list The command returns a list of policy names, one per line. ```text readwrite writeonly ``` -------------------------------- ### Example JSON Log Output Source: https://docs.min.io/aistor/reference/kubernetes/object-store-helm-chart An example of JSON-formatted log output from a MinIO pod. ```shell $ k logs myminio-pool-0-0 -n default {\"level\":\"INFO\",\"errKind\":\"\",\"time\":\"2022-04-07T21:49:33.740058549Z\",\"message\":\"All MinIO sub-systems initialized successfully\"} ``` -------------------------------- ### Start Prometheus Cluster Source: https://docs.min.io/aistor/operations/monitoring/metrics-and-alerts/collect-minio-metrics-using-prometheus Command to start the Prometheus cluster using a specified configuration file. ```bash prometheus --config.file=prometheus.yaml ``` -------------------------------- ### Create Bucket using MakeBucketArgs Source: https://docs.min.io/aistor/developers/sdk/dotnet/api Demonstrates creating a bucket using the MakeBucketArgs object for asynchronous bucket creation. Includes error handling for MinioExceptions. ```csharp try { // Create bucket if it doesn't exist. bool found = await minioClient.BucketExistsAsync(bktExistArgs); if (found) { Console.WriteLine(bktExistArgs.BucketName +" already exists"); } else { // Create bucket 'my-bucketname'. await minioClient.MakeBucketAsync(mkBktArgs); Console.WriteLine(mkBktArgs.BucketName + " is created successfully"); } } catch (MinioException e) { Console.WriteLine("Error occurred: " + e); } ``` -------------------------------- ### Policy Example: Read-only access Source: https://docs.min.io/aistor/administration/aistor-tables/aistor-tables-access Example policy granting read-only access to a warehouse and its tables. ```APIDOC ## Read-only access ### Description Grants read-only access to a warehouse and its tables, allowing users to query table metadata and schemas without making modifications. ### Policy ```json { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3tables:GetWarehouse", "s3tables:ListNamespaces", "s3tables:GetNamespace", "s3tables:ListTables", "s3tables:GetTable", "s3tables:GetTableData" ], "Resource": [ "arn:aws:s3tables:::bucket/analytics", "arn:aws:s3tables:::bucket/analytics/table/*" ] } ] } ``` ### Permissions Granted * View warehouse metadata. * List and view namespaces. * List and view table schemas. * Read table metadata and snapshots. ``` -------------------------------- ### Example Command Source: https://docs.min.io/aistor/reference/cli/mc-table/mc-table-remove This example demonstrates removing the `sales_data` table from the `prod` namespace within the `analytics` warehouse on the `myaistor` MinIO AIStor cluster. ```bash mc table remove myaistor analytics prod sales_data ``` -------------------------------- ### Create Tenant User and Attach Policy Source: https://docs.min.io/aistor/administration/multi-tenancy Create a new user with `mc admin user add` and attach the tenant policy using `mc admin policy attach`. ```bash mc admin user add ALIAS tenant-alpha-user tenant-alpha-password mc admin policy attach ALIAS tenant-alpha-policy --user tenant-alpha-user ``` -------------------------------- ### Install mc on Windows Source: https://docs.min.io/aistor/reference/cli Installs the mc client for Windows systems. Use mc.exe to run the command. ```powershell Invoke-WebRequest https://dl.min.io/aistor/mc/release/windows-amd64/mc -OutFile C:\mc.exe C:\mc.exe --help ``` -------------------------------- ### Start AIStor Server with License and Drives Source: https://docs.min.io/aistor/reference/aistor-server Starts the AIStor Server process, specifying the license file path and the storage drives. Ensure the license file is valid and the directories are empty before the first run. ```bash minio server --license /path/to/minio.license /mnt/disk{1...4} ``` -------------------------------- ### Install SELinux Policy Tools Source: https://docs.min.io/aistor/operations/security/storage-hardening Install the necessary tools for SELinux policy development on Fedora-based systems. ```bash sudo dnf install -y policycoreutils-python-utils selinux-policy-devel ``` -------------------------------- ### Build minio-cpp with tests using local vcpkg installation Source: https://docs.min.io/aistor/developers/sdk/cpp Clone minio-cpp and vcpkg locally, then configure and build minio-cpp with tests enabled, specifying the local vcpkg toolchain file. ```bash $ git clone https://github.com/minio/minio-cpp $ cd minio-cpp $ git clone https://github.com/microsoft/vcpkg.git $ ./vcpkg/bootstrap-vcpkg.sh $ ./vcpkg/vcpkg install $ cmake . -B ./build/Debug -DCMAKE_BUILD_TYPE=Debug -DMINIO_CPP_TEST=ON -DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake $ cmake --build ./build/Debug ``` -------------------------------- ### Install MinIO Haskell SDK with Stack Source: https://docs.min.io/aistor/developers/sdk/haskell Install the minio-hs library for use with the stack build tool. ```bash stack install minio-hs ``` -------------------------------- ### Disable Access Key Example Source: https://docs.min.io/aistor/reference/cli/mc-idp-ldap-accesskey/mc-idp-ldap-accesskey-disable An example demonstrating how to disable the access key `mykey` from the `myaistor` deployment. ```bash mc idp ldap accesskey disable myaistor/ mykey ```