chef-server
chef-server copied to clipboard
Vhost
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 (particularlyBookshelf will use path style URLs.bksw_sec.erl
) to pass-in an override to mini_s3:new to construct 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.
Deploy preview for chef-server processing.
Building with commit 1573039a7c6fe283b47f5b797274da28c31ea7b3
https://app.netlify.com/sites/chef-server/deploys/6017da5b46ecb20007a9d75d
Deploy Preview for chef-server processing.
Name | Link |
---|---|
Latest commit | dfb907bd1dffb00c88b7531d49a38f4c82f1a386 |
Latest deploy log | https://app.netlify.com/sites/chef-server/deploys/63628d7d112acd000813c545 |
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
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)
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication