Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minio #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions minio/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minio on Kontena

[Minio](https://minio.io) is a distributed object storage server built for cloud applications and devops.

## Install
> Prerequisites: You need to have working [Kontena](http://www.kontena.io) Container Platform installed. If you are new to Kontena, check [quick start guide](http://www.kontena.io/docs/getting-started/quick-start).

Install Kontena Load Balancer stack:

`$ kontena stack install kontena/ingress-lb`

Create volume configuration:

`$ kontena volume create --driver local --scope instance minio-export`

Install Minio stack:

`$ kontena stack install kontena/minio`

This will deploy Minio distributed object storage cluster (4 instances) to your Kontena grid. It can be accessed via Kontena LB using given virtual host: `http(s)://<virtualhost>/`
72 changes: 72 additions & 0 deletions minio/kontena.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
stack: kontena/minio
version: 0.2.0
description: Minio is a distributed object storage server built for cloud applications and devops
variables:
affinity:
type: string
default: label!=no-minio
from:
prompt: Affinity
lb_service:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to have the exposing through LB as optional? Just thinking that do people ALWAYS want to expose this or would there be use cases for only grid internal minio.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But there can be an internal load balancer that isn't exposed to the public internet, right? And I suppose you'll always want to have it in front of the minio cluster.

type: string
from:
service_link:
prompt: Pick a loadbalancer
image: kontena/lb
lb_domain:
type: string
from:
prompt: Virtual host (domain) name for minio
memory_limit:
type: integer
default: 512
from:
prompt: Minio server memory limit (MB)
cache_size:
type: integer
from:
evaluate: ${memory_limit} * 0.8
access_key:
type: string
from:
vault: ${STACK}-access-key
random_string: 20
to:
vault: ${STACK}-access-key
secret_key:
type: string
from:
vault: ${STACK}-secret-key
random_string: 20
to:
vault: ${STACK}-secret-key
services:
server:
image: minio/minio:latest
stateful: true
instances: 4
command: server http://server-1/export/1/ http://server-2/export/2/ http://server-3/export/3/ http://server-4/export/4/
mem_limit: "{{ memory_limit }}m"
health_check:
protocol: tcp
port: 9000
initial_delay: 30
secrets:
- secret: ${STACK}-access-key
name: MINIO_ACCESS_KEY
type: env
- secret: ${STACK}-secret-key
name: MINIO_SECRET_KEY
type: env
environment:
- MINIO_CACHE_SIZE={{ cache_size }}MB
- KONTENA_LB_INTERNAL_PORT=9000
- KONTENA_LB_VIRTUAL_HOSTS={{ lb_domain }}
volumes:
- export:/export
links:
- "{{ lb_service }}"
volumes:
export:
external:
name: ${STACK}-export