Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

Commit df78250

Browse files
Leonardo Loriericarmstrong
authored andcommitted
Ceph Rados Gateway and other S3 compatible APIs
1 parent 22ff2e7 commit df78250

File tree

3 files changed

+48
-2
lines changed

3 files changed

+48
-2
lines changed

README.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,11 @@ AWS Simple Storage Service options
352352
server-side by S3 and will be stored in an encrypted form while at rest
353353
in S3.
354354
1. `s3_secure`: boolean, true for HTTPS to S3
355-
1. `boto_bucket`: string, the bucket name
355+
1. `boto_bucket`: string, the bucket name for *non*-Amazon S3-compliant object store
356+
1. `boto_host`: string, host for *non*-Amazon S3-compliant object store
357+
1. `boto_port`: for *non*-Amazon S3-compliant object store
358+
1. `boto_debug`: for *non*-Amazon S3-compliant object store
359+
1. `boto_calling_format`: for *non*-Amazon S3-compliant object store
356360
1. `storage_path`: string, the sub "folder" where image data will be stored.
357361

358362
Example:
@@ -366,6 +370,23 @@ prod:
366370
s3_secret_key: xdDowwlK7TJajV1Y7EoOZrmuPEJlHYcNP2k4j49T
367371
```
368372

373+
Example *non*-Amazon S3-compliant object store (e.g. Ceph and Riak CS):
374+
```yaml
375+
prod:
376+
storage: s3
377+
s3_bucket: acme-docker
378+
s3_secure: false
379+
s3_encrypt: false
380+
storage_path: /registry
381+
s3_access_key: AKIAHSHB43HS3J92MXZ
382+
s3_secret_key: xdDowwlK7TJajV1Y7EoOZrmuPEJlHYcNP2k4j49T
383+
boto_host: myowns3.com
384+
boto_port: 80
385+
boto_debug: true
386+
boto_calling_format: OrdinaryCallingFormat
387+
388+
```
389+
369390
Run the Registry
370391
----------------
371392

@@ -391,6 +412,26 @@ docker run \
391412
NOTE: The container will try to allocate the port 5000. If the port
392413
is already taken, find out which container is already using it by running `docker ps`
393414
415+
### Other *non*-Amazon S3-compliant object store (e.g. Ceph and Riak CS)
416+
417+
```
418+
docker run \
419+
-e SETTINGS_FLAVOR=s3 \
420+
-e AWS_BUCKET=acme-docker \
421+
-e STORAGE_PATH=/registry \
422+
-e AWS_KEY=AKIAHSHB43HS3J92MXZ \
423+
-e AWS_SECRET=xdDowwlK7TJajV1Y7EoOZrmuPEJlHYcNP2k4j49T \
424+
-e SEARCH_BACKEND=sqlalchemy \
425+
-p 5000:5000 \
426+
-p AWS_HOST=myowns3.com \
427+
-p AWS_SECURE=false \
428+
-p AWS_ENCRYPT=false \
429+
-p AWS_PORT=80 \
430+
-p AWS_DEBUG=true \
431+
-p AWS_CALLING_FORMAT=OrdinaryCallingFormat \
432+
registry
433+
```
434+
394435
### Advanced: install the registry on an existing server
395436
396437
#### On Ubuntu

config/config_sample.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ s3: &s3
8484
s3_secure: _env:AWS_SECURE:true
8585
s3_access_key: _env:AWS_KEY
8686
s3_secret_key: _env:AWS_SECRET
87+
boto_host: _env:AWS_HOST
88+
boto_port: _env:AWS_PORT
89+
boto_debug: _env:AWS_DEBUG
90+
boto_calling_format: _env:AWS_CALLING_FORMAT
8791

8892
# Google Cloud Storage Configuration
8993
# See:

depends/docker-registry-core/docker_registry/core/boto.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ def _build_connection_params(self):
139139
config_args = [
140140
'host', 'port', 'debug',
141141
'proxy', 'proxy_port',
142-
'proxy_user', 'proxy_pass'
142+
'proxy_user', 'proxy_pass',
143+
'calling_format'
143144
]
144145
for arg in config_args:
145146
confkey = 'boto_' + arg

0 commit comments

Comments
 (0)