From 73bd65236377129de16b9b17c8a55e3fcfeeb3d2 Mon Sep 17 00:00:00 2001 From: Aaron Schlesinger Date: Mon, 7 Dec 2015 12:47:08 -0800 Subject: [PATCH] docs(README.md,_docs/README.md): add install and usage instructions --- README.md | 19 +++++++++++++------ _docs/README.md | 17 ++++++++++++++++- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 56bfd90..e30f81b 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,22 @@ # Deis Minio -This package provides a Minio S3-compatible object storage system inside -of Kubernetes. +This package provides a [Minio](http://minio.io) S3-compatible object storage system on Kubernetes. It can be used as a [Deis](https://deis.com/) component to provide object storage for various other components, but it is flexible enough to be run anywhere else. -- [Minio](http://minio.io) +We provide it as a Docker container, and also provide the following manifests to run it inside [Kubernetes](http://kubernetes.io/): + +- A [replication controller](http://kubernetes.io/v1.1/docs/user-guide/replication-controller.html) to run a server on a single pod +- A [service](http://kubernetes.io/v1.1/docs/user-guide/services.html) to run in front of the replication controller +- [Secret](http://kubernetes.io/v1.1/docs/user-guide/secrets.html)s for: + - User credentials + - Admin credentials + - SSL + +Note: this component currently does not offer persistent storage from the Docker container. ## Installation -You will need Docker and Kubectl to use this package. +The following steps assume that you have the [Docker CLI](https://docs.docker.com/) and [Kubernetes CLI](http://kubernetes.io/v1.1/docs/user-guide/kubectl-overview.html) installed and correctly configured. ``` -$ make build -$ make deploy +make deploy kube-service ``` diff --git a/_docs/README.md b/_docs/README.md index 6b20e54..d70fc42 100644 --- a/_docs/README.md +++ b/_docs/README.md @@ -1,2 +1,17 @@ # Minio on Kubernetes - + +Please see [the top level README](https://github.com/deis/minio/blob/master/README.md) for a description of what this project does. + +# Example Client Usage + +Assuming you've installed the Kubernetes service and replication controller (run `make kube-secrets kube-service kube-rc` to do so), you can access the Minio server via the Kubernetes service IP and port. Assuming you have the Minio [`mc`](https://github.com/minio/mc) CLI, installed in your container, here's how you'd configure the CLI and create a new bucket, all from inside Kubernetes: + +```bash +# The following two commands assume that you've mounted the 'minio-user' secret under /var/run/secrets/object/store. +# If you've mounted the secret elsewhere, adjust as necessary. +ACCESS_KEY_ID=`cat /var/run/secrets/object/store/access-key-id` +ACCESS_SECRET_KEY=`cat /var/run/secrets/object/store/access-secret-key` +BASE_SERVER="http://${DEIS_MINIO_SERVICE_HOST}:${DEIS_MINIO_SERVICE_PORT}" +mc config host add $BASE_SERVER $ACCESS_KEY_ID $ACCESS_KEY_SECRET +mc mb "${BASE_SERVER}/mybucket" +```