From f47c871eafed2bb862d16ee83db2a1562f1b3aea Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Wed, 12 Oct 2016 17:24:19 +0200 Subject: add regionendpoint parameter for registry s3 --- inventory/byo/hosts.origin.example | 15 +++++++++++++++ roles/openshift_hosted/templates/registry_config.j2 | 3 +++ 2 files changed, 18 insertions(+) diff --git a/inventory/byo/hosts.origin.example b/inventory/byo/hosts.origin.example index 0f0e223ce..1c14002e0 100644 --- a/inventory/byo/hosts.origin.example +++ b/inventory/byo/hosts.origin.example @@ -351,6 +351,21 @@ openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', #openshift_hosted_registry_pullthrough=true #openshift_hosted_registry_acceptschema2=true #openshift_hosted_registry_enforcequota=true +# +# Any S3 service (Minio, ExoScale, ...) +# S3 bucket must already exist. +#openshift_hosted_registry_storage_kind=object +#openshift_hosted_registry_storage_provider=s3 +#openshift_hosted_registry_storage_s3_accesskey=access_key_id +#openshift_hosted_registry_storage_s3_secretkey=secret_access_key +#openshift_hosted_registry_storage_s3_regionendpoint=https;//myendpoint.example.com +#openshift_hosted_registry_storage_s3_bucket=bucket_name +#openshift_hosted_registry_storage_s3_region=bucket_region +#openshift_hosted_registry_storage_s3_chunksize=26214400 +#openshift_hosted_registry_storage_s3_rootdirectory=/registry +#openshift_hosted_registry_pullthrough=true +#openshift_hosted_registry_acceptschema2=true +#openshift_hosted_registry_enforcequota=true # Metrics deployment # See: https://docs.openshift.com/enterprise/latest/install_config/cluster_metrics.html diff --git a/roles/openshift_hosted/templates/registry_config.j2 b/roles/openshift_hosted/templates/registry_config.j2 index cfe7ac81c..2fc38a8cf 100644 --- a/roles/openshift_hosted/templates/registry_config.j2 +++ b/roles/openshift_hosted/templates/registry_config.j2 @@ -13,6 +13,9 @@ storage: accesskey: {{ openshift.hosted.registry.storage.s3.accesskey }} secretkey: {{ openshift.hosted.registry.storage.s3.secretkey }} region: {{ openshift.hosted.registry.storage.s3.region }} +{% if openshift.hosted.registry.storage.s3.regionendpoint %} + regionendpoint: {{ aws_bucket_region_endpoint }} +{% endif -%} bucket: {{ openshift.hosted.registry.storage.s3.bucket }} encrypt: false secure: true -- cgit v1.2.3 From ff70636ff0c08a119d57af6492f9267a7282781e Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Wed, 12 Oct 2016 20:37:28 +0200 Subject: adjustments in docs and j2 template --- inventory/byo/hosts.origin.example | 3 ++- inventory/byo/hosts.ose.example | 16 ++++++++++++++++ roles/openshift_hosted/templates/registry_config.j2 | 4 ++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/inventory/byo/hosts.origin.example b/inventory/byo/hosts.origin.example index 1c14002e0..86a287f14 100644 --- a/inventory/byo/hosts.origin.example +++ b/inventory/byo/hosts.origin.example @@ -352,7 +352,8 @@ openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', #openshift_hosted_registry_acceptschema2=true #openshift_hosted_registry_enforcequota=true # -# Any S3 service (Minio, ExoScale, ...) +# Any S3 service (Minio, ExoScale, ...): Basically the same as above +# but with regionendpoint configured # S3 bucket must already exist. #openshift_hosted_registry_storage_kind=object #openshift_hosted_registry_storage_provider=s3 diff --git a/inventory/byo/hosts.ose.example b/inventory/byo/hosts.ose.example index 2e5b7564d..667ab7ab9 100644 --- a/inventory/byo/hosts.ose.example +++ b/inventory/byo/hosts.ose.example @@ -351,6 +351,22 @@ openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', #openshift_hosted_registry_pullthrough=true #openshift_hosted_registry_acceptschema2=true #openshift_hosted_registry_enforcequota=true +# +# Any S3 service (Minio, ExoScale, ...): Basically the same as above +# but with regionendpoint configured +# S3 bucket must already exist. +#openshift_hosted_registry_storage_kind=object +#openshift_hosted_registry_storage_provider=s3 +#openshift_hosted_registry_storage_s3_accesskey=access_key_id +#openshift_hosted_registry_storage_s3_secretkey=secret_access_key +#openshift_hosted_registry_storage_s3_regionendpoint=https;//myendpoint.example.com +#openshift_hosted_registry_storage_s3_bucket=bucket_name +#openshift_hosted_registry_storage_s3_region=bucket_region +#openshift_hosted_registry_storage_s3_chunksize=26214400 +#openshift_hosted_registry_storage_s3_rootdirectory=/registry +#openshift_hosted_registry_pullthrough=true +#openshift_hosted_registry_acceptschema2=true +#openshift_hosted_registry_enforcequota=true # Metrics deployment # See: https://docs.openshift.com/enterprise/latest/install_config/cluster_metrics.html diff --git a/roles/openshift_hosted/templates/registry_config.j2 b/roles/openshift_hosted/templates/registry_config.j2 index 2fc38a8cf..b60175ccd 100644 --- a/roles/openshift_hosted/templates/registry_config.j2 +++ b/roles/openshift_hosted/templates/registry_config.j2 @@ -13,8 +13,8 @@ storage: accesskey: {{ openshift.hosted.registry.storage.s3.accesskey }} secretkey: {{ openshift.hosted.registry.storage.s3.secretkey }} region: {{ openshift.hosted.registry.storage.s3.region }} -{% if openshift.hosted.registry.storage.s3.regionendpoint %} - regionendpoint: {{ aws_bucket_region_endpoint }} +{% if 'regionendpoint' in openshift.hosted.registry.storage.s3 %} + regionendpoint: {{ openshift.hosted.registry.storage.s3.regionendpoint }} {% endif -%} bucket: {{ openshift.hosted.registry.storage.s3.bucket }} encrypt: false -- cgit v1.2.3 From 412b215c048616b5152d05c8f191f3bf5d99a870 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Thu, 13 Oct 2016 23:00:09 +0200 Subject: revise docs --- inventory/byo/hosts.origin.example | 2 +- inventory/byo/hosts.ose.example | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inventory/byo/hosts.origin.example b/inventory/byo/hosts.origin.example index 86a287f14..04922894b 100644 --- a/inventory/byo/hosts.origin.example +++ b/inventory/byo/hosts.origin.example @@ -359,7 +359,7 @@ openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', #openshift_hosted_registry_storage_provider=s3 #openshift_hosted_registry_storage_s3_accesskey=access_key_id #openshift_hosted_registry_storage_s3_secretkey=secret_access_key -#openshift_hosted_registry_storage_s3_regionendpoint=https;//myendpoint.example.com +#openshift_hosted_registry_storage_s3_regionendpoint=https://myendpoint.example.com/ #openshift_hosted_registry_storage_s3_bucket=bucket_name #openshift_hosted_registry_storage_s3_region=bucket_region #openshift_hosted_registry_storage_s3_chunksize=26214400 diff --git a/inventory/byo/hosts.ose.example b/inventory/byo/hosts.ose.example index 667ab7ab9..fd5c8a5f4 100644 --- a/inventory/byo/hosts.ose.example +++ b/inventory/byo/hosts.ose.example @@ -359,7 +359,7 @@ openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', #openshift_hosted_registry_storage_provider=s3 #openshift_hosted_registry_storage_s3_accesskey=access_key_id #openshift_hosted_registry_storage_s3_secretkey=secret_access_key -#openshift_hosted_registry_storage_s3_regionendpoint=https;//myendpoint.example.com +#openshift_hosted_registry_storage_s3_regionendpoint=https://myendpoint.example.com/ #openshift_hosted_registry_storage_s3_bucket=bucket_name #openshift_hosted_registry_storage_s3_region=bucket_region #openshift_hosted_registry_storage_s3_chunksize=26214400 -- cgit v1.2.3 From a6310c37b86447270449f9f54f53e3d9e9ac5ebb Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Fri, 14 Oct 2016 22:47:22 +0200 Subject: formatting updates in template --- roles/openshift_hosted/templates/registry_config.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/openshift_hosted/templates/registry_config.j2 b/roles/openshift_hosted/templates/registry_config.j2 index b60175ccd..75d8f7fa6 100644 --- a/roles/openshift_hosted/templates/registry_config.j2 +++ b/roles/openshift_hosted/templates/registry_config.j2 @@ -15,7 +15,7 @@ storage: region: {{ openshift.hosted.registry.storage.s3.region }} {% if 'regionendpoint' in openshift.hosted.registry.storage.s3 %} regionendpoint: {{ openshift.hosted.registry.storage.s3.regionendpoint }} -{% endif -%} +{% endif %} bucket: {{ openshift.hosted.registry.storage.s3.bucket }} encrypt: false secure: true -- cgit v1.2.3