chef-server icon indicating copy to clipboard operation
chef-server copied to clipboard

Vhost

Open lbakerchef opened this issue 4 years ago • 3 comments

Issues Resolved

https://github.com/chef/chef-server/issues/2088

Proposed Solution

When configured to use Bookshelf, create path-style URLs. When configured to use S3, create vhost-style URLs.

Rationale

Minimize required modifications to Bookshelf. Bookshelf currently uses path-style URLs, and would continue to use path-style URLs.

Implementation

  • Modify mini_s3:new to construct vhost-style URLs by default. This would allow for vhost-style URLS when configured for S3.
  • Modify Bookshelf (particularly bksw_sec.erl) to pass-in an override to mini_s3:new to construct path-style URLs. Bookshelf will use path style URLs.
  • Read the bookshelf['enable'] config value and use it to select vhost or path-style URLs where necessary (bookshelf enabled = path-style URLs, bookshelf disabled = vhost-style URLs).

Update

Amazon: "Update (September 23, 2020) – Over the last year, we’ve heard feedback from many customers who have asked us to extend the deprecation date. Based on this feedback we have decided to delay the deprecation of path-style URLs to ensure that customers have the time that they need to transition to virtual hosted-style URLs.

We have also heard feedback from customers that virtual hosted-style URLs should support buckets that have dots in their names for compatibility reasons, so we’re working on developing that support. Once we do, we will provide at least one full year prior to deprecating support for path-style URLs for new buckets."

Tests

https://buildkite.com/chef/chef-chef-server-master-omnibus-adhoc/builds/1833#02060477-4ce7-4576-906b-a4f40d35f84e https://buildkite.com/chef/chef-umbrella-master-chef-server/builds/92#6e485022-5f8c-48fe-a4cc-349fcdf8412f

Configured for S3 as backing store:

Finished in 19 minutes 39 seconds (files took 3.27 seconds to load)
5195 examples, 0 failures, 128 pending

Instructions

Merge AFTER lbaker/sigv4-bookshelf has been merged.

lbakerchef avatar Oct 23 '20 07:10 lbakerchef

Deploy preview for chef-server processing.

Building with commit 1573039a7c6fe283b47f5b797274da28c31ea7b3

https://app.netlify.com/sites/chef-server/deploys/6017da5b46ecb20007a9d75d

netlify[bot] avatar Jan 13 '21 20:01 netlify[bot]

Deploy Preview for chef-server processing.

Name Link
Latest commit dfb907bd1dffb00c88b7531d49a38f4c82f1a386
Latest deploy log https://app.netlify.com/sites/chef-server/deploys/63628d7d112acd000813c545

netlify[bot] avatar Sep 28 '22 04:09 netlify[bot]

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Sep 28 '22 05:09 sonarqubecloud[bot]

UMBRELLA TESTS main against bookshelf (for comparison): https://buildkite.com/chef/chef-umbrella-main-chef-server-full/builds/357 vhost against bookshelf: https://buildkite.com/chef/chef-umbrella-main-chef-server-full/builds/364 main against s3 (for comparison): https://buildkite.com/chef/chef-umbrella-main-chef-server-full/builds/358 vhost against S3: https://buildkite.com/chef/chef-umbrella-main-chef-server-full/builds/365 (edited)

lbakerchef avatar Nov 02 '22 01:11 lbakerchef

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Nov 02 '22 15:11 sonarqubecloud[bot]