Git Product home page Git Product logo

demo-minio-nats's Introduction

Minio NATS Demo

Use Minio to notify of changes through NATS and sync changes between two clouds (or a laptop and a cloud).

Overview

Minio makes it easy to manage an object store with an S3 interface across multiple different platforms, from your local desktop to other clouds beyond AWS.

This demonstration will show you how to run a Minio object store on a local laptop, configure a local NATS message bus and finally replicate objects to other clouds.

Diagram

Tutorial

  1. Install and run gnatsd

    go get github.com/nats-io/gnatsd; gnatsd -D -V
    
  2. Install minio

    go get minio
    
  3. Configure minio for local NATS event subscription

    edit ~/.minio/config.json

    set "nats"."1"."enable": true

    ...
    "nats": {
        "1": {
            "enable": true,
            "address": "0.0.0.0:4222",
            "subject": "bucketevents",
    ...
    
  4. Run minio

    Set ~/minio-tmp/ to any directory you want to store your objects in.

    minio server ~/minio-tmp/
    
  5. Run minioNATS

    go run minionats/main.go -remote s3://accessKeyId:accessSecretKey@host:port -local s3://accessKeyId:accessSecretKey@host:port
    
  6. Open Browsers to your test bucket Minio Browser and an S3 Browser

  7. Upload a File to your Minio Browser. Watch it automatically get added to your S3 browser

  8. Delete a File from your Minio Browser. Watch it automatically get removed from your S3 Browser

Usage

Usage of demo-minio-nats:
  -bucket string
    	bucket to test with (default "minio-nats-example")
  -local string
    	local S3 URL in format s3://accessKeyId:accessSecretKey@host:port
  -nats string
    	NATS URL in format nats://user:password@host:port (default "nats://localhost:4222")
  -region string
    	region to create and maintain bucket (default "us-east-1")
  -remote string
    	remote S3 URL in format s3://accessKeyId:accessSecretKey@host:port
  -tmpDir string
    	temporary directory for copying files (default "/tmp/")

Additional Reading

Publish Minio Events via NATS

NATS Blog

demo-minio-nats's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.