Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Chef Server distributable under a configurable name - wordmarks in outputs #1949

Open
bobchaos opened this issue Apr 6, 2020 · 4 comments
Labels
Aspect: Packaging Distribution of the projects 'compiled' artifacts. Status: To be prioritized Indicates that product needs to prioritize this issue. Triage: Confirmed Indicates and issue has been confirmed as described.

Comments

@bobchaos
Copy link

bobchaos commented Apr 6, 2020

Motivation

As a Chef Infra redistributor, I would like to be able to redistribute Chef Infra server under a configurable name in order to make 3rd party distributions easier to produce and maintain in compliance with Chef Software's policy on trademarks https://www.chef.io/trademark-policy/

Specification

In other Chef Software repositories, we've adopted an approach wherein we create a file with constants in it (dist.rb in chef/chef) that correspond to Chef's wordmarks. We then replace all user-facing references to the wordmarks in the codebase with the constants. This allows 3rd party distros like Cinc.sh to build the code under new branding by swapping out the dist file and performing minor tweaks to the Omnibus conf.

Another approach also exists for Golang projects. Salim Afiune cooked up a a go code generator that's being implemented in Chef's go projects (see chef/go-libs for a full implementation + the code generator proper). When building, 3rd party distros simply feed a URL to a JSON file with their distro's wordmark replacements into go generate and then run plain old go build.

Original design proposal in chef/chef, which was re-used in multiple projects: chef/chef#8376

Initial PR implementing dist.rb in chef/chef: chef/chef#8368

The go code generator: https://github.com/chef/go-libs/tree/master/distgen

Let me know if I can provide any additional info about existing implementations of dist stuff, or if you want to explore an altogether different approach.

Downstream Impact

Somewhere between "none" and "everything" o.O For example, in chef/chef, we had a few situations that required changes beyond log messages and CLI outputs, such as having to rename the configuration directories. In the client repo, we addressed such concerns as we went, and ultimately managed to avoid breaking changes (altho a few deprecations resulted from the distro work). The bulk of the work should have no impact however, as it consists mostly of string replacements happening outside of logic and flow-control.

@bobchaos bobchaos added the Status: Untriaged An issue that has yet to be triaged. label Apr 6, 2020
@PrajaktaPurohit PrajaktaPurohit added Aspect: Packaging Distribution of the projects 'compiled' artifacts. Status: To be prioritized Indicates that product needs to prioritize this issue. Triage: Confirmed Indicates and issue has been confirmed as described. and removed Status: Untriaged An issue that has yet to be triaged. labels Apr 24, 2020
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Apr 28, 2020
Chef Server distributable under a configurable name. This is a starting
point which replaces most of the instances of `chef-server` and
`chef-sevrer-ctl` within the Ruby code of the Chef Server repo, but
is not a complete fix for chef#1949
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Apr 28, 2020
Add `dist.rb` files with "Wordmark" constants in an attempt to make
Chef Server distributable under a configurable name. This is a starting
point which replaces most of the instances of `chef-server` and
`chef-sevrer-ctl` within the Ruby code of the Chef Server repo, but
is not a complete fix for chef#1949

Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
@jgitlin-p21 jgitlin-p21 mentioned this issue Apr 28, 2020
5 tasks
@jgitlin-p21
Copy link
Contributor

I have created an initial PR for review on this. It builds for me locally, but this is nowhere near a complete fix. Notably missing is anything outside the ruby code, and I focused on replacing chef-server and chef-server-ctl but there are probably many instances of chef still in the codebase which will need additional PRs.

I do not have buildkite set up but I did an Omnibus build and the resulting package appeared to be a fully functional Chef server. I can't get tests to run locally even when just building on the master branch so I may need help there from someone in Slack.

PrajaktaPurohit pushed a commit that referenced this issue Jun 3, 2020
Add `dist.rb` files with "Wordmark" constants in an attempt to make
Chef Server distributable under a configurable name. This is a starting
point which replaces most of the instances of `chef-server` and
`chef-sevrer-ctl` within the Ruby code of the Chef Server repo, but
is not a complete fix for #1949

Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Jun 5, 2020
Add `dist.rb` files with "Wordmark" constants in an attempt to make
Chef Server distributable under a configurable name. This is a starting
point which replaces most of the instances of `chef-server` and
`chef-sevrer-ctl` within the Ruby code of the Chef Server repo, but
is not a complete fix for chef#1949

Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
@jgitlin-p21
Copy link
Contributor

jgitlin-p21 commented Jul 1, 2020

Coming back to this finally. At last check the smoke tests were failing with uninitialized constant Chef::Dist::Server from a recipe at cookbooks/private-chef/recipes/default.rb:25. I had refactored the wordmarks to use a cookbook attribute for everything under cookbooks and am now trying to ensure all tests pass.

Latest work is here: https://github.com/jgitlin-p21/chef-server/tree/jgitlin-p21/wordmarks

jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Aug 12, 2020
Server distributable under a configurable name - wordmarks in outputs.

This pas focuses on `chef-server-ctl` and replaces:

 * `chef` with `#{ChefConfig::Dist::SHORT}`
 * `Chef Server` with `#{Chef::Dist::SERVER_PRODUCT}`

Multiple passes will likely be required; this is a small chunk meant
to be easy to review and test.

This is a combination of 3 commits:

 * f26fdb9
 * 03c8686
 * 7fae6f4

Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Aug 12, 2020
Server distributable under a configurable name - wordmarks in outputs.

This pas focuses on `chef-server-ctl` and replaces:

 * `chef` with `#{ChefConfig::Dist::SHORT}`
 * `Chef Server` with `#{Chef::Dist::SERVER_PRODUCT}`

Multiple passes will likely be required; this is a small chunk meant
to be easy to review and test.

This is a combination of 3 commits:

 * f26fdb9
 * 03c8686
 * 7fae6f4

Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Aug 12, 2020
This is an initial pass of replacements for issue chef#1949: Make Chef
Server distributable under a configurable name - wordmarks in outputs.

This pas focuses on `chef-server-ctl` and replaces:

 * `chef` with `#{ChefConfig::Dist::SHORT}`
 * `Chef Server` with `#{Chef::Dist::SERVER_PRODUCT}`

Multiple passes will likely be required; this is a small chunk meant
to be easy to review and test.

This is a combination of 3 commits:

 * f26fdb9
 * 03c8686
 * 7fae6f4

Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
@jgitlin-p21
Copy link
Contributor

New PR for an initial pass here. Now with passing tests!

jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Sep 9, 2021
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Sep 9, 2021
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Sep 9, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Sep 9, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Sep 9, 2021
…1949)

Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Sep 9, 2021
…1949)

Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Sep 9, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Sep 9, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Sep 9, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Sep 9, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Sep 9, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Sep 9, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
chef#1949)

Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
…ef#1949)

Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
)

Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
…1949)

Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
chef#1949)

Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
…ef#1949)

Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
jgitlin-p21 added a commit to jgitlin-p21/chef-server that referenced this issue Oct 18, 2021
)

Signed-off-by: Josh Gitlin <jgitlin@pinnacle21.com>
PrajaktaPurohit added a commit that referenced this issue Oct 18, 2021
Replace wordmarks in chef-server-ctl (#1949, first pass)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Aspect: Packaging Distribution of the projects 'compiled' artifacts. Status: To be prioritized Indicates that product needs to prioritize this issue. Triage: Confirmed Indicates and issue has been confirmed as described.
Projects
None yet
Development

No branches or pull requests

3 participants