GithubHelp home page GithubHelp logo

minio / m3 Goto Github PK

View Code? Open in Web Editor NEW
27.0 12.0 19.0 8.73 MB

MinIO Kubernetes Cloud

License: GNU Affero General Public License v3.0

Go 94.76% Dockerfile 0.89% Shell 2.89% Makefile 1.46%

m3's Introduction

m3 (mkube)

MinIO Kubernetes Cloud

Installation

You can apply all the files located in k8s/base/ to install m3

kubectl apply -f k8s/base/

Or you can use kustomize to build a single file to apply which supports customizations

kustomize build k8s/base/ | kubectl apply -f -

Development

If you want to do some development for m3 please refer to our Development document

m3's People

Contributors

alevsk avatar bexsoft avatar cesnietor avatar dependabot[bot] avatar dvaldivia avatar harshavardhana avatar jhutchings1 avatar kaankabalak avatar krisis avatar nitisht avatar poornas avatar u5surf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

m3's Issues

Profiling start and stop for mcs

Im implementing the start and stop profiling endpoint for mcs based in the following swagger definition


  /api/v1/profiling/start:
    post:
      summary: Start recording profile data
      operationId: ProfilingStart
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/profilingStartRequest'
      responses:
        201:
          description: A successful response.
        default:
          description: Generic error response.
          schema:
            $ref: "#/definitions/error"
      tags:
        - AdminAPI
  /api/v1/profiling/stop:
    post:
      summary: Stop and download profile data
      operationId: ProfilingStop
      produces:
        - application/octet-stream
      responses:
        201:
          description: A successful response.
          schema:
            type: file
        default:
          description: Generic error response.
          schema:
            $ref: "#/definitions/error"
      tags:
        - AdminAPI

  profilingType:
    type: string
    enum:
      - cpu
      - mem
      - block
      - mutex
      - trace
      - threads
      - goroutines
  profilingStartRequest:
    type: object
    required:
      - type
    properties:
      type:
        $ref: "#/definitions/profilingType"

Node management

We need a set of APIs to define and manage the underlying infrastructure to onsite deployments. This should be accessible via CLI and API

The tables that hold the data looks as follows:
Screen Shot 2019-10-23 at 1 16 23 PM

We need support to:

  • Add nodes CLI
  • Add nodes API
  • List Nodes CLI
  • List Nodes API
  • Get details for a Node CLI
  • Get details for a Node API
  • Add drives to a node CLI
  • Add drives to a node API
  • List Drives on a Node CLI
  • List Drives on a Node API
  • Get details for a drive CLI
  • Get details for a drive API

Allocation

We need an algorithm that decides where to place a brand new tenant based on certain allocation rules:

  • Storage Group is not full
  • Storage Cluster has space and below 85% threshold
  • If no storage group is available, create a new SG inside a SC with available space

Move Storage to it's own namespace

We need to move all the storage to it's own storage group so we can control access to and from it using kubernetes policy and network policies

Error when try to assign the same 2 permissions to a service account

When updating service account permissions that contains the same bucket rule, ie allow read access to same bucket in two different permissions this error happens:

2019/12/11 01:50:32 MinIO: duplicate actions [s3:GetBucketLocation s3:GetObject s3:ListBucket s3:PutObject], resources [arn:aws:s3:::movies/*] found in statements { Allow [s3:GetBucketLocation s3:GetObject s3:ListBucket s3:PutObject] [arn:aws:s3:::movies/* arn:aws:s3:::music/*] []}, { Allow [s3:GetBucketLocation s3:GetObject s3:ListBucket s3:PutObject] [arn:aws:s3:::movies/*] []}

Integrate Prometheus into Tenant MinIO

We need to integrate Prometheus with the Tenant MinIO to keep track of usage metrics

  • Provision a Prometheus along with the Tenant (cmd tenant add)
  • Configure the Tenant MinIO to send it's data to Prometheus via the Tenant MinIO Configuration Secret

Timeout when adding a new user to a tenant

When trying to add a new user to a tenant via:

./m3 tenant user add --tenant TENANT --email [email protected] --name somename --password somepassword

We are getting this error after a timeout:

Error adding user: Put http://XXXXXX-sg-1:9001/minio/admin/v1/add-user?accessKey=XXXXXXXX: dial tcp: lookup XXXXXX-sg-1: no such host

However the user is created correctly

Error when trying to run migrations

When there is new migrations to apply to the database, i try to run them with ./m3 setup db

./m3 setup db --help
NAME:
  m3 setup db - runs DB migrations

USAGE:
  m3 setup db [command options] [arguments...]

FLAGS:
  --help, -h  show help

They failed with error:

pq: schema "provisioning" already exists
pq: database "tenants" already exists
Adding the first admin
Error adding user: pq: duplicate key value violates unique constraint "admins_email_uindex"
admin m3 error
pq: duplicate key value violates unique constraint "admins_email_uindex"

Seems like the command is trying to do the whole setup db process instead of just running the missing migrations.

disable user public handler should invalid the user session

today enable/disable user public api handler is only modifying users database
it should call:

err = cluster.UpdateSessionStatus(appCtx, sessionRowID, "invalid")
	if err != nil {
		return nil, status.New(codes.Internal, err.Error()).Err()
	}

Introduce support for transaction-like changes to Kubernetes

We need to keep track of the Kubernetes changes we are making along an operation, so if something else fails along the way, we can roll back the k8s operations.

We can use the cluster.Context to keep track of k8s changes we are doing, and how to roll them back.

An example is adding a tenant, we create config maps and then service and lastly deployment, but if anything fails, and the command fails, the first two successful commands stay on k8s therefore blocking other subsequent commands.

Implement local user IDP

We need some basic User management features:

  • Register a User - return JWT token for the session
  • Login as a User - return JWT token for the session
  • Validate User Email for the provided Tenant (company)

Send Emails

  • Configure external email provider
  • Send emails internal api

Reconnect m3 login page

This ticket needs to focus on 4 things:

  • Remove the field for company
  • Change email & password fields to be Access & Secret
  • Connect the form to the updated API for login
  • Store the token in a local storage variable & redirect

Upgrade Storage Group's MinIO

We need an algorithm that updates a Storage Group by stages

  1. drain the pod within the SG that is going to be updated by updating each tenant service pointing to this SG
  2. update the pod with the new MinIO version
  3. wait for the pod to be ready, all containers should pass readiness check
  4. re-enable the pod within each tenant service
  5. repeat for the next pod

API Validate Tenant Short Name

We need an API to Validate Tenant Short Name, we already have a proper internal function to validate, just expose it via API

Validate Tenant Short Name on creation

We need to make sure the tenants being created have a valid short name as that's used as identifier and subdomain.

Add this validation as a function so it can be re-used in many places.

A valid tenant short name must:

  • Is globally unique
  • min 2 characters
  • max 64 characters
  • is only lowecase, numbers and dashes [a-z0-9-]{2,64}
  • Not a reserved word: m3, kube-system, default, kube-public, kube-node-lease

Integrate any KMS

  • Provision a KMS per tenant
  • Configure MinIO to use the KMS
  • Store the configuration on the Tenant MinIO Configuration (Secret)

pq syntax error when creating a tenant with -

On a brand new cluster when creating the tenant following the README example we are getting this error:

./m3 tenant add company-name
Registered as tenant 244cb114-1737-438e-ad4c-2777acdde5d8

done creating tenant service for tenant company-name-sg-1
sql: transaction has already been committed or rolled back
pq: syntax error at or near "-"

Manage Storage Clusters

We need a set of APIs to manage the layout of a storage cluster, which nodes participate in the cluster and how many storage groups are inside the storage cluster

Screen Shot 2019-10-23 at 2 44 25 PM

Tasks:

  • Get a list of Storage Clusters and their details (nodes, drives, storage groups)
  • Get SC usage (sg, tenants, usage)
  • Lock a Storage Cluster. Prevent new SG or Tenants from being added.
  • Get a list of Storage Groups and their details (tenants)
  • Create a new Storage Group inside a Storage Cluster

Implement Main LB router

We need to implement a router that can route to any of the valid tenants on the cluster via it's named services and ports

  • Resolve TENANT-SHORT-NAME.app-domain.com to the proper Tenant identified by the shortname
  • When a Tenant signs up update the routing rules
  • Avoid dropping connections during reconfig

mcs make bucket api returns error if access not set

Error returned 500 if access not specified on make bucket request POST api/v1/buckets
Proposals

  • either we make access required on the request and delete the bucket if something failed after creating it or:
  • we split this into two separate call this requires change on the wireframes

Node capacity/usage

We need a function that queries the registered storage nodes and their drives and figures out how much space is left.

Context deadline exceeded message is shown when no valid dockerhub image is set for new tenant

When you try to create a new tenant with an incorrect / empty dockerhub image, a timeout error is thrown:

"Get "https://dl.min.io/server/minio/release/linux-amd64/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"

Also this error is being sent as a 200 response so the application thinks that everything went OK.

We need to set a default image for these cases and fix the error response code to be something different than 200

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.