xip.io is a domain name that provides wildcard DNS for any IP address. This provides an easy way to use subdomain-style buckets, without needing to add an entry to your DNS server (or hosts file) for every bucket.
Using xip.io with StorReduce
Go to the Amazon EC2 Management Console and find the public IP address for your instance. Then add “.xip.io” to the end to get a DNS name that will resolve to that IP address. For example:
Without changing any server configuration you can then browse to the StorReduce dashboard using a URL like this:
(Note that you will need to add the
/storreduce-dashboard on the end yourself until StorReduce is configured to know about this domain.)
In order to use the S3 API via this URL you must configure StorReduce to respond to the xip.io domain:
Log in to the StorReduce dashboard and click on the Settings tab.
Go to the hostname setting (under the Network section) and add your xip.io domain to the comma-separated list of domains. To ensure continued connectivity to your StorReduce server we suggest you do not remove any of the existing hostsnames from this setting. Do not put a space after the comma.
Save Settings & Restart Server
You can then prefix your xip.io address with any bucket name to refer to that bucket as a subdomain. This is useful for tools that require use of the subdomain syntax for buckets, such as older versions of s3cmd). For example:
Configuring s3cmd to work with StorReduce and xip.io
Here are some example settings from an s3cmd config file, for use with xip.io and StorReduce:
[default] access_key = ABCDEFGHIJKLMNOPQRST secret_key = abcDEFgHIJKLmno/pQRSTIvwxyZ01234567890+A host_base = 184.108.40.206.xip.io host_bucket = %(bucket)s.220.127.116.11.xip.io
Using s3cmd with this config we can then look around and fetch a file from StorReduce:
$ s3cmd -c $HOME/.sr-s3cfg ls 2015-01-23 00:10 s3://my-bucket-1 $ s3cmd -c $HOME/.sr-s3cfg ls s3://my-bucket-1 2015-01-23 00:15 6941544 s3://my-bucket-1/second-copy-node.exe 2015-01-23 00:13 6941544 s3://my-bucket-1/test-file-node.exe $ s3cmd -c $HOME/.sr-s3cfg get s3://my-bucket-1/test-file-node.exe s3://my-bucket-1/test-file-node.exe -> ./test-file-node.exe [1 of 1] 6941544 of 6941544 100% in 25s 267.90 kB/s done