storj.io/minio@v0.0.0-20230509071714-0cbc90f649b1/docs/federation/lookup/README.md (about) 1 *Federation feature is deprecated and should be avoided for future deployments* 2 3 # Federation Quickstart Guide [](https://slack.min.io) 4 This document explains how to configure MinIO with `Bucket lookup from DNS` style federation. 5 6 ## Get started 7 8 ### 1. Prerequisites 9 Install MinIO - [MinIO Quickstart Guide](https://docs.min.io/docs/minio-quickstart-guide). 10 11 ### 2. Run MinIO in federated mode 12 Bucket lookup from DNS federation requires two dependencies 13 14 - etcd (for bucket DNS service records) 15 - CoreDNS (for DNS management based on populated bucket DNS service records, optional) 16 17 ## Architecture 18 19  20 21 ### Environment variables 22 23 #### MINIO_ETCD_ENDPOINTS 24 25 This is comma separated list of etcd servers that you want to use as the MinIO federation back-end. This should 26 be same across the federated deployment, i.e. all the MinIO instances within a federated deployment should use same 27 etcd back-end. 28 29 #### MINIO_DOMAIN 30 31 This is the top level domain name used for the federated setup. This domain name should ideally resolve to a load-balancer 32 running in front of all the federated MinIO instances. The domain name is used to create sub domain entries to etcd. For 33 example, if the domain is set to `domain.com`, the buckets `bucket1`, `bucket2` will be accessible as `bucket1.domain.com` 34 and `bucket2.domain.com`. 35 36 #### MINIO_PUBLIC_IPS 37 38 This is comma separated list of IP addresses to which buckets created on this MinIO instance will resolve to. For example, 39 a bucket `bucket1` created on current MinIO instance will be accessible as `bucket1.domain.com`, and the DNS entry for 40 `bucket1.domain.com` will point to IP address set in `MINIO_PUBLIC_IPS`. 41 42 *Note* 43 44 - This field is mandatory for standalone and erasure code MinIO server deployments, to enable federated mode. 45 - This field is optional for distributed deployments. If you don't set this field in a federated setup, we use the IP addresses of 46 hosts passed to the MinIO server startup and use them for DNS entries. 47 48 ### Run Multiple Clusters 49 50 > cluster1 51 52 ```sh 53 export MINIO_ETCD_ENDPOINTS="http://remote-etcd1:2379,http://remote-etcd2:4001" 54 export MINIO_DOMAIN=domain.com 55 export MINIO_PUBLIC_IPS=44.35.2.1,44.35.2.2,44.35.2.3,44.35.2.4 56 minio server http://rack{1...4}.host{1...4}.domain.com/mnt/export{1...32} 57 ``` 58 59 > cluster2 60 61 ```sh 62 export MINIO_ETCD_ENDPOINTS="http://remote-etcd1:2379,http://remote-etcd2:4001" 63 export MINIO_DOMAIN=domain.com 64 export MINIO_PUBLIC_IPS=44.35.1.1,44.35.1.2,44.35.1.3,44.35.1.4 65 minio server http://rack{5...8}.host{5...8}.domain.com/mnt/export{1...32} 66 ``` 67 68 In this configuration you can see `MINIO_ETCD_ENDPOINTS` points to the etcd backend which manages MinIO's 69 `config.json` and bucket DNS SRV records. `MINIO_DOMAIN` indicates the domain suffix for the bucket which 70 will be used to resolve bucket through DNS. For example if you have a bucket such as `mybucket`, the 71 client can use now `mybucket.domain.com` to directly resolve itself to the right cluster. `MINIO_PUBLIC_IPS` 72 points to the public IP address where each cluster might be accessible, this is unique for each cluster. 73 74 NOTE: `mybucket` only exists on one cluster either `cluster1` or `cluster2` this is random and 75 is decided by how `domain.com` gets resolved, if there is a round-robin DNS on `domain.com` then 76 it is randomized which cluster might provision the bucket. 77 78 ### 3. Upgrading to `etcdv3` API 79 80 Users running MinIO federation from release `RELEASE.2018-06-09T03-43-35Z` to `RELEASE.2018-07-10T01-42-11Z`, should migrate the existing bucket data on etcd server to `etcdv3` API, and update CoreDNS version to `1.2.0` before updating their MinIO server to the latest version. 81 82 Here is some background on why this is needed - MinIO server release `RELEASE.2018-06-09T03-43-35Z` to `RELEASE.2018-07-10T01-42-11Z` used etcdv2 API to store bucket data to etcd server. This was due to `etcdv3` support not available for CoreDNS server. So, even if MinIO used `etcdv3` API to store bucket data, CoreDNS wouldn't be able to read and serve it as DNS records. 83 84 Now that CoreDNS [supports etcdv3](https://coredns.io/2018/07/11/coredns-1.2.0-release/), MinIO server uses `etcdv3` API to store bucket data to etcd server. As `etcdv2` and `etcdv3` APIs are not compatible, data stored using `etcdv2` API is not visible to the `etcdv3` API. So, bucket data stored by previous MinIO version will not be visible to current MinIO version, until a migration is done. 85 86 CoreOS team has documented the steps required to migrate existing data from `etcdv2` to `etcdv3` in [this blog post](https://coreos.com/blog/migrating-applications-etcd-v3.html). Please refer the post and migrate etcd data to `etcdv3` API. 87 88 ### 4. Test your setup 89 90 To test this setup, access the MinIO server via browser or [`mc`](https://docs.min.io/docs/minio-client-quickstart-guide). You’ll see the uploaded files are accessible from the all the MinIO endpoints. 91 92 # Explore Further 93 94 - [Use `mc` with MinIO Server](https://docs.min.io/docs/minio-client-quickstart-guide) 95 - [Use `aws-cli` with MinIO Server](https://docs.min.io/docs/aws-cli-with-minio) 96 - [Use `s3cmd` with MinIO Server](https://docs.min.io/docs/s3cmd-with-minio) 97 - [Use `minio-go` SDK with MinIO Server](https://docs.min.io/docs/golang-client-quickstart-guide) 98 - [The MinIO documentation website](https://docs.min.io)