From cedbe274cd52ae13a6392634fe6b34620d933c81 Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Fri, 28 Jul 2017 08:27:50 +0300 Subject: [PATCH 1/2] minio --- minio/README.md | 14 +++++++++ minio/kontena.yml | 72 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 minio/README.md create mode 100644 minio/kontena.yml diff --git a/minio/README.md b/minio/README.md new file mode 100644 index 0000000..840e78a --- /dev/null +++ b/minio/README.md @@ -0,0 +1,14 @@ +# 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` + +Install Minio stack +`$ kontena stack install kontena/minio` + +This will deploy Minio distributed object storage cluster (4 instances) to your Kontena grid. diff --git a/minio/kontena.yml b/minio/kontena.yml new file mode 100644 index 0000000..d0e13d8 --- /dev/null +++ b/minio/kontena.yml @@ -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: + 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 \ No newline at end of file From d6a231cc380b48f6d6b09a900f6703fbad6ff2d6 Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Fri, 28 Jul 2017 08:30:08 +0300 Subject: [PATCH 2/2] add volume config to readme --- minio/README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/minio/README.md b/minio/README.md index 840e78a..f085a83 100644 --- a/minio/README.md +++ b/minio/README.md @@ -5,10 +5,16 @@ ## 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 +Install Kontena Load Balancer stack: + `$ kontena stack install kontena/ingress-lb` -Install Minio stack +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. +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):///`