Doc: This patch new guides with titles mentioned below (#2382)
parent
a1f3bf57c7
commit
0c125f3596
@ -0,0 +1,80 @@ |
||||
# How to run multiple Minio server instances on single machine. [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/minio/minio?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) |
||||
|
||||
![minio_MULTISERVER](https://github.com/minio/blob/master/docs/screenshots/multiport.jpeg?raw=true) |
||||
|
||||
|
||||
In this document we will illustrate how to set up multiple Minio server instances on single machine. These Minio servers are running on thier own port, data directory & configuration directory. |
||||
|
||||
## 1. Prerequisites |
||||
|
||||
* Download Minio server from [here](https://docs.minio.io/docs/minio) |
||||
* Download & Install mc from [here](https://docs.minio.io/docs/minio-client-quickstart-guide) |
||||
* Ports should be available for Minio server's use |
||||
|
||||
## 2. Install and Configure Minio Server |
||||
|
||||
Minio server is running on port 9002, 9003, 9004 with associated data directory and configuration file directory. |
||||
|
||||
**Minio server on port ``9002``** |
||||
|
||||
```sh |
||||
$ ./minio -C /home/minio/minio1/.minio server --address 192.168.1.11:9002 minio1/data1/ |
||||
|
||||
Endpoint: http://192.168.1.11:9002 |
||||
AccessKey: XTW9SWKRWYKWE9M9K9RG |
||||
SecretKey: pZehbS5UNrA9BAhYHnWC/QVvQ7vGVge48WGHzG9t |
||||
Region: us-east-1 |
||||
``` |
||||
|
||||
**Minio server on port ``9003``** |
||||
|
||||
```sh |
||||
$ ./minio -C /home/minio/minio2/.minio server --address 192.168.1.11:9003 minio1/data2/ |
||||
|
||||
Endpoint: http://192.168.1.11:9003 |
||||
AccessKey: UTD2WWPJOK754KMZKHWF |
||||
SecretKey: DbikDIY4+wItcexJa4nyrwQC0V2r7kLsK5SsRgHb |
||||
Region: us-east-1 |
||||
``` |
||||
|
||||
**Minio server on port ``9004``** |
||||
|
||||
```sh |
||||
$ ./minio -C /home/minio/minio3/.minio server --address 192.168.1.11:9004 minio1/data3/ |
||||
|
||||
Endpoint: http://192.168.1.11:9004 |
||||
AccessKey: KXLOJ908VEJ2K9RGUFHQ |
||||
SecretKey: LpkeePMtEWAa6payiCovfrNKiFHhABsJhMwGynF8 |
||||
Region: us-east-1 |
||||
``` |
||||
|
||||
This is how directory structure will look like for ``minio1``, replace it with your local setup. |
||||
|
||||
```sh |
||||
$ tree -la minio1/ |
||||
minio1/ |
||||
├── data1 |
||||
└── .minio |
||||
├── certs |
||||
├── config.json |
||||
└── config.json.old |
||||
|
||||
3 directories, 2 files |
||||
|
||||
``` |
||||
**Testing it all** |
||||
|
||||
Using terminal comamnd ``netstat`` we can see ``Minio Server`` is running on different ports on same machine. |
||||
|
||||
```sh |
||||
$ netstat -ntlp | grep minio |
||||
tcp 0 0 192.168.1.11:9002 0.0.0.0:* LISTEN 29573/minio |
||||
tcp 0 0 192.168.1.11:9003 0.0.0.0:* LISTEN 29597/minio |
||||
tcp 0 0 192.168.1.11:9004 0.0.0.0:* LISTEN 29631/minio |
||||
``` |
||||
|
||||
|
||||
# Explore Further |
||||
* [Minio Quickstart Guide](https://docs.minio.io/docs/minio-quickstart-guide) |
||||
* [Minio Client Complete Guide](https://docs.minio.io/docs/minio-client-complete-guide) |
||||
|
@ -0,0 +1,110 @@ |
||||
# Minio Server configuration files Guide [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/minio/minio?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) |
||||
|
||||
In this document we will walk through the configuration files of Minio Server. |
||||
|
||||
## Minio Server configuration directory |
||||
Minio Server configurations are stored in file name ``.minio``. It's a hidden file which resides on user's home directory. |
||||
|
||||
**This how the structure of the directory looks like:** |
||||
|
||||
```sh |
||||
$ tree ~/.minio/ |
||||
/Users/supernova/.minio/ |
||||
├── certs |
||||
├── config.json |
||||
└── config.json.old |
||||
|
||||
1 directory, 2 files |
||||
``` |
||||
### Files and directories. |
||||
|
||||
##### ``certs`` directory |
||||
``certs`` directory stores key & cert information, which are needed to run Minio in ``HTTPS``. You can read more on running Minio with ``HTTPS`` with Let's Encrypt cert with Concert [here](https://docs.minio.io/docs/generate-let-s-encypt-certificate-using-concert-for-minio) |
||||
|
||||
##### ``config.json`` |
||||
config.json is the configuration file for Minio, it gets generated after you install and start Minio. |
||||
|
||||
```sh |
||||
|
||||
$ cat config.json |
||||
{ |
||||
"version": "6", |
||||
"credential": { |
||||
"accessKey": "YI7S1CKXB76RGOGT6R8W", |
||||
"secretKey": "FJ9PWUVNXGPfiI72WMRFepN3LsFgW3MjsxSALroV" |
||||
}, |
||||
"region": "us-east-1", |
||||
"logger": { |
||||
"console": { |
||||
"enable": true, |
||||
"level": "fatal" |
||||
}, |
||||
"file": { |
||||
"enable": false, |
||||
"fileName": "", |
||||
"level": "error" |
||||
}, |
||||
"syslog": { |
||||
"enable": false, |
||||
"address": "", |
||||
"level": "debug" |
||||
} |
||||
}, |
||||
"notify": { |
||||
"amqp": { |
||||
"1": { |
||||
"enable": false, |
||||
"url": "", |
||||
"exchange": "", |
||||
"routineKey": "", |
||||
"exchangeType": "", |
||||
"mandatory": false, |
||||
"immediate": false, |
||||
"durable": false, |
||||
"internal": false, |
||||
"noWait": false, |
||||
"autoDeleted": false |
||||
} |
||||
}, |
||||
"elasticsearch": { |
||||
"1": { |
||||
"enable": false, |
||||
"url": "", |
||||
"index": "" |
||||
} |
||||
}, |
||||
"redis": { |
||||
"1": { |
||||
"enable": false, |
||||
"address": "", |
||||
"password": "", |
||||
"key": "" |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
``` |
||||
|
||||
``version`` : Represents `version` number of current configuration file. |
||||
|
||||
``credential`` : Represents authentication credentials for the server, value is automatically generated upon first server start. |
||||
|
||||
``region`` : Represents deployment region for the server, value defaults to `us-east-1`. |
||||
|
||||
``logger `` : Represents various logging types supported for server error logs, console logger is enabled by default. |
||||
|
||||
``notify``: Represents various notification types supported. These notification types should be configured prior to using bucket |
||||
|
||||
|
||||
##### ``config.json.old`` |
||||
This file keeps previous config file version details. |
||||
|
||||
## Explore Further |
||||
* [Minio Quickstart Guide](https://docs.minio.io/docs/minio-quickstart-guide) |
||||
|
||||
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 29 KiB |
@ -0,0 +1,116 @@ |
||||
# How to use ``mc mirror`` to setup replication between two sites running Minio. [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/minio/minio?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) |
||||
|
||||
![minio_MIRROR](https://raw.githubusercontent.com/minio/blob/master/docs/screenshots/miniomirror.jpeg?raw=true) |
||||
|
||||
|
||||
|
||||
In this document we will illustrate how to set up replication between two Minio servers, `minio1` and `minio2` running on ``192.168.1.11`` and ``192.168.1.12`` respectively. We will mirror the data directory on `minio1` to the bucket on `minio2`. |
||||
|
||||
|
||||
## 1. Prerequisites |
||||
|
||||
* Download Minio server from [here](https://docs.minio.io/docs/minio) |
||||
* Download & Install mc from [here](https://docs.minio.io/docs/minio-client-quickstart-guide) |
||||
* Familiarity with [``mc mirror``](https://docs.minio.io/docs/minio-client-complete-guide#mirror) |
||||
|
||||
## 2. Install and Configure Minio Server |
||||
|
||||
### Setup minio1 |
||||
|
||||
```sh |
||||
$ ./minio server minio1-data/ |
||||
|
||||
Endpoint: http://127.0.0.1:9000 http://192.168.1.11:9000 |
||||
AccessKey: MURIVYBYNPTYE7O8I779 |
||||
SecretKey: lVbZmz4CvGkBl7JKw5icuL7RCcSvpBJTkAJTFQwz |
||||
Region: us-east-1 |
||||
``` |
||||
**mc alias** |
||||
|
||||
Alias is a short name to your cloud storage service for ``Minio client``. End-point, access and secret keys are supplied by your cloud storage provider. API signature is an optional argument. By default, it is set to ``S3v4``. |
||||
|
||||
```sh |
||||
$ ./mc config host add minio1 http://192.168.1.11:9000 MURIVYBYNPTYE7O8I779 lVbZmz4CvGkBl7JKw5icuL7RCcSvpBJTkAJTFQwz |
||||
``` |
||||
|
||||
**Create buckets and add objects** |
||||
|
||||
We have created few buckets using [``mc mb``](https://docs.minio.io/docs/minio-client-complete-guide#mb) and added objects to it using [``mc cp``](https://docs.minio.io/docs/minio-client-complete-guide#cp) Minio client commands. |
||||
|
||||
```sh |
||||
$ ./mc mb minio1/mybucket |
||||
$ ./mc cp myfile.txt minio1/bucket1 |
||||
$ ./mc ls minio1 |
||||
[2016-07-31 10:26:55 PDT] 0B bucket1/ |
||||
[2016-07-31 09:36:17 PDT] 0B bucket2/ |
||||
[2016-07-31 09:38:08 PDT] 0B bucket3/ |
||||
``` |
||||
|
||||
### Setup minio2 |
||||
|
||||
```sh |
||||
$ ./minio server minio2-data/ |
||||
|
||||
Endpoint: http://127.0.0.1:9000 http://192.168.1.12:9000 |
||||
AccessKey: YRDRWWQLEWS9OBJ31GZ2 |
||||
SecretKey: y2sSWzx5ytwvkELcxOuSaQ8n3doNqoIilRpb5Kjj |
||||
Region: us-east-1 |
||||
``` |
||||
|
||||
```sh |
||||
$ ./mc config host add minio2 http://192.168.1.12:9000 YRDRWWQLEWS9OBJ31GZ2 y2sSWzx5ytwvkELcxOuSaQ8n3doNqoIilRpb5Kjj |
||||
``` |
||||
|
||||
**Create bucket** |
||||
|
||||
We are creating destination bucket ``mbucket`` on ``minio2`` and adding ``minio2`` alias. The bucket ``mbucket`` will be used to mirror data directory of ``minio1``. |
||||
|
||||
```sh |
||||
$ ./mc mb minio1/mbucket |
||||
``` |
||||
|
||||
```sh |
||||
$ ./mc config host add minio2 http://192.168.1.12:9000 YRDRWWQLEWS9OBJ31GZ2 y2sSWzx5ytwvkELcxOuSaQ8n3doNqoIilRpb5Kjj |
||||
|
||||
``` |
||||
|
||||
## 4. Setup crontab |
||||
Cron is a Unix/Linux system utility by which you can schedule a task process for particular duration, we have tested this setup on Ubuntu Linux. |
||||
|
||||
|
||||
### Script |
||||
|
||||
Add crontab configuration on `minio1` providing path of data directory, ``minio1-data``. |
||||
|
||||
``--force`` option with ``mc mirror`` overwrites the destination contents, this would keep your contents in sync. |
||||
|
||||
```sh |
||||
|
||||
#!/bin/bash |
||||
datadir="/home/minio/minio1-data/" |
||||
minio2="minio2/mbucket" |
||||
MC_PATH="/home/minio/mc" |
||||
$MC_PATH --quiet mirror --force $minio1 $minio2 |
||||
|
||||
``` |
||||
|
||||
Set executable permissions on the script before adding a cron entry. |
||||
|
||||
```sh |
||||
|
||||
$ chmod 755 /home/minio/minio.sh |
||||
``` |
||||
|
||||
Set a new cron entry to run ``minio.sh`` script once every 30mins. |
||||
|
||||
```sh |
||||
|
||||
$ crontab -e |
||||
*/30 * * * * /home/minio/minio.sh |
||||
``` |
||||
|
||||
Note: We are going to introduce continuous replication feature in `mc mirror` which will enable the sites to be in sync without having the need to setup cron job. |
||||
|
||||
# Explore Further |
||||
* [Minio Quickstart Guide](https://docs.minio.io/docs/minio-quickstart-guide) |
||||
* [Minio Client Complete Guide](https://docs.minio.io/docs/minio-client-complete-guide) |
Loading…
Reference in new issue